Compare commits

..

1 Commits

Author SHA1 Message Date
Bryan Petty
1cedeb5c04 This commit was manufactured by cvs2svn to create tag 'old_debug'.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/old_debug@217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-10 10:39:48 +00:00
2159 changed files with 306790 additions and 63289 deletions

167
Makefile Normal file
View File

@@ -0,0 +1,167 @@
# Top-level Makefile for wxGTK by Wolfram Gloger
# based on the version for wx-Xt by Martin Sperl
SHELL=/bin/sh
#if DIRS are defind make only executes in these diretories
all::
@if test "x$(DIRS)" = x; then \
for i in src samples utils user; do \
echo "entering directory $$i building $@"; \
(cd $$i; ${MAKE} -k $@); \
done; \
else \
for i in $(DIRS) xxx; do \
if test "$$i" != xxx; then \
echo "entering directory $$i building $@"; \
(cd $$i; ${MAKE} -k $@); \
fi; \
done; \
fi
# what to do if a target is not understood:
# pass it on to all the children...
.DEFAULT::
@if test "x$(DIRS)" = x; then \
for i in src samples utils user; do \
echo "entering directory $$i building $@"; \
(cd $$i; ${MAKE} -k $@); \
done; \
else \
for i in $(DIRS) xxx; do \
if test "$$i" != xxx; then \
echo "entering directory $$i building $@"; \
(cd $$i; ${MAKE} -k $@); \
fi; \
done; \
fi
src::
@echo "entering directory src building all"
@cd src; ${MAKE} all
samples::
@echo "entering directory samples building all"
@cd samples; ${MAKE} all
utils::
@echo "entering directory utils building all"
@cd utils; ${MAKE} all
user::
@echo "entering directory user building all"
@cd user; ${MAKE} all
# the following ones recreate all Makefiles.
makefiles:: recreate
Makefiles:: recreate
recreate::
@src/gtk/setup/general/createall
# the following ones define what needs to be done to distribute the
# library and its components
distribute:: distrib
distrib:: distrib_base distrib_user join_utils join_samples
distrib_samples::
@echo "entering directory samples creating distribution files"
@(cd samples; ${MAKE} -k distrib)
distrib_user::
@echo "entering directory user creating distribution files"
@(cd user; ${MAKE} -k distrib)
distrib_utils::
@echo "entering directory utils creating distribution files"
@(cd utils; ${MAKE} -k distrib)
join_utils:: distrib_utils
@$(MAKE) join \
BASEDIR=utils \
FILES=`echo distrib/utils/*.tgz `
join_samples:: distrib_samples
@$(MAKE) join \
BASEDIR=samples \
FILES=`echo distrib/samples/*.tgz `
join_user:: distrib_user
@$(MAKE) join \
BASEDIR=user \
FILES=`echo distrib/user/*.tgz `
join::
@# needed are BASEDIR and FILES
@if test "x$$BASEDIR" = x; then\
echo "BASEDIR not specified.";\
exit -1;\
fi
@if test "x$$FILES" != x ; then \
echo "putting all seperate distribution files:";\
echo "$$FILES";\
echo "into distrib/$(BASEDIR).tgz";\
src/gtk/setup/general/jointar $(BASEDIR) $$FILES distrib/$(BASEDIR).tgz; \
else \
echo "Nothing to join - deleting..."; \
echo "This may be the case, if you have not specified FILES."\
rm -f distrib/$(BASEDIR).tgz; \
fi
distrib_base::
@if test ! -d distrib ; then mkdir distrib; fi;
@if test ! -f system.list ; then \
echo "dummy" > system.list;\
fi
@(curr=`pwd`; direc=`basename $$curr`;\
(cd ..; \
echo creating distrib/$$direc.tar from the current directory;\
tar -cf /tmp/$$direc.tar \
$$direc/COPYING\
$$direc/INSTALL\
$$direc/Makefile\
$$direc/template.mak\
$$direc/configure\
$$direc/configure.in\
$$direc/config.guess\
$$direc/config.sub\
$$direc/install-sh\
$$direc/user/Makefile \
$$direc/utils/Makefile \
$$direc/samples/Makefile \
;\
sed "s|^\(.*\)$$|/\1/|g" $$direc/system.list \
| uniq > /tmp/$$direc.list; \
echo "/RCS/" >> /tmp/$$direc.list; \
for each in misc docs wx src setup; do \
tar -uf /tmp/$$direc.tar \
`\
find $$direc/$$each \( -type f -o -type l \) -print \
| fgrep -vf /tmp/$$direc.list \
| grep -v "[~#]$$" \
` ;\
done; \
echo compressing $$direc.tar to $$direc.tgz;\
gzip -9 -c /tmp/$$direc.tar > $$direc/distrib/$$direc.tgz;\
rm /tmp/$$direc.tar /tmp/$$direc.list;\
)\
)
# the following ones are only needed if configure.in has changed
# and needs to be updated...
config:: configure
configure::
@autoconf
@cat configure \
| sed "s/config.cache/\$$OSTYPE.config.cache/g" \
| sed "s/config.status/\$$OSTYPE.config.status/g" \
| sed "s/\*\*--/ --/g" \
> configure1
@chmod a+x configure1
@mv configure1 configure

52
TODO.txt Normal file
View File

@@ -0,0 +1,52 @@
********************* TODO list for wxWindows 2 ******************************
The items are grouped by platform (generic, MSW, GTK...) and inside by
subject. The first 2 columns containg the following codes:
Priority classification: Amount of work expected:
9 next point release q quick fix
8 next release s small change
7 as soon as possible l a little work
6 soon w some work
5 should be included b big change
4 nice to have m major change
3 consider including ? don't know how to fix
2 maybe not - unclassified
1 probably not
- unclassified
After the subject the name in brackets indicates the person who is going to do
it.
=============================== common ========================================
4w wxString optimization (VZ)
allocate more memory than needed to avoid reallocation each time when
operator+ or += is used.
6b stream classes (VZ)
=============================== generic ======================================
7s wxTreeCtrl root item (RR)
root item is not shown currently (unlike in MSW version)
5w wxImageList
it's not implemented currently, to do (assuming that all images have the
same size - no resizing should be done to simplify the job)
================================ MSW ==========================================
7w consistent keyboard interface and focus behaviour (VZ)
currently, the focus is lost all the time (after a MessageBox, for example)
and sometimes TABbing through controls doesn't work
================================ GTK ==========================================
9m keyboard interface (RR)
TAB traversal, Alt-letter accelerators for the controls and accelerators
for menu items - TODO.
3b wxTreeCtrl native implementation?
GTK has a GtkCTree widget which seems to be quite close to the Windows
standard control - what about writing a native wxTreeCtrl based on it?

85
distrib/msw/docsrc.rsp Normal file
View File

@@ -0,0 +1,85 @@
docs/latex/wx/*.tex
docs/latex/wx/*.sty
docs/latex/wx/*.bib
docs/latex/wx/*.hpj
docs/latex/wx/*.ini
docs/latex/wx/*.txt
docs/latex/wx/*.cnt
docs/latex/wx/*.eps
docs/latex/wx/*.bmp
docs/latex/wx/*.gif
docs/latex/wx/*.wmf
docs/latex/porting/*.tex
docs/latex/porting/*.sty
docs/latex/porting/*.bib
docs/latex/porting/*.hpj
docs/latex/porting/*.ini
docs/latex/porting/*.txt
docs/latex/porting/*.cnt
docs/latex/porting/*.eps
docs/latex/porting/*.gif
docs/latex/porting/*.bmp
utils/wxhelp/docs/*.tex
utils/wxhelp/docs/*.txt
utils/wxhelp/docs/*.hpj
utils/wxhelp/docs/*.ini
utils/wxhelp/docs/*.bmp
utils/wxhelp/docs/*.wmf
utils/wxhelp/docs/*.gif
utils/tex2rtf/docs/*.tex
utils/tex2rtf/docs/*.txt
utils/tex2rtf/docs/*.hpj
utils/tex2rtf/docs/*.bib
utils/tex2rtf/docs/*.ini
utils/tex2rtf/docs/*.sty
utils/tex2rtf/docs/*.bmp
utils/tex2rtf/docs/*.shg
utils/tex2rtf/docs/*.wmf
utils/tex2rtf/docs/*.gif
utils/wxtree/docs/*.tex
utils/wxtree/docs/*.ini
utils/wxtree/docs/*.bib
utils/wxtree/docs/*.txt
utils/wxtree/docs/*.hpj
utils/wxtree/docs/*.bmp
utils/wxtree/docs/*.wmf
utils/wxtree/docs/*.gif
utils/wxgraph/docs/*.tex
utils/wxgraph/docs/*.ini
utils/wxgraph/docs/*.bib
utils/wxgraph/docs/*.txt
utils/wxgraph/docs/*.hpj
utils/wxgraph/docs/*.bmp
utils/wxgraph/docs/*.wmf
utils/wxgraph/docs/*.gif
utils/mfutils/docs/*.tex
utils/mfutils/docs/*.txt
utils/mfutils/docs/*.hpj
utils/mfutils/docs/*.wmf
utils/mfutils/docs/*.bmp
utils/wxprop/docs/*.txt
utils/wxprop/docs/*.hpj
utils/wxprop/docs/*.tex
utils/wxprop/docs/*.ini
utils/wxprop/docs/*.eps
utils/wxprop/docs/*.bmp
utils/wxprop/docs/*.wmf
utils/wxprop/docs/*.gif
utils/dialoged/docs/*.txt
utils/dialoged/docs/*.hpj
utils/dialoged/docs/*.tex
utils/dialoged/docs/*.ini
utils/dialoged/docs/*.eps
utils/dialoged/docs/*.bmp
utils/dialoged/docs/*.wmf
utils/dialoged/docs/*.gif

540
distrib/msw/generic.rsp Normal file
View File

@@ -0,0 +1,540 @@
distrib/*.*
docs/readme.txt
docs/install.txt
docs/release.txt
docs/changes.txt
docs/upgrade.txt
docs/todo.txt
docs/licence.txt
docs/symbols.txt
src/common/*.cpp
src/common/dosyacc.c
src/common/doslex.c
src/common/vmsyacc.c
src/common/vmslex.c
src/common/extended.c
src/common/*.l
src/common/*.y
src/common/*.inc
src/generic/*.cpp
src/generic/*.c
src/generic/*.inc
src/png/*.c
src/png/*.h
src/png/makefile.*
src/png/INSTALL
src/png/CHANGES
src/png/README
src/png/TODO
src/png/*.1
src/png/*.3
src/png/*.5
src/png/scripts/*
src/zlib/*.c
src/zlib/*.h
src/zlib/INDEX
src/zlib/README
src/zlib/ChangeLog
src/zlib/configure
src/zlib/*.txt
src/zlib/makefile.*
src/zlib/*.com
src/zlib/*.3
src/zlib/*.mms
include/wx/*.h
include/wx/wx_setup.vms
include/wx/common/*.h
include/wx/generic/*.h
lib/dummy
bin/*.*
tools/gettext/*.*
bitmaps/xpm/16x16/*.*
bitmaps/xpm/32x32/*.*
bitmaps/xpm/64x64/*.*
bitmaps/xpm/misc/*.*
bitmaps/*.*
bitmaps/bmp/16x15/*.*
bitmaps/bmp/10x8/*.*
bitmaps/ico/32x32/*.*
afm/*.*
utils/*.txt
utils/make*.*
utils/xpmshow/src/makefile.*
utils/xpmshow/src/*.cpp
utils/xpmshow/src/*.h
utils/xpmshow/src/*.def
utils/xpmshow/src/*.rc
utils/xpmshow/src/*.xpm
utils/xpmshow/src/*.bmp
utils/xpmshow/src/*.ico
utils/wxhelp/src/*.cpp
utils/wxhelp/src/*.h
utils/wxhelp/src/makefile.*
utils/wxhelp/src/*.xbm
utils/wxhelp/src/*.txt
utils/wxhelp/src/*.ico
utils/wxhelp/src/*.def
utils/wxhelp/src/*.rc
utils/tex2rtf/src/wxwin/*.*
utils/tex2rtf/src/*.cpp
utils/tex2rtf/src/*.h
utils/tex2rtf/src/make*.*
utils/tex2rtf/src/*.xbm
utils/tex2rtf/src/*.sty
utils/tex2rtf/src/*.ini
utils/tex2rtf/src/*.inf
utils/tex2rtf/lib/dummy
utils/tex2rtf/src/*.bmp
utils/tex2rtf/src/*.ico
utils/tex2rtf/src/*.def
utils/tex2rtf/src/*.rc
utils/tex2rtf/tools/lacheck/*.*
utils/tex2rtf/tools/tcheck/*.awk
utils/tex2rtf/tools/tcheck/*.pl
utils/tex2rtf/tools/tcheck/*.bat
utils/wxtree/src/*.cpp
utils/wxtree/src/*.h
utils/wxtree/src/makefile.*
utils/wxtree/src/*.xbm
utils/wxtree/lib/dummy
utils/wxtree/src/*.ico
utils/wxtree/src/*.def
utils/wxtree/src/*.rc
utils/wxgraph/src/*.cpp
utils/wxgraph/src/*.c
utils/wxgraph/src/*.h
utils/wxgraph/src/makefile.*
utils/wxgraph/src/*.xbm
utils/wxgraph/lib/dummy
utils/wxgraph/src/*.ico
utils/wxgraph/src/*.def
utils/wxgraph/src/*.rc
utils/mfutils/src/*.cpp
utils/mfutils/src/*.h
utils/mfutils/src/*.rc
utils/mfutils/src/*.def
utils/mfutils/src/makefile.*
utils/mfutils/src/*.txt
utils/mfutils/lib/dummy
utils/mfutils/src/*.ico
utils/mfutils/src/*.def
utils/mfutils/src/*.bmp
utils/mfutils/src/*.ico
utils/rcparser/src/*.cpp
utils/rcparser/src/*.c
utils/rcparser/src/*.h
utils/rcparser/src/makefile.*
utils/rcparser/src/*.xbm
utils/rcparser/lib/dummy
utils/rcparser/src/*.ico
utils/rcparser/src/*.def
utils/rcparser/src/*.rc
utils/rcparser/src/*.rh
utils/colours/*.h
utils/colours/*.cpp
utils/colours/*.def
utils/colours/*.rc
utils/colours/makefile.*
utils/colours/*.xbm
utils/colours/*.txt
utils/wxprop/src/*.h
utils/wxprop/src/*.cpp
utils/wxprop/src/*.def
utils/wxprop/src/*.rc
utils/wxprop/src/makefile.*
utils/wxprop/src/*.xbm
utils/wxprop/src/*.txt
utils/wxprop/src/*.ico
utils/wxprop/src/*.bmp
utils/wxprop/lib/dummy
utils/dialoged/src/bitmaps/*.xbm
utils/dialoged/src/*.h
utils/dialoged/src/*.cpp
utils/dialoged/src/*.def
utils/dialoged/src/*.rc
utils/dialoged/src/makefile.*
utils/dialoged/src/*.xbm
utils/dialoged/src/*.txt
utils/dialoged/src/*.inf
utils/dialoged/test/*.h
utils/dialoged/src/*.ico
utils/dialoged/src/*.prj
utils/dialoged/src/*.bmp
utils/dialoged/src/bitmaps/*.bmp
utils/dialoged/src/bitmaps/*.ico
utils/dialoged/test/*.cpp
utils/dialoged/test/*.def
utils/dialoged/test/*.rc
utils/dialoged/test/makefile.*
utils/dialoged/lib/dummy
utils/dialoged/test/*.ico
utils/dialoged/test/*.prj
utils/dialoged/test/*.bmp
samples/*.txt
samples/makefile.*
samples/hello/*.cpp
samples/hello/*.h
samples/hello/*.def
samples/hello/makefile.*
samples/hello/*.xbm
samples/hello/*.txt
samples/hello/*.ico
samples/hello/*.bmp
samples/hello/*.rc
samples/hello/*.wav
samples/dynamic/*.cpp
samples/dynamic/*.h
samples/dynamic/*.def
samples/dynamic/makefile.*
samples/dynamic/*.xbm
samples/dynamic/*.txt
samples/dynamic/*.ico
samples/dynamic/*.bmp
samples/dynamic/*.rc
samples/dynamic/*.wav
samples/bombs/*.cpp
samples/bombs/*.h
samples/bombs/*.def
samples/bombs/makefile.*
samples/bombs/*.xbm
samples/bombs/*.txt
samples/bombs/*.ico
samples/bombs/*.bmp
samples/bombs/*.rc
samples/ipc/*.cpp
samples/ipc/*.h
samples/ipc/*.def
samples/ipc/makefile.*
samples/ipc/*.xbm
samples/ipc/*.ico
samples/ipc/*.rc
samples/types/*.cpp
samples/types/*.h
samples/types/*.def
samples/types/*.rc
samples/types/*.txt
samples/types/makefile.*
samples/types/*.xbm
samples/types/*.ico
samples/resource/*.cpp
samples/resource/*.h
samples/resource/*.def
samples/resource/*.rc
samples/resource/*.txt
samples/resource/*.wxr
samples/resource/makefile.*
samples/resource/*.xbm
samples/resource/*.ico
samples/animate/*.cpp
samples/animate/*.h
samples/animate/*.def
samples/animate/makefile.*
samples/animate/*.xbm
samples/animate/*.ico
samples/animate/*.rc
samples/mdi/*.cpp
samples/mdi/*.h
samples/mdi/*.def
samples/mdi/makefile.*
samples/mdi/*.xbm
samples/mdi/*.ico
samples/mdi/*.rc
samples/mdi/bitmaps/*.bmp
samples/mdi/bitmaps/*.ico
samples/minimal/*.cpp
samples/minimal/*.h
samples/minimal/*.def
samples/minimal/makefile.*
samples/minimal/*.xbm
samples/minimal/*.ico
samples/minimal/*.rc
samples/controls/*.cpp
samples/controls/*.h
samples/controls/*.def
samples/controls/makefile.*
samples/controls/*.xbm
samples/controls/*.ico
samples/controls/*.bmp
samples/controls/*.rc
samples/fractal/*.cpp
samples/fractal/*.h
samples/fractal/*.def
samples/fractal/makefile.*
samples/fractal/*.xbm
samples/fractal/*.ico
samples/fractal/*.rc
samples/layout/*.cpp
samples/layout/*.h
samples/layout/*.def
samples/layout/makefile.*
samples/layout/*.xbm
samples/layout/*.ico
samples/layout/*.rc
samples/layout/*.bmp
samples/layout/*.xpm
samples/printing/*.cpp
samples/printing/*.h
samples/printing/*.def
samples/printing/makefile.*
samples/printing/*.xbm
samples/printing/*.txt
samples/printing/*.ico
samples/printing/*.bmp
samples/printing/*.rc
samples/tbarsmpl/*.cpp
samples/tbarsmpl/*.h
samples/tbarsmpl/*.def
samples/tbarsmpl/makefile.*
samples/tbarsmpl/*.txt
samples/tbarsmpl/*.xbm
samples/tbarsmpl/bitmaps/*.xbm
samples/tbarsmpl/*.ico
samples/tbarsmpl/*.bmp
samples/tbarsmpl/*.rc
samples/tbarsmpl/bitmaps/*.bmp
samples/tbar95/*.cpp
samples/tbar95/*.h
samples/tbar95/*.def
samples/tbar95/makefile.*
samples/tbar95/*.txt
samples/tbar95/*.xbm
samples/tbar95/bitmaps/*.xbm
samples/tbar95/*.ico
samples/tbar95/*.bmp
samples/tbar95/*.rc
samples/tbar95/bitmaps/*.bmp
samples/tbarmsw/*.cpp
samples/tbarmsw/*.h
samples/tbarmsw/*.def
samples/tbarmsw/makefile.*
samples/tbarmsw/*.txt
samples/tbarmsw/*.xbm
samples/tbarmsw/bitmaps/*.xbm
samples/tbarmsw/*.ico
samples/tbarmsw/*.bmp
samples/tbarmsw/*.rc
samples/tbarmsw/bitmaps/*.bmp
samples/docview/*.h
samples/docview/*.cpp
samples/docview/*.def
samples/docview/*.rc
samples/docview/makefile.*
samples/docview/*.xbm
samples/docview/*.txt
samples/docview/*.ico
samples/docview/*.bmp
samples/memcheck/*.h
samples/memcheck/*.cpp
samples/memcheck/*.def
samples/memcheck/*.rc
samples/memcheck/makefile.*
samples/memcheck/*.xbm
samples/memcheck/*.txt
samples/memcheck/*.ico
samples/memcheck/*.bmp
samples/odbc/*.h
samples/odbc/*.cpp
samples/odbc/*.def
samples/odbc/*.rc
samples/odbc/makefile.*
samples/odbc/*.inf
samples/odbc/*.xbm
samples/odbc/*.ico
samples/odbc/*.bmp
samples/odbc/*.dbf
samples/odbc/*.cdx
samples/odbc/odbc32.lib
samples/dialogs/*.h
samples/dialogs/*.cpp
samples/dialogs/*.def
samples/dialogs/*.rc
samples/dialogs/makefile.*
samples/dialogs/*.xbm
samples/dialogs/*.txt
samples/dialogs/*.bmp
samples/dialogs/*.ico
samples/wxpoem/*.cpp
samples/wxpoem/*.h
samples/wxpoem/*.def
samples/wxpoem/*.rc
samples/wxpoem/*.inf
samples/wxpoem/*.txt
samples/wxpoem/makefile.*
samples/wxpoem/*.xbm
samples/wxpoem/*.ico
samples/wxpoem/*.bmp
samples/wxpoem/*.dat
samples/pressup/*.cpp
samples/pressup/*.c
samples/pressup/*.h
samples/pressup/*.def
samples/pressup/*.rc
samples/pressup/*.inf
samples/pressup/*.txt
samples/pressup/makefile.*
samples/pressup/*.xbm
samples/pressup/*.ico
samples/pressup/*.bmp
samples/validate/*.cpp
samples/validate/*.h
samples/validate/*.def
samples/validate/*.rc
samples/validate/*.inf
samples/validate/*.txt
samples/validate/makefile.*
samples/validate/*.xbm
samples/validate/*.ico
samples/validate/*.bmp
samples/events/*.cpp
samples/events/*.h
samples/events/*.def
samples/events/*.rc
samples/events/*.inf
samples/events/*.txt
samples/events/makefile.*
samples/events/*.xbm
samples/events/*.ico
samples/events/*.bmp
samples/treectrl/*.cpp
samples/treectrl/*.h
samples/treectrl/*.def
samples/treectrl/*.rc
samples/treectrl/*.txt
samples/treectrl/makefile.*
samples/treectrl/*.xbm
samples/treectrl/bitmaps/*.xbm
samples/treectrl/*.ico
samples/treectrl/*.bmp
samples/treectrl/bitmaps/*.bmp
samples/treectrl/bitmaps/*.ico
samples/listctrl/*.cpp
samples/listctrl/*.h
samples/listctrl/*.def
samples/listctrl/*.rc
samples/listctrl/*.txt
samples/listctrl/makefile.*
samples/listctrl/*.xbm
samples/listctrl/bitmaps/*.xbm
samples/listctrl/*.ico
samples/listctrl/*.bmp
samples/listctrl/bitmaps/*.bmp
samples/listctrl/bitmaps/*.ico
samples/splitter/*.cpp
samples/splitter/*.h
samples/splitter/*.def
samples/splitter/*.rc
samples/splitter/*.txt
samples/splitter/makefile.*
samples/splitter/*.xbm
samples/splitter/*.ico
samples/splitter/*.bmp
samples/grid/*.cpp
samples/grid/*.h
samples/grid/*.def
samples/grid/*.rc
samples/grid/*.txt
samples/grid/makefile.*
samples/grid/*.xbm
samples/grid/*.ico
samples/grid/*.bmp
samples/internat/*.cpp
samples/internat/*.h
samples/internat/*.def
samples/internat/*.rc
samples/internat/*.txt
samples/internat/makefile.*
samples/internat/*.xbm
samples/internat/*.po
samples/internat/*.ico
samples/internat/*.bmp
samples/internat/*.mo
samples/checklst/*.cpp
samples/checklst/*.h
samples/checklst/*.def
samples/checklst/*.rc
samples/checklst/*.txt
samples/checklst/makefile.*
samples/checklst/*.xbm
samples/checklst/*.ico
samples/checklst/*.bmp
samples/dnd/*.cpp
samples/dnd/*.h
samples/dnd/makefile.*
samples/dnd/*.rc
samples/dnd/*.def
samples/dnd/*.bmp
samples/dnd/*.ico
samples/dnd/*.txt
samples/tab/*.cpp
samples/tab/*.h
samples/tab/makefile.*
samples/tab/*.rc
samples/tab/*.def
samples/tab/*.bmp
samples/tab/*.ico
samples/tab/*.txt
samples/png/*.cpp
samples/png/*.h
samples/png/makefile.*
samples/png/*.rc
samples/png/*.def
samples/png/*.bmp
samples/png/*.ico
samples/png/*.txt
samples/png/*.png

129
distrib/msw/msw.rsp Normal file
View File

@@ -0,0 +1,129 @@
docs/msw/*.txt
src/makeb32.env
src/makebcc.env
src/makemsw.env
src/makewat.env
src/makesc.env
src/makeg95.env
src/makem95.env
src/ntwxwin.mak
src/makefile.bcc
src/makefile.dos
src/makefile.nt
src/*.bat
src/common/dosyacc.c
src/common/doslex.c
src/msw/*.cpp
src/msw/*.h
src/msw/makefile.*
src/msw/*.lst
src/msw/*.def
src/msw/*.inc
src/msw/ctl3d/*.*
src/msw/ctl3d/msvc/*.*
src/msw/ctl3d/wat32/*.*
src/msw/ctl3d/wat386/*.*
src/msw/ctl3d/borland/*.*
src/msw/ole/*.cpp
src/msw/*.prj
include/wx/msw/*.h
include/wx/msw/*.rc
include/wx/msw/ctl3d/*.h
include/wx/msw/gnuwin32/*.h
include/wx/msw/ole/*.h
include/wx/msw/*.cur
include/wx/msw/*.ico
include/wx/msw/*.bmp
lib/dummy
samples/ownerdrw/*.cpp
samples/ownerdrw/*.h
samples/ownerdrw/makefile.*
samples/ownerdrw/*.rc
samples/ownerdrw/*.def
samples/ownerdrw/*.bmp
samples/ownerdrw/*.ico
samples/ownerdrw/*.txt
samples/taskbar/*.cpp
samples/taskbar/*.h
samples/taskbar/makefile.*
samples/taskbar/*.rc
samples/taskbar/*.def
samples/taskbar/*.bmp
samples/taskbar/*.ico
samples/taskbar/*.txt
samples/regtest/*.cpp
samples/regtest/*.h
samples/regtest/makefile.*
samples/regtest/*.rc
samples/regtest/*.def
samples/regtest/*.bmp
samples/regtest/*.ico
samples/regtest/*.txt
samples/nativdlg/*.cpp
samples/nativdlg/*.h
samples/nativdlg/*.def
samples/nativdlg/*.rc
samples/nativdlg/*.txt
samples/nativdlg/makefile.*
samples/nativdlg/*.xbm
samples/nativdlg/*.ico
samples/nativdlg/*.bmp
samples/mfc/*.h
samples/mfc/*.cpp
samples/mfc/*.def
samples/mfc/*.rc
samples/mfc/makefile.*
samples/mfc/*.txt
samples/mfc/*.bmp
samples/mfc/*.ico
samples/joytest/*.h
samples/joytest/*.cpp
samples/joytest/*.def
samples/joytest/*.rc
samples/joytest/makefile.*
samples/joytest/*.txt
samples/joytest/*.bmp
samples/joytest/*.wav
samples/joytest/*.ico
utils/nplugin/make*.*
utils/nplugin/src/*.cpp
utils/nplugin/src/*.h
utils/nplugin/src/*.rc
utils/nplugin/src/*.def
utils/nplugin/src/makefile.*
utils/nplugin/src/*.txt
utils/nplugin/samples/simple/*.cpp
utils/nplugin/samples/simple/*.h
utils/nplugin/samples/simple/*.rc
utils/nplugin/samples/simple/*.def
utils/nplugin/samples/simple/makefile.*
utils/nplugin/samples/simple/*.txt
utils/nplugin/samples/gui/*.cpp
utils/nplugin/samples/gui/*.h
utils/nplugin/samples/gui/*.rc
utils/nplugin/samples/gui/*.def
utils/nplugin/samples/gui/makefile.*
utils/nplugin/samples/gui/*.txt
utils/nplugin/docs/*.tex
utils/nplugin/docs/*.txt
utils/nplugin/docs/*.hpj
utils/nplugin/docs/*.eps
utils/nplugin/docs/*.ps
utils/nplugin/docs/*.ini
utils/nplugin/docs/*.cnt
utils/nplugin/docs/*.hlp
utils/nplugin/lib/dummy

117
distrib/msw/tardist.bat Executable file
View File

@@ -0,0 +1,117 @@
@echo off
rem Tar up an external distribution of wxWindows 2.0: but
rem putting in separate ASCII and binary files
rem This seems to be the one that works, using
rem separate tar programs for conversion/non-conversion
rem of ASCII/binary files.
if "%1" == "" goto usage
if "%2" == "" goto usage
echo About to archive an external wxWindows 2.0 distribution:
echo From %1
echo To %2\wx200_1.tgz, %2\wx200_2.tgz, %2\wx200hlp.tgz, %2\wx200ps.tgz, %2\wx200htm.tgz
echo CTRL-C if this is not correct.
inkey /W4 `Press any key to continue...` %%input
erase %2\*.tgz
cd %1
rem First, expand the wildcards in the rsp files
rem Create empty list file
erase %1\distrib\*.lis
c:\bin\touch %1\distrib\wx200asc.lis
c:\bin\touch %1\distrib\wx200bin.lis
c:\bin\touch %1\distrib\wx200hlp.lis
c:\bin\touch %1\distrib\wx200ps.lis
c:\bin\touch %1\distrib\wx200xlp.lis
rem Create a .rsp file with backslashes instead
rem of forward slashes
rem No need if using ls2 (from UNIX95 distribution)
rem sed -e "s/\//\\/g" %1\distrib\wx_asc.rsp > %1\distrib\wx_asc.rs2
call %1\distrib\expdwild.bat %1\distrib\wx_asc.rsp %1\distrib\wx200asc.lis
call %1\distrib\expdwild.bat %1\distrib\util_asc.rsp %1\distrib\wx200asc.lis
call %1\distrib\expdwild.bat %1\distrib\smpl_asc.rsp %1\distrib\wx200asc.lis
rem call %1\distrib\expdwild.bat %1\distrib\wxim1asc.rsp %1\distrib\wx200asc.lis
rem call %1\distrib\expdwild.bat %1\distrib\wxim2asc.rsp %1\distrib\wx200asc.lis
call %1\distrib\expdwild.bat %1\distrib\wx_bin.rsp %1\distrib\wx200bin.lis
call %1\distrib\expdwild.bat %1\distrib\util_bin.rsp %1\distrib\wx200bin.lis
call %1\distrib\expdwild.bat %1\distrib\smpl_bin.rsp %1\distrib\wx200bin.lis
rem call %1\distrib\expdwild.bat %1\distrib\wxim1bin.rsp %1\distrib\wx200bin.lis
rem Docs
call %1\distrib\expdwild.bat %1\distrib\wx_hlp.rsp %1\distrib\wx200hlp.lis
call %1\distrib\expdwild.bat %1\distrib\wx_ps.rsp %1\distrib\wx200ps.lis
call %1\distrib\expdwild.bat %1\distrib\wx_html.rsp %1\distrib\wx200htm.lis
call %1\distrib\expdwild.bat %1\distrib\wx_pdf.rsp %1\distrib\wx200pdf.lis
rem Do some further massaging of the .lis files
sed -e "s/\\/\//g" %1\distrib\wx200asc.lis > c:\temp\temp.tmp
sed -e "s/D:\/wx\///g" c:\temp\temp.tmp > %1\distrib\wx200asc.lis
sed -e "s/\\/\//g" %1\distrib\wx200bin.lis > c:\temp\temp.tmp
sed -e "s/D:\/wx\///g" c:\temp\temp.tmp > %1\distrib\wx200bin.lis
sed -e "s/\\/\//g" %1\distrib\wx200hlp.lis > c:\temp\temp.tmp
sed -e "s/D:\/wx\///g" c:\temp\temp.tmp > %1\distrib\wx200hlp.lis
sed -e "s/\\/\//g" %1\distrib\wx200ps.lis > c:\temp\temp.tmp
sed -e "s/D:\/wx\///g" c:\temp\temp.tmp > %1\distrib\wx200ps.lis
sed -e "s/\\/\//g" %1\distrib\wx200htm.lis > c:\temp\temp.tmp
sed -e "s/D:\/wx\///g" c:\temp\temp.tmp > %1\distrib\wx200htm.lis
sed -e "s/\\/\//g" %1\distrib\wx200pdf.lis > c:\temp\temp.tmp
sed -e "s/D:\/wx\///g" c:\temp\temp.tmp > %1\distrib\wx200pdf.lis
rem 'tar' converts linefeeds.
tar -c -T %1\distrib\wx200asc.lis -f %2\wx200.tar
rem pause Press a key to continue.
rem This converts to lower case
ren %2\wx200.tar %2\wx200_1.tar
gzip32 %2\wx200_1.tar
ren %2\wx200_1.tar.gz %2\wx200_1.tgz
rem No linefeed conversion wanted
rem Note: GNU tar seems to crash with a full destination path, so
rem pander to it.
targnu -c -T %1\distrib\wx200bin.lis -f wx200_2.tar
move wx200_2.tar %2
gzip32 %2\wx200_2.tar
ren %2\wx200_2.tar.gz %2\wx200_2.tgz
targnu -c -T %1\distrib\wx200hlp.lis -f wx200_hlp.tar
move wx200_hlp.tar %2
gzip32 %2\wx200_hlp.tar
ren %2\wx200_hlp.tar.gz %2\wx200hlp.tgz
tar -c -T %1\distrib\wx200ps.lis -f %2\wx200ps.tar
gzip32 %2\wx200ps.tar
ren %2\wx200ps.tar.gz %2\wx200ps.tgz
targnu -c -T %1\distrib\wx200htm.lis -f wx200htm.tar
move wx200htm.tar %2
gzip32 %2\wx200htm.tar
ren %2\wx200htm.tar.gz %2\wx200htm.tgz
targnu -c -T %1\distrib\wx200pdf.lis -f wx200pdf.tar
move wx200pdf.tar %2
gzip32 %2\wx200pdf.tar
ren %2\wx200pdf.tar.gz %2\wx200pdf.tgz
cd %2
echo wxWindows archived.
goto end
:usage
echo Tar/gzip wxWindows distribution under DOS, making an ASCII and binary file
echo Usage: tardist source destination
echo e.g. tardist d:\wx d:\wx\deliver
:end

2
distrib/msw/wx_hlp.rsp Normal file
View File

@@ -0,0 +1,2 @@
docs/winhelp/*.hlp
docs/winhelp/*.cnt

38
distrib/msw/wx_html.rsp Normal file
View File

@@ -0,0 +1,38 @@
docs/html/*.htm
docs/html/*.gif
docs/html/wx/*.htm
docs/html/wx/*.gif
docs/html/porting/*.htm
docs/html/porting/*.gif
docs/html/faq/*.htm
docs/html/faq/*.gif
docs/html/techref/*.htm
docs/html/techref/*.gif
docs/html/prologio/*.htm
docs/html/prologio/*.gif
docs/html/dialoged/*.htm
docs/html/dialoged/*.gif
docs/html/wxbuild/*.htm
docs/html/wxbuild/*.gif
docs/html/wxtab/*.htm
docs/html/wxtab/*.gif
docs/html/wxchart/*.htm
docs/html/wxchart/*.gif
docs/html/wxtree/*.htm
docs/html/wxtree/*.gif
docs/html/wxgraph/*.htm
docs/html/wxgraph/*.gif
docs/html/wxgrid/*.htm
docs/html/wxgrid/*.gif
docs/html/wxhelp/*.htm
docs/html/wxhelp/*.gif
docs/html/wxhelp2/*.htm
docs/html/wxhelp2/*.gif
docs/html/wxprop/*.htm
docs/html/wxprop/*.gif
docs/html/winstall/*.htm
docs/html/winstall/*.gif
docs/html/tex2rtf/*.htm
docs/html/tex2rtf/*.gif

1
distrib/msw/wx_pdf.rsp Normal file
View File

@@ -0,0 +1 @@
docs/pdf/*.pdf

34
distrib/msw/zipdist.bat Executable file
View File

@@ -0,0 +1,34 @@
@echo off
rem Zip up an external, generic + Windows distribution of wxWindows 2.0
if "%1" == "" goto usage
if "%2" == "" goto usage
echo About to archive an external wxWindows distribution:
echo From %1
echo To %2\wx200gen.zip, %2\wx200doc.zip, %2\wx200msw.zip, %2\wx200ps.zip, %2\wx200hlp.zip, %2\wx200htm.zip, %2\wx200pdf.zip
echo CTRL-C if this is not correct.
pause
erase %2\wx200*.zip
cd %1
echo Zipping...
zip32 -@ %2\wx200gen.zip < %1\distrib\msw\generic.rsp
zip32 -@ %2\wx200msw.zip < %1\distrib\msw\msw.rsp
zip32 -@ %2\wx200doc.zip < %1\distrib\msw\docsrc.rsp
rem zip32 -@ %2\wx200ps.zip < %1\distrib\msw\wx_ps.rsp
zip32 -@ %2\wx200hlp.zip < %1\distrib\msw\wx_hlp.rsp
zip32 -@ %2\wx200htm.zip < %1\distrib\msw\wx_html.rsp
zip32 -@ %2\wx200pdf.zip < %1\distrib\msw\wx_pdf.rsp
cd %2
echo wxWindows archived.
goto end
:usage
echo DOS wxWindows distribution.
echo Usage: zipdist source destination
echo e.g. zipdist d:\wx2\wxWindows d:\wx2\wxWindows\deliver
:end

232
docs/changes.txt Normal file
View File

@@ -0,0 +1,232 @@
Generic wxWindows 2.0 Change Log
--------------------------------
Note: for platform-specific changes, see wx/docs/XXX/changes.txt
where XXX is one of msw, motif, xt, gtk, mac.
Alpha 11, July 3rd 1998
-----------------------
- Major work on Dialog Editor (still plenty to go).
- Expanded documentation a bit more.
Alpha 9, April 27th 1998
------------------------
- Corrected some bugs, such as the wxModule compilation problem.
- Added Gnu-Win32 b19/Mingw32 support by changing resource
compilation and pragmas.
- Changed SIZEOF to WXSIZEOF.
Alpha 8, April 17th 1998
------------------------
- Added src/other/png, src/other/zlib directories.
- Added samples/png.
- IMPORTANT: Changed 'no id' number from 0 to -1, in wxEVT_ macros.
Porters, please check particularly your wxTreeCtrl and wxListCtrl
header files.
- Added modules.h/cpp, config.cpp, fileconf.cpp, textfile.cpp/h.
Alpha 7, March 30th 1998
------------------------
- Added tab classes, tab sample.
- Revised memory.cpp, memory.h slightly; memory.h now #defines
new to WXDEBUG_NEW in DEBUG mode. Windows implementation app.cpp
now checks for leaks on exit. Added memcheck sample.
See src/msw/issues.txt for more details.
- resource.h, resource.cpp changed to make wxDefaultResourceTable
a pointer. Now initialize resource system with
wxInitializeResourceSystem and wxCleanUpResourceSystem, to
allow better control of memory.
- wxString now derives from wxObject, to enable memory leak
checking.
- Added some #include fixes in various files, plus changed
float to long in wxToolBar files.
Alpha 6, March 10th 1998
------------------------
- Added Vadim's dynarray.h, dynarray.cpp.
- Added Vadim's menuitem.cpp.
- Added Windows-specific wxCheckListBox,
owner-draw wxListBox, and drag-and-drop
(see docs/msw/changes.txt).
Alpha 5, 14th February 1998
--------------------------
- GENERIC AND MSW-SPECIFIC CODE NOW TREATED AS TWO SEPARATE
DISTRIBUTIONS. This change log will therefore now refer to
the generic code only. See docs/msw/changes.txt for Windows-specific
changes.
- Readmes, change logs and installation files now go in
platform-specific directories under docs, e.g. docs/msw,
docs/gtk.
- Added DECLARE_APP and IMPLEMENT_APP macros so wxApp object gets
created dynamically, not as a global object.
- Put wxColour into wx/msw/colour.h, src/msw/colour.cpp.
- Changed names of some include/wx/generic headers to be
consistent and to conform to gcc pragma conventions. Also
changed choicesg.cpp to choicdgg.cpp.
- Added gcc pragmas.
- Added gtk inclusion in include/wx headers.
- Added consistent file headings to source and headers.
- Removed lang.cpp, lang.h and references to wxSTR_... variables;
added a few references to wxTransString.
- Added operator to wxTransString that converts automatically
to wxString, so we can say e.g. wxMessageBox(wxTransString("Hello"), ...).
- samples/internat now works (minimally).
- Added wxMouseEvent::GetPosition and
wxMouseEvent::GetLogicalPosition, both returning wxPoints.
- Made wxSize and wxRect contain longs not ints.
- Cured some lemory leaks (thanks Vadim).
- Tidied up OnIdle and introduced RequestMore/MoreRequested so
will only keep processing OnIdle if it returns TRUE from
MoreRequested.
Alpha 4, 31st January 1998
--------------------------
- Changed wxDC functions to take longs instead of floats. GetSize now takes
integer pointers, plus a version that returns a wxSize.
- const keyword added to various wxDC functions.
- Under Windows, wxDC no longer has any knowledge of whether
an associated window is scrolled or not. Instead, the device
origin is set by wxScrolledWindow in wxScrolledWindow::PrepareDC.
- wxScrolledWindow applications can optionally override the virtual OnDraw
function instead of using the OnPaint event handler. The wxDC passed to
OnDraw will be translated by PrepareDC to reflect scrolling.
When drawing outside of OnDraw, must call PrepareDC explicitly.
- wxToolBarBase/wxToolBarSimple similarly changed to allow for
scrolling toolbars.
- Integrated wxPostScriptDC patches for 1.xx by Chris Breeze,
to help printing with multiple pages.
- IPC classes given base classes (wxConnectionBase etc.) which
define the API used by different implementations. DDE
implementation updated to use these base classes.
- wxHelpInstance now separated into wxHelpControllerBase (base
for all implementations), wxWinHelpController (uses standard
WinHelp), wxXLPHelPController (talks to wxHelp by DDE or
TCP/IP). There will be others eventually, such as
wxHTMLHelpController for Microsoft (and Netscape?) HTML Help.
- Added Vadim Zeitlin's wxString class plus
internationalization code (gettext simulation, wxLocale, etc.).
New files from Vadim:
include\wx\string.h
include\wx\debug.h
include\wx\file.h
include\wx\log.h
include\wx\intl.h
src\common\string.cpp
src\common\log.cpp
src\common\intl.cpp
src\common\file.cpp
No longer use GNU wxString files.
- Split off file-related functions into include\wx\filefn.h and
src\common\filefn.cpp.
- Borland C++ support (WIN32) for main library and
samples, using makefile.b32 files.
- Preparation done for allowing BC++ to compile wxWin as a DLL,
including changes to defs.h.
- wxIntPoint removed, wxPoint is now int, and wxRealPoint
introduced.
- Added wxShowEvent (generated when window is being shown or
hidden).
- Got minimal, docview, mdi samples working for 16-bit VC++ and
cured 16-bit problem with wxTextCtrl (removed global memory
trick).
- Updated GnuWin32 makefiles, checked minimal, mdi, docview samples.
Alpha 3, September 1997
-----------------------
- wxListCtrl, wxTreeCtrl, wxImageList classes done.
- Instigated new file hierarchy, split files and classes up more logically.
- PrologIO and some other utils now put into core library.
- Revamped print/preview classes, added wxPageSetupDialog.
- Started documentation.
Alpha 2, 30th April 1997
------------------------
- EVT_... macros now have at least one argument, for conformance
with MetroWerks compiler.
- Added ids to .wxr file format.
- Got Dialog Editor compiled and running again but need
to extend functionality to be in line with new controls.
Added dialoged\test app to allow dynamic loading of .wxr files
for testing purposes.
- Rewrote wxBitmap to allow installable file type
handlers.
- Rewrote wxBitmapButton, wxStaticBitmap to not use Fafa.
- Wrote most of wxTreeCtrl and sample (need wxImageList to implement it
fully).
- Added back wxRadioBox.
- Tidied up wx_main.cpp, wxApp class, putting PenWin code in
a separate file.
Alpha 1, 5th April 1997
-----------------------
At this point, the following has been achieved:
- A lot, but not all, of the code has been revamped for better
naming conventions, protection of data members, and use of
wxString instead of char *.
- Obsolete functionality deleted (e.g. default wxPanel layout,
old system event system) and code size reduced.
- Class hierarchy changed (see design doc) - base classes such
as wxbWindow now removed.
- No longer includes windows.h in wxWin headers, by using stand-in
Windows types where needed e.g. WXHWND.
- PrologIO revised.
- wxScrolledWindow, wxStatusBar and new MDI classes added.
MDI is now achived using separate classes, not window styles.
- wxSystemSettings added, and made use of to reflect standard
Windows settings.
- SetButtonFont/SetLabelFont replaced by SetFont; font and colour
settings mucho rationalised.
- All windows are now subclassed with the same window proc to make
event handling far more consistent. Old internal wxWnd and derived
classes removed.
- API for controls revised, in particular addition of
wxValidator parameters and removal of labels for some controls.
- 1 validator written: see examples/validate.
- Event table system introduced (see most samples and
wx_event.cpp/ProcessEvent, wx_event.h). wxEvtHandler
made more flexible, with Push/PopEventHandler allowing a chain
of event handlers.
- wxRadioBox removed - will be added back soon.
- Toolbar class hierarchy revised:
wxToolBarBase
wxToolBarSimple (= old wxToolBar)
wxToolBar95 (= old wxButtonBar under Win95
wxToolBarMSW (= old wxButtonBar under WIN16/WIN32)
- Constraint system debugged somewhat (sizers now work properly).
- wxFileDialog, wxDirDialog added; other common dialogs now
have class equivalents. Generic colour and font dialogs
rewritten to not need obsolete panel layout.
- .wxr resource system partially reinstated, though needs
an integer ID for controls. Hopefully the resource system
will be replaced by something better and more efficient
in the future.
- Device contexts no longer stored with window and accessed
with GetDC - use wxClientDC, wxPaintDC, wxWindowDC stack
variables instead.
- wxSlider uses trackbar class under Win95, and wxSL_LABELS flag
determines whether labels are shown. Other Win95-specific flags
introduced, e.g. for showing ticks.
- Styles introduced for dealing with 3D effects per window, for
any window: all Win95 3D effects supported, plus transparent windows.
- Major change to allow 3D effect support without CTL3D, under
Win95.
- Bitmap versions of button and checkbox separated out into new
classes, but unimplemented as yet because I intend to remove
the need for Fafa - it apparently causes GPFs in Win95 OSR 2.
- utils/wxprop classes working (except maybe wxPropertyFormView)
in preparation for use in Dialog Editor.
- GNU-WIN32 compilation verified (a month or so ago).

292
docs/gtk/welcome.html Normal file
View File

@@ -0,0 +1,292 @@
<html>
<head><title>wxGTK Homepage</title>
</head>
<body bgcolor=#FFFFFF text=#000000 link=#0020FF vlink=#800000 alink=#007777>
<h1>"wxWindows for the GTK" Homepage</h1>
<hr>
<h3>Current version</h3>
15th May '98: wxGTK v0.12 (alpha-)
<p>
This release is hardly more stable than the one before, but it
has many new features. It's main purpose is actually to prepare
the final merge of the Windows port and the GTK port source
trees into a common tree, developed using CVS. The growing
number of demos which compile and run with wxGTK "although"
being written for wxMSW shows that we seem to be on the right
track. One nice new feature for many potential users is that
wxGTK no longer needs any extra libraries to be installed,
other than the GTK.
<p>
If you have a compiler
better than gcc 2.7.2.2 then you can uncomment a line in src/common/prntbase.cpp
which defines __GOOD_COMPILER__. This should make the printing demo work.
I haven't got such a compiler, so I actually don't know. Somebody reported
problems with version 2.7.2.3 as well.
<p>
<hr>
<h3>Acknowledgements</h3>
I'd like to thank the
<a href="http://www.freiburg.linux.de">Freiburg Linux User Group</a>
for kindly providing
this site and Christian Wetzel in particular for helping me with
this site's administration.
<p>
<hr>
<h3>What is wxWindows?</h3>
wxWindows is a C++ cross-platform GUI toolkit written mainly by Julian Smart.
More information about wxWindows can be found at the
<a href="http://web.ukonline.co.uk/julian.smart/wxwin">wxWindows Homepage</a>.
<p>
The current version of wxWindows (v1.68) supports Windows ('95 and NT), Motif and
XView (aka OpenLook). There is another port (wxXt) available, which uses the
free-ware widget set from the Free Widget Foundation (FSF). Ports have been
started for the Mac, OS/2 and NextStep.
<p>
For different reasons, it was decided to start a complete rewrite of wxWindows,
which will then be called wxWindows 2.0. For a list of new features and changes
from the current version, you may read the wxWindows Homepage (see above).
<p>
Currently, work is being done on four ports of wxWindows 2.0:
<dl>
<li> Windows (wxMSW, main author Julian Smart)
<li> Unix, Motif (wxMotif, main author Markus Holzhem)
<li> Unix, GIMP Toolkit (wxGTK, main author Robert Roebling)
<li> Macintosh (wxMac, main author Greg Whitehead)
</dl>
<p>
wxWindows provides a rich set of classes which help to make cross-platform
GUI programming easy. In many aspect, it is modelled after MFC, making transition
from MFC to wxWindows relatively painless. The main technical
difference between most other free or commercial cross platform libraries is
that wxWindows is a wrapper around existing widget sets, whereas the other
toolkits (Qt, Tk, Java, Amulet, OPaC, JX, Fresko) draw their widgets themselves,
which results in applications having a different look than native applications
for that specific platform.
<p>
There are classes for the following categories
<dl>
<li> Window classes: wxWindow, wxFrame, wxDialogBox, wxPanel, wxCanvas etc.
<li> Widget classes: wxButton, wxCheckbox, wxChoice, wxListBox, wxListCtrl, wxText, wxGauge etc.
<li> Data structures: wxList, wxString, wxHashTable, wxDate etc.
<li> Layout/constraint system
<li> GDI classes: wxPen, wxBrush, wxFont, wxBitmap etc.
<li> Events: wxCommandEvent, wxMouseEvent, wxKeyEvent etc.
<li> Devices contexts: wxCanvasDC, wxPostScriptDC, wxMemoryDC, wxPrinterDC
<li> Base classes for runtime-type information: wxObject
<li> Interprocess communication: wxClient, wxConnection, wxSocket, wxServer etc.
<li> Document-view architecture: wxDocument, wxView, wxDocManager etc.
<li> Printing framework: wxPreviewFrame, wxPrintDialog, wxPrinter etc.
<li> Many helper classes, wxApplication, wxTypeTree, wxPathList etc.
<li> Classes for internationalization
<li> Built-in memory leak checking, log-files
<li> A multitude of functions and macros
</dl>
<hr>
<h3>Copyright</h3>
The choice of a suitable copyright has been subject to endless discussions. It
has always been the aim, to put wxWindows under a copyright, which protects
the work of its authors while at the same time encouraging the use of wxWindows
in as many projects as possible.
<p>
The (so far) last decision has been to put the whole of wxWindows
under a modified (less restrictive) version of the GNU library general
public license.
<p>
The only exception is that wxGTK now contains code (gdk_imlib) which is
under the GNU library general public license. When you make changes to
this part of wxGTK, you'll have to make these changes public (in contrast
to changes to the rest).
<p>
It is obviously encouraged that anybody who uses wxWindows and who
makes any improvements to it will make these changes available to
wxWindows' authors.
<p>
<hr>
<h3>What can I do with wxWindows 2.0?</h3>
wxWindows is still in alpha stage, which means that there are still bugs
waiting for you and several features are not yet (fully) implemented, but
you can expect the interface to be more or less stable, so no major
modifications will have to be made to your source code. wxGTK is already
used in a number of medium sized projects and is it being developped
in close cooperation with the authors of these applications.
<p>
<hr>
<h3>Can I write a GNOME application with wxGTK 2.0?</h3>
Good question. The idea to use wxGTK for the GNOME desktop environment is
quite obvious. When this topic came up on the GNOME mailing list, the GNOME
people have shown an amazingly negative opinion about wxWindows. One reason
might be that several of the main authors of the GNOME-project consider
C++ a "broken language". I don't share that view and I am sure many people
find C++ easier to handle and better suited for GUI programming than C.
<p>
Just recently, the topic of C++ in general and wxGTK in particular appeared
again on the GNOME list. It has shown that - at least - the opinion on C++
on the GNOME list is split.
<p>
There is already a C++ wrapper for the GTK called GTK-- written by Tero Pulkkinen.
It is very small and adds very little overhead to the GTK. If platform
independence is no issue for you and you want to write a small tool
for Linux, you should probably use GTK--. Of course you can use wxGTK
for that, too :-)
<p>
<hr>
<h3>Screenshots</h3>
What would a home page of a GUI be without a screenshot? Well, as wxWindows
is a wrapper around existing widget/item sets, a wxWindows application will
look like any other native Windows, Motif, GTK or Mac application.
<p>
But for those of you, who wouldn't download wxGTK only because there
is no screenshot,
<a href="ftp://ftp.freiburg.linux.de/pub/linux/wxxt/sshot.jpg">here it comes</a>.
<p>
<hr>
<h3>Download 1.68</h3>
Go to the
<a href="ftp://ftp.freiburg.linux.de/pub/linux/wxxt">FTP</a>
section directly.
<p>
There is documentation for version 1.68 in html available.
<a href="ftp://ftp.freiburg.linux.de/pub/linux/wxxt">here</a>. Not yet.
<p>
You can download current wxWindows version 1.68 for Windows, Motif and
XView from
<a href="ftp://ftp.freiburg.linux.de/pub/linux/wxxt">here</a>. Not yet.
<p>
You can download wxXt 1.66d from
<a href="ftp://ftp.freiburg.linux.de/pub/linux/wxxt/wxxt166d.tgz">here</a>.
<p>
<hr>
<h3>Download 2.0 alpha</h3>
There is documentation for version 2.0 in html available.
<a href="ftp://ftp.freiburg.linux.de/pub/linux/wxxt/wxGTK_doc.tgz">here</a>.
<p>
You can download the first alpha for wxWindows 2.0 for Windows from
<a href="ftp://ftp.freiburg.linux.de/pub/linux/wxxt/">here</a>. Not yet.
<p>
You can download the current alpha for wxWindows 2.0 for GTK from
<a href="ftp://ftp.freiburg.linux.de/pub/linux/wxxt/wxGTK-0.12.tgz">here</a>.
<p>
<hr>
<h3>News from wxGTK 0.12</h3>
<p>
PNG, zlib and gdk_imlib code included.
<p>
MDI implementation. More a basis for further testing
than of real value.
<p>
Split "--with-debug" option into two options: "--with-debug_info"
and "--with-debug_flag". The first one sets the "-g" flag when
compiling, the second defines "DEBUG" in setup.h (which is included
from defs.h).
<p>
Merged DocView framework. The sample doesn't compile yet, because
it uses features from wxTextCtrl, which I haven't implemented yet.
<p>
Merged TabCtrl. Doesn't look perfect, but it seems to work.
<p>
Merged remaining classes from the newest wxMSW alpha. (wxDynArray,
wxModule etc.).
<p>
Further updates, bug fixes or additions:
<p>
<dl>
<li> wxYield() (again)
<li> postscript support for bitmaps
<li> spline code merged
<li> several bug fixes
<li> new samples
</dl>
<p>
<hr>
<h3>Known problems</h3>
Missing implementation of:
<dl>
<li>Impossible to set new font in GTK's widgets
<li>Items containing bitmaps
<li>Masks, bitmap handlers (partially done)
<li>Gauge
<li>Combobox
<li>Palettes (colormaps)
<li>Keyboard accelerators for menus
<li>Validation
<li>Clipboard functions
<li>Resources (for use with wxIDE-to-be)
<li>Drag and Drop
<li>Threads, Interprocess communication
<li>Sockets
<li>Database classes
</dl>
<p>
<hr>
<h3>Installation of wxGTK under Linux</h3>
GTK requires an up-to-date version of the
<dl>
<li> GTK (GIMP ToolKit)
</dl>
to be installed as a shared lib on your system. wxGTK is being developped with
version 1.0.1 and it is known not to work with earlier versions.
The GTK library is available from
<a href="ftp://ftp.gtk.org/pub/">somewhere here (gtk.org).</a>
After having typed "make install" the GTK header files should be
in "/usr/local/include". Correct me, if I am wrong.
<p>
Compilation itself works as usual with autoconf:
<dl>
<li> Unpack it to a suitable subdirectory, let's say ~/wxGTK
<li> Type "cd wxGTK"
<li> Type "configure"
<li> Type "make"
</dl>
Some demos use files stored in the source directory of those demos
(e.g. internat uses files in samples/internat) whereas the binaries
will end up in samples/internat/linux. You'll have to copy the binaries
down or call them like "linux/test" from samples/internat. This is
also the case for wxTest (which should display a horse).
<p>
You can create a shared library by adding the option "--with-shared" to
the "configure" command. Afterwards, you'll have to copy the library
~/wxGTK/lib/linux (if you have Linux) to a directory in your LDPATH (e.g. /usr/X11R6/lib)
and run "ldconfig".
<p>
<hr>
<h3>Mailing list for wxGTK</h3>
The mailing list (as well as this page) is called wxxt for more
or less historical reasons.
<p>
You can subsribe to the mailing list by sending a mail to
<a href="mailto:majordomo@wesley.informatik.uni-freiburg.de">majordomo@wesley.informatik.uni-freiburg.de</a>.
This mail must contain the text "subscribe wxxt" in the body (not the subject) of the
mail. You will then get a confirmation that somebody asked majordomo to put you
on the list and you will have to confirm this once again by sending back
the authentisation, which comes in the confirmation mail. The last step
is also described in the actual confirmation mail (I think).
<p>
You can send a mail to the mailing list to the address
<a href="mailto:wxxt@www.freiburg.linux.de">wxxt@www.freiburg.linux.de</a>.
<p>
Unsubscribe by sending "unsubscribe wxxt" to majordomo (see above). Not to
the actual mailing list.
<p>
<hr>
<address>
<br>This page is maintained by <a href="mailto:roebling@sun2.ruf.uni-freiburg.de">Robert Roebling</a>.
Comments, in contrast to junk and flames, welcome.
<p>
Last changed 15th Mai '98.
</address>
</body>
</html>

BIN
docs/latex/porting/back.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 B

View File

@@ -0,0 +1,17 @@
[OPTIONS]
BMROOT=d:\wx2\wxwind~1\docs\latex\porting ; Assume that bitmaps are where the source is
TITLE=wxWindows Porting Guide
CONTENTS=Contents
COMPRESS=HIGH
[FILES]
porting.rtf
[CONFIG]
CreateButton("Up", "&Up", "JumpId(`porting.hlp', `Contents')")
BrowseButtons()
[MAP]
[BITMAPS]

View File

@@ -1,6 +1,36 @@
\chapter{Porting from wxWindows 1.xx}\label{porting}
\documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report}
\newcommand{\indexit}[1]{#1\index{#1}}%
\newcommand{\pipe}[0]{$\|$\ }%
\definecolour{black}{0}{0}{0}%
\definecolour{cyan}{0}{255}{255}%
\definecolour{green}{0}{255}{0}%
\definecolour{magenta}{255}{0}{255}%
\definecolour{red}{255}{0}{0}%
\definecolour{blue}{0}{0}{200}%
\definecolour{yellow}{255}{255}{0}%
\definecolour{white}{255}{255}{255}%
\input psbox.tex
\parskip=10pt
\parindent=0pt
\title{Guide to porting applications from wxWindows 1.xx to 2.0}
\author{Julian Smart}
\date{October 1997}
\makeindex
\begin{document}
\maketitle
\pagestyle{fancyplain}
\bibliographystyle{plain}
\setheader{{\it CONTENTS}}{}{}{}{}{{\it CONTENTS}}
\setfooter{\thepage}{}{}{}{}{\thepage}%
\pagenumbering{roman}
\tableofcontents
%
\chapter{About this document}\label{about}
\pagenumbering{arabic}%
\setheader{{\it Porting guide}}{}{}{}{}{{\it Porting guide}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
This addendum gives guidelines and tips for porting applications from
This document gives guidelines and tips for porting applications from
version 1.xx of wxWindows to version 2.0.
The first section offers tips for writing 1.xx applications in a way to
@@ -10,20 +40,23 @@ how you can modify your application to be 2.0-compliant.
You may be worrying that porting to 2.0 will be a lot of work,
particularly if you have only recently started using 1.xx. In fact,
the wxWindows 2.0 API has far more in common with 1.xx than it has differences.
The main challenges are using the new event system, doing without the default
With backward compatibility mode on, much of the conversion can be
done gradually. The main challenges are doing without the default
panel item layout, and the lack of automatic labels in some controls.
However, if you already use resource files (.wxr), or application-specific positioning,
or constraints, then even this will be quite painless.
Please don't be freaked out by the jump to 2.0! For one thing, 1.xx is still available
So please don't be freaked out by the jump to 2.0! For one thing, 1.xx is still available
and will be supported by the user community for some time. And when you have
changed to 2.0, we hope that you will appreciate the benefits in terms
of greater flexibility, better user interface aesthetics, improved C++ conformance,
improved compilation speed, and many other enhancements. The revised architecture
of 2.0 will ensure that wxWindows can continue to evolve for the foreseeable
of 2.0 will ensure that wxWindows can continue to evolve for the forseeable
future.
{\it Please note that this document is a work in progress.}
\section{Preparing for version 2.0}\label{portingpreparing}
\chapter{Preparing for version 2.0}\label{preparing}
Even before compiling with version 2.0, there's also a lot you can do right now to make porting
relatively simple. Here are a few tips.
@@ -57,8 +90,7 @@ for some notes on using member functions for callbacks. wxWindows 2.0 will banis
callback functions (and OnMenuCommand), and nearly all event handling will be done by functions taking a single event argument.
So in future you will have code like:
{\small
\begin{verbatim}
{\small\begin{verbatim}
void MyFrame::OnOK(wxCommandEvent& event)
{
...
@@ -68,7 +100,7 @@ void MyFrame::OnOK(wxCommandEvent& event)
You may find that writing the extra code to call a member function isn't worth it at this stage,
but the option is there.
\item {\bf Use wxString wherever possible.} 2.0 replaces char * with wxString
\item {\bf Use wxString wherever possible.} 2.0 will replace char * with wxString
in most cases, and if you use wxString to receive strings returned from
wxWindows functions (except when you need to save the pointer if deallocation is required), there should
be no conversion problems later on.
@@ -76,11 +108,11 @@ be no conversion problems later on.
font sizes (for example, a 12-point font will appear bigger than before). Write your application
to be flexible where fonts are concerned.
Don't rely on fonts being similarly-sized across platforms, as they were (by chance) between
Windows and X under wxWindows 1.66. Yes, this is not easy... but I think it is better to conform to the
Windows and X under wxWindows 1.66. Yes, this is not easy... but I think it's better to conform to the
standards of each platform, and currently the size difference makes it difficult to
conform to Windows UI standards. You may eventually wish to build in a global 'fudge-factor' to compensate
for size differences. The old font sizing will still be available via wx\_setup.h, so do not panic...
\item {\bf Consider dropping wxForm usage}:
\item {\bf Consider dropping wxForm usage}: an alternative is to be found in utils/wxprop.
wxPropertyFormView can be used in a wxForm-like way, except that you specify a pre-constructed panel
or dialog; or you can use a wxPropertyListView to show attributes in a scrolling list - you don't even need
to lay panel items out.
@@ -93,13 +125,13 @@ zero in the {\it multiple} parameter. The {\it multiple} parameter will be remov
MDI sample is. In wxWindows 2.0, MDI functionality is separated into distinct classes.
\end{itemize}
\section{The new event system}\label{portingeventsystem}
\chapter{The new event system}\label{eventsystem}
The way that events are handled has been radically changed in wxWindows 2.0. Please
read the topic `Event handling overview' in the wxWindows 2.0 manual for background
on this.
\subsection{Callbacks}
\section{Callbacks}
Instead of callbacks for panel items, menu command events, control commands and other events are directed to
the originating window, or an ancestor, or an event handler that has been plugged into the window
@@ -122,14 +154,14 @@ Control commands, such as button commands, can be routed to a derived button cla
the parent window, or even the frame. Here, you use a function of the form EVT\_BUTTON(id, func).
Similar macros exist for other control commands.
\subsection{Other events}
\section{Other events}
To intercept other events, you used to override virtual functions, such as OnSize. Now, while you can use
the OnSize name for such event handlers (or any other name of your choice), it has only a single argument
(wxSizeEvent) and must again be `mapped' using the EVT\_SIZE macro. The same goes for all other events,
including OnClose (although in fact you can still use the old, virtual form of OnClose for the time being).
\section{Class hierarchy}\label{portingclasshierarchy}
\chapter{Class hierarchy}\label{classhierarchy}
The class hierarchy has changed somewhat. wxToolBar and wxButtonBar
classes have been split into several classes, and are derived from wxControl (which was
@@ -141,15 +173,14 @@ There are new MDI classes so that wxFrame does not have to be overloaded with th
functionality.
There are new device context classes, with wxPanelDC and wxCanvasDC disappearing.
See \helpref{Device contexts and painting}{portingdc}.
See \helpref{Device contexts and painting}{dc}.
\section{GDI objects}\label{portinggdiobjects}
\chapter{GDI objects}\label{gdiobjects}
These objects - instances of classes such as wxPen, wxBrush, wxBitmap (but not wxColour) -
are now implemented with reference-counting. This makes assignment a very cheap operation,
and also means that management of the resource is largely automatic. You now pass {\it references} to
objects to functions such as wxDC::SetPen, not pointers, so you will need to dereference your pointers.
The device context does not store a copy of the pen
objects to functions such as wxDC::SetPen. The device context does not store a copy of the pen
itself, but takes a copy of it (via reference counting), and the object's data gets freed up
when the reference count goes to zero. The application does not have to worry so much about
who the object belongs to: it can pass the reference, then destroy the object without
@@ -160,10 +191,13 @@ pointers to GDI objects, and using the FindOrCreate... functions. However, it is
keep this explicit management to a minimum, instead creating objects on the fly as needed, on the stack,
unless this causes too much of an overhead in your application.
At a minimum, you will have to make sure that calls to SetPen, SetBrush etc. work. Also, where you pass NULL to these
functions, you will need to use an identifier such as wxNullPen or wxNullBrush.
At a minimum, you will have to make sure that calls to SetPen, SetBrush etc. work. Some compilers
will do the conversion from pointer to reference automatically (via a constructor in the GDI
class) but you cannot rely on this being true for all compilers. Also, where you pass NULL to these
functions, you will need to either cast to the appropriate reference type, or instead
use an identifier such as wxNullPen or wxNullBrush.
\section{Dialogs and controls}\label{portingdialogscontrols}
\chapter{Dialogs and controls}\label{dialogscontrols}
\wxheading{Labels}
@@ -179,7 +213,8 @@ properties.
All window constructors have two main changes, apart from the label issue mentioned above.
Windows now have integer identifiers; and position and size are now passed as wxPoint and
wxSize objects. In addition, some windows have a wxValidator argument.
wxSize objects. In addition, some windows have a wxValidator argument. wxWindows 2.0 may provide
old-style constructors in WXWIN\_COMPATIBILITY mode for limited backward compatibility.
\wxheading{Show versus ShowModal}
@@ -218,12 +253,12 @@ wxGroupBox is renamed wxStaticBox.
\wxheading{wxForm}
Note that wxForm is no longer supported in wxWindows 2.0. Consider using the wxPropertyFormView class
Note that wxForm is no longer supported in wxWindows 2.0. Consider using the wxPropertyForm class
instead, which takes standard dialogs and panels and associates controls with property objects.
You may also find that the new validation method, combined with dialog resources, is easier
and more flexible than using wxForm.
\section{Device contexts and painting}\label{portingdc}
\chapter{Device contexts and painting}\label{dc}
In wxWindows 2.0, device contexts are used for drawing into, as per 1.xx, but the way
they are accessed and constructed is a bit different.
@@ -243,11 +278,9 @@ If you used device context functions with wxPoint or wxIntPoint before, please n
that wxPoint now contains integer members, and there is a new class wxRealPoint. wxIntPoint
no longer exists.
wxMetaFile and wxMetaFileDC have been renamed to wxMetafile and wxMetafileDC.
\chapter{Miscellaneous}
\section{Miscellaneous}
\subsection{Strings}
\section{Strings}
wxString has replaced char* in the majority of cases. For passing strings into functions,
this should not normally require you to change your code if the syntax is otherwise the
@@ -259,10 +292,9 @@ returned in wxWindows 1.xx, your application will need to be changed. Usually yo
simplify your application's allocation and deallocation of memory for the returned string,
and simply assign the result to a wxString object. For example, replace this:
{\small
\begin{verbatim}
{\small\begin{verbatim}
char* s = wxFunctionThatReturnsString();
s = copystring(s); // Take a copy in case it is temporary
s = copystring(s); // Take a copy in case it's temporary
.... // Do something with it
delete[] s;
\end{verbatim}
@@ -270,8 +302,7 @@ and simply assign the result to a wxString object. For example, replace this:
with this:
{\small
\begin{verbatim}
{\small\begin{verbatim}
wxString s = wxFunctionThatReturnsString();
.... // Do something with it
\end{verbatim}
@@ -280,7 +311,7 @@ with this:
To indicate an empty return value or a problem, a function may return either the
empty string (``") or a null string. You can check for a null string with wxString::IsNull().
\subsection{Use of const}
\section{Use of const}
The {\bf const} keyword is now used to denote constant functions that do not affect the
object, and for function arguments to denote that the object passed cannot be changed.
@@ -291,180 +322,69 @@ check whether there is a parameter mismatch (or function type mismatch) involvin
Try to use the {\bf const} keyword in your own code where possible.
\section{Backward compatibility}\label{portingcompat}
\chapter{Backward compatibility}\label{compat}
Some wxWindows 1.xx functionality has been left to ease the transition to 2.0. This functionality
(usually) only works if you compile with WXWIN\_COMPATIBILITY set to 1 in setup.h.
(usually) only works if you compile with WXWIN\_COMPATIBILITY set to 1.
Mostly this defines old names to be the new names (e.g. wxRectangle is defined to be wxRect).
TODO
\section{Quick reference}\label{portingquickreference}
OnMenuCommand, OnSize, OnActivate, OnPaint, others?? can all be prefixed with Old (e.g. OldOnMenuCommand)
and will work as before. You are encouraged to convert your code to the new forms, but
this will allow you to get your applications up and running a little more quickly.
OnClose can be used as-is without an 'Old' prefix, but officially the OnCloseWindow event table handler should be
used instead.
\chapter{Quick reference}\label{quickreference}
This section allows you to quickly find features that
need to be converted.
\subsection{Include files}
TODO
Use the form:
\section{OnActivate}
\begin{verbatim}
#include <wx/wx.h>
#include <wx/button.h>
\end{verbatim}
Rename to OldOnActivate, or replace arguments with one wxActivateEvent\& argument.
For precompiled header support, use this form:
\wxheading{See also}
\begin{verbatim}
// For compilers that support precompilation, includes "wx.h".
#include <wx/wxprec.h>
\helpref{Backward compatibility}{compat}
#ifdef __BORLANDC__
#pragma hdrstop
#endif
\section{OnClose}
// Any files you want to include if not precompiling by including
// the whole of <wx/wx.h>
#ifndef WX_PRECOMP
#include <stdio.h>
#include <wx/setup.h>
#include <wx/bitmap.h>
#include <wx/brush.h>
#endif
This can either remain the same as before, or you can add an OnCloseWindow event
handler using an EVT\_CLOSE event table entry.
// Any files you want to include regardless of precompiled headers
#include <wx/toolbar.h>
\end{verbatim}
\wxheading{See also}
\subsection{IPC classes}
\helpref{Backward compatibility}{compat}
These are now separated out into wxDDEServer/Client/Connection (Windows only) and wxTCPServer/Client/Connection
(Windows and Unix). Take care to use wxString for your overridden function arguments, instead of char*, as per
the documentation.
\section{OnMenuCommand}
\subsection{MDI style frames}
Rename to OldOnMenuCommand, or replace with a series of functions, one for
each case of your old switch statement. Create an event table for your frame
containing EVT\_MENU macros, and insert DECLARE\_EVENT\_TABLE() in your frame class.
MDI is now implemented as a family of separate classes, so you can't switch to MDI just by
using a different frame style. Please see the documentation for the MDI frame classes, and the MDI
sample may be helpful too.
\wxheading{See also}
\subsection{OnActivate}
\helpref{Backward compatibility}{compat}
Replace the arguments with one wxActivateEvent\& argument, make sure the function isn't virtual,
and add an EVT\_ACTIVATE event table entry.
\section{OnSize}
\subsection{OnChar}
Rename to OldOnSize, or replace arguments with one wxSizeEvent\& argument.
This is now a non-virtual function, with the same wxKeyEvent\& argument as before.
Add an EVT\_CHAR macro to the event table
for your window, and the implementation of your function will need very few changes.
\wxheading{See also}
\subsection{OnClose}
\helpref{Backward compatibility}{compat}
The old virtual function OnClose is now obsolete.
Add an OnCloseWindow event handler using an EVT\_CLOSE event table entry. For details
about window destruction, see the Windows Deletion Overview in the manual. This is a subtle
topic so please read it very carefully. Basically, OnCloseWindow is now responsible for
destroying a window with Destroy(), but the default implementation (for example for wxDialog) may not
destroy the window, so to be sure, always provide this event handler so it is obvious what's going on.
\section{wxDialog::Show}
\subsection{OnEvent}
This is now a non-virtual function, with the same wxMouseEvent\& argument as before. However
you may wish to rename it OnMouseEvent. Add an EVT\_MOUSE\_EVENTS macro to the event table
for your window, and the implementation of your function will need very few changes.
However, if you wish to intercept different events using different functions, you can
specify specific events in your event table, such as EVT\_LEFT\_DOWN.
Your OnEvent function is likely to have references to GetDC(), so make sure you create
a wxClientDC instead. See \helpref{Device contexts}{portingdc}.
If you are using a wxScrolledWindow (formerly wxCanvas), you should call
PrepareDC(dc) to set the correct translation for the current scroll position.
\subsection{OnMenuCommand}
You need to replace this virtual function with a series of non-virtual functions, one for
each case of your old switch statement. Each function takes a wxCommandEvent\& argument.
Create an event table for your frame
containing EVT\_MENU macros, and insert DECLARE\_EVENT\_TABLE() in your frame class, as
per the samples.
\subsection{OnPaint}
This is now a non-virtual function, with a wxPaintEvent\& argument.
Add an EVT\_PAINT macro to the event table
for your window.
Your function {\it must} create a wxPaintDC object, instead of using GetDC to
obtain the device context.
If you are using a wxScrolledWindow (formerly wxCanvas), you should call
PrepareDC(dc) to set the correct translation for the current scroll position.
\subsection{OnSize}
Replace the arguments with one wxSizeEvent\& argument, make it non-virtual, and add to your
event table using EVT\_SIZE.
\subsection{wxApp definition}
The definition of OnInit has changed. Return a bool value, not a wxFrame.
Also, do {\it not} declare a global application object. Instead, use the macros
DECLARE\_APP and IMPLEMENT\_APP as per the samples. Remove any occurrences of IMPLEMENT\_WXWIN\_MAIN:
this is subsumed in IMPLEMENT\_APP.
\subsection{wxButton}
For bitmap buttons, use wxBitmapButton.
\subsection{wxCanvas}
Change the name to wxScrolledWindow.
\subsection{wxDialogBox}
Change the name to wxDialog, and for modal dialogs, use ShowModal instead of Show.
\subsection{wxDialog::Show}
If you used {\bf Show} to show a modal dialog or to override the standard
If you used {\bf Show} to show a modal dialog, or to override the standard
modal dialog {\bf Show}, use {\bf ShowModal} instead.
\wxheading{See also}
\helpref{Dialogs and controls}{portingdialogscontrols}
\subsection{wxForm}
Sorry, this class is no longer available. Try using the wxPropertyListView or wxPropertyFormView class
instead, or use .wxr files and validators.
\subsection{wxPoint}
The old wxPoint is called wxRealPoint, and wxPoint now uses integers.
\subsection{wxRectangle}
This is now called wxRect.
\subsection{wxScrollBar}
The function names have changed for this class: please refer to the documentation for wxScrollBar. Instead
of setting properties individually, you will call SetScrollbar with several parameters.
\subsection{wxText, wxMultiText, wxTextWindow}
Change all these to wxTextCtrl. Add the window style wxTE\_MULTILINE if you
wish to have a multi-line text control.
\subsection{wxToolBar}
This name is an alias for the most popular form of toolbar for your platform. There is now a family
of toolbar classes, with for example wxToolBar95, wxToolBarMSW and wxToolBarSimple classes existing
under Windows 95.
Toolbar management is supported by frames, so calling wxFrame::CreateToolBar and adding tools is usually
enough, and the SDI or MDI frame will manage the positioning for you. The client area of the frame is the space
left over when the menu bar, toolbar and status bar have been taken into account.
\helpref{Dialogs and controls}{dialogscontrols}
\end{document}

View File

@@ -0,0 +1,28 @@
;;; Tex2RTF initialisation file for 16-bit Winhelp
runTwice = yes
titleFontSize = 12
authorFontSize = 10
authorFontSize = 10
chapterFontSize = 12
sectionFontSize = 12
subsectionFontSize = 12
contentsDepth = 2
headerRule = yes
footerRule = yes
useHeadingStyles = yes
listItemIndent=40
generateHPJ = yes
htmlBrowseButtons = bitmap
winHelpContents = yes
winHelpVersion = 3 ; 3 for Windows 3.x, 4 for Windows 95
winHelpTitle = "wxWindows Porting Guide"
truncateFilenames = yes
combineSubSections = yes
\overview [2] {\rtfonly{See also }\settransparency{on}\sethotspotcolour{off}\sethotspotunderline{on}\winhelponly{\image{}{books.bmp}\settransparency{off}}
\htmlonly{\image{}{books.gif}}\helpref{#1}{#2}
\sethotspotcolour{on}\sethotspotunderline{on}}
\docparam [2]{\parskip{0}{\it #1}\par\parskip{10}\indented{1cm}{#2}}
\wxheading [1]{{\bf \fcol{blue}{#1}}}
\const [0] {{\bf const}}
\constfunc [3] {{\bf #1} {\bf #2}(#3) {\bf const}\index{#2}}

View File

@@ -0,0 +1,289 @@
% LaTeX style file
% Name: texhelp.sty
% Author: Julian Smart
%
% Purpose
% -------
% Style file to enable the simultaneous preparation of printed LaTeX and on-line
% hypertext manuals.
% Use in conjunction with Tex2RTF (see Tex2RTF documentation).
%
% Note that if a non-ASCII character starts a newline and there should be a space
% between the last word on the previous line and the first word on this line,
% you need to use \rtfsp to generate a space in Windows Help. \rtfsp is ignored
% in all other formats.
%
% Julian Smart
% Artificial Intelligence Applications Institute
%
%
% ============== C++/CLIPS Documentation Facilities ==============
%
% Each class definition should be typeset with e.g.
%
% \section{\class{Name}: Parent}
%
% followed by a description of the class.
% Each member should follow:
%
% \membersection{wxName::Member}
%
% with a description of what this member does.
% Then, one (or more if overloaded) member (function) in detail:
%
% \func{return type}{name}{args}
% or
% \member{type}{name}
%
% where args is a list of \param{type}{name}, ...
% Function, e.g.
% e.g. to typeset
%
% void DoIt(char *string);
%
% write:
%
% \func{void}{DoIt}{\param{char *}{string}}
%
\newcommand{\func}[3]{\hangafter=1\noindent\hangindent=10mm
{{\it #1} {\bf #2}\index{#2}}(#3)}
% For function/type definition where the name is a pointer,
% e.g. to typeset
%
% typedef void (*wxFunction)(wxObject&)
%
% write:
%
% \pfunc{typedef void}{wxFunction}{param{wxObject&}}
\newcommand{\pfunc}[3]{\hangafter=1\noindent\hangindent=10mm
{{\it #1} ({\bf *#2})\index{#2}}(#3)}
% Use an ordinary \section command for class name definitions.
% This is used for a member, such as wxBitmap: GetDepth
\newcommand{\membersection}[1]{\subsection*{#1}\index{#1}}
% CLIPS function
\newcommand{\clipsfunc}[3]{\hangafter=1\noindent\hangindent=10mm
{{\bf #1} ({\bf #2}\index{#2}}#3)}
\newcommand{\clipssection}[1]{\chapter{#1}}
% This is used for a CLIPS function name
\newcommand{\functionsection}[1]{\subsection*{#1}}
% Member: a type and a name
\newcommand{\member}[2]{{\bf #1 \it #2}}
% C++ Parameter: a type and a name (no intervening space)
\newcommand{\param}[2]{{\it #1}{\bf #2}}
% CLIPS Parameter: a type and a name (one intervening space)
\newcommand{\cparam}[2]{{\bf #1} {\it #2}}
% Class: puts in index
\newcommand{\class}[1]{#1\index{#1}}
% Void type
\newcommand{\void}{{\it void}}
% Typeset destructor
\newcommand{\destruct}[1]{{$\sim$}#1}
% Typeset insert/extract operators
\newcommand{\cinsert}{$<<$}
\newcommand{\cextract}{$>>$}
% =================== Hypertext facilities ===================
%
% To insert hyperlinks (or references, in Latex), \label the sections
% or membersections \label{ref-label} immediately after the section, on the same line,
% and use \helpref{text-to-show}{ref-label} to make a reference.
%
% Type text with section reference
\newcommand{\helpref}[2]{{\it #1} (p.\ \pageref{#2}) }
% Type text with URL in verbatim mode
\newcommand{\urlref}[2]{#1 (\verb$#2$)}
% Don't typeset section number in LaTeX
\newcommand{\helprefn}[2]{{\it #1}}
% Like helpref, but popup text in WinHelp instead of hyperlinked
\newcommand{\popref}[2]{{\it #1}}
% Like footnote, but popup text.
\newcommand{\footnotepopup}[2]{{\it #1}\footnote{#2}}
% =================== On-line help specific macros ===================
%
% Global document font size/family, help only.
\newcommand{\helpfontsize}[1]{}
\newcommand{\helpfontfamily}[1]{}
% Ignore in all on-line help
\newcommand{\helpignore}[1]{#1}
% Only print in all on-line help
\newcommand{\helponly}[1]{}
% Ignore in LaTeX
\newcommand{\latexignore}[1]{}
% Only print in LaTeX
\newcommand{\latexonly}[1]{#1}
% Ignore in linear RTF
\newcommand{\rtfignore}[1]{#1}
% Only print in linear RTF
\newcommand{\rtfonly}[1]{}
% Ignore in WinHelp RTF
\newcommand{\winhelpignore}[1]{#1}
% Only print in WinHelp RTF
\newcommand{\winhelponly}[1]{}
% Ignore in wxHelp
\newcommand{\xlpignore}[1]{#1}
% Only print in wxHelp
\newcommand{\xlponly}[1]{}
% Ignore in HTML
\newcommand{\htmlignore}[1]{#1}
% Only print in HTML
\newcommand{\htmlonly}[1]{}
% Input a file only for help system (binder thickness is not a limitation
% in help systems!)
\newcommand{\helpinput}[1]{}
\newcommand{\rtfsp}{ } % Force a space in RTF, ignore in Latex
% =================== Miscellaneous macros ===================
%
% Headings consistent with generated ones
\newcommand{\myheading}[1]{\vspace*{25pt}
\begin{flushleft}
{\LARGE \bf #1}
\end{flushleft}
\vskip 20pt
}
% Heading with entry in contents page.
\newcommand{\chapterheading}[1]{\myheading{#1}
\addcontentsline{toc}{chapter}{#1}}
\newcommand{\sectionheading}[1]{\myheading{#1}
\addcontentsline{toc}{section}{#1}}
% Glossary environment
\newenvironment{helpglossary}{\newpage\chapterheading{Glossary}\begin{description}}{\end{description}}
% Glossary entry
\newcommand{\gloss}[1]{\item[#1]\index{#1}}
% Image: EPS in Latex, BMP or MF (whatever's available) in RTF. Requires psbox.
\newcommand{\image}[2]{\psboxto(#1){#2}}
% Image, left aligned (HTML)
\newcommand{\imager}[2]{\psboxto(#1){#2}}
% Image, right aligned (HTML)
\newcommand{\imagel}[2]{\psboxto(#1){#2}}
% Imagemap: principally for HTML only. In Latex,
% acts like \image.
\newcommand{\imagemap}[3]{\psboxto(#1){#2}}
% Headers and footers
% \setheader{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
% {OddPageLeft}{OddPageCentre}{OddPageRight}
\newcommand{\setheader}[6]{
\lhead[\fancyplain{}{#1}]{\fancyplain{}{#4}}
\chead[\fancyplain{}{#2}]{\fancyplain{}{#5}}
\rhead[\fancyplain{}{#3}]{\fancyplain{}{#6}}
}
% \setfooter{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
% {OddPageLeft}{OddPageCentre}{OddPageRight}
\newcommand{\setfooter}[6]{
\lfoot[\fancyplain{#1}{#1}]{\fancyplain{#4}{#4}}
\cfoot[\fancyplain{#2}{#2}]{\fancyplain{#5}{#5}}
\rfoot[\fancyplain{#3}{#3}]{\fancyplain{#6}{#6}}
}
% Needed for telling RTF where margin paragraph should go
% in mirrored margins mode.
\newcommand{\marginpareven}[1]{\hspace*{0pt}\marginpar{#1}}
\newcommand{\marginparodd}[1]{\hspace*{0pt}\marginpar{#1}}
% Environment for two-column table popular in WinHelp and manuals.
\newcommand{\twocolwidtha}[1]{\def\twocolwidthaval{#1}}
\newcommand{\twocolwidthb}[1]{\def\twocolwidthbval{#1}}
\newcommand{\twocolspacing}[1]{\def\twocolspacingval{#1}}
\twocolwidtha{3cm}
\twocolwidthb{8.5cm}
\twocolspacing{2}
\newcommand{\twocolitem}[2]{#1 & #2\\}
\newcommand{\twocolitemruled}[2]{#1 & #2\\\hline}
\newenvironment{twocollist}{\renewcommand{\arraystretch}{\twocolspacingval}\begin{tabular}{lp{\twocolwidthbval}}}%
{\end{tabular}\renewcommand{\arraystretch}{1}}
% Specifying table rows for RTF compatibility
\newcommand{\row}[1]{#1\\}
% Use for the last ruled row for correct RTF generation.
\newcommand{\ruledrow}[1]{#1\\\hline}
% Indentation environment. Arg1 is left margin size
\newenvironment{indented}[1]{\begin{list}{}{\leftmargin=#1}\item[]}%
{\end{list}}
% Framed box of text, normal formatting.
\newcommand{\normalbox}[1]{\fbox{\vbox{#1}}}
% Double-framed box of text.
\newcommand{\normalboxd}[1]{\fbox{\fbox{\vbox{#1}}}}
% WITHDRAWN -- can't do in RTF, easily.
% Framed box of text, horizontally centred. Ragged right within box.
% \newcommand{\centeredbox}[2]{\begin{center}\fbox{\parbox{#1}{\raggedright#2}}\end{center}}
% Double-framed box of text, horizontally centred. Ragged right within box.
% \newcommand{\centeredboxd}[2]{\begin{center}\fbox{\fbox{\parbox{#1}{\raggedright#2}}}\end{center}}
% toocomplex environment: simply prints the argument in LaTeX,
% comes out verbatim in all generated formats.
\newenvironment{toocomplex}{}{}
% Colour: dummy commands since LaTeX doesn't support colour.
% \definecolour{name}{red}{blue}{green}
% \fcol{name}{text} ; Foreground
% \bcol{name}{text} ; Background
\newcommand{\definecolour}[4]{}
\newcommand{\definecolor}[4]{}
\newcommand{\fcol}[2]{#2}
\newcommand{\bcol}[2]{#2}
\newcommand{\sethotspotcolour}[1]{}
\newcommand{\sethotspotunderline}[1]{}
\newcommand{\settransparency}[1]{}
\newcommand{\backslashraw}[0]{}
\newcommand{\lbraceraw}[0]{}
\newcommand{\rbraceraw}[0]{}
\newcommand{\registered}[0]{(r)}
\newcommand{\background}[1]{}
\newcommand{\textcolour}[1]{}
\newcommand{\overview}[2]{See \helpref{#1}{#2}.}
\newcommand{\docparam}[2]{{\it #1}\begin{list}{}{\leftmargin=1cm}\item[]
#2%
\end{list}}
\newcommand{\wxheading}[1]{{\bf #1}}
\newcommand{\const}[0]{{\bf const}}
\newcommand{\constfunc}[3]{{\bf #1} {\bf #2}(#3) {\bf const}\index{#2}}

View File

@@ -0,0 +1 @@
GIF87a

After

Width:  |  Height:  |  Size: 6 B

View File

@@ -1,206 +0,0 @@
\section{\class{wxAcceleratorEntry}}\label{wxacceleratorentry}
An object used by an application wishing to create an \helpref{accelerator table}{wxacceleratortable}.
\wxheading{Derived from}
None
\wxheading{Include files}
<wx/accel.h>
\wxheading{See also}
\helpref{wxAcceleratorTable}{wxacceleratortable}, \helpref{wxWindow::SetAcceleratorTable}{wxwindowsetacceleratortable}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxAcceleratorEntry::wxAcceleratorEntry}\label{wxacceleratorentryconstr}
\func{}{wxAcceleratorEntry}{\void}
Default constructor.
\func{}{wxAcceleratorEntry}{\param{int}{ flags}, \param{int}{ keyCode}, \param{int}{ cmd}}
Constructor.
\wxheading{Parameters}
\docparam{flags}{One of wxACCEL\_ALT, wxACCEL\_SHIFT, wxACCEL\_CTRL and wxACCEL\_NORMAL. Indicates
which modifier key is held down.}
\docparam{keyCode}{The keycode to be detected. See \helpref{Keycodes}{keycodes} for a full list of keycodes.}
\docparam{cmd}{The menu or control command identifier.}
\membersection{wxAcceleratorEntry::GetCommand}\label{wxacceleratorentrygetcommand}
\constfunc{int}{GetCommand}{\void}
Returns the command identifier for the accelerator table entry.
\membersection{wxAcceleratorEntry::GetFlags}\label{wxacceleratorentrygetflags}
\constfunc{int}{GetFlags}{\void}
Returns the flags for the accelerator table entry.
\membersection{wxAcceleratorEntry::GetKeyCode}\label{wxacceleratorentrygetkeycode}
\constfunc{int}{GetKeyCode}{\void}
Returns the keycode for the accelerator table entry.
\membersection{wxAcceleratorEntry::Set}\label{wxacceleratorentryset}
\func{void}{Set}{\param{int}{ flags}, \param{int}{ keyCode}, \param{int}{ cmd}}
Sets the accelerator entry parameters.
\wxheading{Parameters}
\docparam{flags}{One of wxACCEL\_ALT, wxACCEL\_SHIFT, wxACCEL\_CTRL and wxACCEL\_NORMAL. Indicates
which modifier key is held down.}
\docparam{keyCode}{The keycode to be detected. See \helpref{Keycodes}{keycodes} for a full list of keycodes.}
\docparam{cmd}{The menu or control command identifier.}
\section{\class{wxAcceleratorTable}}\label{wxacceleratortable}
An accelerator table allows the application to specify a table of keyboard shortcuts for
menus or other commands. On Windows, menu or button commands are supported; on GTK,
only menu commands are supported.
The object {\bf wxNullAcceleratorTable} is defined to be a table with no data, and is the
initial accelerator table for a window.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/accel.h>
\wxheading{Example}
{\small%
\begin{verbatim}
wxAcceleratorEntry entries[4];
entries[0].Set(wxACCEL_CTRL, (int) 'N', ID_NEW_WINDOW);
entries[1].Set(wxACCEL_CTRL, (int) 'X', wxID_EXIT);
entries[2].Set(wxACCEL_SHIFT, (int) 'A', ID_ABOUT);
entries[3].Set(wxACCEL_NORMAL, WXK_DELETE, wxID_CUT);
wxAcceleratorTable accel(4, entries);
frame->SetAcceleratorTable(accel);
\end{verbatim}
}
\wxheading{Remarks}
An accelerator takes precedence over normal processing and can be a convenient way to program some event handling.
For example, you can use an accelerator table to enable a dialog with a multi-line text control to
accept CTRL-Enter as meaning `OK' (but not in GTK at present).
\wxheading{See also}
\helpref{wxAcceleratorEntry}{wxacceleratorentry}, \helpref{wxWindow::SetAcceleratorTable}{wxwindowsetacceleratortable}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxAcceleratorTable::wxAcceleratorTable}\label{wxacceleratortableconstr}
\func{}{wxAcceleratorTable}{\void}
Default constructor.
\func{}{wxAcceleratorTable}{\param{const wxAcceleratorTable\& }{bitmap}}
Copy constructor.
\func{}{wxAcceleratorTable}{\param{int}{ n}, \param{wxAcceleratorEntry}{ entries[]}}
Creates from an array of \helpref{wxAcceleratorEntry}{wxacceleratorentry} objects.
\func{}{wxAcceleratorTable}{\param{const wxString\&}{ resource}}
Loads the accelerator table from a Windows resource (Windows only).
\wxheading{Parameters}
\docparam{n}{Number of accelerator entries.}
\docparam{entries}{The array of entries.}
\docparam{resource}{Name of a Windows accelerator.}
\pythonnote{The wxPython constructor accepts a list of
wxAcceleratorEntry objects, or 3-tuples consisting of flags, keyCode,
and cmd values like you would construct wxAcceleratorEntry objects with.}
\perlnote{The wxPerl constructor accepts a list of either
Wx::AcceleratorEntry objects or references to 3-element arrays
( flags, keyCode, cmd ), like the parameters of Wx::AcceleratorEntry::new.}
\membersection{wxAcceleratorTable::\destruct{wxAcceleratorTable}}
\func{}{\destruct{wxAcceleratorTable}}{\void}
Destroys the wxAcceleratorTable object.
\membersection{wxAcceleratorTable::Ok}\label{wxacceleratortableok}
\constfunc{bool}{Ok}{\void}
Returns TRUE if the accelerator table is valid.
\membersection{wxAcceleratorTable::operator $=$}
\func{wxAcceleratorTable\& }{operator $=$}{\param{const wxAcceleratorTable\& }{accel}}
Assignment operator. This operator does not copy any data, but instead
passes a pointer to the data in {\it accel} and increments a reference
counter. It is a fast operation.
\wxheading{Parameters}
\docparam{accel}{Accelerator table to assign.}
\wxheading{Return value}
Returns reference to this object.
\membersection{wxAcceleratorTable::operator $==$}
\func{bool}{operator $==$}{\param{const wxAcceleratorTable\& }{accel}}
Equality operator. This operator tests whether the internal data pointers are
equal (a fast test).
\wxheading{Parameters}
\docparam{accel}{Accelerator table to compare with}
\wxheading{Return value}
Returns TRUE if the accelerator tables were effectively equal, FALSE otherwise.
\membersection{wxAcceleratorTable::operator $!=$}
\func{bool}{operator $!=$}{\param{const wxAcceleratorTable\& }{accel}}
Inequality operator. This operator tests whether the internal data pointers are
unequal (a fast test).
\wxheading{Parameters}
\docparam{accel}{Accelerator table to compare with}
\wxheading{Return value}
Returns TRUE if the accelerator tables were unequal, FALSE otherwise.

View File

@@ -8,10 +8,6 @@ or deactivated.
\helpref{wxEvent}{wxevent}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/event.h>
\wxheading{Event table macros}
To process an activate event, use these event handler macros to direct input to a member
@@ -34,16 +30,15 @@ or a frame becomes inactivate resulting in all application frames being inactive
\wxheading{See also}
%\helpref{wxWindow::OnActivate}{wxwindowonactivate},\rtfsp
%% GD: OnXXX functions are not documented
%%\helpref{wxApp::OnActivate}{wxapponactivate},\rtfsp
\helpref{wxWindow::OnActivate}{wxwindowonactivate},\rtfsp
\helpref{wxApp::OnActivate}{wxapponactivate},\rtfsp
\helpref{Event handling overview}{eventhandlingoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxActivateEvent::wxActivateEvent}
\func{}{wxActivateEvent}{\param{WXTYPE }{eventType = 0}, \param{bool}{ active = TRUE}, \param{int }{id = 0}}
\func{}{wxActivateEvent}{\param{WXTYPE }{eventType = 0}, \param{int }{id = 0}}
Constructor.

View File

@@ -22,10 +22,6 @@ a reference to your application object) to be visible to other files.
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/app.h>
\wxheading{See also}
\helpref{wxApp overview}{wxappoverview}
@@ -34,10 +30,15 @@ a reference to your application object) to be visible to other files.
\membersection{wxApp::wxApp}
\func{void}{wxApp}{\void}
\func{void}{wxApp}{\param{int}{ language = wxLANGUAGE\_ENGLISH}}
Constructor. Called implicitly with a definition of a wxApp object.
The argument is a language identifier; this is an experimental
feature and will be expanded and documented in future versions.
TODO: completely rewrite the language stuff.
\membersection{wxApp::\destruct{wxApp}}
\func{void}{\destruct{wxApp}}{\void}
@@ -85,17 +86,6 @@ This can be used for programming event loops, e.g.
\helpref{wxApp::Pending}{wxapppending}
\membersection{wxApp::FilterEvent}\label{wxappfilterevent}
\func{int}{FilterEvent}{\param{wxEvent\& }{event}}
This function is called before processing any event and allows the application
to preempt the processing of some events. If this method returns $-1$ the event
is processed normally, otherwise either {\tt TRUE} or {\tt FALSE} should be
returned and the event processing stops immediately considering that the event
had been already processed (for the former return value) or that it is not
going to be processed at all (for the latter one).
\membersection{wxApp::GetAppName}\label{wxappgetappname}
\constfunc{wxString}{GetAppName}{\void}
@@ -128,49 +118,32 @@ manner to refer to the application.
\helpref{wxApp::SetClassName}{wxappsetclassname}
\membersection{wxApp::GetExitOnFrameDelete}\label{wxappgetexitonframedelete}
\membersection{wxApp::GetExitOnDelete}\label{wxappgetexitondelete}
\constfunc{bool}{GetExitFrameOnDelete}{\void}
\constfunc{bool}{GetExitOnDelete}{\void}
Returns TRUE if the application will exit when the top-level window is deleted, FALSE
otherwise.
\wxheading{See also}
\helpref{wxApp::SetExitOnFrameDelete}{wxappsetexitonframedelete},\\
\helpref{wxApp shutdown overview}{wxappshutdownoverview}
\helpref{wxApp::SetExitOnDelete}{wxappsetexitondelete}
\membersection{wxApp::GetPrintMode}\label{wxappgetprintmode}
\constfunc{bool}{GetPrintMode}{\void}
Returns the print mode: see \helpref{wxApp::SetPrintMode}{wxappsetprintmode}.
\membersection{wxApp::GetTopWindow}\label{wxappgettopwindow}
\constfunc{virtual wxWindow *}{GetTopWindow}{\void}
\constfunc{wxWindow *}{GetTopWindow}{\void}
Returns a pointer to the top window.
\wxheading{Remarks}
If the top window hasn't been set using \helpref{wxApp::SetTopWindow}{wxappsettopwindow}, this
function will find the first top-level window (frame or dialog) and return that.
\wxheading{See also}
\helpref{SetTopWindow}{wxappsettopwindow}
\membersection{wxApp::GetUseBestVisual}\label{wxappgetusebestvisual}
\constfunc{bool}{GetUseBestVisual}{\void}
Returns TRUE if the application will use the best visual on systems that support
different visuals, FALSE otherwise.
\wxheading{See also}
\helpref{SetUseBestVisual}{wxappsetusebestvisual}
\membersection{wxApp::GetVendorName}\label{wxappgetvendorname}
\constfunc{wxString}{GetVendorName}{\void}
Returns the application's vendor name.
\helpref{wxApp::SetTopWindow}{wxappsettopwindow}
\membersection{wxApp::ExitMainLoop}\label{wxappexitmainloop}
@@ -201,252 +174,93 @@ to provide your own (environment-dependent) main loop.
Returns 0 under X, and the wParam of the WM\_QUIT message under Windows.
%% VZ: OnXXX() functions should *not* be documented
%%
%%\membersection{wxApp::OnActivate}\label{wxapponactivate}
%%
%%\func{void}{OnActivate}{\param{wxActivateEvent\& }{event}}
%%
%%Provide this member function to know whether the application is being
%%activated or deactivated (Windows only).
%%
%%\wxheading{See also}
%%
%%\helpref{wxWindow::OnActivate}{wxwindowonactivate}, \helpref{wxActivateEvent}{wxactivateevent}
%%
%%\membersection{wxApp::OnCharHook}\label{wxapponcharhook}
%%
%%\func{void}{OnCharHook}{\param{wxKeyEvent\&}{ event}}
%%
%%This event handler function is called (under Windows only) to allow the window to intercept keyboard events
%%before they are processed by child windows.
%%
%%\wxheading{Parameters}
%%
%%\docparam{event}{The keypress event.}
%%
%%\wxheading{Remarks}
%%
%%Use the wxEVT\_CHAR\_HOOK macro in your event table.
%%
%%If you use this member, you can selectively consume keypress events by calling\rtfsp
%%\helpref{wxEvent::Skip}{wxeventskip} for characters the application is not interested in.
%%
%%\wxheading{See also}
%%
%%\helpref{wxKeyEvent}{wxkeyevent}, \helpref{wxWindow::OnChar}{wxwindowonchar},\rtfsp
%%\helpref{wxWindow::OnCharHook}{wxwindowoncharhook}, \helpref{wxDialog::OnCharHook}{wxdialogoncharhook}
\membersection{wxApp::OnActivate}\label{wxapponactivate}
\membersection{wxApp::OnAssert}\label{wxapponassert}
\func{void}{OnActivate}{\param{wxActivateEvent\& }{event}}
\func{void}{OnAssert}{\param{const wxChar }{*file}, \param{int }{line}, \param{const wxChar }{*cond}, \param{const wxChar }{*msg}}
Provide this member function to know whether the application is being
activated or deactivated (Windows only).
This function is called when an assert failure occurs, i.e. the condition
specified in \helpref{wxASSERT}{wxassert} macro evaluated to {\tt FALSE}.
It is only called in debug mode (when {\tt \_\_WXDEBUG\_\_} is defined) as
asserts are not left in the release code at all.
\wxheading{See also}
The base class version show the default assert failure dialog box proposing to
the user to stop the program, continue or ignore all subsequent asserts.
\wxheading{Parameters}
\docparam{file}{the name of the source file where the assert occured}
\docparam{line}{the line number in this file where the assert occured}
\docparam{cond}{the condition of the failed assert in string form}
\docparam{msg}{the message specified as argument to
\helpref{wxASSERT\_MSG}{wxassertmsg} or \helpref{wxFAIL\_MSG}{wxfailmsg}, will
be {\tt NULL} if just \helpref{wxASSERT}{wxassert} or \helpref{wxFAIL}{wxfail}
was used}
\helpref{wxWindow::OnActivate}{wxwindowonactivate}, \helpref{wxActivateEvent}{wxactivateevent}
\membersection{wxApp::OnExit}\label{wxapponexit}
\func{int}{OnExit}{\void}
Provide this member function for any processing which needs to be
done as the application is about to exit. OnExit is called after
destroying all application windows and controls, but before
wxWindows cleanup.
Provide this member function for any processing which needs to be done as
the application is about to exit.
\membersection{wxApp::OnCmdLineError}\label{wxapponcmdlineerror}
\membersection{wxApp::OnCharHook}\label{wxapponcharhook}
\func{bool}{OnCmdLineError}{\param{wxCmdLineParser\& }{parser}}
\func{void}{OnCharHook}{\param{wxKeyEvent\&}{ event}}
Called when command line parsing fails (i.e. an incorrect command line option
was specified by the user). The default behaviour is to show the program usage
text and abort the program.
This event handler function is called (under Windows only) to allow the window to intercept keyboard events
before they are processed by child windows.
Return {\tt TRUE} to continue normal execution or {\tt FALSE} to return
{\tt FALSE} from \helpref{OnInit}{wxapponinit} thus terminating the program.
\wxheading{Parameters}
\docparam{event}{The keypress event.}
\wxheading{Remarks}
Use the wxEVT\_CHAR\_HOOK macro in your event table.
If you use this member, you can selectively consume keypress events by calling\rtfsp
\helpref{wxEvent::Skip}{wxeventskip} for characters the application is not interested in.
\wxheading{See also}
\helpref{OnInitCmdLine}{wxapponinitcmdline}
\helpref{wxKeyEvent}{wxkeyevent}, \helpref{wxWindow::OnChar}{wxwindowonchar},\rtfsp
\helpref{wxWindow::OnCharHook}{wxwindowoncharhook}, \helpref{wxDialog::OnCharHook}{wxdialogoncharhook}
\membersection{wxApp::OnCmdLineHelp}\label{wxapponcmdlinehelp}
\membersection{wxApp::OnIdle}\label{wxapponidle}
\func{bool}{OnCmdLineHelp}{\param{wxCmdLineParser\& }{parser}}
\func{void}{OnIdle}{\param{wxIdleEvent\& }{event}}
Called when the help option ({\tt --help}) was specified on the command line.
The default behaviour is to show the program usage text and abort the program.
Override this member function for any processing which needs to be done
when the application is idle. You should call wxApp::OnIdle from your own function,
since this forwards OnIdle events to windows and also performs garbage collection for
windows whose destruction has been delayed.
Return {\tt TRUE} to continue normal execution or {\tt FALSE} to return
{\tt FALSE} from \helpref{OnInit}{wxapponinit} thus terminating the program.
wxWindows' strategy for OnIdle processing is as follows. After pending user interface events for an
application have all been processed, wxWindows sends an OnIdle event to the application object. wxApp::OnIdle itself
sends an OnIdle event to each application window, allowing windows to do idle processing such as updating
their appearance. If either wxApp::OnIdle or a window OnIdle function requested more time, by
caling \helpref{wxIdleEvent::ReqestMore}{wxidleeventrequestmore}, wxWindows will send another OnIdle
event to the application event. This will occur in a loop until either a user event is found to be
pending, or OnIdle requests no more time. Then all pending user events are processed until the system
goes idle again, when OnIdle is called, and so on.
\wxheading{See also}
\helpref{OnInitCmdLine}{wxapponinitcmdline}
\membersection{wxApp::OnCmdLineParsed}\label{wxapponcmdlineparsed}
\func{bool}{OnCmdLineParsed}{\param{wxCmdLineParser\& }{parser}}
Called after the command line had been successfully parsed. You may override
this method to test for the values of the various parameters which could be
set from the command line.
Don't forget to call the base class version unless you want to suppress
processing of the standard command line options.
Return {\tt TRUE} to continue normal execution or {\tt FALSE} to return
{\tt FALSE} from \helpref{OnInit}{wxapponinit} thus terminating the program.
\wxheading{See also}
\helpref{OnInitCmdLine}{wxapponinitcmdline}
\membersection{wxApp::OnFatalException}\label{wxapponfatalexception}
\func{void}{OnFatalException}{\void}
This function may be called if something fatal happens: an unhandled
exception under Win32 or a a fatal signal under Unix, for example. However,
this will not happen by default: you have to explicitly call
\helpref{wxHandleFatalExceptions}{wxhandlefatalexceptions} to enable this.
Generally speaking, this function should only show a message to the user and
return. You may attempt to save unsaved data but this is not guaranteed to
work and, in fact, probably won't.
\wxheading{See also}
\helpref{wxHandleFatalExcetions}{wxhandlefatalexceptions}
%% VZ: the wxApp event handler are private and should not be documented here!
%%
%%\membersection{wxApp::OnIdle}\label{wxapponidle}
%%
%%\func{void}{OnIdle}{\param{wxIdleEvent\& }{event}}
%%
%%Override this member function for any processing which needs to be done
%%when the application is idle. You should call wxApp::OnIdle from your own function,
%%since this forwards OnIdle events to windows and also performs garbage collection for
%%windows whose destruction has been delayed.
%%
%%wxWindows' strategy for OnIdle processing is as follows. After pending user interface events for an
%%application have all been processed, wxWindows sends an OnIdle event to the application object. wxApp::OnIdle itself
%%sends an OnIdle event to each application window, allowing windows to do idle processing such as updating
%%their appearance. If either wxApp::OnIdle or a window OnIdle function requested more time, by
%%calling \helpref{wxIdleEvent::RequestMore}{wxidleeventrequestmore}, wxWindows will send another OnIdle
%%event to the application object. This will occur in a loop until either a user event is found to be
%%pending, or OnIdle requests no more time. Then all pending user events are processed until the system
%%goes idle again, when OnIdle is called, and so on.
%%
%%\wxheading{See also}
%%
%%\helpref{wxWindow::OnIdle}{wxwindowonidle}, \helpref{wxIdleEvent}{wxidleevent},\rtfsp
%%\helpref{wxWindow::SendIdleEvents}{wxappsendidleevents}
%%
%%\membersection{wxApp::OnEndSession}\label{wxapponendsession}
%%
%%\func{void}{OnEndSession}{\param{wxCloseEvent\& }{event}}
%%
%%This is an event handler function called when the operating system or GUI session is
%%about to close down. The application has a chance to silently save information,
%%and can optionally close itself.
%%
%%Use the EVT\_END\_SESSION event table macro to handle query end session events.
%%
%%The default handler calls \helpref{wxWindow::Close}{wxwindowclose} with a TRUE argument
%%(forcing the application to close itself silently).
%%
%%\wxheading{Remarks}
%%
%%Under X, OnEndSession is called in response to the `die' event.
%%
%%Under Windows, OnEndSession is called in response to the WM\_ENDSESSION message.
%%
%%\wxheading{See also}
%%
%%\helpref{wxWindow::Close}{wxwindowclose},\rtfsp
%%\helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow},\rtfsp
%%\helpref{wxCloseEvent}{wxcloseevent},\rtfsp
%%\helpref{wxApp::OnQueryEndSession}{wxapponqueryendsession}
\helpref{wxWindow::OnIdle}{wxwindowonidle}, \helpref{wxIdleEvent}{wxidleevent},\rtfsp
\helpref{wxWindow::SendIdleEvents}{wxappsendidleevents}
\membersection{wxApp::OnInit}\label{wxapponinit}
\func{bool}{OnInit}{\void}
This must be provided by the application, and will usually create the
application's main window, optionally calling
\helpref{wxApp::SetTopWindow}{wxappsettopwindow}.
Notice that if you want to to use the command line processing provided by
wxWindows you have to call the base class version in the derived class
OnInit().
application's main window, calling \helpref{wxApp::SetTopWindow}{wxappsettopwindow}.
Return TRUE to continue processing, FALSE to exit the application.
\membersection{wxApp::OnInitCmdLine}\label{wxapponinitcmdline}
\membersection{wxApp::Pending}\label{wxapppending}
\func{void}{OnInitCmdLine}{\param{wxCmdLineParser\& }{parser}}
\func{bool}{Pending}{\void}
Called from \helpref{OnInit}{wxapponinit} and may be used to initialize the
parser with the command line options for this application. The base class
versions adds support for a few standard options only.
\membersection{wxApp::OnQueryEndSession}\label{wxapponqueryendsession}
\func{void}{OnQueryEndSession}{\param{wxCloseEvent\& }{event}}
This is an event handler function called when the operating system or GUI session is
about to close down. Typically, an application will try to save unsaved documents
at this point.
If \helpref{wxCloseEvent::CanVeto}{wxcloseeventcanveto} returns TRUE, the application
is allowed to veto the shutdown by calling \helpref{wxCloseEvent::Veto}{wxcloseeventveto}.
The application might veto the shutdown after prompting for documents to be saved, and the
user has cancelled the save.
Use the EVT\_QUERY\_END\_SESSION event table macro to handle query end session events.
You should check whether the application is forcing the deletion of the window
using \helpref{wxCloseEvent::GetForce}{wxcloseeventgetforce}. If this is TRUE,
destroy the window using \helpref{wxWindow::Destroy}{wxwindowdestroy}.
If not, it is up to you whether you respond by destroying the window.
The default handler calls \helpref{wxWindow::Close}{wxwindowclose} on the top-level window,
and vetoes the shutdown if Close returns FALSE. This will be sufficient for many applications.
\wxheading{Remarks}
Under X, OnQueryEndSession is called in response to the `save session' event.
Under Windows, OnQueryEndSession is called in response to the WM\_QUERYENDSESSION message.
Returns TRUE if unprocessed events are in the window system event queue
(MS Windows and Motif).
\wxheading{See also}
\helpref{wxWindow::Close}{wxwindowclose},\rtfsp
\helpref{wxCloseEvent}{wxcloseevent}
%% GD: OnXXX functions are not documented
%%\helpref{wxApp::OnEndSession}{wxapponendsession}
\helpref{wxApp::Dispatch}{wxappdispatch}
\membersection{wxApp::ProcessMessage}\label{wxappprocessmessage}
\func{bool}{ProcessMessage}{\param{WXMSG *}{msg}}
\func{bool}{ProcessMessage}{\param{MSG *}{msg}}
Windows-only function for processing a message. This function
is called from the main message loop, checking for windows that
@@ -454,30 +268,20 @@ may wish to process it. The function returns TRUE if the message
was processed, FALSE otherwise. If you use wxWindows with another class
library with its own message loop, you should make sure that this
function is called to allow wxWindows to receive messages. For example,
to allow co-existence with the Microsoft Foundation Classes, override
to allow co-existance with the Microsoft Foundation Classes, override
the PreTranslateMessage function:
\begin{verbatim}
// Provide wxWindows message loop compatibility
BOOL CTheApp::PreTranslateMessage(MSG *msg)
{
if (wxTheApp && wxTheApp->ProcessMessage((WXMSW *)msg))
if (wxTheApp && wxTheApp->ProcessMessage(msg))
return TRUE;
else
return CWinApp::PreTranslateMessage(msg);
}
\end{verbatim}
\membersection{wxApp::Pending}\label{wxapppending}
\func{bool}{Pending}{\void}
Returns TRUE if unprocessed events are in the window system event queue.
\wxheading{See also}
\helpref{wxApp::Dispatch}{wxappdispatch}
\membersection{wxApp::SendIdleEvents}\label{wxappsendidleevents}
\func{bool}{SendIdleEvents}{\void}
@@ -495,9 +299,7 @@ If TRUE is returned, more OnIdle processing is requested by one or more window.
\wxheading{See also}
%% GD: OnXXX functions are not documented
%%\helpref{wxApp::OnIdle}{wxapponidle}
\helpref{wxIdleEvent}{wxidleevent}
\helpref{wxApp::OnIdle}{wxapponidle}, \helpref{wxWindow::OnIdle}{wxwindowonidle}, \helpref{wxIdleEvent}{wxidleevent}
\membersection{wxApp::SetAppName}\label{wxappsetappname}
@@ -541,9 +343,9 @@ manner to refer to the application.
\helpref{wxApp::GetClassName}{wxappgetclassname}
\membersection{wxApp::SetExitOnFrameDelete}\label{wxappsetexitonframedelete}
\membersection{wxApp::SetExitOnDelete}\label{wxappsetexitondelete}
\func{void}{SetExitOnFrameDelete}{\param{bool}{ flag}}
\func{void}{SetExitOnDelete}{\param{bool}{ flag}}
Allows the programmer to specify whether the application will exit when the
top-level frame is deleted.
@@ -553,21 +355,35 @@ top-level frame is deleted.
\docparam{flag}{If TRUE (the default), the application will exit when the top-level frame is
deleted. If FALSE, the application will continue to run.}
\wxheading{See also}
\wxheading{Remarks}
\helpref{wxApp::GetExitOnFrameDelete}{wxappgetexitonframedelete},\\
\helpref{wxApp shutdown overview}{wxappshutdownoverview}
Currently, setting this to FALSE only has an effect under Windows.
\membersection{wxApp::SetPrintMode}\label{wxappsetprintmode}
\func{void}{SetPrintMode}{\param{int}{ mode}}
Sets the print mode determining what printing facilities will be
used by the printing framework.
\wxheading{Parameters}
\docparam{mode}{This can be one of:
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf wxPRINT\_WINDOWS}}{Under Windows, use Windows printing (wxPrinterDC). This is the
default under Windows.}
\twocolitem{{\bf wxPRINT\_POSTSCRIPT}}{Use PostScript printing (wxPostScriptDC). This is the
default for non-Windows platforms.}
\end{twocollist}
}%
\membersection{wxApp::SetTopWindow}\label{wxappsettopwindow}
\func{void}{SetTopWindow}{\param{wxWindow* }{window}}
Sets the `top' window. You can call this from within \helpref{wxApp::OnInit}{wxapponinit} to
let wxWindows know which is the main window. You don't have to set the top window;
it is only a convenience so that (for example) certain dialogs without parents can use a
specific window as the top window. If no top window is specified by the application,
wxWindows just uses the first frame or dialog in its top-level window list, when it
needs to use the top window.
Sets the `top' window. You should normally call this from within \helpref{wxApp::OnInit}{wxapponinit} to
let wxWindows know which is the main window.
\wxheading{Parameters}
@@ -577,60 +393,3 @@ needs to use the top window.
\helpref{wxApp::GetTopWindow}{wxappgettopwindow}, \helpref{wxApp::OnInit}{wxapponinit}
\membersection{wxApp::SetVendorName}\label{wxappsetvendorname}
\func{void}{SetVendorName}{\param{const wxString\& }{name}}
Sets the name of application's vendor. The name will be used
in registry access. A default name is set by
wxWindows.
\wxheading{See also}
\helpref{wxApp::GetVendorName}{wxappgetvendorname}
\membersection{wxApp::SetUseBestVisual}\label{wxappsetusebestvisual}
\func{void}{SetUseBestVisual}{\param{bool}{ flag}}
Allows the programmer to specify whether the application will use the best visual
on systems that support several visual on the same display. This is typically the
case under Solaris and IRIX, where the default visual is only 8-bit whereas certain
applications are supposed to run in TrueColour mode.
Note that this function has to be called in the constructor of the {\tt wxApp}
instance and won't have any effect when called later on.
This function currently only has effect under GTK.
\wxheading{Parameters}
\docparam{flag}{If TRUE, the app will use the best visual.}
\membersection{wxApp::Yield}\label{wxappyield}
\func{bool}{Yield}{\param{bool}{ onlyIfNeeded = FALSE}}
Yields control to pending messages in the windowing system. This can be useful, for example, when a
time-consuming process writes to a text window. Without an occasional
yield, the text window will not be updated properly, and on systems with
cooperative multitasking, such as Windows 3.1 other processes will not respond.
Caution should be exercised, however, since yielding may allow the
user to perform actions which are not compatible with the current task.
Disabling menu items or whole menus during processing can avoid unwanted
reentrance of code: see \helpref{::wxSafeYield}{wxsafeyield} for a better
function.
Note that Yield() will not flush the message logs. This is intentional as
calling Yield() is usually done to quickly update the screen and popping up a
message box dialog may be undesirable. If you do wish to flush the log
messages immediately (otherwise it will be done during the next idle loop
iteration), call \helpref{wxLog::FlushActive}{wxlogflushactive}.
Calling Yield() recursively is normally an error and an assert failure is
raised in debug build if such situation is detected. However if the the
{\it onlyIfNeeded} parameter is {\tt TRUE}, the method will just silently
return {\tt FALSE} instead.

View File

@@ -1,620 +0,0 @@
\section{\class{wxArray}}\label{wxarray}
This section describes the so called {\it dynamic arrays}. This is a C
array-like data structure i.e. the member access time is constant (and not
linear according to the number of container elements as for linked lists). However, these
arrays are dynamic in the sense that they will automatically allocate more
memory if there is not enough of it for adding a new element. They also perform
range checking on the index values but in debug mode only, so please be sure to
compile your application in debug mode to use it (see \helpref{debugging overview}{debuggingoverview} for
details). So, unlike the arrays in some other
languages, attempt to access an element beyond the arrays bound doesn't
automatically expand the array but provokes an assertion failure instead in
debug build and does nothing (except possibly crashing your program) in the
release build.
The array classes were designed to be reasonably efficient, both in terms of
run-time speed and memory consumption and the executable size. The speed of
array item access is, of course, constant (independent of the number of elements)
making them much more efficient than linked lists (\helpref{wxList}{wxlist}).
Adding items to the arrays is also implemented in more or less constant time -
but the price is preallocating the memory in advance. In the \helpref{memory management}{wxarraymemorymanagement} section
you may find some useful hints about optimizing wxArray memory usage. As for executable size, all
wxArray functions are inline, so they do not take {\it any space at all}.
wxWindows has three different kinds of array. All of them derive from
wxBaseArray class which works with untyped data and can not be used directly.
The standard macros WX\_DEFINE\_ARRAY(), WX\_DEFINE\_SORTED\_ARRAY() and
WX\_DEFINE\_OBJARRAY() are used to define a new class deriving from it. The
classes declared will be called in this documentation wxArray, wxSortedArray and
wxObjArray but you should keep in mind that no classes with such names actually
exist, each time you use one of WX\_DEFINE\_XXXARRAY macro you define a class
with a new name. In fact, these names are "template" names and each usage of one
of the macros mentioned above creates a template specialization for the given
element type.
wxArray is suitable for storing integer types and pointers which it does not
treat as objects in any way, i.e. the element pointed to by the pointer is not
deleted when the element is removed from the array. It should be noted that
all of wxArray's functions are inline, so it costs strictly nothing to define as
many array types as you want (either in terms of the executable size or the
speed) as long as at least one of them is defined and this is always the case
because wxArrays are used by wxWindows internally. This class has one serious
limitation: it can only be used for storing integral types (bool, char, short,
int, long and their unsigned variants) or pointers (of any kind). An attempt
to use with objects of sizeof() greater than sizeof(long) will provoke a
runtime assertion failure, however declaring a wxArray of floats will not (on
the machines where sizeof(float) <= sizeof(long)), yet it will {\bf not} work,
please use wxObjArray for storing floats and doubles (NB: a more efficient
wxArrayDouble class is scheduled for the next release of wxWindows).
wxSortedArray is a wxArray variant which should be used when searching in the
array is a frequently used operation. It requires you to define an additional
function for comparing two elements of the array element type and always stores
its items in the sorted order (according to this function). Thus, it is
\helpref{Index()}{wxarrayindex} function execution time is $O(log(N))$ instead of
$O(N)$ for the usual arrays but the \helpref{Add()}{wxarrayadd} method is
slower: it is $O(log(N))$ instead of constant time (neglecting time spent in
memory allocation routine). However, in a usual situation elements are added to
an array much less often than searched inside it, so wxSortedArray may lead to
huge performance improvements compared to wxArray. Finally, it should be
noticed that, as wxArray, wxSortedArray can be only used for storing integral
types or pointers.
wxObjArray class treats its elements like "objects". It may delete them when
they are removed from the array (invoking the correct destructor) and copies
them using the objects copy constructor. In order to implement this behaviour
the definition of the wxObjArray arrays is split in two parts: first, you should
declare the new wxObjArray class using WX\_DECLARE\_OBJARRAY() macro and then
you must include the file defining the implementation of template type:
<wx/arrimpl.cpp> and define the array class with WX\_DEFINE\_OBJARRAY() macro
from a point where the full (as opposed to `forward') declaration of the array
elements class is in scope. As it probably sounds very complicated here is an
example:
\begin{verbatim}
#include <wx/dynarray.h>
// we must forward declare the array because it is used inside the class
// declaration
class MyDirectory;
class MyFile;
// this defines two new types: ArrayOfDirectories and ArrayOfFiles which can be
// now used as shown below
WX_DECLARE_OBJARRAY(MyDirectory, ArrayOfDirectories);
WX_DECLARE_OBJARRAY(MyFile, ArrayOfFiles);
class MyDirectory
{
...
ArrayOfDirectories m_subdirectories; // all subdirectories
ArrayOfFiles m_files; // all files in this directory
};
...
// now that we have MyDirectory declaration in scope we may finish the
// definition of ArrayOfDirectories -- note that this expands into some C++
// code and so should only be compiled once (i.e., don't put this in the
// header, but into a source file or you will get linking errors)
#include <wx/arrimpl.cpp> // this is a magic incantation which must be done!
WX_DEFINE_OBJARRAY(ArrayOfDirectories);
// that's all!
\end{verbatim}
It is not as elegant as writing
\begin{verbatim}
typedef std::vector<MyDirectory> ArrayOfDirectories;
\end{verbatim}
but is not that complicated and allows the code to be compiled with any, however
dumb, C++ compiler in the world.
Things are much simpler for wxArray and wxSortedArray however: it is enough
just to write
\begin{verbatim}
WX_DEFINE_ARRAY(MyDirectory *, ArrayOfDirectories);
WX_DEFINE_SORTED_ARRAY(MyFile *, ArrayOfFiles);
\end{verbatim}
\wxheading{See also:}
\helpref{Container classes overview}{wxcontaineroverview}, \helpref{wxList}{wxlist}
\wxheading{Include files}
<wx/dynarray.h> for wxArray and wxSortedArray and additionally <wx/arrimpl.cpp>
for wxObjArray.
\latexignore{\rtfignore{\wxheading{Function groups}}}
\membersection{Macros for template array definition}
To use an array you must first define the array class. This is done with the
help of the macros in this section. The class of array elements must be (at
least) forward declared for WX\_DEFINE\_ARRAY, WX\_DEFINE\_SORTED\_ARRAY and
WX\_DECLARE\_OBJARRAY macros and must be fully declared before you use
WX\_DEFINE\_OBJARRAY macro.
\helpref{WX\_DEFINE\_ARRAY}{wxdefinearray}\\
\helpref{WX\_DEFINE\_EXPORTED\_ARRAY}{wxdefinearray}\\
\helpref{WX\_DEFINE\_USER\_EXPORTED\_ARRAY}{wxdefinearray}\\
\helpref{WX\_DEFINE\_SORTED\_ARRAY}{wxdefinesortedarray}\\
\helpref{WX\_DEFINE\_SORTED\_EXPORTED\_ARRAY}{wxdefinesortedarray}\\
\helpref{WX\_DEFINE\_SORTED\_USER\_EXPORTED\_ARRAY}{wxdefinesortedarray}\\
\helpref{WX\_DECLARE\_EXPORTED\_OBJARRAY}{wxdeclareobjarray}\\
\helpref{WX\_DECLARE\_USER\_EXPORTED\_OBJARRAY}{wxdeclareobjarray}\\
\helpref{WX\_DEFINE\_OBJARRAY}{wxdefineobjarray}\\
\helpref{WX\_DEFINE\_EXPORTED\_OBJARRAY}{wxdefineobjarray}\\
\helpref{WX\_DEFINE\_USER\_EXPORTED\_OBJARRAY}{wxdefineobjarray}
\membersection{Constructors and destructors}
Array classes are 100\% C++ objects and as such they have the appropriate copy
constructors and assignment operators. Copying wxArray just copies the elements
but copying wxObjArray copies the arrays items. However, for memory-efficiency
sake, neither of these classes has virtual destructor. It is not very important
for wxArray which has trivial destructor anyhow, but it does mean that you
should avoid deleting wxObjArray through a wxBaseArray pointer (as you would
never use wxBaseArray anyhow it shouldn't be a problem) and that you should not
derive your own classes from the array classes.
\helpref{wxArray default constructor}{wxarrayctordef}\\
\helpref{wxArray copy constructors and assignment operators}{wxarrayctorcopy}\\
\helpref{\destruct{wxArray}}{wxarraydtor}
\membersection{Memory management}\label{wxarraymemorymanagement}
Automatic array memory management is quite trivial: the array starts by
preallocating some minimal amount of memory (defined by
WX\_ARRAY\_DEFAULT\_INITIAL\_SIZE) and when further new items exhaust already
allocated memory it reallocates it adding 50\% of the currently allocated
amount, but no more than some maximal number which is defined by
ARRAY\_MAXSIZE\_INCREMENT constant. Of course, this may lead to some memory
being wasted (ARRAY\_MAXSIZE\_INCREMENT in the worst case, i.e. 4Kb in the
current implementation), so the \helpref{Shrink()}{wxarrayshrink} function is
provided to deallocate the extra memory. The \helpref{Alloc()}{wxarrayalloc}
function can also be quite useful if you know in advance how many items you are
going to put in the array and will prevent the array code from reallocating the
memory more times than needed.
\helpref{Alloc}{wxarrayalloc}\\
\helpref{Shrink}{wxarrayshrink}
\membersection{Number of elements and simple item access}
Functions in this section return the total number of array elements and allow to
retrieve them - possibly using just the C array indexing $[]$ operator which
does exactly the same as \helpref{Item()}{wxarrayitem} method.
\helpref{Count}{wxarraycount}\\
\helpref{GetCount}{wxarraygetcount}\\
\helpref{IsEmpty}{wxarrayisempty}\\
\helpref{Item}{wxarrayitem}\\
\helpref{Last}{wxarraylast}
\membersection{Adding items}
\helpref{Add}{wxarrayadd}\\
\helpref{Insert}{wxarrayinsert}\\
\helpref{WX\_APPEND\_ARRAY}{wxappendarray}
\membersection{Removing items}
\helpref{WX\_CLEAR\_ARRAY}{wxcleararray}\\
\helpref{Empty}{wxarrayempty}\\
\helpref{Clear}{wxarrayclear}\\
\helpref{RemoveAt}{wxarrayremoveat}\\
\helpref{Remove}{wxarrayremove}
\membersection{Searching and sorting}
\helpref{Index}{wxarrayindex}\\
\helpref{Sort}{wxarraysort}
%%%%% MEMBERS HERE %%%%%
\helponly{\insertatlevel{2}{
\wxheading{Members}
}}
\membersection{WX\_DEFINE\_ARRAY}\label{wxdefinearray}
\func{}{WX\_DEFINE\_ARRAY}{\param{}{T}, \param{}{name}}
\func{}{WX\_DEFINE\_EXPORTED\_ARRAY}{\param{}{T}, \param{}{name}}
\func{}{WX\_DEFINE\_USER\_EXPORTED\_ARRAY}{\param{}{T}, \param{}{name}, \param{}{exportspec}}
This macro defines a new array class named {\it name} and containing the
elements of type {\it T}. The second form is used when compiling wxWindows as
a DLL under Windows and array needs to be visible outside the DLL. The third is
needed for exporting an array from a user DLL.
Example:
\begin{verbatim}
WX_DEFINE_ARRAY(int, wxArrayInt);
class MyClass;
WX_DEFINE_ARRAY(MyClass *, wxArrayOfMyClass);
\end{verbatim}
Note that wxWindows predefines the following standard array classes: wxArrayInt,
wxArrayLong and wxArrayPtrVoid.
\membersection{WX\_DEFINE\_SORTED\_ARRAY}\label{wxdefinesortedarray}
\func{}{WX\_DEFINE\_SORTED\_ARRAY}{\param{}{T}, \param{}{name}}
\func{}{WX\_DEFINE\_SORTED\_EXPORTED\_ARRAY}{\param{}{T}, \param{}{name}}
\func{}{WX\_DEFINE\_SORTED\_USER\_EXPORTED\_ARRAY}{\param{}{T}, \param{}{name}}
This macro defines a new sorted array class named {\it name} and containing
the elements of type {\it T}. The second form is used when compiling wxWindows as
a DLL under Windows and array needs to be visible outside the DLL. The third is
needed for exporting an array from a user DLL.
Example:
\begin{verbatim}
WX_DEFINE_SORTED_ARRAY(int, wxSortedArrayInt);
class MyClass;
WX_DEFINE_SORTED_ARRAY(MyClass *, wxArrayOfMyClass);
\end{verbatim}
You will have to initialize the objects of this class by passing a comparison
function to the array object constructor like this:
\begin{verbatim}
int CompareInts(int n1, int n2)
{
return n1 - n2;
}
wxSortedArrayInt sorted(CompareInts);
int CompareMyClassObjects(MyClass *item1, MyClass *item2)
{
// sort the items by their address...
return Stricmp(item1->GetAddress(), item2->GetAddress());
}
wxArrayOfMyClass another(CompareMyClassObjects);
\end{verbatim}
\membersection{WX\_DECLARE\_OBJARRAY}\label{wxdeclareobjarray}
\func{}{WX\_DECLARE\_OBJARRAY}{\param{}{T}, \param{}{name}}
\func{}{WX\_DECLARE\_EXPORTED\_OBJARRAY}{\param{}{T}, \param{}{name}}
\func{}{WX\_DECLARE\_USER\_EXPORTED\_OBJARRAY}{\param{}{T}, \param{}{name}}
This macro declares a new object array class named {\it name} and containing
the elements of type {\it T}. The second form is used when compiling wxWindows as
a DLL under Windows and array needs to be visible outside the DLL. The third is
needed for exporting an array from a user DLL.
Example:
\begin{verbatim}
class MyClass;
WX_DEFINE_OBJARRAY(MyClass, wxArrayOfMyClass); // note: not "MyClass *"!
\end{verbatim}
You must use \helpref{WX\_DEFINE\_OBJARRAY()}{wxdefineobjarray} macro to define
the array class - otherwise you would get link errors.
\membersection{WX\_DEFINE\_OBJARRAY}\label{wxdefineobjarray}
\func{}{WX\_DEFINE\_OBJARRAY}{\param{}{name}}
\func{}{WX\_DEFINE\_EXPORTED\_OBJARRAY}{\param{}{name}}
\func{}{WX\_DEFINE\_USER\_EXPORTED\_OBJARRAY}{\param{}{name}}
This macro defines the methods of the array class {\it name} not defined by the
\helpref{WX\_DECLARE\_OBJARRAY()}{wxdeclareobjarray} macro. You must include the
file <wx/arrimpl.cpp> before using this macro and you must have the full
declaration of the class of array elements in scope! If you forget to do the
first, the error will be caught by the compiler, but, unfortunately, many
compilers will not give any warnings if you forget to do the second - but the
objects of the class will not be copied correctly and their real destructor will
not be called. The latter two forms are merely aliases of the first to satisfy
some people's sense of symmetry when using the exported declarations.
Example of usage:
\begin{verbatim}
// first declare the class!
class MyClass
{
public:
MyClass(const MyClass&);
...
virtual ~MyClass();
};
#include <wx/arrimpl.cpp>
WX_DEFINE_OBJARRAY(wxArrayOfMyClass);
\end{verbatim}
\membersection{WX\_APPEND\_ARRAY}\label{wxappendarray}
\func{void}{WX\_APPEND\_ARRAY}{\param{wxArray\& }{array}, \param{wxArray\& }{other}}
This macro may be used to append all elements of the {\it other} array to the
{\it array}. The two arrays must be of the same type.
\membersection{WX\_CLEAR\_ARRAY}\label{wxcleararray}
\func{void}{WX\_CLEAR\_ARRAY}{\param{wxArray\& }{array}}
This macro may be used to delete all elements of the array before emptying it.
It can not be used with wxObjArrays - but they will delete their elements anyhow
when you call Empty().
\membersection{Default constructors}\label{wxarrayctordef}
\func{}{wxArray}{\void}
\func{}{wxObjArray}{\void}
Default constructor initializes an empty array object.
\func{}{wxSortedArray}{\param{int (*)(T first, T second)}{compareFunction}}
There is no default constructor for wxSortedArray classes - you must initialize it
with a function to use for item comparison. It is a function which is passed
two arguments of type {\it T} where {\it T} is the array element type and which
should return a negative, zero or positive value according to whether the first
element passed to it is less than, equal to or greater than the second one.
\membersection{wxArray copy constructor and assignment operator}\label{wxarrayctorcopy}
\func{}{wxArray}{\param{const wxArray\& }{array}}
\func{}{wxSortedArray}{\param{const wxSortedArray\& }{array}}
\func{}{wxObjArray}{\param{const wxObjArray\& }{array}}
\func{wxArray\&}{operator$=$}{\param{const wxArray\& }{array}}
\func{wxSortedArray\&}{operator$=$}{\param{const wxSortedArray\& }{array}}
\func{wxObjArray\&}{operator$=$}{\param{const wxObjArray\& }{array}}
The copy constructors and assignment operators perform a shallow array copy
(i.e. they don't copy the objects pointed to even if the source array contains
the items of pointer type) for wxArray and wxSortedArray and a deep copy (i.e.
the array element are copied too) for wxObjArray.
\membersection{wxArray::\destruct{wxArray}}\label{wxarraydtor}
\func{}{\destruct{wxArray}}{\void}
\func{}{\destruct{wxSortedArray}}{\void}
\func{}{\destruct{wxObjArray}}{\void}
The wxObjArray destructor deletes all the items owned by the array. This is not
done by wxArray and wxSortedArray versions - you may use
\helpref{WX\_CLEAR\_ARRAY}{wxcleararray} macro for this.
\membersection{wxArray::Add}\label{wxarrayadd}
\func{void}{Add}{\param{T }{item}, \param{size\_t}{ copies = $1$}}
\func{void}{Add}{\param{T *}{item}}
\func{void}{Add}{\param{T \&}{item}, \param{size\_t}{ copies = $1$}}
Appends the given number of {\it copies} of the {\it item} to the array
consisting of the elements of type {\it T}.
The first version is used with wxArray and wxSortedArray. The second and the
third are used with wxObjArray. There is an important difference between
them: if you give a pointer to the array, it will take ownership of it, i.e.
will delete it when the item is deleted from the array. If you give a reference
to the array, however, the array will make a copy of the item and will not take
ownership of the original item. Once again, it only makes sense for wxObjArrays
because the other array types never take ownership of their elements. Also note
that you cannot append more than one pointer as reusing it would lead to
deleting it twice (or more) and hence to a crash.
You may also use \helpref{WX\_APPEND\_ARRAY}{wxappendarray} macro to append all
elements of one array to another one but it is more efficient to use
{\it copies} parameter and modify the elements in place later if you plan to
append a lot of items.
\membersection{wxArray::Alloc}\label{wxarrayalloc}
\func{void}{Alloc}{\param{size\_t }{count}}
Preallocates memory for a given number of array elements. It is worth calling
when the number of items which are going to be added to the array is known in
advance because it will save unneeded memory reallocation. If the array already
has enough memory for the given number of items, nothing happens.
\membersection{wxArray::Clear}\label{wxarrayclear}
\func{void}{Clear}{\void}
This function does the same as \helpref{Empty()}{wxarrayempty} and additionally
frees the memory allocated to the array.
\membersection{wxArray::Count}\label{wxarraycount}
\constfunc{size\_t}{Count}{\void}
Same as \helpref{GetCount()}{wxarraygetcount}. This function is deprecated -
it exists only for compatibility.
\membersection{wxObjArray::Detach}\label{wxobjarraydetach}
\func{T *}{Detach}{\param{size\_t }{index}}
Removes the element from the array, but, unlike,
\helpref{Remove()}{wxarrayremove} doesn't delete it. The function returns the
pointer to the removed element.
\membersection{wxArray::Empty}\label{wxarrayempty}
\func{void}{Empty}{\void}
Empties the array. For wxObjArray classes, this destroys all of the array
elements. For wxArray and wxSortedArray this does nothing except marking the
array of being empty - this function does not free the allocated memory, use
\helpref{Clear()}{wxarrayclear} for this.
\membersection{wxArray::GetCount}\label{wxarraygetcount}
\constfunc{size\_t}{GetCount}{\void}
Return the number of items in the array.
\membersection{wxArray::Index}\label{wxarrayindex}
\func{int}{Index}{\param{T\& }{item}, \param{bool }{searchFromEnd = FALSE}}
\func{int}{Index}{\param{T\& }{item}}
The first version of the function is for wxArray and wxObjArray, the second is
for wxSortedArray only.
Searches the element in the array, starting from either beginning or the end
depending on the value of {\it searchFromEnd} parameter. wxNOT\_FOUND is
returned if the element is not found, otherwise the index of the element is
returned.
Linear search is used for the wxArray and wxObjArray classes but binary search
in the sorted array is used for wxSortedArray (this is why searchFromEnd
parameter doesn't make sense for it).
{\bf NB:} even for wxObjArray classes, the operator==() of the elements in the
array is {\bf not} used by this function. It searches exactly the given
element in the array and so will only succeed if this element had been
previously added to the array, but fail even if another, identical, element is
in the array.
\membersection{wxArray::Insert}\label{wxarrayinsert}
\func{void}{Insert}{\param{T }{item}, \param{size\_t }{n}, \param{size\_t }{copies = $1$}}
\func{void}{Insert}{\param{T *}{item}, \param{size\_t }{n}}
\func{void}{Insert}{\param{T \&}{item}, \param{size\_t }{n}, \param{size\_t }{copies = $1$}}
Insert the given number of {\it copies} of the {\it item} into the array before
the existing item {\it n} - thus, {\it Insert(something, 0u)} will insert an
item in such way that it will become the first array element.
Please see \helpref{Add()}{wxarrayadd} for explanation of the differences
between the overloaded versions of this function.
\membersection{wxArray::IsEmpty}\label{wxarrayisempty}
\constfunc{bool}{IsEmpty}{\void}
Returns TRUE if the array is empty, FALSE otherwise.
\membersection{wxArray::Item}\label{wxarrayitem}
\constfunc{T\&}{Item}{\param{size\_t }{index}}
Returns the item at the given position in the array. If {\it index} is out of
bounds, an assert failure is raised in the debug builds but nothing special is
done in the release build.
The returned value is of type "reference to the array element type" for all of
the array classes.
\membersection{wxArray::Last}\label{wxarraylast}
\constfunc{T\&}{Last}{\void}
Returns the last element in the array, i.e. is the same as Item(GetCount() - 1).
An assert failure is raised in the debug mode if the array is empty.
The returned value is of type "reference to the array element type" for all of
the array classes.
\membersection{wxArray::Remove}\label{wxarrayremove}
\func{\void}{Remove}{\param{T }{item}}
Removes an element from the array by value: the first item of the
array equal to {\it item} is removed, an assert failure will result from an
attempt to remove an item which doesn't exist in the array.
When an element is removed from wxObjArray it is deleted by the array - use
\helpref{Detach()}{wxobjarraydetach} if you don't want this to happen. On the
other hand, when an object is removed from a wxArray nothing happens - you
should delete it manually if required:
\begin{verbatim}
T *item = array[n];
delete item;
array.Remove(n)
\end{verbatim}
See also \helpref{WX\_CLEAR\_ARRAY}{wxcleararray} macro which deletes all
elements of a wxArray (supposed to contain pointers).
\membersection{wxArray::RemoveAt}\label{wxarrayremoveat}
\func{\void}{RemoveAt}{\param{size\_t }{index}, \param{size\_t }{count = $1$}}
Removes {\it count} elements starting at {\it index} from the array. When an
element is removed from wxObjArray it is deleted by the array - use
\helpref{Detach()}{wxobjarraydetach} if you don't want this to happen. On
the other hand, when an object is removed from a wxArray nothing happens -
you should delete it manually if required:
\begin{verbatim}
T *item = array[n];
delete item;
array.RemoveAt(n)
\end{verbatim}
See also \helpref{WX\_CLEAR\_ARRAY}{wxcleararray} macro which deletes all
elements of a wxArray (supposed to contain pointers).
\membersection{wxArray::Shrink}\label{wxarrayshrink}
\func{void}{Shrink}{\void}
Frees all memory unused by the array. If the program knows that no new items
will be added to the array it may call Shrink() to reduce its memory usage.
However, if a new item is added to the array, some extra memory will be
allocated again.
\membersection{wxArray::Sort}\label{wxarraysort}
\func{void}{Sort}{\param{CMPFUNC<T> }{compareFunction}}
The notation CMPFUNC<T> should be read as if we had the following declaration:
\begin{verbatim}
template int CMPFUNC(T *first, T *second);
\end{verbatim}
where {\it T} is the type of the array elements. I.e. it is a function returning
{\it int} which is passed two arguments of type {\it T *}.
Sorts the array using the specified compare function: this function should
return a negative, zero or positive value according to whether the first element
passed to it is less than, equal to or greater than the second one.
wxSortedArray doesn't have this function because it is always sorted.

View File

@@ -1,288 +0,0 @@
\section{\class{wxArrayString}}\label{wxarraystring}
wxArrayString is an efficient container for storing
\helpref{wxString}{wxstring} objects. It has the same features as all
\helpref{wxArray}{wxarray} classes, i.e. it dynamically expands when new items
are added to it (so it is as easy to use as a linked list), but the access
time to the elements is constant, instead of being linear in number of
elements as in the case of linked lists. It is also very size efficient and
doesn't take more space than a C array {\it wxString[]} type (wxArrayString
uses its knowledge of internals of wxString class to achieve this).
This class is used in the same way as other dynamic \helpref{arrays}{wxarray},
except that no {\it WX\_DEFINE\_ARRAY} declaration is needed for it. When a
string is added or inserted in the array, a copy of the string is created, so
the original string may be safely deleted (e.g. if it was a {\it char *}
pointer the memory it was using can be freed immediately after this). In
general, there is no need to worry about string memory deallocation when using
this class - it will always free the memory it uses itself.
The references returned by \helpref{Item}{wxarraystringitem},
\helpref{Last}{wxarraystringlast} or
\helpref{operator[]}{wxarraystringoperatorindex} are not constant, so the
array elements may be modified in place like this
\begin{verbatim}
array.Last().MakeUpper();
\end{verbatim}
There is also a variant of wxArrayString called wxSortedArrayString which has
exactly the same methods as wxArrayString, but which always keeps the string
in it in (alphabetical) order. wxSortedArrayString uses binary search in its
\helpref{Index}{wxarraystringindex} function (instead of linear search for
wxArrayString::Index) which makes it much more efficient if you add strings to
the array rarely (because, of course, you have to pay for Index() efficiency
by having Add() be slower) but search for them often. Several methods should
not be used with sorted array (basically, all which break the order of items)
which is mentioned in their description.
Final word: none of the methods of wxArrayString is virtual including its
destructor, so this class should not be used as a base class.
\wxheading{Derived from}
Although this is not true strictly speaking, this class may be considered as a
specialization of \helpref{wxArray}{wxarray} class for the wxString member
data: it is not implemented like this, but it does have all of the wxArray
functions.
\wxheading{Include files}
<wx/string.h>
\wxheading{See also}
\helpref{wxArray}{wxarray}, \helpref{wxString}{wxstring}, \helpref{wxString overview}{wxstringoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxArrayString::wxArrayString}\label{wxarraystringctor}
\func{}{wxArrayString}{\void}
\func{}{wxArrayString}{\param{const wxArrayString\&}{ array}}
Default and copy constructors.
Note that when an array is assigned to a sorted array, its contents is
automatically sorted during construction.
\membersection{wxArrayString::\destruct{wxArrayString}}\label{wxarraystringdtor}
\func{}{\destruct{wxArrayString}}{}
Destructor frees memory occupied by the array strings. For the performance
reasons it is not virtual, so this class should not be derived from.
\membersection{wxArrayString::operator=}\label{wxarraystringoperatorassign}
\func{wxArrayString \&}{operator $=$}{\param{const wxArrayString\&}{ array}}
Assignment operator.
\membersection{wxArrayString::operator==}\label{wxarraystringoperatorequal}
\constfunc{bool}{operator $==$}{\param{const wxArrayString\&}{ array}}
Compares 2 arrays respecting the case. Returns TRUE only if the arrays have
the same number of elements and the same strings in the same order.
\membersection{wxArrayString::operator!=}\label{wxarraystringoperatornotequal}
\constfunc{bool}{operator $!=$}{\param{const wxArrayString\&}{ array}}
Compares 2 arrays respecting the case. Returns TRUE if the arrays have
different number of elements or if the elements don't match pairwise.
\membersection{wxArrayString::operator[]}\label{wxarraystringoperatorindex}
\func{wxString\&}{operator[]}{\param{size\_t }{nIndex}}
Return the array element at position {\it nIndex}. An assert failure will
result from an attempt to access an element beyond the end of array in debug
mode, but no check is done in release mode.
This is the operator version of \helpref{Item}{wxarraystringitem} method.
\membersection{wxArrayString::Add}\label{wxarraystringadd}
\func{size\_t}{Add}{\param{const wxString\& }{str}, \param{size\_t}{ copies = $1$}}
Appends the given number of {\it copies} of the new item {\it str} to the
array and returns the index of the first new item in the array.
{\bf Warning:} For sorted arrays, the index of the inserted item will not be,
in general, equal to \helpref{GetCount()}{wxarraystringgetcount} - 1 because
the item is inserted at the correct position to keep the array sorted and not
appended.
See also: \helpref{Insert}{wxarraystringinsert}
\membersection{wxArrayString::Alloc}\label{wxarraystringalloc}
\func{void}{Alloc}{\param{size\_t }{nCount}}
Preallocates enough memory to store {\it nCount} items. This function may be
used to improve array class performance before adding a known number of items
consecutively.
See also: \helpref{Dynamic array memory management}{wxarraymemorymanagement}
\membersection{wxArrayString::Clear}\label{wxarraystringclear}
\func{void}{Clear}{\void}
Clears the array contents and frees memory.
See also: \helpref{Empty}{wxarraystringempty}
\membersection{wxArrayString::Count}\label{wxarraystringcount}
\constfunc{size\_t}{Count}{\void}
Returns the number of items in the array. This function is deprecated and is
for backwards compatibility only, please use
\helpref{GetCount}{wxarraystringgetcount} instead.
\membersection{wxArrayString::Empty}\label{wxarraystringempty}
\func{void}{Empty}{\void}
Empties the array: after a call to this function
\helpref{GetCount}{wxarraystringgetcount} will return $0$. However, this
function does not free the memory used by the array and so should be used when
the array is going to be reused for storing other strings. Otherwise, you
should use \helpref{Clear}{wxarraystringclear} to empty the array and free
memory.
\membersection{wxArrayString::GetCount}\label{wxarraystringgetcount}
\constfunc{size\_t}{GetCount}{\void}
Returns the number of items in the array.
\membersection{wxArrayString::Index}\label{wxarraystringindex}
\func{int}{Index}{\param{const char *}{ sz}, \param{bool}{ bCase = TRUE}, \param{bool}{ bFromEnd = FALSE}}
Search the element in the array, starting from the beginning if
{\it bFromEnd} is FALSE or from end otherwise. If {\it bCase}, comparison is
case sensitive (default), otherwise the case is ignored.
This function uses linear search for wxArrayString and binary search for
wxSortedArrayString, but it ignores the {\it bCase} and {\it bFromEnd}
parameters in the latter case.
Returns index of the first item matched or wxNOT\_FOUND if there is no match.
\membersection{wxArrayString::Insert}\label{wxarraystringinsert}
\func{void}{Insert}{\param{const wxString\& }{str}, \param{size\_t}{ nIndex}, \param{size\_t }{copies = $1$}}
Insert the given number of {\it copies} of the new element in the array before the position {\it nIndex}. Thus, for
example, to insert the string in the beginning of the array you would write
\begin{verbatim}
Insert("foo", 0);
\end{verbatim}
If {\it nIndex} is equal to {\it GetCount()} this function behaves as
\helpref{Add}{wxarraystringadd}.
{\bf Warning:} this function should not be used with sorted arrays because it
could break the order of items and, for example, subsequent calls to
\helpref{Index()}{wxarraystringindex} would then not work!
\membersection{wxArrayString::IsEmpty}\label{wxarraystringisempty}
\func{}{IsEmpty}{}
Returns TRUE if the array is empty, FALSE otherwise. This function returns the
same result as {\it GetCount() == 0} but is probably easier to read.
\membersection{wxArrayString::Item}\label{wxarraystringitem}
\constfunc{wxString\&}{Item}{\param{size\_t }{nIndex}}
Return the array element at position {\it nIndex}. An assert failure will
result from an attempt to access an element beyond the end of array in debug
mode, but no check is done in release mode.
See also \helpref{operator[]}{wxarraystringoperatorindex} for the operator
version.
\membersection{wxArrayString::Last}\label{wxarraystringlast}
\func{}{Last}{}
Returns the last element of the array. Attempt to access the last element of
an empty array will result in assert failure in debug build, however no checks
are done in release mode.
\membersection{wxArrayString::Remove}\label{wxarraystringremove}
\func{void}{Remove}{\param{const char *}{ sz}}
Removes the first item matching this value. An assert failure is provoked by
an attempt to remove an element which does not exist in debug build.
See also: \helpref{Index}{wxarraystringindex}
\func{void}{Remove}{\param{size\_t }{nIndex}, \param{size\_t }{count = $1$}}
Removes {\it count} items starting at position {\it nIndex} from the array.
\membersection{wxArrayString::Shrink}\label{wxarraystringshrink}
\func{void}{Shrink}{\void}
Releases the extra memory allocated by the array. This function is useful to
minimize the array memory consumption.
See also: \helpref{Alloc}{wxarraystringalloc}, \helpref{Dynamic array memory management}{wxarraymemorymanagement}
\membersection{wxArrayString::Sort}\label{wxarraystringsort}
\func{void}{Sort}{\param{bool}{ reverseOrder = FALSE}}
Sorts the array in alphabetical order or in reverse alphabetical order if
{\it reverseOrder} is TRUE.
{\bf Warning:} this function should not be used with sorted array because it
could break the order of items and, for example, subsequent calls to
\helpref{Index()}{wxarraystringindex} would then not work!
\func{void}{Sort}{\param{CompareFunction }{compareFunction}}
Sorts the array using the specified {\it compareFunction} for item comparison.
{\it CompareFunction} is defined as a function taking two {\it const
wxString\&} parameters and returning an {\it int} value less than, equal to or
greater than 0 if the first string is less than, equal to or greater than the
second one.
\wxheading{Example}
The following example sorts strings by their length.
\begin{verbatim}
static int CompareStringLen(const wxString& first, const wxString& second)
{
return first.length() - second.length();
}
...
wxArrayString array;
array.Add("one");
array.Add("two");
array.Add("three");
array.Add("four");
array.Sort(CompareStringLen);
\end{verbatim}
{\bf Warning:} this function should not be used with sorted array because it
could break the order of items and, for example, subsequent calls to
\helpref{Index()}{wxarraystringindex} would then not work!

View File

@@ -1,182 +0,0 @@
%
% automatically generated by HelpGen $Revision$ from
% artprov.h at 08/Apr/02 17:44:57
%
\section{\class{wxArtProvider}}\label{wxartprovider}
wxArtProvider class is used to customize the look of wxWindows application.
When wxWindows need to display an icon or a bitmap (e.g. in the standard file
dialog), it does not use hard-coded resource but asks wxArtProvider for it
instead. This way the users can plug in own wxArtProvider class and easily
replace standard art with his/her own version. It is easy thing to do: all
that is needed is to derive a class from wxArtProvider, override it's
\helpref{CreateBitmap}{wxartprovidercreatebitmap} method and register the
provider with
\helpref{wxArtProvider::PushProvider}{wxartproviderpushprovider}:
\begin{verbatim}
class MyProvider : public wxArtProvider
{
protected:
wxBitmap CreateBitmap(const wxArtID& id,
const wxArtClient& client,
const wxSize size)
{ ... }
};
...
wxArtProvider::PushProvider(new MyProvider);
\end{verbatim}
There's another way of taking advantage of this class: you can use it in your code and use
platform native icons as provided by
\helpref{wxArtProvider::GetBitmap}{wxartprovidergetbitmap} or
\helpref{wxArtProvider::GetIcon}{wxartprovidergeticon} (NB: this is not yet really
possible as of wxWindows 2.3.3, the set of wxArtProvider bitmaps is too
small).
\membersection{Identifying art resources}
Every bitmap is known to wxArtProvider under an unique ID that is used by when
requesting a resource from it. The ID is represented by wxArtID type and can
have one of these predefined values (you can see bitmaps represented by these
constants in the \helpref{artprov}{sampleartprovider} sample):
\begin{itemize}\itemsep=0pt
\item wxART\_ADD\_BOOKMARK
\item wxART\_DEL\_BOOKMARK
\item wxART\_HELP\_SIDE\_PANEL
\item wxART\_HELP\_SETTINGS
\item wxART\_HELP\_BOOK
\item wxART\_HELP\_FOLDER
\item wxART\_HELP\_PAGE
\item wxART\_GO\_BACK
\item wxART\_GO\_FORWARD
\item wxART\_GO\_UP
\item wxART\_GO\_DOWN
\item wxART\_GO\_TO\_PARENT
\item wxART\_GO\_HOME
\item wxART\_FILE\_OPEN
\item wxART\_PRINT
\item wxART\_HELP
\item wxART\_TIP
\item wxART\_REPORT\_VIEW
\item wxART\_LIST\_VIEW
\item wxART\_NEW\_DIR
\item wxART\_FOLDER
\item wxART\_GO\_DIR\_UP
\item wxART\_EXECUTABLE\_FILE
\item wxART\_NORMAL\_FILE
\item wxART\_TICK\_MARK
\item wxART\_CROSS\_MARK
\item wxART\_ERROR
\item wxART\_QUESTION
\item wxART\_WARNING
\item wxART\_INFORMATION
\end{itemize}
\membersection{Clients}
Client is the entity that calls wxArtProvider's GetBitmap or GetIcon
function. It is represented by wxClientID type and can have one of these
values:
\begin{itemize}\itemsep=0pt
\item wxART\_TOOLBAR
\item wxART\_MENU
\item wxART\_FRAME\_ICON
\item wxART\_CMN\_DIALOG
\item wxART\_HELP\_BROWSER
\item wxART\_MESSAGE\_BOX
\item wxART\_OTHER (used for all requests that don't fit into any of the categories above)
\end{itemize}
Client ID servers as a hint to wxArtProvider that is supposed to help it to
choose the best looking bitmap. For example it is often desirable to use
slightly different icons in menus and toolbars even though they represent the
same action (e.g. {\tt wx\_ART\_FILE\_OPEN}). Remember that this is really
only a hint for wxArtProvider -- it is common that
\helpref{wxArtProvider::GetBitmap}{wxartprovidergetbitmap}
returns identical bitmap for different {\it client} values!
\wxheading{See also}
See the \helpref{artprov}{sampleartprovider} sample for an example of wxArtProvider usage.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/artprov.h>
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxArtProvider::CreateBitmap}\label{wxartprovidercreatebitmap}
\func{wxBitmap}{CreateBitmap}{\param{const wxArtID\& }{id}, \param{const wxArtClient\& }{client}, \param{const wxSize\& }{size}}
Derived art provider classes must override this method to create requested
art resource. Note that returned bitmaps are cached by wxArtProvider and it is therefore
not neccessary to optimize CreateBitmap for speed (e.g. you may create wxBitmap objects
from XPMs here).
\wxheading{Parameters}
\docparam{id}{wxArtID unique identifier of the bitmap.}
\docparam{client}{wxArtClient identifier of the client (i.e. who is asking for the bitmap).
This only servers as a hint.}
\docparam{size}{Prefered size of the bitmap. The function may return a bitmap of different
dimensions, it will be automatically rescaled to meet client's request.}
\wxheading{Note}
This is {\bf not} part of wxArtProvider's public API, use
\helpref{wxArtProvider::GetBitmap}{wxartprovidergetbitmap} or
\helpref{wxArtProvider::GetIcon}{wxartprovidergeticon}
to query wxArtProvider for a resource.
\membersection{wxArtProvider::GetBitmap}\label{wxartprovidergetbitmap}
\func{static wxBitmap}{GetBitmap}{\param{const wxArtID\& }{id}, \param{const wxArtClient\& }{client = wxART\_OTHER}, \param{const wxSize\& }{size = wxDefaultSize}}
Query registered providers for bitmap with given ID.
\wxheading{Parameters}
\docparam{id}{wxArtID unique identifier of the bitmap.}
\docparam{client}{wxArtClient identifier of the client (i.e. who is asking for the bitmap).}
\docparam{size}{Size of the returned bitmap or {\tt wxDefaultSize} if size doesn't matter.}
\wxheading{Return value}
The bitmap if one of registered providers recognizes the ID or wxNullBitmap otherwise.
\membersection{wxArtProvider::GetIcon}\label{wxartprovidergeticon}
\func{static wxIcon}{GetIcon}{\param{const wxArtID\& }{id}, \param{const wxArtClient\& }{client = wxART\_OTHER}, \param{const wxSize\& }{size = wxDefaultSize}}
Same as \helpref{wxArtProvider::GetBitmap}{wxartprovidergetbitmap}, but
return a wxIcon object (or wxNullIcon on failure).
\membersection{wxArtProvider::PopProvider}\label{wxartproviderpopprovider}
\func{static bool}{PopProvider}{\void}
Remove latest added provider and delete it.
\membersection{wxArtProvider::PushProvider}\label{wxartproviderpushprovider}
\func{static void}{PushProvider}{\param{wxArtProvider* }{provider}}
Register new art provider (add it to the top of providers stack).
\membersection{wxArtProvider::RemoveProvider}\label{wxartproviderremoveprovider}
\func{static bool}{RemoveProvider}{\param{wxArtProvider* }{provider}}
Remove a provider from the stack. The provider must have been added previously
and is {\it not} deleted.

View File

@@ -1,201 +0,0 @@
\section{\class{wxAutomationObject}}\label{wxautomationobject}
The {\bf wxAutomationObject} class represents an OLE automation object containing a single data member,
an IDispatch pointer. It contains a number of functions that make it easy to perform
automation operations, and set and get properties. The class makes heavy use of the \helpref{wxVariant}{wxvariant} class.
The usage of these classes is quite close to OLE automation usage in Visual Basic. The API is
high-level, and the application can specify multiple properties in a single string. The following example
gets the current Excel instance, and if it exists, makes the active cell bold.
{\small
\begin{verbatim}
wxAutomationObject excelObject;
if (excelObject.GetInstance("Excel.Application"))
excelObject.PutProperty("ActiveCell.Font.Bold", TRUE);
\end{verbatim}
}
Note that this class works under Windows only, and currently only for Visual C++.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/msw/ole/automtn.h>
\wxheading{See also}
\helpref{wxVariant}{wxvariant}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxAutomationObject::wxAutomationObject}\label{wxautomationobjectctor}
\func{}{wxAutomationObject}{\param{WXIDISPATCH*}{ dispatchPtr = NULL}}
Constructor, taking an optional IDispatch pointer which will be released when the
object is deleted.
\membersection{wxAutomationObject::\destruct{wxAutomationObject}}\label{wxautomationobjectdtor}
\func{}{\destruct{wxAutomationObject}}{\void}
Destructor. If the internal IDispatch pointer is non-null, it will be released.
\membersection{wxAutomationObject::CallMethod}\label{wxautomationobjectcallmethod}
\constfunc{wxVariant}{CallMethod}{\param{const wxString\&}{ method}, \param{int}{ noArgs},
\param{wxVariant }{args[]}}
\constfunc{wxVariant}{CallMethod}{\param{const wxString\&}{ method}, \param{...}{}}
Calls an automation method for this object. The first form takes a method name, number of
arguments, and an array of variants. The second form takes a method name and zero to six
constant references to variants. Since the variant class has constructors for the basic
data types, and C++ provides temporary objects automatically, both of the following lines
are syntactically valid:
{\small
\begin{verbatim}
wxVariant res = obj.CallMethod("Sum", wxVariant(1.2), wxVariant(3.4));
wxVariant res = obj.CallMethod("Sum", 1.2, 3.4);
\end{verbatim}
}
Note that {\it method} can contain dot-separated property names, to save the application
needing to call GetProperty several times using several temporary objects. For example:
{\small
\begin{verbatim}
object.CallMethod("ActiveCell.Font.ShowDialog", "My caption");
\end{verbatim}
}
\membersection{wxAutomationObject::CreateInstance}\label{wxautomationobjectcreateinstance}
\constfunc{bool}{CreateInstance}{\param{const wxString\&}{ classId}}
Creates a new object based on the class id, returning TRUE if the object was successfully created,
or FALSE if not.
\membersection{wxAutomationObject::GetDispatchPtr}\label{wxautomationobjectgetdispatchptr}
\constfunc{IDispatch*}{GetDispatchPtr}{\void}
Gets the IDispatch pointer.
\membersection{wxAutomationObject::GetInstance}\label{wxautomationobjectgetinstance}
\constfunc{bool}{GetInstance}{\param{const wxString\&}{ classId}}
Retrieves the current object associated with a class id, and attaches the IDispatch pointer
to this object. Returns TRUE if a pointer was successfully retrieved, FALSE otherwise.
Note that this cannot cope with two instances of a given OLE object being active simultaneously,
such as two copies of Excel running. Which object is referenced cannot currently be specified.
\membersection{wxAutomationObject::GetObject}\label{wxautomationobjectgetobject}
\constfunc{bool}{GetObject}{\param{wxAutomationObject\&}{obj} \param{const wxString\&}{ property},
\param{int}{ noArgs = 0}, \param{wxVariant }{args[] = NULL}}
Retrieves a property from this object, assumed to be a dispatch pointer, and initialises {\it obj} with it.
To avoid having to deal with IDispatch pointers directly, use this function in preference
to \helpref{wxAutomationObject::GetProperty}{wxautomationobjectgetproperty} when retrieving objects
from other objects.
Note that an IDispatch pointer is stored as a void* pointer in wxVariant objects.
\wxheading{See also}
\helpref{wxAutomationObject::GetProperty}{wxautomationobjectgetproperty}
\membersection{wxAutomationObject::GetProperty}\label{wxautomationobjectgetproperty}
\constfunc{wxVariant}{GetProperty}{\param{const wxString\&}{ property}, \param{int}{ noArgs},
\param{wxVariant }{args[]}}
\constfunc{wxVariant}{GetProperty}{\param{const wxString\&}{ property}, \param{...}{}}
Gets a property value from this object. The first form takes a property name, number of
arguments, and an array of variants. The second form takes a property name and zero to six
constant references to variants. Since the variant class has constructors for the basic
data types, and C++ provides temporary objects automatically, both of the following lines
are syntactically valid:
{\small
\begin{verbatim}
wxVariant res = obj.GetProperty("Range", wxVariant("A1"));
wxVariant res = obj.GetProperty("Range", "A1");
\end{verbatim}
}
Note that {\it property} can contain dot-separated property names, to save the application
needing to call GetProperty several times using several temporary objects.
\membersection{wxAutomationObject::Invoke}\label{wxautomationobjectinvoke}
\constfunc{bool}{Invoke}{\param{const wxString\&}{ member}, \param{int}{ action},
\param{wxVariant\& }{retValue}, \param{int}{ noArgs}, \param{wxVariant}{ args[]},
\param{const wxVariant*}{ ptrArgs[] = 0}}
This function is a low-level implementation that allows access to the IDispatch Invoke function.
It is not meant to be called directly by the application, but is used by other convenience functions.
\wxheading{Parameters}
\docparam{member}{The member function or property name.}
\docparam{action}{Bitlist: may contain DISPATCH\_PROPERTYPUT, DISPATCH\_PROPERTYPUTREF,
DISPATCH\_METHOD.}
\docparam{retValue}{Return value (ignored if there is no return value)}.
\docparam{noArgs}{Number of arguments in {\it args} or {\it ptrArgs}.}
\docparam{args}{If non-null, contains an array of variants.}
\docparam{ptrArgs}{If non-null, contains an array of constant pointers to variants.}
\wxheading{Return value}
TRUE if the operation was successful, FALSE otherwise.
\wxheading{Remarks}
Two types of argument array are provided, so that when possible pointers are used for efficiency.
\membersection{wxAutomationObject::PutProperty}\label{wxautomationobjectputproperty}
\constfunc{bool}{PutProperty}{\param{const wxString\&}{ property}, \param{int}{ noArgs},
\param{wxVariant }{args[]}}
\func{bool}{PutProperty}{\param{const wxString\&}{ property}, \param{...}{}}
Puts a property value into this object. The first form takes a property name, number of
arguments, and an array of variants. The second form takes a property name and zero to six
constant references to variants. Since the variant class has constructors for the basic
data types, and C++ provides temporary objects automatically, both of the following lines
are syntactically valid:
{\small
\begin{verbatim}
obj.PutProperty("Value", wxVariant(23));
obj.PutProperty("Value", 23);
\end{verbatim}
}
Note that {\it property} can contain dot-separated property names, to save the application
needing to call GetProperty several times using several temporary objects.
\membersection{wxAutomationObject::SetDispatchPtr}\label{wxautomationobjectsetdispatchptr}
\func{void}{SetDispatchPtr}{\param{WXIDISPATCH*}{ dispatchPtr}}
Sets the IDispatch pointer. This function does not check if there is already an IDispatch pointer.
You may need to cast from IDispatch* to WXIDISPATCH* when calling this function.

BIN
docs/latex/wx/back.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

View File

@@ -12,15 +12,11 @@ almost any other window.
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/bmpbuttn.h>
\wxheading{Remarks}
A bitmap button can be supplied with a single bitmap, and wxWindows will draw
all button states using this bitmap. If the application needs more control, additional bitmaps for
the selected state, unpressed focused state, and greyed-out state may be supplied.
the selected state, unpressed focussed state, and greyed-out state may be supplied.
\wxheading{Window styles}
@@ -29,23 +25,11 @@ the selected state, unpressed focused state, and greyed-out state may be supplie
\twocolitem{\windowstyle{wxBU\_AUTODRAW}}{If
this is specified, the button will be drawn automatically using the label bitmap only, providing
a 3D-look border. If this style is not specified, the button will be drawn without borders and using all
provided bitmaps. WIN32 only.}
\twocolitem{\windowstyle{wxBU\_LEFT}}{Left-justifies the bitmap label. WIN32 only.}
\twocolitem{\windowstyle{wxBU\_TOP}}{Aligns the bitmap label to the top of the button. WIN32 only.}
\twocolitem{\windowstyle{wxBU\_RIGHT}}{Right-justifies the bitmap label. WIN32 only.}
\twocolitem{\windowstyle{wxBU\_BOTTOM}}{Aligns the bitmap label to the bottom of the button. WIN32 only.}
provided bitmaps.}
\end{twocollist}
See also \helpref{window styles overview}{windowstyles}.
\wxheading{Event handling}
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_BUTTON(id, func)}}{Process a wxEVT\_COMMAND\_BUTTON\_CLICKED event,
when the button is clicked.}
\end{twocollist}
\wxheading{See also}
\helpref{wxButton}{wxbutton}
@@ -58,15 +42,9 @@ when the button is clicked.}
Default constructor.
\func{}{wxBitmapButton}{
\param{wxWindow* }{parent},
\param{wxWindowID }{id},
\param{const wxBitmap\& }{bitmap},\rtfsp
\param{const wxPoint\& }{pos = wxDefaultPosition},
\param{const wxSize\& }{size = wxDefaultSize},\rtfsp
\param{long }{style = wxBU\_AUTODRAW},
\param{const wxValidator\& }{validator = wxDefaultValidator},
\param{const wxString\& }{name = ``button"}}
\func{}{wxBitmapButton}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id}, \param{const wxBitmap\& }{bitmap},\rtfsp
\param{const wxPoint\& }{pos}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
\param{long}{ style = wxBU\_AUTODRAW}, \param{const wxValidator\& }{validator}, \param{const wxString\& }{name = ``button"}}
Constructor, creating and showing a button.
@@ -119,7 +97,7 @@ Button creation function for two-step creation. For more details, see \helpref{w
\membersection{wxBitmapButton::GetBitmapDisabled}\label{wxbitmapbuttongetbitmapdisabled}
\constfunc{wxBitmap\&}{GetBitmapDisabled}{\void}
\constfunc{wxBitmap\&}{GetBitmapLabel}{\void}
Returns the bitmap for the disabled state.
@@ -135,11 +113,11 @@ A reference to the disabled state bitmap.
\constfunc{wxBitmap\&}{GetBitmapFocus}{\void}
Returns the bitmap for the focused state.
Returns the bitmap for the focussed state.
\wxheading{Return value}
A reference to the focused state bitmap.
A reference to the focussed state bitmap.
\wxheading{See also}

View File

@@ -10,23 +10,9 @@ either monochrome or colour.
\helpref{wxGDIObject}{wxgdiobject}\\
\helpref{wxObject}{wxobject}
\wxheading{Include file}
<wx/bitmap.h>
\wxheading{Predefined objects}
Objects:
{\bf wxNullBitmap}
\wxheading{See also}
\helpref{wxBitmap overview}{wxbitmapoverview},
\helpref{supported bitmap file formats}{supportedbitmapformats},
\helpref{wxDC::Blit}{wxdcblit},
\helpref{wxIcon}{wxicon}, \helpref{wxCursor}{wxcursor}, \helpref{wxBitmap}{wxbitmap},
\helpref{wxMemoryDC}{wxmemorydc}
\helpref{wxBitmap overview}{wxbitmapoverview}, \helpref{wxDC::Blit}{wxdcblit}, \helpref{wxIcon}{wxicon}, \helpref{wxCursor}{wxcursor}, \helpref{wxMemoryDC}{wxmemorydc}
\latexignore{\rtfignore{\wxheading{Members}}}
@@ -38,33 +24,22 @@ Default constructor.
\func{}{wxBitmap}{\param{const wxBitmap\& }{bitmap}}
Copy constructor.
\func{}{wxBitmap}{\param{const wxBitmap* }{bitmap}}
Copy constructors.
\func{}{wxBitmap}{\param{void*}{ data}, \param{int}{ type}, \param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}}
Creates a bitmap from the given data which is interpreted in platform-dependent
manner.
Creates a bitmap from the given data, which can be of arbitrary type.
\func{}{wxBitmap}{\param{const char}{ bits[]}, \param{int}{ width}, \param{int}{ height}\\
\param{int}{ depth = 1}}
Creates a bitmap from an array of bits.
You should only use this function for monochrome bitmaps ({\it depth} 1) in
portable programs: in this case the {\it bits} parameter should contain an XBM
image.
For other bit depths, the behaviour is platform dependent: under Windows, the
data is passed without any changes to the underlying {\tt CreateBitmap()} API.
Under other platforms, only monochrome bitmaps may be created using this
constructor and \helpref{wxImage}{wximage} should be used for creating colour
bitmaps from static data.
\func{}{wxBitmap}{\param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}}
Creates a new bitmap. A depth of -1 indicates the depth of the current screen
or visual. Some platforms only support 1 for monochrome and -1 for the current
colour setting.
Creates a new bitmap.
\func{}{wxBitmap}{\param{const char**}{ bits}}
@@ -74,23 +49,6 @@ Creates a bitmap from XPM data.
Loads a bitmap from a file or resource.
\func{}{wxBitmap}{\param{const wxImage\&}{ img}, \param{int}{ depth = -1}}
Creates bitmap object from the image. This has to be done
to actually display an image as you cannot draw an image directly on a window.
The resulting bitmap will use the provided colour depth (or that of the
current system if depth is -1) which entails that a colour reduction has
to take place.
When in 8-bit mode (PseudoColour mode), the GTK port will use a color cube created
on program start-up to look up colors. This ensures a very fast conversion, but
the image quality won't be perfect (and could be better for photo images using more
sophisticated dithering algorithms).
On Windows, if there is a palette present (set with SetPalette), it will be used when
creating the wxBitmap (most useful in 8-bit display mode). On other platforms,
the palette is currently ignored.
\wxheading{Parameters}
\docparam{bits}{Specifies an array of pixel values.}
@@ -103,30 +61,23 @@ the palette is currently ignored.
screen is used.}
\docparam{name}{This can refer to a resource name under MS Windows, or a filename under MS Windows and X.
Its meaning is determined by the {\it type} parameter.}
Its meaning is determined by the {\it flags} parameter.}
\docparam{type}{May be one of the following:
\twocolwidtha{5cm}
\begin{twocollist}
\twocolitem{\indexit{wxBITMAP\_TYPE\_BMP}}{Load a Windows bitmap file.}
\twocolitem{\indexit{wxBITMAP\_TYPE\_BMP\_RESOURCE}}{Load a Windows bitmap from the resource database.}
\twocolitem{\indexit{wxBITMAP\_TYPE\_GIF}}{Load a GIF bitmap file.}
\twocolitem{\indexit{wxBITMAP\_TYPE\_XBM}}{Load an X bitmap file.}
\twocolitem{\indexit{wxBITMAP\_TYPE\_XPM}}{Load an XPM bitmap file.}
\twocolitem{\indexit{wxBITMAP\_TYPE\_RESOURCE}}{Load a Windows resource name.}
\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_BMP}}}{Load a Windows bitmap file.}
\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_BMP\_RESOURCE}}}{Load a Windows bitmap from the resource database.}
\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_GIF}}}{Load a GIF bitmap file.}
\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_XBM}}}{Load an X bitmap file.}
\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_XPM}}}{Load an XPM bitmap file.}
\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_RESOURCE}}}{Load a Windows resource name.}
\end{twocollist}
The validity of these flags depends on the platform and wxWindows configuration.
If all possible wxWindows settings are used, the Windows platform supports BMP file, BMP resource,
XPM data, and XPM. Under wxGTK, the available formats are BMP file, XPM data, XPM file, and PNG file.
Under wxMotif, the available formats are XBM data, XBM file, XPM data, XPM file.
In addition, wxBitmap can read all formats that \helpref{wxImage}{wximage} can, which currently include
wxBITMAP\_TYPE\_JPEG, wxBITMAP\_TYPE\_TIF, wxBITMAP\_TYPE\_PNG, wxBITMAP\_TYPE\_GIF, wxBITMAP\_TYPE\_PCX,
and wxBITMAP\_TYPE\_PNM. Of course, you must have wxImage handlers loaded. }
\docparam{img}{Platform-independent wxImage object.}
If all possible wxWindows settings are used, the Windows platform supports BMP, BMP\_RESOURCE,
XPM\_DATA, and XPM. Under X, the available formats are BMP, GIF, XBM, and XPM.}
\wxheading{Remarks}
@@ -164,37 +115,12 @@ The eighth form constructs a bitmap from a file or resource. {\it name} can refe
to a resource name under MS Windows, or a filename under MS Windows and X.
Under Windows, {\it type} defaults to wxBITMAP\_TYPE\_BMP\_RESOURCE.
Under X, {\it type} defaults to wxBITMAP\_TYPE\_XPM.
Under X, {\it type} defaults to wxBITMAP\_TYPE\_XBM.
\wxheading{See also}
\helpref{wxBitmap::LoadFile}{wxbitmaploadfile}
\pythonnote{Constructors supported by wxPython are:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf wxBitmap(name, flag)}}{Loads a bitmap from a file}
\twocolitem{{\bf wxEmptyBitmap(width, height, depth = -1)}}{Creates an
empty bitmap with the given specifications}
\twocolitem{{\bf wxBitmapFromXPMData(listOfStrings)}}{Create a bitmap
from a Python list of strings whose contents are XPM data.}
\twocolitem{{\bf wxBitmapFromBits(bits, width, height,
depth=-1)}}{Create a bitmap from an array of bits contained in a
string.}
\twocolitem{{\bf wxBitmapFromImage(image, depth=-1)}}{Convert a
wxImage to a wxBitmap.}
\end{twocollist}}
}
\perlnote{Constructors supported by wxPerl are:\par
\begin{itemize}
\item{Wx::Bitmap->new( width, height, depth = -1 )}
\item{Wx::Bitmap->new( name, type )}
\item{Wx::Bitmap->new( icon )}
\item{Wx::Bitmap->newFromBits( bits, width, height, depth = 1 )}
\item{Wx::Bitmap->newFromXPM( data )}
\end{itemize}
}
\membersection{wxBitmap::\destruct{wxBitmap}}
\func{}{\destruct{wxBitmap}}{\void}
@@ -230,15 +156,7 @@ Deletes all bitmap handlers.
This function is called by wxWindows on exit.
\membersection{wxBitmap::ConvertToImage}\label{wxbitmapconverttoimage}
\func{wxImage}{ConvertToImage}{\void}
Creates an image from a platform-dependent bitmap. This preserves
mask information so that bitmaps and images can be converted back
and forth without loss in that respect.
\membersection{wxBitmap::Create}\label{wxbitmapcreate}
\membersection{wxBitmap::Create}
\func{virtual bool}{Create}{\param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}}
@@ -341,7 +259,7 @@ or set for the bitmap.
\constfunc{wxMask*}{GetMask}{\void}
Gets the associated mask (if any) which may have been loaded from a file
Gets the associated mask if any) which may have been loaded from a file
or set for the bitmap.
\wxheading{See also}
@@ -358,13 +276,6 @@ Gets the width of the bitmap in pixels.
\helpref{wxBitmap::GetHeight}{wxbitmapgetheight}
\membersection{wxBitmap::GetSubBitmap}\label{wxbitmapgetsubbitmap}
\constfunc{wxBitmap}{GetSubBitmap}{\param{const wxRect\&}{rect}}
Returns a sub bitmap of the current one as long as the rect belongs entirely to
the bitmap. This function preserves bit depth and mask information.
\membersection{wxBitmap::InitStandardHandlers}
\func{static void}{InitStandardHandlers}{\void}
@@ -413,11 +324,7 @@ The meaning of {\it name} is determined by the {\it type} parameter.}
\twocolitem{{\bf wxBITMAP\_TYPE\_XPM}}{Load an XPM bitmap file.}
\end{twocollist}
The validity of these flags depends on the platform and wxWindows configuration.
In addition, wxBitmap can read all formats that \helpref{wxImage}{wximage} can
(wxBITMAP\_TYPE\_JPEG, wxBITMAP\_TYPE\_PNG, wxBITMAP\_TYPE\_GIF, wxBITMAP\_TYPE\_PCX, wxBITMAP\_TYPE\_PNM).
(Of course you must have wxImage handlers loaded.) }
The validity of these flags depends on the platform and wxWindows configuration.}
\wxheading{Return value}
@@ -476,15 +383,10 @@ Saves a bitmap in the named file.
\twocolitem{{\bf wxBITMAP\_TYPE\_XPM}}{Save an XPM bitmap file.}
\end{twocollist}
The validity of these flags depends on the platform and wxWindows configuration.
The validity of these flags depends on the platform and wxWindows configuration.}
In addition, wxBitmap can save all formats that \helpref{wxImage}{wximage} can
(wxBITMAP\_TYPE\_JPEG, wxBITMAP\_TYPE\_PNG).
(Of course you must have wxImage handlers loaded.) }
\docparam{palette}{An optional palette used for saving the bitmap.}
% TODO: this parameter should
%probably be eliminated; instead the app should set the palette before saving.
\docparam{palette}{An optional palette used for saving the bitmap. TODO: this parameter should
probably be eliminated; instead the app should set the palette before saving.}
\wxheading{Return value}
@@ -532,27 +434,32 @@ The bitmap object owns the mask once this has been called.
\helpref{wxBitmap::GetMask}{wxbitmapgetmask}, \helpref{wxMask}{wxmask}
%% VZ: this function is an implementation detail and shouldn't be documented
%%\membersection{wxBitmap::SetOk}
%%
%%\func{void}{SetOk}{\param{int }{isOk}}
%%
%%Sets the validity member (does not affect the bitmap data).
%%
%%\wxheading{Parameters}
%%
%%\docparam{isOk}{Validity flag.}
\membersection{wxBitmap::SetOk}
\func{void}{SetOk}{\param{int }{isOk}}
Sets the validity member (does not affect the bitmap data).
\wxheading{Parameters}
\docparam{isOk}{Validity flag.}
\membersection{wxBitmap::SetPalette}\label{wxbitmapsetpalette}
\func{void}{SetPalette}{\param{const wxPalette\& }{palette}}
\func{void}{SetPalette}{\param{wxPalette* }{palette}}
Sets the associated palette.
Sets the associated palette: it will be deleted in the wxBitmap
destructor, so if you do not wish it to be deleted automatically,
reset the palette to NULL before the bitmap is deleted.
\wxheading{Parameters}
\docparam{palette}{The palette to set.}
\wxheading{Remarks}
The bitmap object owns the palette once this has been called.
\wxheading{See also}
\helpref{wxPalette}{wxpalette}
@@ -613,3 +520,164 @@ unequal (a fast test).
Returns TRUE if the bitmaps were unequal, FALSE otherwise.
\section{\class{wxBitmapHandler}}\label{wxbitmaphandler}
\overview{Overview}{wxbitmapoverview}
This is the base class for implementing bitmap file loading/saving, and bitmap creation from data.
It is used within wxBitmap and is not normally seen by the application.
If you wish to extend the capabilities of wxBitmap, derive a class from wxBitmapHandler
and add the handler using \helpref{wxBitmap::AddHandler}{wxbitmapaddhandler} in your
application initialisation.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{See also}
\helpref{wxBitmap}{wxbitmap}, \helpref{wxIcon}{wxicon}, \helpref{wxCursor}{wxcursor}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxBitmapHandler::wxBitmapHandler}\label{wxbitmaphandlerconstr}
\func{}{wxBitmapHandler}{\void}
Default constructor. In your own default constructor, initialise the members
m\_name, m\_extension and m\_type.
\membersection{wxBitmapHandler::\destruct{wxBitmapHandler}}
\func{}{\destruct{wxBitmapHandler}}{\void}
Destroys the wxBitmapHandler object.
\membersection{wxBitmapHandler::Create}
\func{virtual bool}{Create}{\param{wxBitmap* }{bitmap}, \param{void*}{ data}, \param{int}{ type}, \param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}}
Creates a bitmap from the given data, which can be of arbitrary type. The wxBitmap object {\it bitmap} is
manipulated by this function.
\wxheading{Parameters}
\docparam{bitmap}{The wxBitmap object.}
\docparam{width}{The width of the bitmap in pixels.}
\docparam{height}{The height of the bitmap in pixels.}
\docparam{depth}{The depth of the bitmap in pixels. If this is -1, the screen depth is used.}
\docparam{data}{Data whose type depends on the value of {\it type}.}
\docparam{type}{A bitmap type identifier - see \helpref{wxBitmapHandler::wxBitmapHandler}{wxbitmapconstr} for a list
of possible values.}
\wxheading{Return value}
TRUE if the call succeeded, FALSE otherwise (the default).
\membersection{wxBitmapHandler::GetName}
\constfunc{wxString}{GetName}{\void}
Gets the name of this handler.
\membersection{wxBitmapHandler::GetExtension}
\constfunc{wxString}{GetExtension}{\void}
Gets the file extension associated with this handler.
\membersection{wxBitmapHandler::GetType}
\constfunc{long}{GetType}{\void}
Gets the bitmap type associated with this handler.
\membersection{wxBitmapHandler::LoadFile}\label{wxbitmaphandlerloadfile}
\func{bool}{LoadFile}{\param{wxBitmap* }{bitmap}, \param{const wxString\&}{ name}, \param{long}{ type}}
Loads a bitmap from a file or resource, putting the resulting data into {\it bitmap}.
\wxheading{Parameters}
\docparam{bitmap}{The bitmap object which is to be affected by this operation.}
\docparam{name}{Either a filename or a Windows resource name.
The meaning of {\it name} is determined by the {\it type} parameter.}
\docparam{type}{See \helpref{wxBitmap::wxBitmap}{wxbitmapconstr} for values this can take.}
\wxheading{Return value}
TRUE if the operation succeeded, FALSE otherwise.
\wxheading{See also}
\helpref{wxBitmap::LoadFile}{wxbitmaploadfile}\\
\helpref{wxBitmap::SaveFile}{wxbitmapsavefile}\\
\helpref{wxBitmapHandler::SaveFile}{wxbitmaphandlersavefile}
\membersection{wxBitmapHandler::SaveFile}\label{wxbitmaphandlersavefile}
\func{bool}{SaveFile}{\param{wxBitmap* }{bitmap}, \param{const wxString\& }{name}, \param{int}{ type}, \param{wxPalette* }{palette = NULL}}
Saves a bitmap in the named file.
\wxheading{Parameters}
\docparam{bitmap}{The bitmap object which is to be affected by this operation.}
\docparam{name}{A filename. The meaning of {\it name} is determined by the {\it type} parameter.}
\docparam{type}{See \helpref{wxBitmap::wxBitmap}{wxbitmapconstr} for values this can take.}
\docparam{palette}{An optional palette used for saving the bitmap. TODO: this parameter should
probably be eliminated; instead the app should set the palette before saving.}
\wxheading{Return value}
TRUE if the operation succeeded, FALSE otherwise.
\wxheading{See also}
\helpref{wxBitmap::LoadFile}{wxbitmaploadfile}\\
\helpref{wxBitmap::SaveFile}{wxbitmapsavefile}\\
\helpref{wxBitmapHandler::LoadFile}{wxbitmaphandlerloadfile}
\membersection{wxBitmapHandler::SetName}
\func{void}{SetName}{\param{const wxString\& }{name}}
Sets the handler name.
\wxheading{Parameters}
\docparam{name}{Handler name.}
\membersection{wxBitmapHandler::SetExtension}
\func{void}{SetExtension}{\param{const wxString\& }{extension}}
Sets the handler extension.
\wxheading{Parameters}
\docparam{extension}{Handler extension.}
\membersection{wxBitmapHandler::SetType}
\func{void}{SetType}{\param{long }{type}}
Sets the handler type.
\wxheading{Parameters}
\docparam{name}{Handler type.}

View File

@@ -1,60 +0,0 @@
\section{\class{wxBitmapDataObject}}\label{wxbitmapdataobject}
wxBitmapDataObject is a specialization of wxDataObject for bitmap data. It can
be used without change to paste data into the
\helpref{wxClipboard}{wxclipboard} or a \helpref{wxDropSource}{wxdropsource}. A
user may wish to derive a new class from this class for providing a bitmap
on-demand in order to minimize memory consumption when offering data in several
formats, such as a bitmap and GIF.
\pythonnote{If you wish to create a derived wxBitmapDataObject class in
wxPython you should derive the class from wxPyBitmapDataObject
in order to get Python-aware capabilities for the various virtual
methods.}
\wxheading{Virtual functions to override}
This class may be used as is, but
\helpref{GetBitmap}{wxbitmapdataobjectgetbitmap} may be overridden to increase
efficiency.
\wxheading{Derived from}
\helpref{wxDataObjectSimple}{wxdataobjectsimple}\\
\helpref{wxDataObject}{wxdataobject}
\wxheading{Include files}
<wx/dataobj.h>
\wxheading{See also}
\helpref{Clipboard and drag and drop overview}{wxdndoverview},
\helpref{wxDataObject}{wxdataobject},
\helpref{wxDataObjectSimple}{wxdataobjectsimple},
\helpref{wxFileDataObject}{wxfiledataobject},
\helpref{wxTextDataObject}{wxtextdataobject},
\helpref{wxDataObject}{wxdataobject}
\func{}{wxBitmapDataObject}{\param{const wxBitmap\& }{bitmap = wxNullBitmap}}
Constructor, optionally passing a bitmap (otherwise use
\helpref{SetBitmap}{wxbitmapdataobjectsetbitmap} later).
\membersection{wxBitmapDataObject::GetBitmap}\label{wxbitmapdataobjectgetbitmap}
\constfunc{virtual wxBitmap}{GetBitmap}{\void}
Returns the bitmap associated with the data object. You may wish to override
this method when offering data on-demand, but this is not required by
wxWindows' internals. Use this method to get data in bitmap form from
the \helpref{wxClipboard}{wxclipboard}.
\membersection{wxBitmapDataObject::SetBitmap}\label{wxbitmapdataobjectsetbitmap}
\func{virtual void}{SetBitmap}{\param{const wxBitmap\& }{bitmap}}
Sets the bitmap associated with the data object. This method is called when the
data object receives data. Usually there will be no reason to override this
function.

View File

@@ -1,165 +0,0 @@
\section{\class{wxBitmapHandler}}\label{wxbitmaphandler}
\overview{Overview}{wxbitmapoverview}
This is the base class for implementing bitmap file loading/saving, and bitmap creation from data.
It is used within wxBitmap and is not normally seen by the application.
If you wish to extend the capabilities of wxBitmap, derive a class from wxBitmapHandler
and add the handler using \helpref{wxBitmap::AddHandler}{wxbitmapaddhandler} in your
application initialisation.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/bitmap.h>
\wxheading{See also}
\helpref{wxBitmap}{wxbitmap}, \helpref{wxIcon}{wxicon}, \helpref{wxCursor}{wxcursor}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxBitmapHandler::wxBitmapHandler}\label{wxbitmaphandlerconstr}
\func{}{wxBitmapHandler}{\void}
Default constructor. In your own default constructor, initialise the members
m\_name, m\_extension and m\_type.
\membersection{wxBitmapHandler::\destruct{wxBitmapHandler}}
\func{}{\destruct{wxBitmapHandler}}{\void}
Destroys the wxBitmapHandler object.
\membersection{wxBitmapHandler::Create}
\func{virtual bool}{Create}{\param{wxBitmap* }{bitmap}, \param{void*}{ data}, \param{int}{ type}, \param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}}
Creates a bitmap from the given data, which can be of arbitrary type. The wxBitmap object {\it bitmap} is
manipulated by this function.
\wxheading{Parameters}
\docparam{bitmap}{The wxBitmap object.}
\docparam{width}{The width of the bitmap in pixels.}
\docparam{height}{The height of the bitmap in pixels.}
\docparam{depth}{The depth of the bitmap in pixels. If this is -1, the screen depth is used.}
\docparam{data}{Data whose type depends on the value of {\it type}.}
\docparam{type}{A bitmap type identifier - see \helpref{wxBitmapHandler::wxBitmapHandler}{wxbitmapconstr} for a list
of possible values.}
\wxheading{Return value}
TRUE if the call succeeded, FALSE otherwise (the default).
\membersection{wxBitmapHandler::GetName}
\constfunc{wxString}{GetName}{\void}
Gets the name of this handler.
\membersection{wxBitmapHandler::GetExtension}
\constfunc{wxString}{GetExtension}{\void}
Gets the file extension associated with this handler.
\membersection{wxBitmapHandler::GetType}
\constfunc{long}{GetType}{\void}
Gets the bitmap type associated with this handler.
\membersection{wxBitmapHandler::LoadFile}\label{wxbitmaphandlerloadfile}
\func{bool}{LoadFile}{\param{wxBitmap* }{bitmap}, \param{const wxString\&}{ name}, \param{long}{ type}}
Loads a bitmap from a file or resource, putting the resulting data into {\it bitmap}.
\wxheading{Parameters}
\docparam{bitmap}{The bitmap object which is to be affected by this operation.}
\docparam{name}{Either a filename or a Windows resource name.
The meaning of {\it name} is determined by the {\it type} parameter.}
\docparam{type}{See \helpref{wxBitmap::wxBitmap}{wxbitmapconstr} for values this can take.}
\wxheading{Return value}
TRUE if the operation succeeded, FALSE otherwise.
\wxheading{See also}
\helpref{wxBitmap::LoadFile}{wxbitmaploadfile}\\
\helpref{wxBitmap::SaveFile}{wxbitmapsavefile}\\
\helpref{wxBitmapHandler::SaveFile}{wxbitmaphandlersavefile}
\membersection{wxBitmapHandler::SaveFile}\label{wxbitmaphandlersavefile}
\func{bool}{SaveFile}{\param{wxBitmap* }{bitmap}, \param{const wxString\& }{name}, \param{int}{ type}, \param{wxPalette* }{palette = NULL}}
Saves a bitmap in the named file.
\wxheading{Parameters}
\docparam{bitmap}{The bitmap object which is to be affected by this operation.}
\docparam{name}{A filename. The meaning of {\it name} is determined by the {\it type} parameter.}
\docparam{type}{See \helpref{wxBitmap::wxBitmap}{wxbitmapconstr} for values this can take.}
\docparam{palette}{An optional palette used for saving the bitmap.}
\wxheading{Return value}
TRUE if the operation succeeded, FALSE otherwise.
\wxheading{See also}
\helpref{wxBitmap::LoadFile}{wxbitmaploadfile}\\
\helpref{wxBitmap::SaveFile}{wxbitmapsavefile}\\
\helpref{wxBitmapHandler::LoadFile}{wxbitmaphandlerloadfile}
\membersection{wxBitmapHandler::SetName}
\func{void}{SetName}{\param{const wxString\& }{name}}
Sets the handler name.
\wxheading{Parameters}
\docparam{name}{Handler name.}
\membersection{wxBitmapHandler::SetExtension}
\func{void}{SetExtension}{\param{const wxString\& }{extension}}
Sets the handler extension.
\wxheading{Parameters}
\docparam{extension}{Handler extension.}
\membersection{wxBitmapHandler::SetType}
\func{void}{SetType}{\param{long }{type}}
Sets the handler type.
\wxheading{Parameters}
\docparam{name}{Handler type.}

File diff suppressed because it is too large Load Diff

BIN
docs/latex/wx/book1.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

BIN
docs/latex/wx/books.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
docs/latex/wx/books.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

View File

@@ -1,46 +0,0 @@
\section{\class{wxBoxSizer}}\label{wxboxsizer}
The basic idea behind a box sizer is that windows will most often be laid out in rather
simple basic geometry, typically in a row or a column or several hierarchies of either.
For more information, please see \helpref{Programming with wxBoxSizer}{boxsizerprogramming}.
\wxheading{Derived from}
\helpref{wxSizer}{wxsizer}\\
\helpref{wxObject}{wxobject}
\wxheading{See also}
\helpref{wxSizer}{wxsizer}, \helpref{Sizer overview}{sizeroverview}
\membersection{wxBoxSizer::wxBoxSizer}\label{wxboxsizerwxboxsizer}
\func{}{wxBoxSizer}{\param{int }{orient}}
Constructor for a wxBoxSizer. {\it orient} may be either of wxVERTICAL
or wxHORIZONTAL for creating either a column sizer or a row sizer.
\membersection{wxBoxSizer::RecalcSizes}\label{wxboxsizerrecalcsizes}
\func{void}{RecalcSizes}{\void}
Implements the calculation of a box sizer's dimensions and then sets
the size of its its children (calling \helpref{wxWindow::SetSize}{wxwindowsetsize}
if the child is a window). It is used internally only and must not be called
by the user. Documented for information.
\membersection{wxBoxSizer::CalcMin}\label{wxboxsizercalcmin}
\func{wxSize}{CalcMin}{\void}
Implements the calculation of a box sizer's minimal. It is used internally
only and must not be called by the user. Documented for information.
\membersection{wxBoxSizer::GetOrientation}\label{wxboxsizergetorientation}
\func{int}{GetOrientation}{\void}
Returns the orientation of the box sizer, either wxVERTICAL
or wxHORIZONTAL.

View File

@@ -9,29 +9,6 @@ style.
\helpref{wxGDIObject}{wxgdiobject}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/brush.h>
\wxheading{Predefined objects}
Objects:
{\bf wxNullBrush}
Pointers:
{\bf wxBLUE\_BRUSH\\
wxGREEN\_BRUSH\\
wxWHITE\_BRUSH\\
wxBLACK\_BRUSH\\
wxGREY\_BRUSH\\
wxMEDIUM\_GREY\_BRUSH\\
wxLIGHT\_GREY\_BRUSH\\
wxTRANSPARENT\_BRUSH\\
wxCYAN\_BRUSH\\
wxRED\_BRUSH}
\wxheading{Remarks}
On a monochrome display, wxWindows shows
@@ -51,11 +28,12 @@ list of brushes {\bf wxTheBrushList}, and calling the member function
wxBrush uses a reference counting system, so assignments between brushes are very
cheap. You can therefore use actual wxBrush objects instead of pointers without
efficiency problems. Once one wxBrush object changes its data it will create its
own brush data internally so that other brushes, which previously shared the
data using the reference counting, are not affected.
efficiency problems. Bear in mind, though, that changing a brush's properties may
affect another brush which has been involved in an assignment with the first brush,
because of the way internal brush data is shared.
TODO: an overview for wxBrush.
%TODO: an overview for wxBrush.
\wxheading{See also}
\helpref{wxBrushList}{wxbrushlist}, \helpref{wxDC}{wxdc}, \helpref{wxDC::SetBrush}{wxdcsetbrush}
@@ -85,6 +63,10 @@ Constructs a stippled brush using a bitmap.
Copy constructor. This uses reference counting so is a cheap operation.
\func{}{wxBrush}{\param{const wxBrush*}{ brush}}
Copy constructor. This uses reference counting so is a cheap operation.
\wxheading{Parameters}
\docparam{colour}{Colour object.}
@@ -169,7 +151,6 @@ Returns the brush style, one of:
\twocolitem{{\bf wxHORIZONTAL\_HATCH}}{Horizontal hatch.}
\twocolitem{{\bf wxVERTICAL\_HATCH}}{Vertical hatch.}
\twocolitem{{\bf wxSTIPPLE}}{Stippled using a bitmap.}
\twocolitem{{\bf wxSTIPPLE\_MASK\_OPAQUE}}{Stippled using a bitmap's mask.}
\end{twocollist}
\wxheading{See also}
@@ -215,17 +196,13 @@ Sets the stipple bitmap.
\wxheading{Remarks}
The style will be set to wxSTIPPLE, unless the bitmap has a mask associated
to it, in which case the style will be set to wxSTIPPLE\_MASK\_OPAQUE.
The style will be set to wxSTIPPLE.
If the wxSTIPPLE variant is used, the bitmap will be used to fill out the
area to be drawn. If the wxSTIPPLE\_MASK\_OPAQUE is used, the current
text foreground and text background determine what colours are used for
displaying and the bits in the mask (which is a mono-bitmap actually)
determine where to draw what.
Note that under Windows 95, only 8x8 pixel large stipple bitmaps are
supported, Windows 98 and NT as well as GTK support arbitrary bitmaps.
Note that there is a big difference between stippling in X and Windows.
On X, the stipple is a mask between the wxBitmap and current colour.
On Windows, the current colour is ignored, and the bitmap colour is used.
However, for pre-defined modes like wxCROSS\_HATCH, the behaviour is the
same for both platforms.
\wxheading{See also}
@@ -249,7 +226,6 @@ Sets the brush style.
\twocolitem{{\bf wxHORIZONTAL\_HATCH}}{Horizontal hatch.}
\twocolitem{{\bf wxVERTICAL\_HATCH}}{Vertical hatch.}
\twocolitem{{\bf wxSTIPPLE}}{Stippled using a bitmap.}
\twocolitem{{\bf wxSTIPPLE\_MASK\_OPAQUE}}{Stippled using a bitmap's mask.}
\end{twocollist}}
\wxheading{See also}
@@ -288,10 +264,6 @@ A brush list is a list containing all brushes which have been created.
\helpref{wxList}{wxlist}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/gdicmn.h>
\wxheading{Remarks}
There is only one instance of this class: {\bf wxTheBrushList}. Use

BIN
docs/latex/wx/bullet.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

View File

@@ -1,46 +0,0 @@
\section{\class{wxBusyCursor}}\label{wxbusycursor}
This class makes it easy to tell your user that the program is temporarily busy.
Just create a wxBusyCursor object on the stack, and within the current scope,
the hourglass will be shown.
For example:
\begin{verbatim}
wxBusyCursor wait;
for (int i = 0; i < 100000; i++)
DoACalculation();
\end{verbatim}
It works by calling \helpref{wxBeginBusyCursor}{wxbeginbusycursor} in the constructor,
and \helpref{wxEndBusyCursor}{wxendbusycursor} in the destructor.
\wxheading{Derived from}
None
\wxheading{Include files}
<wx/utils.h>
\wxheading{See also}
\helpref{wxBeginBusyCursor}{wxbeginbusycursor},\rtfsp
\helpref{wxEndBusyCursor}{wxendbusycursor},\rtfsp
\helpref{wxWindowDisabler}{wxwindowdisabler}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxBusyCursor::wxBusyCursor}
\func{}{wxBusyCursor}{\param{wxCursor*}{ cursor = wxHOURGLASS\_CURSOR}}
Constructs a busy cursor object, calling \helpref{wxBeginBusyCursor}{wxbeginbusycursor}.
\membersection{wxBusyCursor::\destruct{wxBusyCursor}}
\func{}{\destruct{wxBusyCursor}}{\void}
Destroys the busy cursor object, calling \helpref{wxEndBusyCursor}{wxendbusycursor}.

View File

@@ -1,69 +0,0 @@
\section{\class{wxBusyInfo}}\label{wxbusyinfo}
This class makes it easy to tell your user that the program is temporarily busy.
Just create a wxBusyInfo object on the stack, and within the current scope,
a message window will be shown.
For example:
\begin{verbatim}
wxBusyInfo wait("Please wait, working...");
for (int i = 0; i < 100000; i++)
{
DoACalculation();
}
\end{verbatim}
It works by creating a window in the constructor,
and deleting it in the destructor.
You may also want to call wxTheApp->Yield() to refresh the window
periodically (in case it had been obscured by other windows, for
example) like this:
\begin{verbatim}
wxWindowDisabler disableAll;
wxBusyInfo wait("Please wait, working...");
for (int i = 0; i < 100000; i++)
{
DoACalculation();
if ( !(i % 1000) )
wxTheApp->Yield();
}
\end{verbatim}
but take care to not cause undesirable reentrancies when doing it (see
\helpref{wxApp::Yield()}{wxappyield} for more details). The simplest way to do
it is to use \helpref{wxWindowDisabler}{wxwindowdisabler} class as illustrated
in the above example.
\wxheading{Derived from}
None
\wxheading{Include files}
<wx/busyinfo.h>
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxBusyInfo::wxBusyInfo}
\func{}{wxBusyInfo}{\param{const wxString\&}{ msg}, \param{wxParent }{*parent = NULL}}
Constructs a busy info window as child of {\it parent} and displays {\it msg}
in it.
{\bf NB:} If {\it parent} is not {\tt NULL} you must ensure that it is not
closed while the busy info is shown.
\membersection{wxBusyInfo::\destruct{wxBusyInfo}}
\func{}{\destruct{wxBusyInfo}}{\void}
Hides and closes the window containing the information text.

View File

@@ -12,31 +12,12 @@ almost any other window.
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/button.h>
\wxheading{Window styles}
\twocolwidtha{5cm}%
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxBU\_LEFT}}{Left-justifies the label. WIN32 only.}
\twocolitem{\windowstyle{wxBU\_TOP}}{Aligns the label to the top of the button. WIN32 only.}
\twocolitem{\windowstyle{wxBU\_RIGHT}}{Right-justifies the bitmap label. WIN32 only.}
\twocolitem{\windowstyle{wxBU\_BOTTOM}}{Aligns the label to the bottom of the button. WIN32 only.}
\twocolitem{\windowstyle{wxBU\_EXACTFIT}}{Creates the button as small as possible instead of making it of the standard size (which is the default behaviour ).}
\end{twocollist}
There are no special styles for wxButton.
See also \helpref{window styles overview}{windowstyles}.
\wxheading{Event handling}
\twocolwidtha{7cm}%
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_BUTTON(id, func)}}{Process a wxEVT\_COMMAND\_BUTTON\_CLICKED event,
when the button is clicked.}
\end{twocollist}
\wxheading{See also}
\helpref{wxBitmapButton}{wxbitmapbutton}
@@ -106,14 +87,6 @@ The button's label.
\helpref{wxButton::SetLabel}{wxbuttonsetlabel}
\membersection{wxButton::GetDefaultSize}\label{wxbuttongetdefaultsize}
\func{wxSize}{GetDefaultSize}{\void}
Returns the default size for the buttons. It is advised to make all the dialog
buttons of the same size and this function allows to retrieve the (platform and
current font dependent size) which should be the best suited for this.
\membersection{wxButton::SetDefault}\label{wxbuttonsetdefault}
\func{void}{SetDefault}{\void}
@@ -126,8 +99,8 @@ box.
Under Windows, only dialog box buttons respond to this function. As
normal under Windows and Motif, pressing return causes the default button to
be depressed when the return key is pressed. See also \helpref{wxWindow::SetFocus}{wxwindowsetfocus}\rtfsp
which sets the keyboard focus for windows and text panel items,\rtfsp
and \helpref{wxPanel::SetDefaultItem}{wxpanelsetdefaultitem}.
which sets the keyboard focus for windows and text panel items, \helpref{wxWindow::OnDefaultAction}{wxwindowondefaultaction}\rtfsp
and \helpref{wxWindow::GetDefaultItem}{wxwindowgetdefaultitem}.
Note that under Motif, calling this function immediately after
creation of a button and before the creation of other buttons

View File

@@ -1,64 +0,0 @@
\section{\class{wxCalculateLayoutEvent}}\label{wxcalculatelayoutevent}
This event is sent by \helpref{wxLayoutAlgorithm}{wxlayoutalgorithm} to
calculate the amount of the remaining client area that the window should
occupy.
\wxheading{Derived from}
\helpref{wxEvent}{wxevent}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/laywin.h>
\wxheading{Event table macros}
\twocolwidtha{7cm}%
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_CALCULATE\_LAYOUT(func)}}{Process a wxEVT\_CALCULATE\_LAYOUT event,
which asks the window to take a 'bite' out of a rectangle provided by the algorithm.}
\end{twocollist}
\wxheading{See also}
\helpref{wxQueryLayoutInfoEvent}{wxquerylayoutinfoevent},\rtfsp
\helpref{wxSashLayoutWindow}{wxsashlayoutwindow},\rtfsp
\helpref{wxLayoutAlgorithm}{wxlayoutalgorithm}.
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCalculateLayoutEvent::wxCalculateLayoutEvent}
\func{}{wxCalculateLayoutEvent}{\param{wxWindowID }{id = 0}}
Constructor.
\membersection{wxCalculateLayoutEvent::GetFlags}\label{wxcalculatelayouteventgetflags}
\constfunc{int}{GetFlags}{\void}
Returns the flags associated with this event. Not currently used.
\membersection{wxCalculateLayoutEvent::GetRect}\label{wxcalculatelayouteventgetrect}
\constfunc{wxRect}{GetRect}{\void}
Before the event handler is entered, returns the remaining parent client area that the window
could occupy. When the event handler returns, this should contain the remaining parent client rectangle,
after the event handler has subtracted the area that its window occupies.
\membersection{wxCalculateLayoutEvent::SetFlags}\label{wxcalculatelayouteventsetflags}
\func{void}{SetFlags}{\param{int }{flags}}
Sets the flags associated with this event. Not currently used.
\membersection{wxCalculateLayoutEvent::SetRect}\label{wxcalculatelayouteventsetrect}
\func{void}{SetRect}{\param{const wxRect\& }{rect}}
Call this to specify the new remaining parent client area, after the space occupied by the
window has been subtracted.

View File

@@ -1,453 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: calctrl.tex
%% Purpose: wxCalendarCtrl documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 03.01.00
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxCalendarCtrl}}\label{wxcalendarctrl}
The calendar control allows the user to pick a date interactively. For this,
it displays a window containing several parts: the control to pick the month
and the year at the top (either or both of them may be disabled) and a month
area below them which shows all the days in the month. The user can move the
current selection using the keyboard and select the date (generating
{\tt EVT\_CALENDAR} event) by pressing {\tt <Return>} or double clicking it.
It has advanced possibilities for the customization of its display. All global
settings (such as colours and fonts used) can, of course, be changed. But
also, the display style for each day in the month can be set independently
using \helpref{wxCalendarDateAttr}{wxcalendardateattr} class.
An item without custom attributes is drawn with the default colours and
font and without border, but setting custom attributes with
\helpref{SetAttr}{wxcalendarctrlsetattr} allows to modify its appearance. Just
create a custom attribute object and set it for the day you want to be
displayed specially (note that the control will take ownership of the pointer,
i.e. it will delete it itself). A day may be marked as being a holiday, even
if it is not recognized as one by \helpref{wxDateTime}{tdateholidays} using
\helpref{SetHoliday}{wxcalendardateattrsetholiday} method.
As the attributes are specified for each day, they may change when the month
is changed, so you will often want to update them in
{\tt EVT\_CALENDAR\_MONTH} event handler.
\wxheading{Derived from}
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/calctrl.h>
\wxheading{Window styles}
\twocolwidtha{5cm}
\begin{twocollist}\itemsep=4pt
\twocolitem{\windowstyle{wxCAL\_SUNDAY\_FIRST}}{Show Sunday as the first day in the week}
\twocolitem{\windowstyle{wxCAL\_MONDAY\_FIRST}}{Show Monday as the first day in the week}
\twocolitem{\windowstyle{wxCAL\_SHOW\_HOLIDAYS}}{Highlight holidays in the calendar}
\twocolitem{\windowstyle{wxCAL\_NO\_YEAR\_CHANGE}}{Disable the year changing}
\twocolitem{\windowstyle{wxCAL\_NO\_MONTH\_CHANGE}}{Disable the month (and, implicitly, the year) changing}
\twocolitem{\windowstyle{wxCAL\_SHOW\_SURROUNDING\_WEEKS}}{Show the neighbouring weeks in the previous and next months}
\twocolitem{\windowstyle{wxCAL\_SEQUENTIAL\_MONTH\_SELECTION}}{Use alternative, more compact, style for the month and year selection controls.}
\end{twocollist}
The default calendar style is {\tt wxCAL\_SHOW\_HOLIDAYS}.
\wxheading{Event table macros}
To process input from a calendar control, use these event handler macros to
direct input to member functions that take a
\helpref{wxCalendarEvent}{wxcalendarevent} argument.
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=7pt
\twocolitem{{\bf EVT\_CALENDAR(id, func)}}{A day was double clicked in the calendar.}
\twocolitem{{\bf EVT\_CALENDAR\_SEL\_CHANGED(id, func)}}{The selected date changed.}
\twocolitem{{\bf EVT\_CALENDAR\_DAY(id, func)}}{The selected day changed.}
\twocolitem{{\bf EVT\_CALENDAR\_MONTH(id, func)}}{The selected month changed.}
\twocolitem{{\bf EVT\_CALENDAR\_YEAR(id, func)}}{The selected year changed.}
\twocolitem{{\bf EVT\_CALENDAR\_WEEKDAY\_CLICKED(id, func)}}{User clicked on the week day header}
\end{twocollist}%
Note that changing the selected date will result in either of
{\tt EVT\_CALENDAR\_DAY}, {\tt MONTH} or {\tt YEAR} events and
{\tt EVT\_CALENDAR\_SEL\_CHANGED} one.
\wxheading{Constants}
The following are the possible return values for
\helpref{HitTest}{wxcalendarctrlhittest} method:
{\small
\begin{verbatim}
enum wxCalendarHitTestResult
{
wxCAL_HITTEST_NOWHERE, // outside of anything
wxCAL_HITTEST_HEADER, // on the header (weekdays)
wxCAL_HITTEST_DAY // on a day in the calendar
}
\end{verbatim}
}
\wxheading{See also}
\helpref{Calendar sample}{samplecalendar}\\
\helpref{wxCalendarDateAttr}{wxcalendardateattr}\\
\helpref{wxCalendarEvent}{wxcalendarevent}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCalendarCtrl::wxCalendarCtrl}\label{wxcalendarctrlwxcalendarctrldef}
\func{}{wxCalendarCtrl}{\void}
Default constructor, use \helpref{Create}{wxcalendarctrlcreate} after it.
\membersection{wxCalendarCtrl::wxCalendarCtrl}\label{wxcalendarctrlwxcalendarctrl}
\func{}{wxCalendarCtrl}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxDateTime\& }{date = wxDefaultDateTime}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxCAL\_SHOW\_HOLIDAYS}, \param{const wxString\& }{name = wxCalendarNameStr}}
Does the same as \helpref{Create}{wxcalendarctrlcreate} method.
\membersection{wxCalendarCtrl::Create}\label{wxcalendarctrlcreate}
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxDateTime\& }{date = wxDefaultDateTime}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxCAL\_SHOW\_HOLIDAYS}, \param{const wxString\& }{name = wxCalendarNameStr}}
Creates the control. See \helpref{wxWindow}{wxwindowctor} for the meaning of
the parameters and the control overview for the possible styles.
\membersection{wxCalendarCtrl::\destruct{wxCalendarCtrl}}\label{wxcalendarctrldtor}
\func{}{\destruct{wxCalendarCtrl}}{\void}
Destroys the control.
\membersection{wxCalendarCtrl::SetDate}\label{wxcalendarctrlsetdate}
\func{void}{SetDate}{\param{const wxDateTime\& }{date}}
Sets the current date.
\membersection{wxCalendarCtrl::GetDate}\label{wxcalendarctrlgetdate}
\constfunc{const wxDateTime\&}{GetDate}{\void}
Gets the currently selected date.
\membersection{wxCalendarCtrl::EnableYearChange}\label{wxcalendarctrlenableyearchange}
\func{void}{EnableYearChange}{\param{bool }{enable = TRUE}}
This function should be used instead of changing {\tt wxCAL\_NO\_YEAR\_CHANGE}
style bit directly. It allows or disallows the user to change the year
interactively.
\membersection{wxCalendarCtrl::EnableMonthChange}\label{wxcalendarctrlenablemonthchange}
\func{void}{EnableMonthChange}{\param{bool }{enable = TRUE}}
This function should be used instead of changing
{\tt wxCAL\_NO\_MONTH\_CHANGE} style bit. It allows or disallows the user to
change the month interactively. Note that if the month can not be changed, the
year can not be changed neither.
\membersection{wxCalendarCtrl::EnableHolidayDisplay}\label{wxcalendarctrlenableholidaydisplay}
\func{void}{EnableHolidayDisplay}{\param{bool }{display = TRUE}}
This function should be used instead of changing {\tt wxCAL\_SHOW\_HOLIDAYS}
style bit directly. It enables or disables the special highlighting of the
holidays.
\membersection{wxCalendarCtrl::SetHeaderColours}\label{wxcalendarctrlsetheadercolours}
\func{void}{SetHeaderColours}{\param{const wxColour\& }{colFg}, \param{const wxColour\& }{colBg}}
Set the colours used for painting the weekdays at the top of the control.
\membersection{wxCalendarCtrl::GetHeaderColourFg}\label{wxcalendarctrlgetheadercolourfg}
\constfunc{const wxColour\&}{GetHeaderColourFg}{\void}
Gets the foreground colour of the header part of the calendar window.
\wxheading{See also}
\helpref{SetHeaderColours}{wxcalendarctrlsetheadercolours}
\membersection{wxCalendarCtrl::GetHeaderColourBg}\label{wxcalendarctrlgetheadercolourbg}
\constfunc{const wxColour\&}{GetHeaderColourBg}{\void}
Gets the background colour of the header part of the calendar window.
\wxheading{See also}
\helpref{SetHeaderColours}{wxcalendarctrlsetheadercolours}
\membersection{wxCalendarCtrl::SetHighlightColours}\label{wxcalendarctrlsethighlightcolours}
\func{void}{SetHighlightColours}{\param{const wxColour\& }{colFg}, \param{const wxColour\& }{colBg}}
Set the colours to be used for highlighting the currently selected date.
\membersection{wxCalendarCtrl::GetHighlightColourFg}\label{wxcalendarctrlgethighlightcolourfg}
\constfunc{const wxColour\&}{GetHighlightColourFg}{\void}
Gets the foreground highlight colour.
\wxheading{See also}
\helpref{SetHighlightColours}{wxcalendarctrlsethighlightcolours}
\membersection{wxCalendarCtrl::GetHighlightColourBg}\label{wxcalendarctrlgethighlightcolourbg}
\constfunc{const wxColour\&}{GetHighlightColourBg}{\void}
Gets the background highlight colour.
\wxheading{See also}
\helpref{SetHighlightColours}{wxcalendarctrlsethighlightcolours}
\membersection{wxCalendarCtrl::SetHolidayColours}\label{wxcalendarctrlsetholidaycolours}
\func{void}{SetHolidayColours}{\param{const wxColour\& }{colFg}, \param{const wxColour\& }{colBg}}
Sets the colours to be used for the holidays highlighting (only used if the
window style includes {\tt wxCAL\_SHOW\_HOLIDAYS} flag).
\membersection{wxCalendarCtrl::GetHolidayColourFg}\label{wxcalendarctrlgetholidaycolourfg}
\constfunc{const wxColour\&}{GetHolidayColourFg}{\void}
Return the foreground colour currently used for holiday highlighting.
\wxheading{See also}
\helpref{SetHolidayColours}{wxcalendarctrlsetholidaycolours}
\membersection{wxCalendarCtrl::GetHolidayColourBg}\label{wxcalendarctrlgetholidaycolourbg}
\constfunc{const wxColour\&}{GetHolidayColourBg}{\void}
Return the background colour currently used for holiday highlighting.
\wxheading{See also}
\helpref{SetHolidayColours}{wxcalendarctrlsetholidaycolours}
\membersection{wxCalendarCtrl::GetAttr}\label{wxcalendarctrlgetattr}
\constfunc{wxCalendarDateAttr *}{GetAttr}{\param{size\_t }{day}}
Returns the attribute for the given date (should be in the range $1\ldots31$).
The returned pointer may be {\tt NULL}.
\membersection{wxCalendarCtrl::SetAttr}\label{wxcalendarctrlsetattr}
\func{void}{SetAttr}{\param{size\_t }{day}, \param{wxCalendarDateAttr* }{attr}}
Associates the attribute with the specified date (in the range $1\ldots31$).
If the pointer is {\tt NULL}, the items attribute is cleared.
\membersection{wxCalendarCtrl::SetHoliday}\label{wxcalendarctrlsetholiday}
\func{void}{SetHoliday}{\param{size\_t }{day}}
Marks the specified day as being a holiday in the current month.
\membersection{wxCalendarCtrl::ResetAttr}\label{wxcalendarctrlresetattr}
\func{void}{ResetAttr}{\param{size\_t }{day}}
Clears any attributes associated with the given day (in the range
$1\ldots31$).
\membersection{wxCalendarCtrl::HitTest}\label{wxcalendarctrlhittest}
\func{wxCalendarHitTestResult}{HitTest}{\param{const wxPoint\& }{pos}, \param{wxDateTime* }{date = NULL}, \param{wxDateTime::WeekDay* }{wd = NULL}}
Returns one of {\tt wxCAL\_HITTEST\_XXX}
\helpref{constants}{wxcalendarctrl} and fills either {\it date} or
{\it wd} pointer with the corresponding value depending on the hit test code.
\section{\class{wxCalendarDateAttr}}\label{wxcalendardateattr}
wxCalendarDateAttr is a custom attributes for a calendar date. The objects of
this class are used with \helpref{wxCalendarCtrl}{wxcalendarctrl}.
\wxheading{Derived from}
No base class
\wxheading{Constants}
Here are the possible kinds of borders which may be used to decorate a date:
\begin{verbatim}
enum wxCalendarDateBorder
{
wxCAL_BORDER_NONE, // no border (default)
wxCAL_BORDER_SQUARE, // a rectangular border
wxCAL_BORDER_ROUND // a round border
}
\end{verbatim}
\wxheading{See also}
\helpref{wxCalendarCtrl}{wxcalendarctrl}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCalendarDateAttr::wxCalendarDateAttr}\label{wxcalendardateattrwxcalendardateattr}
\func{}{wxCalendarDateAttr}{\void}
\func{}{wxCalendarDateAttr}{\param{const wxColour\& }{colText}, \param{const wxColour\& }{colBack = wxNullColour}, \param{const wxColour\& }{colBorder = wxNullColour}, \param{const wxFont\& }{font = wxNullFont}, \param{wxCalendarDateBorder }{border = wxCAL\_BORDER\_NONE}}
\func{}{wxCalendarDateAttr}{\param{wxCalendarDateBorder }{border}, \param{const wxColour\& }{colBorder = wxNullColour}}
The constructors.
\membersection{wxCalendarDateAttr::SetTextColour}\label{wxcalendardateattrsettextcolour}
\func{void}{SetTextColour}{\param{const wxColour\& }{colText}}
Sets the text (foreground) colour to use.
\membersection{wxCalendarDateAttr::SetBackgroundColour}\label{wxcalendardateattrsetbackgroundcolour}
\func{void}{SetBackgroundColour}{\param{const wxColour\& }{colBack}}
Sets the text background colour to use.
\membersection{wxCalendarDateAttr::SetBorderColour}\label{wxcalendardateattrsetbordercolour}
\func{void}{SetBorderColour}{\param{const wxColour\& }{col}}
Sets the border colour to use.
\membersection{wxCalendarDateAttr::SetFont}\label{wxcalendardateattrsetfont}
\func{void}{SetFont}{\param{const wxFont\& }{font}}
Sets the font to use.
\membersection{wxCalendarDateAttr::SetBorder}\label{wxcalendardateattrsetborder}
\func{void}{SetBorder}{\param{wxCalendarDateBorder }{border}}
Sets the \helpref{border kind}{wxcalendardateattr}
\membersection{wxCalendarDateAttr::SetHoliday}\label{wxcalendardateattrsetholiday}
\func{void}{SetHoliday}{\param{bool }{holiday}}
Display the date with this attribute as a holiday.
\membersection{wxCalendarDateAttr::HasTextColour}\label{wxcalendardateattrhastextcolour}
\constfunc{bool}{HasTextColour}{\void}
Returns {\tt TRUE} if this item has a non default text foreground colour.
\membersection{wxCalendarDateAttr::HasBackgroundColour}\label{wxcalendardateattrhasbackgroundcolour}
\constfunc{bool}{HasBackgroundColour}{\void}
Returns {\tt TRUE} if this attribute specifies a non default text background colour.
\membersection{wxCalendarDateAttr::HasBorderColour}\label{wxcalendardateattrhasbordercolour}
\constfunc{bool}{HasBorderColour}{\void}
Returns {\tt TRUE} if this attribute specifies a non default border colour.
\membersection{wxCalendarDateAttr::HasFont}\label{wxcalendardateattrhasfont}
\constfunc{bool}{HasFont}{\void}
Returns {\tt TRUE} if this attribute specifies a non default font.
\membersection{wxCalendarDateAttr::HasBorder}\label{wxcalendardateattrhasborder}
\constfunc{bool}{HasBorder}{\void}
Returns {\tt TRUE} if this attribute specifies a non default (i.e. any) border.
\membersection{wxCalendarDateAttr::IsHoliday}\label{wxcalendardateattrisholiday}
\constfunc{bool}{IsHoliday}{\void}
Returns {\tt TRUE} if this attribute specifies that this item should be
displayed as a holiday.
\membersection{wxCalendarDateAttr::GetTextColour}\label{wxcalendardateattrgettextcolour}
\constfunc{const wxColour\&}{GetTextColour}{\void}
Returns the text colour to use for the item with this attribute.
\membersection{wxCalendarDateAttr::GetBackgroundColour}\label{wxcalendardateattrgetbackgroundcolour}
\constfunc{const wxColour\&}{GetBackgroundColour}{\void}
Returns the background colour to use for the item with this attribute.
\membersection{wxCalendarDateAttr::GetBorderColour}\label{wxcalendardateattrgetbordercolour}
\constfunc{const wxColour\&}{GetBorderColour}{\void}
Returns the border colour to use for the item with this attribute.
\membersection{wxCalendarDateAttr::GetFont}\label{wxcalendardateattrgetfont}
\constfunc{const wxFont\&}{GetFont}{\void}
Returns the font to use for the item with this attribute.
\membersection{wxCalendarDateAttr::GetBorder}\label{wxcalendardateattrgetborder}
\constfunc{wxCalendarDateBorder}{GetBorder}{\void}
Returns the \helpref{border}{wxcalendardateattr} to use for the item with this attribute.
\section{\class{wxCalendarEvent}}\label{wxcalendarevent}
The wxCalendarEvent class is used together with
\helpref{wxCalendarCtrl}{wxcalendarctrl}.
\wxheading{See also}
\helpref{wxCalendarCtrl}{wxcalendarctrl}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCalendarEvent::GetDate}{wxcalendareventgetdate}
\constfunc{const wxDateTime\&}{GetDate}{\void}
Returns the date. This function may be called for all event types except
{\tt EVT\_CALENDAR\_WEEKDAY\_CLICKED} one for which it doesn't make sense.
\membersection{wxCalendarEvent::GetWeekDay}{wxcalendareventgetweekday}
\constfunc{wxDateTime::WeekDay}{GetWeekDay}{\void}
Returns the week day on which the user clicked in
{\tt EVT\_CALENDAR\_WEEKDAY\_CLICKED} handler. It doesn't make sense to call
this function in other handlers.

View File

@@ -1,165 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: caret.tex
%% Purpose: wxCaret documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 20.06.00
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxCaret}}\label{wxcaret}
A caret is a blinking cursor showing the position where the typed text will
appear. The text controls usually have a caret but wxCaret class also allows
to use a caret in other windows.
Currently, the caret appears as a rectangle of the given size. In the future,
it will be possible to specify a bitmap to be used for the caret shape.
A caret is always associated with a window and the current caret can be
retrieved using \helpref{wxWindow::GetCaret}{wxwindowgetcaret}. The same caret
can't be reused in two different windows.
\wxheading{Derived from}
No base class
\wxheading{Include files}
<wx/caret.h>
\wxheading{Data structures}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCaret::wxCaret}\label{wxcaretwxcaret}
\func{}{wxCaret}{\void}
Default constructor: you must use one of Create() functions later.
\func{}{wxCaret}{\param{wxWindow* }{window}, \param{int }{width}, \param{int }{height}}
\func{}{wxCaret}{\param{wxWindowBase* }{window}, \param{const wxSize\& }{size}}
Create the caret of given (in pixels) width and height and associates it
with the given window.
\membersection{wxCaret::Create}\label{wxcaretcreate}
\func{bool}{Create}{\param{wxWindowBase* }{window}, \param{int }{width}, \param{int }{height}}
\func{bool}{Create}{\param{wxWindowBase* }{window}, \param{const wxSize\& }{size}}
Create the caret of given (in pixels) width and height and associates it
with the given window (same as constructor).
\membersection{wxCaret::GetBlinkTime}\label{wxcaretgetblinktime}
\func{static int}{GetBlinkTime}{\void}
Returns the blink time which is measured in milliseconds and is the time elapsed
between 2 inversions of the caret (blink time of the caret is the same
for all carets, so this functions is static).
\membersection{wxCaret::GetPosition}\label{wxcaretgetposition}
\constfunc{void}{GetPosition}{\param{int* }{x}, \param{int* }{y}}
\constfunc{wxPoint}{GetPosition}{\void}
Get the caret position (in pixels).
\perlnote{In wxPerl there are two methods instead of a single overloaded
method:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf GetPosition()}}{Returns a Wx::Point}
\twocolitem{{\bf GetPositionXY()}}{Returns a 2-element list
{\tt ( x, y )}}
\end{twocollist}
}}
\membersection{wxCaret::GetSize}\label{wxcaretgetsize}
\constfunc{void}{GetSize}{\param{int* }{width}, \param{int* }{height}}
\constfunc{wxSize}{GetSize}{\void}
Get the caret size.
\perlnote{In wxPerl there are two methods instead of a single overloaded
method:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf GetSize()}}{Returns a Wx::Size}
\twocolitem{{\bf GetSizeWH()}}{Returns a 2-element list
{\tt ( width, height )}}
\end{twocollist}
}}
\membersection{wxCaret::GetWindow}\label{wxcaretgetwindow}
\constfunc{wxWindow*}{GetWindow}{\void}
Get the window the caret is associated with.
\membersection{wxCaret::Hide}\label{wxcarethide}
\func{void}{Hide}{\void}
Same as \helpref{wxCaret::Show(FALSE)}{wxcaretshow}.
\membersection{wxCaret::IsOk}\label{wxcaretisok}
\constfunc{bool}{IsOk}{\void}
Returns TRUE if the caret was created successfully.
\membersection{wxCaret::IsVisible}\label{wxcaretisvisible}
\constfunc{bool}{IsVisible}{\void}
Returns TRUE if the caret is visible and FALSE if it is permanently
hidden (if it is is blinking and not shown currently but will be after the
next blink, this method still returns TRUE).
\membersection{wxCaret::Move}\label{wxcaretmove}
\func{void}{Move}{\param{int }{x}, \param{int }{y}}
\func{void}{Move}{\param{const wxPoint\& }{pt}}
Move the caret to given position (in logical coordinates).
\membersection{wxCaret::SetBlinkTime}\label{wxcaretsetblinktime}
\func{static void}{SetBlinkTime}{\param{int }{milliseconds}}
Sets the blink time for all the carets.
\wxheading{Remarks}
Under Windows, this function will change the blink time for {\bf all} carets
permanently (until the next time it is called), even for the carets in other
applications.
\wxheading{See also}
\helpref{GetBlinkTime}{wxcaretgetblinktime}
\membersection{wxCaret::SetSize}\label{wxcaretsetsize}
\func{void}{SetSize}{\param{int }{width}, \param{int }{height}}
\func{void}{SetSize}{\param{const wxSize\& }{size}}
Changes the size of the caret.
\membersection{wxCaret::Show}\label{wxcaretshow}
\func{void}{Show}{\param{bool }{show = TRUE}}
Shows or hides the caret. Notice that if the caret was hidden $N$ times, it
must be shown $N$ times as well to reappear on the screen.

View File

@@ -3,6 +3,7 @@
\setfooter{\thepage}{}{}{}{}{\thepage}%
A classification of wxWindows classes by category.
\twocolwidtha{5cm}
{\large {\bf Managed windows}}
@@ -10,41 +11,42 @@ There are several types of window that are directly controlled by the
window manager (such as MS Windows, or the Motif Window Manager).
Frames may contain windows, and dialog boxes may directly contain controls.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxDialog}{wxdialog}}{Dialog box}
\twocolitem{\helpref{wxFrame}{wxframe}}{Normal frame}
\twocolitem{\helpref{wxMDIChildFrame}{wxmdichildframe}}{MDI child frame}
\twocolitem{\helpref{wxMDIParentFrame}{wxmdiparentframe}}{MDI parent frame}
\twocolitem{\helpref{wxMDIChildFrame}{wxmdichildframe}}{MDI child frame}
\twocolitem{\helpref{wxMiniFrame}{wxminiframe}}{A frame with a small title bar}
\twocolitem{\helpref{wxSplashScreen}{wxsplashscreen}}{Splash screen class}
%\twocolitem{\helpref{wxTabbedDialog}{wxtabbeddialog}}{Tabbed dialog
%(deprecated, use wxNotebook instead)}
\twocolitem{\helpref{wxTipWindow}{wxtipwindow}}{Shows text in a small window}
\twocolitem{\helpref{wxWizard}{wxwizard}}{A wizard dialog}
\twocolitem{\helpref{wxTabbedDialog}{wxtabbeddialog}}{Tabbed dialog}
\end{twocollist}
See also {\bf Common dialogs}.
{\large {\bf Miscellaneous windows}}
The following are a variety of classes that are derived from wxWindow.
The following are a variety of windows that are derived from wxWindow.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxGrid}{wxgrid}}{A grid (table) window}
\twocolitem{\helpref{wxPanel}{wxpanel}}{A window whose colour changes according to current user settings}
\twocolitem{\helpref{wxScrolledWindow}{wxscrolledwindow}}{Window with automatically managed scrollbars}
\twocolitem{\helpref{wxGrid}{wxgrid}}{A grid (table) window}
\twocolitem{\helpref{wxSplitterWindow}{wxsplitterwindow}}{Window which can be split vertically or horizontally}
\twocolitem{\helpref{wxStatusBar}{wxstatusbar}}{Implements the status bar on a frame}
\twocolitem{\helpref{wxToolBar}{wxtoolbar}}{Toolbar class}
%\twocolitem{\helpref{wxTabbedPanel}{wxtabbedpanel}}{Tabbed panel (to be replaced with wxNotebook)}
\twocolitem{\helpref{wxNotebook}{wxnotebook}}{Notebook class}
\twocolitem{\helpref{wxPlotWindow}{wxplotwindow}}{A class to display data.}
\twocolitem{\helpref{wxSashWindow}{wxsashwindow}}{Window with four optional sashes that can be dragged}
\twocolitem{\helpref{wxSashLayoutWindow}{wxsashlayoutwindow}}{Window that can be involved in an IDE-like layout arrangement}
\twocolitem{\helpref{wxWizardPage}{wxwizardpage}}{A base class for the page in wizard dialog.}
\twocolitem{\helpref{wxWizardPageSimple}{wxwizardpagesimple}}{A page in wizard dialog.}
\twocolitem{\helpref{wxStatusBar95}{wxstatusbar95}}{Implements a Windows 95 status bar on a frame}
\twocolitem{\helpref{wxTabbedPanel}{wxtabbedpanel}}{Tabbed panel}
\end{twocollist}
{\large {\bf Toolbar classes}}
\overview{Overview}{wxtoolbaroverview}
These are the toolbar classes.
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxToolBarBase}{wxtoolbarbase}}{Toolbar base class}
\twocolitem{\helpref{wxToolBarSimple}{wxtoolbarsimple}}{A simple, cross-platform toolbar class}
\twocolitem{\helpref{wxToolBarMSW}{wxtoolbarmsw}}{A Windows-only toolbar class}
\twocolitem{\helpref{wxToolBar95}{wxtoolbar95}}{A Windows 95-only toolbar class}
\end{twocollist}
{\large {\bf Common dialogs}}
@@ -54,22 +56,18 @@ The following are a variety of classes that are derived from wxWindow.
Common dialogs are ready-made dialog classes which are frequently used
in an application.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxDialog}{wxdialog}}{Base class for common dialogs}
\twocolitem{\helpref{wxColourDialog}{wxcolourdialog}}{Colour chooser dialog}
\twocolitem{\helpref{wxDirDialog}{wxdirdialog}}{Directory selector dialog}
\twocolitem{\helpref{wxFileDialog}{wxfiledialog}}{File selector dialog}
\twocolitem{\helpref{wxFindReplaceDialog}{wxfindreplacedialog}}{Text search/replace dialog}
\twocolitem{\helpref{wxMultipleChoiceDialog}{wxmultiplechoicedialog}}{Dialog to get one or more selections from a list}
\twocolitem{\helpref{wxSingleChoiceDialog}{wxsinglechoicedialog}}{Dialog to get a single selection from a list and return the string}
\twocolitem{\helpref{wxTextEntryDialog}{wxtextentrydialog}}{Dialog to get a single line of text from the user}
\twocolitem{\helpref{wxFontDialog}{wxfontdialog}}{Font chooser dialog}
\twocolitem{\helpref{wxPageSetupDialog}{wxpagesetupdialog}}{Standard page setup dialog}
\twocolitem{\helpref{wxPrintDialog}{wxprintdialog}}{Standard print dialog}
\twocolitem{\helpref{wxPageSetupDialog}{wxpagesetupdialog}}{Standard page setup dialog}
\twocolitem{\helpref{wxMessageDialog}{wxmessagedialog}}{Simple message box dialog}
\twocolitem{\helpref{wxWizard}{wxwizard}}{A wizard dialog.}
\end{twocollist}
{\large {\bf Controls}}
@@ -77,29 +75,23 @@ in an application.
Typically, these are small windows which provide interaction with the user. Controls
that are not static can have \helpref{validators}{wxvalidator} associated with them.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxControl}{wxcontrol}}{The base class for controls}
\twocolitem{\helpref{wxButton}{wxbutton}}{Push button control, displaying text}
\twocolitem{\helpref{wxBitmapButton}{wxbitmapbutton}}{Push button control, displaying a bitmap}
\twocolitem{\helpref{wxToggleButton}{wxtogglebutton}}{A button which stays pressed when clicked by user.}
\twocolitem{\helpref{wxCalendarCtrl}{wxcalendarctrl}}{Date picker control}
\twocolitem{\helpref{wxCheckBox}{wxcheckbox}}{Checkbox control}
\twocolitem{\helpref{wxCheckListBox}{wxchecklistbox}}{A listbox with a checkbox to the left of each item}
\twocolitem{\helpref{wxChoice}{wxchoice}}{Choice control (a combobox without the editable area)}
\twocolitem{\helpref{wxComboBox}{wxcombobox}}{A choice with an editable area}
\twocolitem{\helpref{wxGauge}{wxgauge}}{A control to represent a varying quantity, such as time remaining}
\twocolitem{\helpref{wxGenericDirCtrl}{wxgenericdirctrl}}{A control for displaying a directory tree}
\twocolitem{\helpref{wxStaticBox}{wxstaticbox}}{A static, or group box for visually grouping related controls}
\twocolitem{\helpref{wxListBox}{wxlistbox}}{A list of strings for single or multiple selection}
\twocolitem{\helpref{wxListCtrl}{wxlistctrl}}{A control for displaying lists of strings and/or icons, plus a multicolumn report view}
\twocolitem{\helpref{wxListView}{wxlistview}}{A simpler interface ({\it fa\c{c}ade} for wxListCtrl in report mode}
\twocolitem{\helpref{wxTabCtrl}{wxtabctrl}}{Manages several tabs}
\twocolitem{\helpref{wxTextCtrl}{wxtextctrl}}{Single or multiline text editing control}
\twocolitem{\helpref{wxTreeCtrl}{wxtreectrl}}{Tree (hierarchy) control}
\twocolitem{\helpref{wxTextCtrl}{wxtextctrl}}{Single or multline text editing control}
\twocolitem{\helpref{wxTreeCtrl}{wxtreectrl}}{Tree (hierachy) control}
\twocolitem{\helpref{wxScrollBar}{wxscrollbar}}{Scrollbar control}
\twocolitem{\helpref{wxSpinButton}{wxspinbutton}}{A spin or `up-down' control}
\twocolitem{\helpref{wxSpinCtrl}{wxspinctrl}}{A spin control - i.e. spin button and text control}
\twocolitem{\helpref{wxStaticText}{wxstatictext}}{One or more lines of non-editable text}
\twocolitem{\helpref{wxStaticBitmap}{wxstaticbitmap}}{A control to display a bitmap}
\twocolitem{\helpref{wxRadioBox}{wxradiobox}}{A group of radio buttons}
@@ -109,7 +101,6 @@ that are not static can have \helpref{validators}{wxvalidator} associated with t
{\large {\bf Menus}}
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxMenu}{wxmenu}}{Displays a series of menu items for selection}
\twocolitem{\helpref{wxMenuBar}{wxmenubar}}{Contains a series of menus for use with a frame}
@@ -118,30 +109,10 @@ that are not static can have \helpref{validators}{wxvalidator} associated with t
{\large {\bf Window layout}}
There are two different systems for laying out windows (and dialogs in particular).
One is based upon so-called sizers and it requires less typing, thinking and calculating
and will in almost all cases produce dialogs looking equally well on all platforms, the
other is based on so-called constraints and is deprecated, though still available.
\overview{Overview}{constraintsoverview}
\overview{Sizer overview}{sizeroverview} describes sizer-based layout.
These are the classes relevant to automated window layout.
These are the classes relevant to sizer-based layout.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxSizer}{wxsizer}}{Abstract base class}
\twocolitem{\helpref{wxGridSizer}{wxgridsizer}}{A sizer for laying out windows in a grid with all fields having the same size}
\twocolitem{\helpref{wxFlexGridSizer}{wxflexgridsizer}}{A sizer for laying out windows in a flexible grid}
\twocolitem{\helpref{wxBoxSizer}{wxboxsizer}}{A sizer for laying out windows in a row or column}
\twocolitem{\helpref{wxStaticBoxSizer}{wxstaticboxsizer}}{Same as wxBoxSizer, but with a surrounding static box}
\twocolitem{\helpref{wxNotebookSizer}{wxnotebooksizer}}{Sizer to use with the wxNotebook control}
\end{twocollist}
\overview{Constraints overview}{constraintsoverview} describes constraints-based layout.
These are the classes relevant to constraints-based window layout.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxIndividualLayoutConstraint}{wxindividuallayoutconstraint}}{Represents a single constraint dimension}
\twocolitem{\helpref{wxLayoutConstraints}{wxlayoutconstraints}}{Represents the constraints for a window class}
@@ -155,7 +126,6 @@ Device contexts are surfaces that may be drawn on, and provide an
abstraction that allows parameterisation of your drawing code
by passing different device contexts.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxClientDC}{wxclientdc}}{A device context to access the client area outside {\bf OnPaint} events}
\twocolitem{\helpref{wxPaintDC}{wxpaintdc}}{A device context to access the client area inside {\bf OnPaint} events}
@@ -163,7 +133,7 @@ by passing different device contexts.
\twocolitem{\helpref{wxScreenDC}{wxscreendc}}{A device context to access the entire screen}
\twocolitem{\helpref{wxDC}{wxdc}}{The device context base class}
\twocolitem{\helpref{wxMemoryDC}{wxmemorydc}}{A device context for drawing into bitmaps}
\twocolitem{\helpref{wxMetafileDC}{wxmetafiledc}}{A device context for drawing into metafiles}
\twocolitem{\helpref{wxMetaFileDC}{wxmetafiledc}}{A device context for drawing into metafiles}
\twocolitem{\helpref{wxPostScriptDC}{wxpostscriptdc}}{A device context for drawing into PostScript files}
\twocolitem{\helpref{wxPrinterDC}{wxprinterdc}}{A device context for drawing to printers}
\end{twocollist}
@@ -174,10 +144,8 @@ by passing different device contexts.
These classes are related to drawing on device contexts and windows.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxColour}{wxcolour}}{Represents the red, blue and green elements of a colour}
\twocolitem{\helpref{wxDCClipper}{wxdcclipper}}{Wraps the operations of setting and destroying the clipping region}
\twocolitem{\helpref{wxBitmap}{wxbitmap}}{Represents a bitmap}
\twocolitem{\helpref{wxBrush}{wxbrush}}{Used for filling areas on a device context}
\twocolitem{\helpref{wxBrushList}{wxbrushlist}}{The list of previously-created brushes}
@@ -185,7 +153,6 @@ These classes are related to drawing on device contexts and windows.
\twocolitem{\helpref{wxFont}{wxfont}}{Represents fonts}
\twocolitem{\helpref{wxFontList}{wxfontlist}}{The list of previously-created fonts}
\twocolitem{\helpref{wxIcon}{wxicon}}{A small, transparent bitmap for assigning to frames and drawing on device contexts}
\twocolitem{\helpref{wxImage}{wximage}}{A platform-independent image class}
\twocolitem{\helpref{wxImageList}{wximagelist}}{A list of images, used with some controls}
\twocolitem{\helpref{wxMask}{wxmask}}{Represents a mask to be used with a bitmap for transparent drawing}
\twocolitem{\helpref{wxPen}{wxpen}}{Used for drawing lines on a device context}
@@ -201,94 +168,62 @@ These classes are related to drawing on device contexts and windows.
An event object contains information about a specific event. Event handlers
(usually member functions) have a single, event argument.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxActivateEvent}{wxactivateevent}}{A window or application activation event}
\twocolitem{\helpref{wxCalendarEvent}{wxcalendarevent}}{Used with \helpref{wxCalendarCtrl}{wxcalendarctrl}}
\twocolitem{\helpref{wxCalculateLayoutEvent}{wxcalculatelayoutevent}}{Used to calculate window layout}
\twocolitem{\helpref{wxCloseEvent}{wxcloseevent}}{A close window or end session event}
\twocolitem{\helpref{wxCommandEvent}{wxcommandevent}}{An event from a variety of standard controls}
\twocolitem{\helpref{wxDialUpEvent}{wxdialupevent}}{Event send by \helpref{wxDialUpManager}{wxdialupmanager}}
\twocolitem{\helpref{wxDropFilesEvent}{wxdropfilesevent}}{A drop files event}
\twocolitem{\helpref{wxEraseEvent}{wxeraseevent}}{An erase background event}
\twocolitem{\helpref{wxEvent}{wxevent}}{The event base class}
\twocolitem{\helpref{wxFindDialogEvent}{wxfinddialogevent}}{Event sent by
\helpref{wxFindReplaceDialog}{wxfindreplacedialog}}
\twocolitem{\helpref{wxFocusEvent}{wxfocusevent}}{A window focus event}
\twocolitem{\helpref{wxKeyEvent}{wxkeyevent}}{A keypress event}
\twocolitem{\helpref{wxIconizeEvent}{wxiconizeevent}}{An iconize/restore event}
\twocolitem{\helpref{wxIdleEvent}{wxidleevent}}{An idle event}
\twocolitem{\helpref{wxInitDialogEvent}{wxinitdialogevent}}{A dialog initialisation event}
\twocolitem{\helpref{wxJoystickEvent}{wxjoystickevent}}{A joystick event}
\twocolitem{\helpref{wxListEvent}{wxlistevent}}{A list control event}
\twocolitem{\helpref{wxMaximizeEvent}{wxmaximizeevent}}{A maximize event}
\twocolitem{\helpref{wxMenuEvent}{wxmenuevent}}{A menu event}
\twocolitem{\helpref{wxMouseCaptureChangedEvent}{wxmousecapturechangedevent}}{A mouse capture changed event}
\twocolitem{\helpref{wxMouseEvent}{wxmouseevent}}{A mouse event}
\twocolitem{\helpref{wxMoveEvent}{wxmoveevent}}{A move event}
\twocolitem{\helpref{wxNotebookEvent}{wxnotebookevent}}{A notebook control event}
\twocolitem{\helpref{wxNotifyEvent}{wxnotifyevent}}{A notification event, which can be vetoed}
\twocolitem{\helpref{wxPaintEvent}{wxpaintevent}}{A paint event}
\twocolitem{\helpref{wxProcessEvent}{wxprocessevent}}{A process ending event}
\twocolitem{\helpref{wxQueryLayoutInfoEvent}{wxquerylayoutinfoevent}}{Used to query layout information}
\twocolitem{\helpref{wxScrollEvent}{wxscrollevent}}{A scroll event from sliders, stand-alone scrollbars and spin buttons}
\twocolitem{\helpref{wxScrollWinEvent}{wxscrollwinevent}}{A scroll event from scrolled windows}
%\twocolitem{\helpref{wxSessionEvent}{wxsessionevent}}{A session ending event}
\twocolitem{\helpref{wxSizeEvent}{wxsizeevent}}{A size event}
\twocolitem{\helpref{wxSocketEvent}{wxsocketevent}}{A socket event}
\twocolitem{\helpref{wxSpinEvent}{wxspinevent}}{An event from \helpref{wxSpinButton}{wxspinbutton}}
\twocolitem{\helpref{wxSysColourChangedEvent}{wxsyscolourchangedevent}}{A system colour change event}
\twocolitem{\helpref{wxTabEvent}{wxtabevent}}{A tab control event}
\twocolitem{\helpref{wxTreeEvent}{wxtreeevent}}{A tree control event}
\twocolitem{\helpref{wxUpdateUIEvent}{wxupdateuievent}}{A user interface update event}
\twocolitem{\helpref{wxWizardEvent}{wxwizardevent}}{A wizard event}
\end{twocollist}
{\large {\bf Validators}}
\overview{Overview}{validatoroverview}
These are the window validators, used for filtering and validating
user input.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxValidator}{wxvalidator}}{Base validator class}
\twocolitem{\helpref{wxTextValidator}{wxtextvalidator}}{Text control validator class}
\twocolitem{\helpref{wxGenericValidator}{wxgenericvalidator}}{Generic control validator class}
\twocolitem{\helpref{wxValidator}{wxvalidator}}{Base validator class.}
\twocolitem{\helpref{wxTextValidator}{wxtextvalidator}}{Text control validator class.}
\end{twocollist}
{\large {\bf Data structures}}
These are the data structure classes supported by wxWindows.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxCmdLineParser}{wxcmdlineparser}}{Command line parser class}
\twocolitem{\helpref{wxDate}{wxdate}}{A class for date manipulation (deprecated in favour of wxDateTime)}
\twocolitem{\helpref{wxDateSpan}{wxdatespan}}{A logical time interval.}
\twocolitem{\helpref{wxDateTime}{wxdatetime}}{A class for date/time manipulations}
\twocolitem{\helpref{wxExpr}{wxexpr}}{A class for flexible I/O}
\twocolitem{\helpref{wxExprDatabase}{wxexprdatabase}}{A class for flexible I/O}
\twocolitem{\helpref{wxHashMap}{wxhashmap}}{A simple hash map implementation}
\twocolitem{\helpref{wxHashTable}{wxhashtable}}{A simple hash table implementation (deprecated, use wxHashMap)}
% \twocolitem{\helpref{wxHashTableLong}{wxhashtablelong}}{A wxHashTable version for storing long data}
\twocolitem{\helpref{wxDate}{wxdate}}{A class for date manipulation}
\twocolitem{\helpref{wxHashTable}{wxhashtable}}{A simple hash table implementation}
\twocolitem{\helpref{wxList}{wxlist}}{A simple linked list implementation}
\twocolitem{\helpref{wxLongLong}{wxlonglong}}{A portable 64 bit integer type}
\twocolitem{\helpref{wxNode}{wxnode}}{Represents a node in the wxList implementation}
\twocolitem{\helpref{wxObject}{wxobject}}{The root class for most wxWindows classes}
\twocolitem{\helpref{wxPathList}{wxpathlist}}{A class to help search multiple paths}
\twocolitem{\helpref{wxPoint}{wxpoint}}{Representation of a point}
\twocolitem{\helpref{wxRect}{wxrect}}{A class representing a rectangle}
\twocolitem{\helpref{wxRegEx}{wxregex}}{Regular expression support}
\twocolitem{\helpref{wxRegion}{wxregion}}{A class representing a region}
\twocolitem{\helpref{wxString}{wxstring}}{A string class}
\twocolitem{\helpref{wxStringList}{wxstringlist}}{A class representing a list of strings}
\twocolitem{\helpref{wxStringTokenizer}{wxstringtokenizer}}{A class for interpreting a string as a list of tokens or words}
\twocolitem{\helpref{wxRealPoint}{wxrealpoint}}{Representation of a point using floating point numbers}
\twocolitem{\helpref{wxSize}{wxsize}}{Representation of a size}
\twocolitem{\helpref{wxTime}{wxtime}}{A class for time manipulation (deprecated in favour of wxDateTime)}
\twocolitem{\helpref{wxTimeSpan}{wxtimespan}}{A time interval.}
\twocolitem{\helpref{wxVariant}{wxvariant}}{A class for storing arbitrary types that may change at run-time}
\twocolitem{\helpref{wxTime}{wxtime}}{A class for time manipulation}
\end{twocollist}
{\large {\bf Run-time class information system}}
@@ -298,34 +233,10 @@ These are the data structure classes supported by wxWindows.
wxWindows supports run-time manipulation of class information, and dynamic
creation of objects given class names.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxClassInfo}{wxclassinfo}}{Holds run-time class information}
\twocolitem{\helpref{wxObject}{wxobject}}{Root class for classes with run-time information}
\twocolitem{\helpref{RTTI macros}{rttimacros}}{Macros for manipulating run-time information}
\end{twocollist}
{\large {\bf Debugging features}}
\overview{Overview}{wxlogoverview}
wxWindows provides several classes and functions for the message logging.
Please see the \helpref{wxLog overview}{wxlogoverview} for more details.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxLog}{wxlog}}{The base log class}
\twocolitem{\helpref{wxLogStderr}{wxlogstderr}}{Log messages to a C STDIO stream}
\twocolitem{\helpref{wxLogStream}{wxlogstream}}{Log messages to a C++ iostream}
\twocolitem{\helpref{wxLogTextCtrl}{wxlogtextctrl}}{Log messages to a \helpref{wxTextCtrl}{wxtextctrl}}
\twocolitem{\helpref{wxLogWindow}{wxlogwindow}}{Log messages to a log frame}
\twocolitem{\helpref{wxLogGui}{wxloggui}}{Default log target for GUI programs}
\twocolitem{\helpref{wxLogNull}{wxlognull}}{Temporarily suppress message logging}
\twocolitem{\helpref{wxLogChain}{wxlogchain}}{Allows to chain two log targets}
\twocolitem{\helpref{wxLogPassThrough}{wxlogpassthrough}}{Allows to filter the log messages}
\twocolitem{\helpref{wxStreamToTextRedirector}{wxstreamtotextredirector}}{Allows
to redirect output sent to {\tt cout} to a \helpref{wxTextCtrl}{wxtextctrl}}
\twocolitem{\helpref{Log functions}{logfunctions}}{Error and warning logging functions}
\twocolitem{\helpref{Macros}{macros}}{Macros for manipulating run-time information}
\end{twocollist}
{\large {\bf Debugging features}}
@@ -335,47 +246,28 @@ to redirect output sent to {\tt cout} to a \helpref{wxTextCtrl}{wxtextctrl}}
wxWindows supports some aspects of debugging an application through
classes, functions and macros.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxDebugContext}{wxdebugcontext}}{Provides memory-checking facilities}
%\twocolitem{\helpref{wxDebugStreamBuf}{wxdebugstreambuf}}{A stream buffer writing to the debug stream}
\twocolitem{\helpref{Debugging macros}{debugmacros}}{Debug macros for assertion and checking}
\twocolitem{\helpref{wxDebugContext}{wxdebugcontext}}{Provides various debugging facilities}
\twocolitem{\helpref{wxDebugStreamBuf}{wxdebugstreambuf}}{A stream buffer writing to the debug stream}
\twocolitem{\helpref{wxObject}{wxobject}}{Provides optional debugging versions of {\bf new} and {\bf delete}}
\twocolitem{\helpref{wxTrace}{wxtrace}}{Tracing facility}
\twocolitem{\helpref{wxTraceLevel}{wxtracelevel}}{Tracing facility with levels}
\twocolitem{\helpref{WXDEBUG\_NEW}{debugnew}}{Use this macro to give further debugging information}
%\twocolitem{\helpref{WXTRACE}{trace}}{Trace macro}
%\twocolitem{\helpref{WXTRACELEVEL}{tracelevel}}{Trace macro with levels}
\twocolitem{\helpref{WXTRACE}{trace}}{Trace macro}
\twocolitem{\helpref{WXTRACELEVEL}{tracelevel}}{Trace macro with levels}
\end{twocollist}
{\large {\bf Networking classes}}
wxWindows provides its own classes for socket based networking.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxDialUpManager}{wxdialupmanager}}{Provides functions to check the status of network connection and to establish one}
\twocolitem{\helpref{wxIPV4address}{wxipv4address}}{Represents an Internet address}
\twocolitem{\helpref{wxSocketBase}{wxsocketbase}}{Represents a socket base object}
\twocolitem{\helpref{wxSocketClient}{wxsocketclient}}{Represents a socket client}
\twocolitem{\helpref{wxSocketServer}{wxsocketserver}}{Represents a socket server}
\twocolitem{\helpref{wxSocketEvent}{wxsocketevent}}{A socket event}
\twocolitem{\helpref{wxFTP}{wxftp}}{FTP protocol class}
\twocolitem{\helpref{wxHTTP}{wxhttp}}{HTTP protocol class}
\twocolitem{\helpref{wxURL}{wxurl}}{Represents a Universal Resource Locator}
\end{twocollist}
{\large {\bf Interprocess communication}}
\overview{Overview}{ipcoverview}
wxWindows provides simple interprocess communications facilities
based on Windows DDE, but available on most platforms using TCP.
wxWindows provides a simple interprocess communications facilities
based on DDE.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxClient}{wxddeclient}}{Represents a client}
\twocolitem{\helpref{wxConnection}{wxddeconnection}}{Represents the connection between a client and a server}
\twocolitem{\helpref{wxServer}{wxddeserver}}{Represents a server}
%\twocolitem{\helpref{wxSocketHandler}{wxsockethandler}}{Represents a socket handler}
\twocolitem{\helpref{wxDDEClient}{wxddeclient}}{Represents a client}
\twocolitem{\helpref{wxDDEConnection}{wxddeconnection}}{Represents the connection between a client and a server}
\twocolitem{\helpref{wxDDEServer}{wxddeserver}}{Represents a server}
\end{twocollist}
{\large {\bf Document/view framework}}
@@ -385,16 +277,16 @@ based on Windows DDE, but available on most platforms using TCP.
wxWindows supports a document/view framework which provides
housekeeping for a document-centric application.
\twocolwidtha{6cm}
TODO: MDI frame classes for documents; make it unnecessary to convert
between streams and files (overridable method that uses filenames instead of streams).
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxDocument}{wxdocument}}{Represents a document}
\twocolitem{\helpref{wxView}{wxview}}{Represents a view}
\twocolitem{\helpref{wxDocTemplate}{wxdoctemplate}}{Manages the relationship between a document class and a view class}
\twocolitem{\helpref{wxDocTemplate}{wxdoctemplate}}{Manages the relationship between a document class and a veiw class}
\twocolitem{\helpref{wxDocManager}{wxdocmanager}}{Manages the documents and views in an application}
\twocolitem{\helpref{wxDocChildFrame}{wxdocchildframe}}{A child frame for showing a document view}
\twocolitem{\helpref{wxDocParentFrame}{wxdocparentframe}}{A parent frame to contain views}
%\twocolitem{\helpref{wxMDIDocChildFrame}{wxmdidocchildframe}}{An MDI child frame for showing a document view}
%\twocolitem{\helpref{wxMDIDocParentFrame}{wxmdidocparentframe}}{An MDI parent frame to contain views}
\end{twocollist}
{\large {\bf Printing framework}}
@@ -402,194 +294,28 @@ housekeeping for a document-centric application.
\overview{Overview}{printingoverview}
A printing and previewing framework is implemented to
make it relatively straightforward to provide document printing
make it relatively straighforward to provide document printing
facilities.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxPreviewFrame}{wxpreviewframe}}{Frame for displaying a print preview}
\twocolitem{\helpref{wxPreviewCanvas}{wxpreviewcanvas}}{Canvas for displaying a print preview}
\twocolitem{\helpref{wxPreviewControlBar}{wxpreviewcontrolbar}}{Standard control bar for a print preview}
\twocolitem{\helpref{wxPrintData}{wxprintdata}}{Represents information about the document being printed}
\twocolitem{\helpref{wxPrintDialog}{wxprintdialog}}{Standard print dialog}
\twocolitem{\helpref{wxPageSetupDialog}{wxpagesetupdialog}}{Standard page setup dialog}
\twocolitem{\helpref{wxPrinter}{wxprinter}}{Class representing the printer}
\twocolitem{\helpref{wxPrinterDC}{wxprinterdc}}{Printer device context}
\twocolitem{\helpref{wxPrintout}{wxprintout}}{Class representing a particular printout}
\twocolitem{\helpref{wxPrintPreview}{wxprintpreview}}{Class representing a print preview}
\twocolitem{\helpref{wxPrintData}{wxprintdata}}{Represents information about the document being printed}
\twocolitem{\helpref{wxPrintDialogData}{wxprintdialogdata}}{Represents information about the print dialog}
\twocolitem{\helpref{wxPageSetupDialogData}{wxpagesetupdialogdata}}{Represents information about the page setup dialog}
\end{twocollist}
{\large {\bf Drag and drop and clipboard classes}}
\overview{Drag and drop and clipboard overview}{wxdndoverview}
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxDataObject}{wxdataobject}}{Data object class}
\twocolitem{\helpref{wxDataFormat}{wxdataformat}}{Represents a data format}
\twocolitem{\helpref{wxTextDataObject}{wxtextdataobject}}{Text data object class}
\twocolitem{\helpref{wxFileDataObject}{wxtextdataobject}}{File data object class}
\twocolitem{\helpref{wxBitmapDataObject}{wxbitmapdataobject}}{Bitmap data object class}
\twocolitem{\helpref{wxCustomDataObject}{wxcustomdataobject}}{Custom data object class}
\twocolitem{\helpref{wxClipboard}{wxclipboard}}{Clipboard class}
\twocolitem{\helpref{wxDropTarget}{wxdroptarget}}{Drop target class}
\twocolitem{\helpref{wxFileDropTarget}{wxfiledroptarget}}{File drop target class}
\twocolitem{\helpref{wxTextDropTarget}{wxtextdroptarget}}{Text drop target class}
\twocolitem{\helpref{wxDropSource}{wxdropsource}}{Drop source class}
\end{twocollist}
{\large {\bf File related classes}}
wxWindows has several small classes to work with disk files, see \helpref{file classes
overview}{wxfileoverview} for more details.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxFileName}{wxfilename}}{Operations with the file name and attributes}
\twocolitem{\helpref{wxDir}{wxdir}}{Class for enumerating files/subdirectories.}
\twocolitem{\helpref{wxDirTraverser}{wxdirtraverser}}{Class used together with wxDir for recursively enumerating the files/subdirectories}
\twocolitem{\helpref{wxFile}{wxfile}}{Low-level file input/output class.}
\twocolitem{\helpref{wxFFile}{wxffile}}{Another low-level file input/output class.}
\twocolitem{\helpref{wxTempFile}{wxtempfile}}{Class to safely replace an existing file}
\twocolitem{\helpref{wxTextFile}{wxtextfile}}{Class for working with text files as with arrays of lines}
\end{twocollist}
{\large {\bf Stream classes}}
wxWindows has its own set of stream classes, as an alternative to often buggy standard stream
libraries, and to provide enhanced functionality.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxStreamBase}{wxstreambase}}{Stream base class}
\twocolitem{\helpref{wxStreamBuffer}{wxstreambuffer}}{Stream buffer class}
\twocolitem{\helpref{wxInputStream}{wxinputstream}}{Input stream class}
\twocolitem{\helpref{wxOutputStream}{wxoutputstream}}{Output stream class}
\twocolitem{\helpref{wxCountingOutputStream}{wxcountingoutputstream}}{Stream class for querying what size a stream would have.}
\twocolitem{\helpref{wxFilterInputStream}{wxfilterinputstream}}{Filtered input stream class}
\twocolitem{\helpref{wxFilterOutputStream}{wxfilteroutputstream}}{Filtered output stream class}
\twocolitem{\helpref{wxBufferedInputStream}{wxbufferedinputstream}}{Buffered input stream class}
\twocolitem{\helpref{wxBufferedOutputStream}{wxbufferedoutputstream}}{Buffered output stream class}
\twocolitem{\helpref{wxMemoryInputStream}{wxmeminputstream}}{Memory input stream class}
\twocolitem{\helpref{wxMemoryOutputStream}{wxmemoutputstream}}{Memory output stream class}
\twocolitem{\helpref{wxDataInputStream}{wxdatainputstream}}{Platform-independent binary data input stream class}
\twocolitem{\helpref{wxDataOutputStream}{wxdataoutputstream}}{Platform-independent binary data output stream class}
\twocolitem{\helpref{wxTextInputStream}{wxtextinputstream}}{Platform-independent text data input stream class}
\twocolitem{\helpref{wxTextOutputStream}{wxtextoutputstream}}{Platform-independent text data output stream class}
\twocolitem{\helpref{wxFileInputStream}{wxfileinputstream}}{File input stream class}
\twocolitem{\helpref{wxFileOutputStream}{wxfileoutputstream}}{File output stream class}
\twocolitem{\helpref{wxFFileInputStream}{wxffileinputstream}}{Another file input stream class}
\twocolitem{\helpref{wxFFileOutputStream}{wxffileoutputstream}}{Another file output stream class}
\twocolitem{\helpref{wxZlibInputStream}{wxzlibinputstream}}{Zlib (compression) input stream class}
\twocolitem{\helpref{wxZlibOutputStream}{wxzliboutputstream}}{Zlib (compression) output stream class}
\twocolitem{\helpref{wxZipInputStream}{wxzipinputstream}}{Input stream for reading from ZIP archives}
\twocolitem{\helpref{wxSocketInputStream}{wxsocketinputstream}}{Socket input stream class}
\twocolitem{\helpref{wxSocketOutputStream}{wxsocketoutputstream}}{Socket output stream class}
\end{twocollist}
{\large {\bf Threading classes}}
\overview{Multithreading overview}{wxthreadoverview}
wxWindows provides a set of classes to make use of the native thread
capabilities of the various platforms.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxThread}{wxthread}}{Thread class}
\twocolitem{\helpref{wxMutex}{wxmutex}}{Mutex class}
\twocolitem{\helpref{wxMutexLocker}{wxmutexlocker}}{Mutex locker utility class}
\twocolitem{\helpref{wxCriticalSection}{wxcriticalsection}}{Critical section class}
\twocolitem{\helpref{wxCriticalSectionLocker}{wxcriticalsectionlocker}}{Critical section locker utility class}
\twocolitem{\helpref{wxCondition}{wxcondition}}{Condition class}
\twocolitem{\helpref{wxSemaphore}{wxsemaphore}}{Semaphore class}
\end{twocollist}
{\large {\bf HTML classes}}
wxWindows provides a set of classes to display text in HTML format. These
class include a help system based on the HTML widget.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxHtmlHelpController}{wxhtmlhelpcontroller}}{HTML help controller class}
\twocolitem{\helpref{wxHtmlWindow}{wxhtmlwindow}}{HTML window class}
\twocolitem{\helpref{wxHtmlEasyPrinting}{wxhtmleasyprinting}}{Simple class for printing HTML}
\twocolitem{\helpref{wxHtmlPrintout}{wxhtmlprintout}}{Generic HTML wxPrintout class}
\twocolitem{\helpref{wxHtmlParser}{wxhtmlparser}}{Generic HTML parser class}
\twocolitem{\helpref{wxHtmlTagHandler}{wxhtmltaghandler}}{HTML tag handler, pluginable into wxHtmlParser}
\twocolitem{\helpref{wxHtmlWinParser}{wxhtmlwinparser}}{HTML parser class for wxHtmlWindow}
\twocolitem{\helpref{wxHtmlWinTagHandler}{wxhtmlwintaghandler}}{HTML tag handler, pluginable into wxHtmlWinParser}
\end{twocollist}
{\large {\bf Virtual file system classes}}
wxWindows provides a set of classes that implement an extensible virtual file system,
used internally by the HTML classes.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxFSFile}{wxfsfile}}{Represents a file in the virtual file system}
\twocolitem{\helpref{wxFileSystem}{wxfilesystem}}{Main interface for the virtual file system}
\twocolitem{\helpref{wxFileSystemHandler}{wxfilesystemhandler}}{Class used to announce file system type}
\end{twocollist}
{\large {\bf XML-based resource system classes}}
\overview{XML-based resource system overview}{xrcoverview}
Resources allow your application to create controls and other user interface elements
from specifications stored in an XML format.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxXmlResource}{wxxmlresource}}{The main class for working with resources.}
\twocolitem{\helpref{wxXmlResourceHandler}{wxxmlresourcehandler}}{The base class for XML resource handlers.}
\end{twocollist}
{\large {\bf Online help}}
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxHelpController}{wxhelpcontroller}}{Family of classes for controlling help windows}
\twocolitem{\helpref{wxHtmlHelpController}{wxhtmlhelpcontroller}}{HTML help controller class}
\twocolitem{\helpref{wxContextHelp}{wxcontexthelp}}{Class to put application into context-sensitive help mode}
\twocolitem{\helpref{wxContextHelpButton}{wxcontexthelpbutton}}{Button class for putting application into context-sensitive help mode}
\twocolitem{\helpref{wxHelpProvider}{wxhelpprovider}}{Abstract class for context-sensitive help provision}
\twocolitem{\helpref{wxSimpleHelpProvider}{wxsimplehelpprovider}}{Class for simple context-sensitive help provision}
\twocolitem{\helpref{wxHelpControllerHelpProvider}{wxhelpcontrollerhelpprovider}}{Class for context-sensitive help provision via a help controller}
\twocolitem{\helpref{wxToolTip}{wxtooltip}}{Class implementing tooltips}
\end{twocollist}
{\large {\bf Database classes}}
\overview{Database classes overview}{odbcoverview}
wxWindows provides two alternative sets of classes for accessing Microsoft's ODBC (Open Database Connectivity)
product. The new version by Remstar, known as wxODBC, is more powerful,
portable, flexible and better supported, so please use the classes below for
working with databases:
wxWindows provides a set of classes for accessing Microsoft's ODBC (Open Database Connectivity)
product.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxDb}{wxdb}}{ODBC database connection}
\twocolitem{\helpref{wxDbTable}{wxdbtable}}{Provides access to a database table}
\twocolitem{\helpref{wxDbInf}{wxdbinf}}{}
\twocolitem{\helpref{wxDbTableInf}{wxdbtableinf}}{}
\twocolitem{\helpref{wxDbColDef}{wxdbcoldef}}{}
\twocolitem{\helpref{wxDbColInf}{wxdbcolinf}}{}
\twocolitem{\helpref{wxDbColDataPtr}{wxdbcoldataptr}}{}
\twocolitem{\helpref{wxDbColFor}{wxdbcolfor}}{}
\twocolitem{\helpref{wxDbConnectInf}{wxdbconnectinf}}{}
\twocolitem{\helpref{wxDbIdxDef}{wxdbidxdef}}{}
\end{twocollist}
The documentation for the older classes is still included, but you should avoid
using any of them in new programs:
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxDatabase}{wxdatabase}}{Database class}
\twocolitem{\helpref{wxQueryCol}{wxquerycol}}{Class representing a column}
@@ -599,25 +325,12 @@ using any of them in new programs:
{\large {\bf Miscellaneous}}
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxApp}{wxapp}}{Application class}
\twocolitem{\helpref{wxCaret}{wxcaret}}{A caret (cursor) object}
\twocolitem{\helpref{wxCmdLineParser}{wxcmdlineparser}}{Command line parser class}
\twocolitem{\helpref{wxConfig}{wxconfigbase}}{Classes for configuration reading/writing (using either INI files or registry)}
\twocolitem{\helpref{wxDllLoader}{wxdllloader}}{Class to work with shared libraries.}
\twocolitem{\helpref{wxLayoutAlgorithm}{wxlayoutalgorithm}}{An alternative window layout facility}
\twocolitem{\helpref{wxProcess}{wxprocess}}{Process class}
\twocolitem{\helpref{wxHelpControllerBase}{wxhelpcontrollerbase}}{Base class for help controllers}
\twocolitem{\helpref{wxTimer}{wxtimer}}{Timer class}
\twocolitem{\helpref{wxStopWatch}{wxstopwatch}}{Stop watch class}
\twocolitem{\helpref{wxMimeTypesManager}{wxmimetypesmanager}}{MIME-types manager class}
\twocolitem{\helpref{wxSystemSettings}{wxsystemsettings}}{System settings class for obtaining various global parameters}
\twocolitem{\helpref{wxSystemOptions}{wxsystemoptions}}{System options class for run-time configuration}
\twocolitem{\helpref{wxAcceleratorTable}{wxacceleratortable}}{Accelerator table}
\twocolitem{\helpref{wxAutomationObject}{wxautomationobject}}{OLE automation class}
\twocolitem{\helpref{wxFontMapper}{wxfontmapper}}{Font mapping, finding suitable font for given encoding}
\twocolitem{\helpref{wxEncodingConverter}{wxencodingconverter}}{Encoding conversions}
\twocolitem{\helpref{wxCalendarDateAttr}{wxcalendardateattr}}{Used with \helpref{wxCalendarCtrl}{wxcalendarctrl}}
\twocolitem{\helpref{wxQuantize}{wxquantize}}{Class to perform quantization, or colour reduction}
\twocolitem{\helpref{wxSingleInstanceChecker}{wxsingleinstancechecker}}{Check that only single program instance is running}
\twocolitem{\helpref{wxSystemSettings}{wxsystemsettings}}{System settings class}
\twocolitem{\helpref{wxWinHelpController}{wxwinhelpcontroller}}{Controls WinHelp instances}
\end{twocollist}

View File

@@ -10,27 +10,15 @@ or off (no checkmark).
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/checkbox.h>
\wxheading{Window styles}
There are no special styles for wxCheckBox.
See also \helpref{window styles overview}{windowstyles}.
\wxheading{Event handling}
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_CHECKBOX(id, func)}}{Process a wxEVT\_COMMAND\_CHECKBOX\_CLICKED event,
when the checkbox is clicked.}
\end{twocollist}
\wxheading{See also}
\helpref{wxRadioButton}{wxradiobutton}, \helpref{wxCommandEvent}{wxcommandevent}
\helpref{wxRadioButton}{wxradiobutton}
\latexignore{\rtfignore{\wxheading{Members}}}
@@ -93,24 +81,16 @@ Gets the state of the checkbox.
\wxheading{Return value}
Returns {\tt TRUE} if it is checked, {\tt FALSE} otherwise.
\membersection{wxCheckBox::IsChecked}\label{wxcheckboxischecked}
\constfunc{bool}{IsChecked}{\void}
This is just a maybe more readable synonym for
\helpref{GetValue}{wxcheckboxgetvalue}: just as the latter, it returns
{\tt TRUE} if the checkbox is checked and {\tt FALSE} otherwise.
Returns TRUE if it is checked, FALSE otherwise.
\membersection{wxCheckBox::SetValue}\label{wxcheckboxsetvalue}
\func{void}{SetValue}{\param{const bool}{ state}}
Sets the checkbox to the given state. This does not cause a
wxEVT\_COMMAND\_CHECKBOX\_CLICKED event to get emitted.
Sets the checkbox to the given state.
\wxheading{Parameters}
\docparam{state}{If {\tt TRUE}, the check is on, otherwise it is off.}
\docparam{state}{If TRUE, the check is on, otherwise it is off.}

View File

@@ -1,111 +0,0 @@
\section{\class{wxCheckListBox}}\label{wxchecklistbox}
A checklistbox is like a listbox, but allows items to be checked or unchecked.
This class is currently implemented under Windows and GTK. When using this
class under Windows wxWindows must be compiled with USE\_OWNER\_DRAWN set to 1.
Only the new functions for this class are documented; see also \helpref{wxListBox}{wxlistbox}.
\wxheading{Derived from}
\helpref{wxListBox}{wxlistbox}\\
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/checklst.h>
\wxheading{Window styles}
See \helpref{wxListBox}{wxlistbox}.
\wxheading{Event handling}
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_CHECKLISTBOX(id, func)}}{Process a wxEVT\_COMMAND\_CHECKLISTBOX\_TOGGLE event,
when an item in the check list box is checked or unchecked.}
\end{twocollist}
\wxheading{See also}
\helpref{wxListBox}{wxlistbox}, \helpref{wxChoice}{wxchoice}, \helpref{wxComboBox}{wxcombobox}, \helpref{wxListCtrl}{wxlistctrl},
\rtfsp\helpref{wxCommandEvent}{wxcommandevent}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCheckListBox::wxCheckListBox}\label{wxchecklistboxconstr}
\func{}{wxCheckListBox}{\void}
Default constructor.
\func{}{wxCheckListBox}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
\param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
\param{int}{ n}, \param{const wxString }{choices[] = NULL},\rtfsp
\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listBox"}}
Constructor, creating and showing a list box.
\wxheading{Parameters}
\docparam{parent}{Parent window. Must not be NULL.}
\docparam{id}{Window identifier. A value of -1 indicates a default value.}
\docparam{pos}{Window position.}
\docparam{size}{Window size. If the default size (-1, -1) is specified then the window is sized
appropriately.}
\docparam{n}{Number of strings with which to initialise the control.}
\docparam{choices}{An array of strings with which to initialise the control.}
\docparam{style}{Window style. See \helpref{wxCheckListBox}{wxchecklistbox}.}
\docparam{validator}{Window validator.}
\docparam{name}{Window name.}
\pythonnote{The wxCheckListBox constructor in wxPython reduces the {\tt n}
and {\tt choices} arguments are to a single argument, which is
a list of strings.}
\perlnote{In wxPerl there is just an array reference in place of {\tt n}
and {\tt choices}.}
\membersection{wxCheckListBox::\destruct{wxCheckListBox}}
\func{void}{\destruct{wxCheckListBox}}{\void}
Destructor, destroying the list box.
\membersection{wxCheckListBox::Check}\label{wxchecklistboxcheck}
\func{void}{Check}{\param{int }{item}, \param{bool}{ check = TRUE}}
Checks the given item. Note that calling this method doesn't result in
wxEVT\_COMMAND\_CHECKLISTBOX\_TOGGLE being emitted.
\wxheading{Parameters}
\docparam{item}{Index of item to check.}
\docparam{check}{TRUE if the item is to be checked, FALSE otherwise.}
\membersection{wxCheckListBox::IsChecked}\label{wxchecklistboxischecked}
\constfunc{bool}{IsChecked}{\param{int}{ item}}
Returns TRUE if the given item is checked, FALSE otherwise.
\wxheading{Parameters}
\docparam{item}{Index of item whose check status is to be returned.}

View File

@@ -6,34 +6,20 @@ menu of choices.
\wxheading{Derived from}
\helpref{wxControlWithItems}{wxcontrolwithitems}\\
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/choice.h>
\wxheading{Window styles}
There are no special styles for wxChoice.
See also \helpref{window styles overview}{windowstyles}.
\wxheading{Event handling}
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_CHOICE(id, func)}}{Process a wxEVT\_COMMAND\_CHOICE\_SELECTED event,
when an item on the list is selected.}
\end{twocollist}
\wxheading{See also}
\helpref{wxListBox}{wxlistbox}, \helpref{wxComboBox}{wxcombobox},
\rtfsp\helpref{wxCommandEvent}{wxcommandevent}
\helpref{wxListBox}{wxlistbox}
\latexignore{\rtfignore{\wxheading{Members}}}
@@ -75,19 +61,28 @@ appropriately.}
\helpref{wxChoice::Create}{wxchoicecreate}, \helpref{wxValidator}{wxvalidator}
\pythonnote{The wxChoice constructor in wxPython reduces the {\tt n}
and {\tt choices} arguments are to a single argument, which is
a list of strings.}
\perlnote{In wxPerl there is just an array reference in place of {\tt n}
and {\tt choices}.}
\membersection{wxChoice::\destruct{wxChoice}}
\func{}{\destruct{wxChoice}}{\void}
Destructor, destroying the choice item.
\membersection{wxChoice::Append}\label{wxchoiceappend}
\func{void}{Append}{\param{const wxString\& }{ item}}
Adds the item to the end of the choice control.
\wxheading{Parameters}
\docparam{item}{String to add.}
\membersection{wxChoice::Clear}\label{wxchoiceclear}
\func{void}{Clear}{\void}
Clears the strings from the choice item.
\membersection{wxChoice::Create}\label{wxchoicecreate}
\func{bool}{Create}{\param{wxWindow *}{parent}, \param{wxWindowID}{ id},\rtfsp
@@ -97,15 +92,19 @@ Destructor, destroying the choice item.
Creates the choice for two-step construction. See \helpref{wxChoice::wxChoice}{wxchoiceconstr}.
\membersection{wxChoice::Delete}\label{wxchoicedelete}
\membersection{wxChoice::FindString}\label{wxchoicefindstring}
\func{void}{Delete}{\param{int }{n}}
\constfunc{int}{FindString}{\param{const wxString\& }{string}}
Deletes the item with the given index from the control.
Finds a choice matching the given string.
\wxheading{Parameters}
\docparam{n}{The item to delete.}
\docparam{string}{String to find.}
\wxheading{Return value}
Returns the position if found, or -1 if not found.
\membersection{wxChoice::GetColumns}\label{wxchoicegetcolumns}
@@ -115,8 +114,39 @@ Gets the number of columns in this choice item.
\wxheading{Remarks}
This is implemented for Motif only and always returns $1$ for the other
platforms.
This is implemented for Motif only.
\membersection{wxChoice::GetSelection}\label{wxchoicegetselection}
\constfunc{int}{GetSelection}{\void}
Gets the id (position) of the selected string, or -1 if there is no selection.
\membersection{wxChoice::GetString}\label{wxchoicegetstring}
\constfunc{wxString}{GetString}{\param{int}{ n}}
Returns the string at the given position.
\wxheading{Parameters}
\docparam{n}{The zero-based position.}
\wxheading{Return value}
The string at the given position, or the empty string if {\it n} is invalid.
\membersection{wxChoice::GetStringSelection}\label{wxchoicegetstringselection}
\constfunc{wxString}{GetStringSelection}{\void}
Gets the selected string, or the empty string if no string is selected.
\membersection{wxChoice::Number}\label{wxchoicenumber}
\constfunc{int}{Number}{\void}
Returns the number of strings in the choice control.
\membersection{wxChoice::SetColumns}\label{wxchoicesetcolumns}
@@ -130,6 +160,34 @@ Sets the number of columns in this choice item.
\wxheading{Remarks}
This is implemented for Motif only and doesn't do anything under other
platforms.
This is implemented for Motif only.
\membersection{wxChoice::SetSelection}\label{wxchoicesetselection}
\func{void}{SetSelection}{\param{int}{ n}}
Sets the choice by passing the desired string position.
\wxheading{Parameters}
\docparam{n}{The string position to select, starting from zero.}
\wxheading{See also}
\helpref{wxChoice::SetStringSelection}{wxchoicesetstringselection}
\membersection{wxChoice::SetStringSelection}\label{wxchoicesetstringselection}
\func{void}{SetStringSelection}{\param{const wxString\& }{ string}}
Sets the choice by passing the desired string.
\wxheading{Parameters}
\docparam{string}{The string to select.}
\wxheading{See also}
\helpref{wxChoice::SetSelection}{wxchoicesetselection}

View File

@@ -8,13 +8,10 @@ of macros such as {\bf DECLARE\_DYNAMIC\_CLASS} and {\bf IMPLEMENT\_DYNAMIC\_CLA
No parent class.
\wxheading{Include files}
<wx/object.h>
\wxheading{See also}
\helpref{Overview}{wxclassinfooverview}, \helpref{wxObject}{wxobject}
\overview{Overview}{wxclassinfooverview}\\
\helpref{wxObject}{wxobject}
\latexignore{\rtfignore{\wxheading{Members}}}
@@ -31,7 +28,7 @@ class, so there is no need to create such objects explicitly in an application.
\func{wxObject*}{CreateObject}{\void}
Creates an object of the appropriate kind. Returns NULL if the class has not been declared
dynamically creatable (typically, it is an abstract class).
dynamically createable (typically, it's an abstract class).
\membersection{wxClassInfo::FindClass}

View File

@@ -1,40 +1,44 @@
\chapter{Alphabetical class reference}\label{classref}
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
\pagenumbering{arabic}%
%
\begin{comment}
\helpignore{\section{Class hierarchy}%
% NB: the files should be in alphabetic order of the classes documented in
% them and *not* in alphabetic order of the file names!
The GUI-specific wxWindows class hierarchy is shown in Figure 5.1.
Many other, non-GUI classes have been omitted.
\vskip 1cm
$$\image{14cm;0cm}{wxclass.ps}$$
\vskip 1cm
\centerline{Figure 5.1: wxWindows class hierarchy}
\newpage}%
\overview{Writing a wxWindows application: a rough guide}{roughguide}
\helponly{
\sethotspotcolour{off}%
\large{
\helpref{Notes on using the reference}{referencenotes}\\
\helpref{Guide to functions}{functions}
\sethotspotcolour{on}%
}}
\end{comment}
\input accel.tex
\input activevt.tex
\input app.tex
\input array.tex
\input arrstrng.tex
\input artprov.tex
\input autoobj.tex
\input button.tex
\input bitmap.tex
\input bbutton.tex
\input bmpdatob.tex
\input bmphand.tex
\input boxsizer.tex
\input brush.tex
\input strmbfrd.tex
\input busycurs.tex
\input busyinfo.tex
\input button.tex
\input calclevt.tex
\input calctrl.tex
\input caret.tex
\input checkbox.tex
\input checklst.tex
\input choice.tex
\input clasinfo.tex
\input ipcclint.tex
\input clientdc.tex
\input clientdat.tex
\input clipbrd.tex
\input closeevt.tex
\input cmdlpars.tex
\input colour.tex
\input colordlg.tex
\input combobox.tex
@@ -42,285 +46,129 @@
\input cmdevent.tex
\input cmdproc.tex
\input conditn.tex
\input config.tex
\input ipcconn.tex
\input cshelp.tex
\input control.tex
\input ctrlsub.tex
\input countstr.tex
\input critsect.tex
\input crtslock.tex
\input csconv.tex
\input cursor.tex
\input custdobj.tex
\input database.tex
\input dataform.tex
\input datistrm.tex
\input dataobj.tex
\input dobjcomp.tex
\input dobjsmpl.tex
\input datostrm.tex
\input date.tex
\input datespan.tex
\input datetime.tex
\input db.tex
\input datstream.tex
\input dc.tex
\input ddeclint.tex
\input ddeconn.tex
\input ddeservr.tex
\input debugcxt.tex
\input dialog.tex
\input dialevt.tex
\input dialup.tex
\input dir.tex
\input dirdlg.tex
\input dirtrav.tex
\input dllload.tex
\input document.tex
\input docchfrm.tex
\input docmanag.tex
\input docmdich.tex
\input docmdipr.tex
\input docprfrm.tex
\input doctempl.tex
\input document.tex
\input dragimag.tex
\input dropevt.tex
\input dropsrc.tex
\input droptrgt.tex
\input dynlib.tex
\input encconv.tex
\input eraseevt.tex
\input event.tex
\input evthand.tex
\input expr.tex
\input ffile.tex
\input ffilestr.tex
\input file.tex
\input fildatob.tex
\input filedlg.tex
\input fildrptg.tex
\input filehist.tex
\input fileistr.tex
\input filename.tex
\input fileostr.tex
\input filestrm.tex
\input filesys.tex
\input filesysh.tex
\input filetype.tex
\input fltinstr.tex
\input fltoutst.tex
\input fdrepdlg.tex
\input flexsizr.tex
\input focusevt.tex
\input font.tex
\input fontdlg.tex
\input fontenum.tex
\input fontlist.tex
\input fontmap.tex
\input frame.tex
\input fsfile.tex
\input ftp.tex
\input gauge.tex
\input gdiobj.tex
\input dirctrl.tex
\input valgen.tex
\input glcanvas.tex
\input grid.tex
\input gridattr.tex
\input gridedit.tex
\input gridevt.tex
\input gridrend.tex
\input gridtbl.tex
\input gridsizr.tex
\input hashmap.tex
\input hash.tex
\input helpinst.tex
\input hprovcnt.tex
\input helpevt.tex
\input helpprov.tex
\input htcell.tex
\input htcolor.tex
\input htcontnr.tex
\input htdcrend.tex
\input hteasypr.tex
\input htfilter.tex
\input hthelpct.tex
\input hthlpdat.tex
\input hthlpfrm.tex
\input htlnkinf.tex
\input htparser.tex
\input htprint.tex
\input httag.tex
\input httaghnd.tex
\input httagmod.tex
\input htwidget.tex
\input htwindow.tex
\input htwinprs.tex
\input htwinhnd.tex
\input http.tex
\input icon.tex
\input iconbndl.tex
\input iconevt.tex
\input idleevt.tex
\input image.tex
\input icon.tex
\input imaglist.tex
\input ilayout.tex
\input indlgevt.tex
\input inputstr.tex
\input ipvaddr.tex
\input joystick.tex
\input joyevent.tex
\input keyevent.tex
\input layalgor.tex
\input layout.tex
\input list.tex
\input listbox.tex
\input listctrl.tex
\input listevt.tex
\input listitem.tex
\input listview.tex
\input locale.tex
\input log.tex
\input longlong.tex
\input mask.tex
\input maxzevt.tex
\input mbconv.tex
\input mbcnvfil.tex
\input mbcnvut7.tex
\input mbcnvut8.tex
\input mdi.tex
\input memorydc.tex
\input fs_mem.tex
\input strmmem.tex
\input menu.tex
\input menuevt.tex
\input menuitem.tex
\input menuevt.tex
\input memorydc.tex
\input msgdlg.tex
\input metafile.tex
\input mimetype.tex
\input minifram.tex
\input module.tex
\input mcaptevt.tex
\input mouseevt.tex
\input moveevt.tex
\input mltchdlg.tex
\input mutex.tex
\input mutexlck.tex
\input node.tex
\input notebook.tex
\input noteevt.tex
\input nbsizer.tex
\input notifevt.tex
\input object.tex
\input outptstr.tex
\input pagedlg.tex
\input paintdc.tex
\input paintevt.tex
\input palette.tex
\input panel.tex
\input pantabv.tex
\input pathlist.tex
\input pen.tex
\input plotcurve.tex
\input plotwindow.tex
\input point.tex
\input postscpt.tex
\input prevwin.tex
\input print.tex
\input prvtdrpt.tex
\input process.tex
\input procevt.tex
\input progdlg.tex
\input protocol.tex
\input quantize.tex
\input postscpt.tex
\input query.tex
\input qylayevt.tex
\input radiobox.tex
\input radiobut.tex
\input realpoin.tex
\input recrdset.tex
\input rect.tex
\input regex.tex
\input recrdset.tex
\input region.tex
\input sashevt.tex
\input sashlayw.tex
\input sashwin.tex
\input screendc.tex
\input scpdarry.tex
\input scpdptr.tex
\input scrolbar.tex
\input scrolwin.tex
\input scrolevt.tex
\input scrlwevt.tex
\input semaphor.tex
\input ipcservr.tex
\input hprovsmp.tex
\input scrolwin.tex
\input sngchdlg.tex
\input snglinst.tex
\input size.tex
\input sizeevt.tex
\input sizer.tex
\input slider.tex
\input sckaddr.tex
\input socket.tex
\input strmsock.tex
\input socksrv.tex
\input spinbutt.tex
\input spinctrl.tex
\input spinevt.tex
\input splash.tex
\input splitevt.tex
\input splitter.tex
\input statbmp.tex
\input statbox.tex
\input sbsizer.tex
\input statline.tex
\input stattext.tex
\input statusbr.tex
\input stopwtch.tex
\input strmbase.tex
\input stream.tex
\input strtotxt.tex
\input wxstring.tex
\input strcldat.tex
%\input wxstring.tex
\input strlist.tex
\input tokenizr.tex
\input sysclevt.tex
\input sysopt.tex
\input settings.tex
\input tab.tex
\input tabctrl.tex
\input tabevent.tex
\input taskbar.tex
\input tempfile.tex
\input text.tex
\input txtdatob.tex
\input txtdrptg.tex
\input textdlg.tex
\input textfile.tex
\input txtstrm.tex
\input valtext.tex
\input thread.tex
\input time.tex
\input timer.tex
\input timespan.tex
\input tipprov.tex
\input tipwin.tex
\input tglbtn.tex
\input toolbar.tex
\input tooltip.tex
\input treectrl.tex
\input treeevt.tex
\input treedata.tex
\input treelay.tex
\input upditer.tex
\input upduievt.tex
\input url.tex
\input validatr.tex
\input variant.tex
\input view.tex
\input wave.tex
\input window.tex
\input windowdc.tex
\input wnddisbl.tex
\input wizard.tex
\input wizevt.tex
\input wizpage.tex
\input xmlres.tex
\input xmlresh.tex
\input zipstrm.tex
\input strmzlib.tex
\input winhelp.tex
\input function.tex

View File

@@ -1,113 +0,0 @@
\section{\class{wxClientData}}\label{wxclientdata}
All classes deriving from \helpref{wxEvtHandler}{wxevthandler}
(such as all controls and \helpref{wxApp}{wxapp})
can hold arbitrary data which is here referred to as "client data".
This is useful e.g. for scripting languages which need to handle
shadow objects for most of wxWindows' classes and which store
a handle to such a shadow class as client data in that class.
This data can either be of type void - in which case the data
{\it container} does not take care of freeing the data again
or it is of type wxClientData or its derivates. In that case the
container (e.g. a control) will free the memory itself later.
Note that you {\it must not} assign both void data and data
derived from the wxClientData class to a container.
Some controls can hold various items and these controls can
additionally hold client data for each item. This is the case for
\helpref{wxChoice}{wxchoice}, \helpref{wxComboBox}{wxcombobox}
and \helpref{wxListBox}{wxlistbox}. \helpref{wxTreeCtrl}{wxtreectrl}
has a specialized class \helpref{wxTreeItemData}{wxtreeitemdata}
for each item in the tree.
If you want to add client data to your own classes, you may
use the mix-in class \helpref{wxClientDataContainer}{wxclientdatacontainer}.
\wxheading{Include files}
<wx/clntdata.h>
\wxheading{See also}
\helpref{wxEvtHandler}{wxevthandler}, \helpref{wxTreeItemData}{wxtreeitemdata},
\helpref{wxStringClientData}{wxstringclientdata}, \helpref{wxClientDataContainer}{wxclientdatacontainer}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxClientData::wxClientData}\label{wxclientdatawxclientdata}
\func{}{wxClientData}{\void}
Constructor.
\membersection{wxClientData::\destruct{wxClientData}}\label{wxclientdatadtor}
\func{}{\destruct{wxClientData}}{\void}
Virtual destructor.
\section{\class{wxClientDataContainer}}\label{wxclientdatacontainer}
This class is a mixin that provides storage and management of "client
data." This data can either be of type void - in which case the data
{\it container} does not take care of freeing the data again
or it is of type wxClientData or its derivates. In that case the
container will free the memory itself later.
Note that you {\it must not} assign both void data and data
derived from the wxClientData class to a container.
NOTE: This functionality is currently duplicated in wxEvtHandler in
order to avoid having more than one vtable in that class heirachy.
\wxheading{See also}
\helpref{wxEvtHandler}{wxevthandler}, \helpref{wxClientData}{wxclientdata}
\wxheading{Derived from}
No base class
\wxheading{Include files}
<clntdata.h>
\wxheading{Data structures}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxClientDataContainer::wxClientDataContainer}\label{wxclientdatacontainerwxclientdatacontainer}
\func{}{wxClientDataContainer}{\void}
\membersection{wxClientDataContainer::\destruct{wxClientDataContainer}}\label{wxclientdatacontainerdtor}
\func{}{\destruct{wxClientDataContainer}}{\void}
\membersection{wxClientDataContainer::GetClientData}\label{wxclientdatacontainergetclientdata}
\constfunc{void*}{GetClientData}{\void}
Get the untyped client data.
\membersection{wxClientDataContainer::GetClientObject}\label{wxclientdatacontainergetclientobject}
\constfunc{wxClientData*}{GetClientObject}{\void}
Get a pointer to the client data object.
\membersection{wxClientDataContainer::SetClientData}\label{wxclientdatacontainersetclientdata}
\func{void}{SetClientData}{\param{void* }{data}}
Set the untyped client data.
\membersection{wxClientDataContainer::SetClientObject}\label{wxclientdatacontainersetclientobject}
\func{void}{SetClientObject}{\param{wxClientData* }{data}}
Set the client data object. Any previous object will be deleted.

View File

@@ -12,13 +12,8 @@ To draw on the whole window including decorations, construct a \helpref{wxWindow
\wxheading{Derived from}
\helpref{wxWindowDC}{wxwindowdc}\\
\helpref{wxDC}{wxdc}
\wxheading{Include files}
<wx/dcclient.h>
\wxheading{See also}
\helpref{wxDC}{wxdc}, \helpref{wxMemoryDC}{wxmemorydc}, \helpref{wxPaintDC}{wxpaintdc},\rtfsp

View File

@@ -1,156 +1,103 @@
\section{\class{wxClipboard}}\label{wxclipboard}
A class for manipulating the clipboard. Note that this is not compatible with the
clipboard class from wxWindows 1.xx, which has the same name but a different implementation.
There is one wxClipboard object referenced by the pointer
wxTheClipboard, initialized by calling \helpref{wxInitClipboard}{wxinitclipboard}.
Under X, clipboard manipulation must be done by using this class, and
such code will work under MS Windows also. Under MS Windows, you have the
alternative of using the normal clipboard functions.
To use the clipboard, you call member functions of the global {\bf wxTheClipboard} object.
See also the \helpref{wxDataObject overview}{wxdataobjectoverview} for further information.
Call \helpref{wxClipboard::Open}{wxclipboardopen} to get ownership of the clipboard. If this operation returns TRUE, you
now own the clipboard. Call \helpref{wxClipboard::SetData}{wxclipboardsetdata} to put data
on the clipboard, or \helpref{wxClipboard::GetData}{wxclipboardgetdata} to
retrieve data from the clipboard. Call \helpref{wxClipboard::Close}{wxclipboardclose} to close
the clipboard and relinquish ownership. You should keep the clipboard open only momentarily.
For example:
\begin{verbatim}
// Write some text to the clipboard
if (wxTheClipboard->Open())
{
// This data objects are held by the clipboard,
// so do not delete them in the app.
wxTheClipboard->SetData( new wxTextDataObject("Some text") );
wxTheClipboard->Close();
}
// Read some text
if (wxTheClipboard->Open())
{
if (wxTheClipboard->IsSupported( wxDF_TEXT ))
{
wxTextDataObject data;
wxTheClipboard->GetData( data );
wxMessageBox( data.GetText() );
}
wxTheClipboard->Close();
}
\end{verbatim}
The documentation for this class will be expanded in due course. At present,
wxClipboard is only used in the wxMediaWindow add-on library.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/clipbrd.h>
\wxheading{See also}
\helpref{Drag and drop overview}{wxdndoverview}, \helpref{wxDataObject}{wxdataobject}
\helpref{wxClipboardClient}{wxclipboardclient}, \helpref{wxInitClipboard}{wxinitclipboard}.
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxClipboard::wxClipboard}
\membersection{wxClipboard::GetClipboardClient}
\func{}{wxClipboard}{\void}
\func{wxClipboardClient *}{GetClipboardClient}{\void}
Constructor.
Get the clipboard client directly. Will be NULL if clipboard data
is a string, or if some other application owns the clipboard.
This can be useful for shortcutting data translation, if the
clipboard user can check for a specific client.
\membersection{wxClipboard::\destruct{wxClipboard}}
\membersection{wxClipboard::GetClipboardData}
\func{}{\destruct{wxClipboard}}{\void}
\func{char*}{GetClipboardData}{\param{const wxString\& }{format}, \param{long *}{length}, \param{long}{ time}}
Destructor.
Get data from the clipboard.
\membersection{wxClipboard::AddData}\label{wxclipboardadddata}
\membersection{wxClipboard::GetClipboardString}
\func{bool}{AddData}{\param{wxDataObject*}{ data}}
\func{wxString}{GetClipboardString}{\param{long}{ time}}
Call this function to add the data object to the clipboard. You may call
this function repeatedly after having cleared the clipboard using \helpref{wxClipboard::Clear}{wxclipboardclear}.
Get the data from the clipboard in the format ``TEXT".
After this function has been called, the clipboard owns the data, so do not delete
the data explicitly.
\membersection{wxClipboard::SetClipboardClient}
\func{void}{SetClipboardClient}{\param{wxClipboardClient *}{client}, \param{long}{ time}}
Set the clipboard data owner.
\membersection{wxClipboard::SetClipboardString}
\func{void}{SetClipboardString}{\param{const wxString\& }{data}, \param{long}{ time}}
Set the clipboard string; does not require a client.
\section{\class{wxClipboardClient}}\label{wxclipboardclient}
Implemented under X and MS Windows, a clipboard client holds data
belonging to the clipboard. For plain text, a client is not necessary.
wxClipboardClient is an abstract class for which the virtual functions
BeingReplaced and GetData must be overridden.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{See also}
\helpref{wxClipboard::SetData}{wxclipboardsetdata}
\helpref{wxClipboard}{wxclipboard}, \helpref{wxInitClipboard}{wxinitclipboard}.
\membersection{wxClipboard::Clear}\label{wxclipboardclear}
\latexignore{\rtfignore{\wxheading{Members}}}
\func{void}{Clear}{\void}
\membersection{wxClipboardClient::formats}
Clears the global clipboard object and the system's clipboard if possible.
\member{wxStringList}{formats}
\membersection{wxClipboard::Close}\label{wxclipboardclose}
This list should be filled in with strings indicating the formats
this client can provide. Almost all clients will provide``TEXT".
Format names should be 4 characters long, so things will work
out on the Macintosh.
\func{bool}{Close}{\void}
\membersection{wxClipboardClient::BeingReplaced}
Call this function to close the clipboard, having opened it with \helpref{wxClipboard::Open}{wxclipboardopen}.
\func{void}{BeingReplaced}{\void}
\membersection{wxClipboard::Flush}\label{wxclipboardflush}
This method is called when the client is losing the selection.
\func{bool}{Flush}{\void}
\membersection{wxClipboardClient::GetData}
Flushes the clipboard: this means that the data which is currently on
clipboard will stay available even after the application exits (possibly
eating memory), otherwise the clipboard will be emptied on exit.
Returns FALSE if the operation is unsuccesful for any reason.
\func{char*}{GetData}{\param{const wxString\& }{format}, \param{long *}{size}}
\membersection{wxClipboard::GetData}\label{wxclipboardgetdata}
This method is called when someone wants the data this client is
supplying to the clipboard.
\func{bool}{GetData}{\param{wxDataObject\&}{ data}}
{\it format} is a string indicating the
format of the data - one of the strings from the ``formats"
list.
Call this function to fill {\it data} with data on the clipboard, if available in the required
format. Returns TRUE on success.
\membersection{wxClipboard::IsOpened}\label{wxclipboardisopened}
\constfunc{bool}{IsOpened}{\void}
Returns TRUE if the clipboard has been opened.
\membersection{wxClipboard::IsSupported}\label{wxclipboardissupported}
\func{bool}{IsSupported}{\param{const wxDataFormat\&}{ format}}
Returns TRUE if the format of the given data object is available on the clipboard.
\membersection{wxClipboard::Open}\label{wxclipboardopen}
\func{bool}{Open}{\void}
Call this function to open the clipboard before calling \helpref{wxClipboard::SetData}{wxclipboardsetdata}
and \helpref{wxClipboard::GetData}{wxclipboardgetdata}.
Call \helpref{wxClipboard::Close}{wxclipboardclose} when you have finished with the clipboard. You
should keep the clipboard open for only a very short time.
Returns TRUE on success. This should be tested (as in the sample shown above).
\membersection{wxClipboard::SetData}\label{wxclipboardsetdata}
\func{bool}{SetData}{\param{wxDataObject*}{ data}}
Call this function to set the data object to the clipboard. This function will
clear all previous contents in the clipboard, so calling it several times
does not make any sense.
After this function has been called, the clipboard owns the data, so do not delete
the data explicitly.
\wxheading{See also}
\helpref{wxClipboard::AddData}{wxclipboardadddata}
\membersection{wxClipboard::UsePrimarySelection}\label{wxclipboarduseprimary}
\func{void}{UsePrimarySelection}{\param{bool}{ primary = TRUE}}
On platforms supporting it (currently only GTK), selects the so called
PRIMARY SELECTION as the clipboard as opposed to the normal clipboard,
if {\it primary} is TRUE.
{\it size} should be filled with the size of the resulting
data. In the case of text, {\it size} does not count the
NULL terminator.

View File

@@ -2,28 +2,10 @@
This event class contains information about window and session close events.
The handler function for EVT\_CLOSE is called when the user has tried to close a a frame
or dialog box using the window manager (X) or system menu (Windows). It can
also be invoked by the application itself programmatically, for example by
calling the \helpref{wxWindow::Close}{wxwindowclose} function.
You should check whether the application is forcing the deletion of the window
using \helpref{wxCloseEvent::CanVeto}{wxcloseeventcanveto}. If this is {\tt FALSE},
you {\it must} destroy the window using \helpref{wxWindow::Destroy}{wxwindowdestroy}.
If the return value is TRUE, it is up to you whether you respond by destroying the window.
If you don't destroy the window, you should call \helpref{wxCloseEvent::Veto}{wxcloseeventveto} to
let the calling code know that you did not destroy the window. This allows the \helpref{wxWindow::Close}{wxwindowclose} function
to return {\tt TRUE} or {\tt FALSE} depending on whether the close instruction was honoured or not.
\wxheading{Derived from}
\helpref{wxEvent}{wxevent}
\wxheading{Include files}
<wx/event.h>
\wxheading{Event table macros}
To process a close event, use these event handler macros to direct input to member
@@ -31,20 +13,13 @@ functions that take a wxCloseEvent argument.
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_CLOSE(func)}}{Process a close event, supplying the member function. This
event applies to wxFrame and wxDialog classes.}
\twocolitem{{\bf EVT\_QUERY\_END\_SESSION(func)}}{Process a query end session event, supplying the member function.
This event applies to wxApp only.}
\twocolitem{{\bf EVT\_END\_SESSION(func)}}{Process an end session event, supplying the member function.
This event applies to wxApp only.}
\twocolitem{{\bf EVT\_CLOSE(func)}}{Process a close event, supplying the member function.}
\end{twocollist}%
\wxheading{See also}
\helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow},\rtfsp
\helpref{wxWindow::Close}{wxwindowclose},\rtfsp
\helpref{wxApp::OnQueryEndSession}{wxapponqueryendsession},\rtfsp
%% GD: OnXXX functions are not documented
%%\helpref{wxApp::OnEndSession}{wxapponendsession},\rtfsp
\helpref{Window deletion overview}{windowdeletionoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
@@ -55,14 +30,6 @@ This event applies to wxApp only.}
Constructor.
\membersection{wxCloseEvent::CanVeto}\label{wxcloseeventcanveto}
\func{bool}{CanVeto}{\void}
Returns TRUE if you can veto a system shutdown or a window close event.
Vetoing a window close event is not possible if the calling code wishes to
force the application to exit, and so this function must be called to check this.
\membersection{wxCloseEvent::GetLoggingOff}\label{wxcloseeventgetloggingoff}
\constfunc{bool}{GetLoggingOff}{\void}
@@ -77,37 +44,14 @@ Returns TRUE if the session is ending.
\membersection{wxCloseEvent::GetForce}\label{wxcloseeventgetforce}
\constfunc{bool}{GetForce}{\void}
\constfunc{void}{GetForce}{\void}
Returns TRUE if the application wishes to force the window to close.
This will shortly be obsolete, replaced by CanVeto.
\membersection{wxCloseEvent::SetCanVeto}\label{wxcloseeventsetcanveto}
\func{void}{SetCanVeto}{\param{bool}{ canVeto}}
Sets the 'can veto' flag.
\membersection{wxCloseEvent::SetForce}\label{wxcloseeventsetforce}
\constfunc{void}{SetForce}{\param{bool}{ force}}
Sets the 'force' flag.
\membersection{wxCloseEvent::SetLoggingOff}\label{wxcloseeventsetloggingoff}
\constfunc{void}{SetLoggingOff}{\param{bool}{ loggingOff}}
Sets the 'logging off' flag.
\membersection{wxCloseEvent::Veto}\label{wxcloseeventveto}
\func{void}{Veto}{\param{bool}{ veto = TRUE}}
\func{void}{Veto}{\void}
Call this from your event handler to veto a system shutdown or to signal
to the calling application that a window close did not happen.
You can only veto a shutdown if \helpref{wxCloseEvent::CanVeto}{wxcloseeventcanveto} returns
TRUE.
Call this from your event handler to veto a system shutdown.

View File

@@ -7,10 +7,6 @@ simple controls. More complex controls, such as \helpref{wxTreeCtrl}{wxtreectrl}
\helpref{wxEvent}{wxevent}
\wxheading{Include files}
<wx/event.h>
\wxheading{Event table macros}
To process a menu command event, use these event handler macros to direct input to member
@@ -18,9 +14,9 @@ functions that take a wxCommandEvent argument.
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_COMMAND(id, event, func)}}{Process a command, supplying the window identifier,
\twocolitem{{\bf EVT\_COMMAND(id, cmd, func)}}{Process a command, supplying the window identifier,
command event identifier, and member function.}
\twocolitem{{\bf EVT\_COMMAND\_RANGE(id1, id2, event, func)}}{Process a command for a range
\twocolitem{{\bf EVT\_COMMAND\_RANGE(id1, id2, cmd, func)}}{Process a command for a range
of window identifiers, supplying the minimum and maximum window identifiers,
command event identifier, and member function.}
\twocolitem{{\bf EVT\_BUTTON(id, func)}}{Process a wxEVT\_COMMAND\_BUTTON\_CLICKED command,
@@ -31,25 +27,16 @@ which is generated by a wxCheckBox control.}
which is generated by a wxChoice control.}
\twocolitem{{\bf EVT\_LISTBOX(id, func)}}{Process a wxEVT\_COMMAND\_LISTBOX\_SELECTED command,
which is generated by a wxListBox control.}
\twocolitem{{\bf EVT\_LISTBOX\_DCLICK(id, func)}}{Process a wxEVT\_COMMAND\_LISTBOX\_DOUBLECLICKED command,
\twocolitem{{\bf EVT\_LISTBOX_DCLICK(id, func)}}{Process a wxEVT\_COMMAND\_LISTBOX\_DOUBLECLICKED command,
which is generated by a wxListBox control.}
\twocolitem{{\bf EVT\_TEXT(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_UPDATED command,
which is generated by a wxTextCtrl control.}
\twocolitem{{\bf EVT\_TEXT\_ENTER(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_ENTER command,
which is generated by a wxTextCtrl control. Note that you must use
wxTE\_PROCESS\_ENTER flag when creating the control if you want it to generate
such events.}
\twocolitem{{\bf EVT\_TEXT\_MAXLEN(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_MAXLEN command,
which is generated by a wxTextCtrl control when the user tries to enter more
characters into it than the limit previously set with
\helpref{SetMaxLength}{wxtextctrlsetmaxlength}.}
which is generated by a wxTextCtrl control.}
\twocolitem{{\bf EVT\_MENU(id, func)}}{Process a wxEVT\_COMMAND\_MENU\_SELECTED command,
which is generated by a menu item.}
\twocolitem{{\bf EVT\_MENU\_RANGE(id1, id2, func)}}{Process a wxEVT\_COMMAND\_MENU\_RANGE command,
which is generated by a range of menu items.}
\twocolitem{{\bf EVT\_CONTEXT\_MENU(func)}}{Process the event generated
when the user has requested a popup menu to appear by pressing a special
keyboard key (under Windows) or by right clicking the mouse.}
\twocolitem{{\bf EVT\_SLIDER(id, func)}}{Process a wxEVT\_COMMAND\_SLIDER\_UPDATED command,
which is generated by a wxSlider control.}
\twocolitem{{\bf EVT\_RADIOBOX(id, func)}}{Process a wxEVT\_COMMAND\_RADIOBOX\_SELECTED command,
@@ -61,16 +48,12 @@ which is generated by a wxScrollBar control. This is provided for compatibility
more specific scrollbar event macros should be used instead (see \helpref{wxScrollEvent}{wxscrollevent}).}
\twocolitem{{\bf EVT\_COMBOBOX(id, func)}}{Process a wxEVT\_COMMAND\_COMBOBOX\_SELECTED command,
which is generated by a wxComboBox control.}
\twocolitem{{\bf EVT\_TOOL(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_CLICKED event
(a synonym for wxEVT\_COMMAND\_MENU\_SELECTED). Pass the id of the tool.}
\twocolitem{{\bf EVT\_TOOL\_RANGE(id1, id2, func)}}{Process a wxEVT\_COMMAND\_TOOL\_CLICKED event
for a range id identifiers. Pass the ids of the tools.}
\twocolitem{{\bf EVT\_TOOL\_RCLICKED(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_RCLICKED event.
Pass the id of the tool.}
\twocolitem{{\bf EVT\_TOOL\_RCLICKED\_RANGE(id1, id2, func)}}{Process a wxEVT\_COMMAND\_TOOL\_RCLICKED event
for a range of ids. Pass the ids of the tools.}
\twocolitem{{\bf EVT\_TOOL\_ENTER(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_ENTER event.
Pass the id of the toolbar itself. The value of wxCommandEvent::GetSelection is the tool id, or -1 if the mouse cursor has moved off a tool.}
\twocolitem{{\bf EVT\_TOOL(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_CLICKED command,
which is generated by a toobar button.}
\twocolitem{{\bf EVT\_TOOL\_RCLICKED(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_RCLICKED command,
which is generated by a toobar button.}
\twocolitem{{\bf EVT\_TOOL\_ENTER(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_ENTER command,
which is generated by a toobar button.}
\twocolitem{{\bf EVT\_COMMAND\_LEFT\_CLICK(id, func)}}{Process a wxEVT\_COMMAND\_LEFT\_CLICK command,
which is generated by a control (Windows 95 and NT only).}
\twocolitem{{\bf EVT\_COMMAND\_LEFT\_DCLICK(id, func)}}{Process a wxEVT\_COMMAND\_LEFT\_DCLICK command,
@@ -89,10 +72,10 @@ which is generated by a control.}
\membersection{wxCommandEvent::m\_clientData}
\member{void*}{m\_clientData}
\member{char*}{m\_clientData}
Contains a pointer to client data for listboxes and choices, if the event
was a selection. Beware, this is not implemented anyway...
was a selection.
\membersection{wxCommandEvent::m\_commandInt}
@@ -104,7 +87,7 @@ deselection), or a boolean value representing the value of a checkbox.
\membersection{wxCommandEvent::m\_commandString}
\member{wxString}{m\_commandString}
\member{char*}{m\_commandString}
Contains a string corresponding to a listbox or choice selection.
@@ -126,13 +109,13 @@ Constructor.
\membersection{wxCommandEvent::Checked}
\constfunc{bool}{Checked}{\void}
\func{bool}{Checked}{\void}
Deprecated, use \helpref{IsChecked}{wxcommandeventischecked} instead.
Returns TRUE or FALSE for a checkbox selection event.
\membersection{wxCommandEvent::GetClientData}
\func{void*}{GetClientData}{\void}
\func{char*}{GetClientData}{\void}
Returns client data pointer for a listbox or choice selection event
(not valid for a deselection).
@@ -158,21 +141,11 @@ a deselection).
\membersection{wxCommandEvent::GetString}
\func{wxString}{GetString}{\void}
\func{char*}{GetString}{\void}
Returns item string for a listbox or choice selection event (not valid for
a deselection).
\membersection{wxCommandEvent::IsChecked}\label{wxcommandeventischecked}
\constfunc{bool}{IsChecked}{\void}
This method can be used with checkbox and menu events: for the checkboxes, the
method returns {\tt TRUE} for a selection event and {\tt FALSE} for a
deselection one. For the menu events, this method indicates if the menu item
just has become checked or unchecked (and thus only makes sense for checkable
menu items).
\membersection{wxCommandEvent::IsSelection}
\func{bool}{IsSelection}{\void}
@@ -182,7 +155,7 @@ is a deselection.
\membersection{wxCommandEvent::SetClientData}
\func{void}{SetClientData}{\param{void*}{ clientData}}
\func{void}{SetClientData}{\param{char*}{ clientData}}
Sets the client data for this event.
@@ -200,7 +173,7 @@ Sets the {\bf m\_commandInt} member.
\membersection{wxCommandEvent::SetString}
\func{void}{SetString}{\param{const wxString\&}{ string}}
\func{void}{SetString}{\param{char*}{ string}}
Sets the {\bf m\_commandString} member.

View File

@@ -1,487 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: cmdlpars.tex
%% Purpose: wxCmdLineParser documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 27.03.00
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxCmdLineParser}}\label{wxcmdlineparser}
wxCmdLineParser is a class for parsing command line.
It has the following features:
\begin{enumerate}\itemsep=0pt
\item distinguishes options, switches and parameters; allows option grouping
\item allows both short and long options
\item automatically generates the usage message from the command line description
\item does type checks on the options values (number, date, $\ldots$).
\end{enumerate}
To use it you should follow these steps:
\begin{enumerate}\itemsep=0pt
\item \helpref{construct}{wxcmdlineparserconstruction} an object of this class
giving it the command line to parse and optionally its description or use
{\tt AddXXX()} functions later
\item call {\tt Parse()}
\item use {\tt Found()} to retrieve the results
\end{enumerate}
In the documentation below the following terminology is used:
\begin{twocollist}\itemsep=0pt
\twocolitem{switch}{This is a boolean option which can be given or not, but
which doesn't have any value. We use the word switch to distinguish such boolean
options from more generic options like those described below. For example,
{\tt -v} might be a switch meaning "enable verbose mode".}
\twocolitem{option}{Option for us here is something which comes with a value 0
unlike a switch. For example, {\tt -o:filename} might be an option which allows
to specify the name of the output file.}
\twocolitem{parameter}{This is a required program argument.}
\end{twocollist}
\wxheading{Derived from}
No base class
\wxheading{Include files}
<wx/cmdline.h>
\wxheading{Constants}
The structure wxCmdLineEntryDesc is used to describe the one command
line switch, option or parameter. An array of such structures should be passed
to \helpref{SetDesc()}{wxcmdlineparsersetdesc}. Also, the meanings of parameters
of the {\tt AddXXX()} functions are the same as of the corresponding fields in
this structure:
\begin{verbatim}
struct wxCmdLineEntryDesc
{
wxCmdLineEntryType kind;
const wxChar *shortName;
const wxChar *longName;
const wxChar *description;
wxCmdLineParamType type;
int flags;
};
\end{verbatim}
The type of a command line entity is in the {\tt kind} field and may be one of
the following constants:
{\small%
\begin{verbatim}
enum wxCmdLineEntryType
{
wxCMD_LINE_SWITCH,
wxCMD_LINE_OPTION,
wxCMD_LINE_PARAM,
wxCMD_LINE_NONE // use this to terminate the list
}
\end{verbatim}
}
The field {\tt shortName} is the usual, short, name of the switch or the option.
{\tt longName} is the corresponding long name or NULL if the option has no long
name. Both of these fields are unused for the parameters. Both the short and
long option names can contain only letters, digits and the underscores.
{\tt description} is used by the \helpref{Usage()}{wxcmdlineparserusage} method
to construct a help message explaining the syntax of the program.
The possible values of {\tt type} which specifies the type of the value accepted
by an option or parameter are:
{\small%
\begin{verbatim}
enum wxCmdLineParamType
{
wxCMD_LINE_VAL_STRING, // default
wxCMD_LINE_VAL_NUMBER,
wxCMD_LINE_VAL_DATE,
wxCMD_LINE_VAL_NONE
}
\end{verbatim}
}
Finally, the {\tt flags} field is a combination of the following bit masks:
{\small%
\begin{verbatim}
enum
{
wxCMD_LINE_OPTION_MANDATORY = 0x01, // this option must be given
wxCMD_LINE_PARAM_OPTIONAL = 0x02, // the parameter may be omitted
wxCMD_LINE_PARAM_MULTIPLE = 0x04, // the parameter may be repeated
wxCMD_LINE_OPTION_HELP = 0x08, // this option is a help request
wxCMD_LINE_NEEDS_SEPARATOR = 0x10, // must have sep before the value
}
\end{verbatim}
}
Notice that by default (i.e. if flags are just $0$), options are optional (sic)
and each call to \helpref{AddParam()}{wxcmdlineparseraddparam} allows one more
parameter - this may be changed by giving non-default flags to it, i.e. use
{\tt wxCMD\_LINE\_OPTION\_MANDATORY} to require that the option is given and
{\tt wxCMD\_LINE\_PARAM\_OPTIONAL} to make a parameter optional. Also,
{\tt wxCMD\_LINE\_PARAM\_MULTIPLE} may be specified if the programs accepts a
variable number of parameters - but it only can be given for the last parameter
in the command line description. If you use this flag, you will probably need to
use \helpref{GetParamCount}{wxcmdlineparsergetparamcount} to retrieve the number
of parameters effectively specified after calling
\helpref{Parse}{wxcmdlineparserparse}.
The last flag {\tt wxCMD\_LINE\_NEEDS\_SEPARATOR} can be specified to require a
separator (either a colon, an equal sign or white space) between the option
name and its value. By default, no separator is required.
\wxheading{See also}
\helpref{wxApp::argc}{wxappargc} and \helpref{wxApp::argv}{wxappargv}\\
console sample
%%%%%%%%%%%%% Methods by group %%%%%%%%%%%%%
\latexignore{\rtfignore{\wxheading{Function groups}}}
\membersection{Construction}\label{wxcmdlineparserconstruction}
Before \helpref{Parse}{wxcmdlineparserparse} can be called, the command line
parser object must have the command line to parse and also the rules saying
which switches, options and parameters are valid - this is called command line
description in what follows.
You have complete freedom of choice as to when specify the required information,
the only restriction is that it must be done before calling
\helpref{Parse}{wxcmdlineparserparse}.
To specify the command line to parse you may use either one of constructors
accepting it (\helpref{wxCmdLineParser(argc, argv)}{wxcmdlineparserwxcmdlineparserargc} or
\helpref{wxCmdLineParser}{wxcmdlineparserwxcmdlineparserdescargc} usually) or,
if you use \helpref{the default constructor}{wxcmdlineparserwxcmdlineparserdef},
you can do it later by calling
\helpref{SetCmdLine}{wxcmdlineparsersetcmdlineargc}.
The same holds for command line description: it can be specified either in
the constructor (\helpref{without command line}{wxcmdlineparserwxcmdlineparserdesc} or
\helpref{together with it}{wxcmdlineparserwxcmdlineparserdescargc}) or
constructed later using either \helpref{SetDesc}{wxcmdlineparsersetdesc} or
combination of \helpref{AddSwitch}{wxcmdlineparseraddswitch},
\helpref{AddOption}{wxcmdlineparseraddoption} and
\helpref{AddParam}{wxcmdlineparseraddparam} methods.
Using constructors or \helpref{SetDesc}{wxcmdlineparsersetdesc} uses a (usually
{\tt const static}) table containing the command line description. If you want
to decide which options to accept during the run-time, using one of the
{\tt AddXXX()} functions above might be preferable.
\membersection{Customization}\label{wxcmdlineparsercustomization}
wxCmdLineParser has several global options which may be changed by the
application. All of the functions described in this section should be called
before \helpref{Parse}{wxcmdlineparserparse}.
First global option is the support for long (also known as GNU-style) options.
The long options are the ones which start with two dashes ({\tt "--"}) and look
like this: {\tt --verbose}, i.e. they generally are complete words and not some
abbreviations of them. As long options are used by more and more applications,
they are enabled by default, but may be disabled with
\helpref{DisableLongOptions}{wxcmdlineparserdisablelongoptions}.
Another global option is the set of characters which may be used to start an
option (otherwise, the word on the command line is assumed to be a parameter).
Under Unix, {\tt '-'} is always used, but Windows has at least two common
choices for this: {\tt '-'} and {\tt '/'}. Some programs also use {\tt '+'}.
The default is to use what suits most the current platform, but may be changed
with \helpref{SetSwitchChars}{wxcmdlineparsersetswitchchars} method.
Finally, \helpref{SetLogo}{wxcmdlineparsersetlogo} can be used to show some
application-specific text before the explanation given by
\helpref{Usage}{wxcmdlineparserusage} function.
\membersection{Parsing command line}\label{wxcmdlineparserparsing}
After the command line description was constructed and the desired options were
set, you can finally call \helpref{Parse}{wxcmdlineparserparse} method.
It returns $0$ if the command line was correct and was parsed, $-1$ if the help
option was specified (this is a separate case as, normally, the program will
terminate after this) or a positive number if there was an error during the
command line parsing.
In the latter case, the appropriate error message and usage information are
logged by wxCmdLineParser itself using the standard wxWindows logging functions.
\membersection{Getting results}\label{wxcmdlineparsergettingresults}
After calling \helpref{Parse}{wxcmdlineparserparse} (and if it returned $0$),
you may access the results of parsing using one of overloaded {\tt Found()}
methods.
For a simple switch, you will simply call
\helpref{Found}{wxcmdlineparserfoundswitch} to determine if the switch was given
or not, for an option or a parameter, you will call a version of {\tt Found()}
which also returns the associated value in the provided variable. All
{\tt Found()} functions return TRUE if the switch or option were found in the
command line or FALSE if they were not specified.
%%%%%%%%%%%%% Methods in alphabetic order %%%%%%%%%%%%%
\helponly{\insertatlevel{2}{
\wxheading{Members}
}}
\membersection{wxCmdLineParser::wxCmdLineParser}\label{wxcmdlineparserwxcmdlineparserdef}
\func{}{wxCmdLineParser}{\void}
Default constructor. You must use
\helpref{SetCmdLine}{wxcmdlineparsersetcmdlineargc} later.
\membersection{wxCmdLineParser::wxCmdLineParser}\label{wxcmdlineparserwxcmdlineparserargc}
\func{}{wxCmdLineParser}{\param{int }{argc}, \param{char** }{argv}}
Constructor specifies the command line to parse. This is the traditional
(Unix) command line format. The parameters {\it argc} and {\it argv} have the
same meaning as for {\tt main()} function.
\membersection{wxCmdLineParser::wxCmdLineParser}\label{wxcmdlineparserwxcmdlineparserstr}
\func{}{wxCmdLineParser}{\param{const wxString\& }{cmdline}}
Constructor specifies the command line to parse in Windows format. The parameter
{\it cmdline} has the same meaning as the corresponding parameter of
{\tt WinMain()}.
\membersection{wxCmdLineParser::wxCmdLineParser}\label{wxcmdlineparserwxcmdlineparserdesc}
\func{}{wxCmdLineParser}{\param{const wxCmdLineEntryDesc* }{desc}}
Same as \helpref{wxCmdLineParser}{wxcmdlineparserwxcmdlineparserdef}, but also
specifies the \helpref{command line description}{wxcmdlineparsersetdesc}.
\membersection{wxCmdLineParser::wxCmdLineParser}\label{wxcmdlineparserwxcmdlineparserdescargc}
\func{}{wxCmdLineParser}{\param{const wxCmdLineEntryDesc* }{desc}, \param{int }{argc}, \param{char** }{argv}}
Same as \helpref{wxCmdLineParser}{wxcmdlineparserwxcmdlineparserargc}, but also
specifies the \helpref{command line description}{wxcmdlineparsersetdesc}.
\membersection{wxCmdLineParser::wxCmdLineParser}\label{wxcmdlineparserwxcmdlineparserdescstr}
\func{}{wxCmdLineParser}{\param{const wxCmdLineEntryDesc* }{desc}, \param{const wxString\& }{cmdline}}
Same as \helpref{wxCmdLineParser}{wxcmdlineparserwxcmdlineparserstr}, but also
specifies the \helpref{command line description}{wxcmdlineparsersetdesc}.
\membersection{wxCmdLineParser::ConvertStringToArgs}\label{wxcmdlineparserconvertstringtoargs}
\func{static wxArrayString}{ConvertStringToArgs}{\param{const wxChar }{*cmdline}}
Breaks down the string containing the full command line in words. The words are
separated by whitespace. The quotes can be used in the input string to quote
the white space and the back slashes can be used to quote the quotes.
\membersection{wxCmdLineParser::SetCmdLine}\label{wxcmdlineparsersetcmdlineargc}
\func{void}{SetCmdLine}{\param{int }{argc}, \param{char** }{argv}}
Set command line to parse after using one of the constructors which don't do it.
\wxheading{See also}
\helpref{wxCmdLineParser}{wxcmdlineparserwxcmdlineparserargc}
\membersection{wxCmdLineParser::SetCmdLine}\label{wxcmdlineparsersetcmdlinestr}
\func{void}{SetCmdLine}{\param{const wxString\& }{cmdline}}
Set command line to parse after using one of the constructors which don't do it.
\wxheading{See also}
\helpref{wxCmdLineParser}{wxcmdlineparserwxcmdlineparserstr}
\membersection{wxCmdLineParser::\destruct{wxCmdLineParser}}\label{wxcmdlineparserdtor}
\func{}{\destruct{wxCmdLineParser}}{\void}
Frees resources allocated by the object.
{\bf NB:} destructor is not virtual, don't use this class polymorphically.
\membersection{wxCmdLineParser::SetSwitchChars}\label{wxcmdlineparsersetswitchchars}
\func{void}{SetSwitchChars}{\param{const wxString\& }{switchChars}}
{\it switchChars} contains all characters with which an option or switch may
start. Default is {\tt "-"} for Unix, {\tt "-/"} for Windows.
\membersection{wxCmdLineParser::EnableLongOptions}\label{wxcmdlineparserenablelongoptions}
\func{void}{EnableLongOptions}{\param{bool }{enable = TRUE}}
Enable or disable support for the long options.
As long options are not (yet) POSIX-compliant, this option allows to disable
them.
\wxheading{See also}
\helpref{Customization}{wxcmdlineparsercustomization} and \helpref{AreLongOptionsEnabled}{wxcmdlineparserarelongoptionsenabled}
\membersection{wxCmdLineParser::DisableLongOptions}\label{wxcmdlineparserdisablelongoptions}
\func{void}{DisableLongOptions}{\void}
Identical to \helpref{EnableLongOptions(FALSE)}{wxcmdlineparserenablelongoptions}.
\membersection{wxCmdLineParser::AreLongOptionsEnabled}\label{wxcmdlineparserarelongoptionsenabled}
\func{bool}{AreLongOptionsEnabled}{\void}
Returns TRUE if long options are enabled, otherwise FALSE.
\wxheading{See also}
\helpref{EnableLongOptions}{wxcmdlineparserenablelongoptions}
\membersection{wxCmdLineParser::SetLogo}\label{wxcmdlineparsersetlogo}
\func{void}{SetLogo}{\param{const wxString\& }{logo}}
{\it logo} is some extra text which will be shown by
\helpref{Usage}{wxcmdlineparserusage} method.
\membersection{wxCmdLineParser::SetDesc}\label{wxcmdlineparsersetdesc}
\func{void}{SetDesc}{\param{const wxCmdLineEntryDesc* }{desc}}
Construct the command line description
Take the command line description from the wxCMD\_LINE\_NONE terminated table.
Example of usage:
\begin{verbatim}
static const wxCmdLineEntryDesc cmdLineDesc[] =
{
{ wxCMD_LINE_SWITCH, "v", "verbose", "be verbose" },
{ wxCMD_LINE_SWITCH, "q", "quiet", "be quiet" },
{ wxCMD_LINE_OPTION, "o", "output", "output file" },
{ wxCMD_LINE_OPTION, "i", "input", "input dir" },
{ wxCMD_LINE_OPTION, "s", "size", "output block size", wxCMD_LINE_VAL_NUMBER },
{ wxCMD_LINE_OPTION, "d", "date", "output file date", wxCMD_LINE_VAL_DATE },
{ wxCMD_LINE_PARAM, NULL, NULL, "input file", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE },
{ wxCMD_LINE_NONE }
};
wxCmdLineParser parser;
parser.SetDesc(cmdLineDesc);
\end{verbatim}
\membersection{wxCmdLineParser::AddSwitch}\label{wxcmdlineparseraddswitch}
\func{void}{AddSwitch}{\param{const wxString\& }{name}, \param{const wxString\& }{lng = wxEmptyString}, \param{const wxString\& }{desc = wxEmptyString}, \param{int }{flags = 0}}
Add a switch {\it name} with an optional long name {\it lng} (no long name if it
is empty, which is default), description {\it desc} and flags {\it flags} to the
command line description.
\membersection{wxCmdLineParser::AddOption}\label{wxcmdlineparseraddoption}
\func{void}{AddOption}{\param{const wxString\& }{name}, \param{const wxString\& }{lng = wxEmptyString}, \param{const wxString\& }{desc = wxEmptyString}, \param{wxCmdLineParamType }{type = wxCMD\_LINE\_VAL\_STRING}, \param{int }{flags = 0}}
Add an option {\it name} with an optional long name {\it lng} (no long name if
it is empty, which is default) taking a value of the given type (string by
default) to the command line description.
\membersection{wxCmdLineParser::AddParam}\label{wxcmdlineparseraddparam}
\func{void}{AddParam}{\param{const wxString\& }{desc = wxEmptyString}, \param{wxCmdLineParamType }{type = wxCMD\_LINE\_VAL\_STRING}, \param{int }{flags = 0}}
Add a parameter of the given {\it type} to the command line description.
\membersection{wxCmdLineParser::Parse}\label{wxcmdlineparserparse}
\func{int}{Parse}{\param{bool }{giveUsage = {\tt TRUE}}}
Parse the command line, return $0$ if ok, $-1$ if {\tt "-h"} or {\tt "--help"}
option was encountered and the help message was given or a positive value if a
syntax error occured.
\wxheading{Parameters}
\docparam{giveUsage}{If {\tt TRUE} (default), the usage message is given if a
syntax error was encountered while parsing the command line or if help was
requested. If {\tt FALSE}, only error messages about possible syntax errors
are given, use \helpref{Usage}{wxcmdlineparserusage} to show the usage message
from the caller if needed.}
\membersection{wxCmdLineParser::Usage}\label{wxcmdlineparserusage}
\func{void}{Usage}{\void}
Give the standard usage message describing all program options. It will use the
options and parameters descriptions specified earlier, so the resulting message
will not be helpful to the user unless the descriptions were indeed specified.
\wxheading{See also}
\helpref{SetLogo}{wxcmdlineparsersetlogo}
\membersection{wxCmdLineParser::Found}\label{wxcmdlineparserfoundswitch}
\constfunc{bool}{Found}{\param{const wxString\& }{name}}
Returns TRUE if the given switch was found, FALSE otherwise.
\membersection{wxCmdLineParser::Found}\label{wxcmdlineparserfoundstringoption}
\constfunc{bool}{Found}{\param{const wxString\& }{name}, \param{wxString* }{value}}
Returns TRUE if an option taking a string value was found and stores the
value in the provided pointer (which should not be NULL).
\membersection{wxCmdLineParser::Found}\label{wxcmdlineparserfoundintoption}
\constfunc{bool}{Found}{\param{const wxString\& }{name}, \param{long* }{value}}
Returns TRUE if an option taking an integer value was found and stores
the value in the provided pointer (which should not be NULL).
\membersection{wxCmdLineParser::Found}\label{wxcmdlineparserfounddateoption}
\constfunc{bool}{Found}{\param{const wxString\& }{name}, \param{wxDateTime* }{value}}
Returns TRUE if an option taking a date value was found and stores the
value in the provided pointer (which should not be NULL).
\membersection{wxCmdLineParser::GetParamCount}\label{wxcmdlineparsergetparamcount}
\constfunc{size\_t}{GetParamCount}{\void}
Returns the number of parameters found. This function makes sense mostly if you
had used {\tt wxCMD\_LINE\_PARAM\_MULTIPLE} flag.
\membersection{wxCmdLineParser::GetParam}\label{wxcmdlineparsergetparam}
\constfunc{wxString}{GetParam}{\param{size\_t }{n = 0u}}
Returns the value of Nth parameter (as string only for now).
\wxheading{See also}
\helpref{GetParamCount}{wxcmdlineparsergetparamcount}

View File

@@ -8,10 +8,6 @@ if you want different behaviour.
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/cmdproc.h>
\wxheading{See also}
\helpref{wxCommandProcessor overview}{wxcommandprocessoroverview}, \helpref{wxCommand}{wxcommand}
@@ -20,13 +16,13 @@ if you want different behaviour.
\membersection{wxCommandProcessor::wxCommandProcessor}
\func{}{wxCommandProcessor}{\param{int}{ maxCommands = $-1$}}
\func{}{wxCommandProcessor}{\param{int}{ maxCommands = 100}}
Constructor.
{\it maxCommands} may be set to a positive integer to limit the number of
commands stored to it, otherwise (and by default) the list of commands can grow
arbitrarily.
{\it maxCommands} defaults to a rather arbitrary 100, but can be set from 1 to any integer.
If your wxCommand classes store a lot of data, you may wish the limit the number of
commands stored to a smaller number.
\membersection{wxCommandProcessor::\destruct{wxCommandProcessor}}
@@ -46,9 +42,9 @@ Returns TRUE if the currently-active command can be undone, FALSE otherwise.
Deletes all the commands in the list and sets the current command pointer to NULL.
\membersection{wxCommandProcessor::Redo}
\membersection{wxCommandProcessor::Do}
\func{virtual bool}{Redo}{\void}
\func{virtual bool}{Do}{\void}
Executes (redoes) the current command (the command that has just been undone if any).
@@ -70,30 +66,6 @@ Returns the maximum number of commands that the command processor stores.
Returns the edit menu associated with the command processor.
\membersection{wxCommandProcessor::GetRedoAccelerator}\label{wxcommandprocessorgetredoaccelerator}
\constfunc{const wxString\&}{GetRedoAccelerator}{\void}
Returns the string that will be appended to the Redo menu item.
\membersection{wxCommandProcessor::GetRedoMenuLabel}\label{wxcommandprocessorgetredomenulabel}
\constfunc{wxString}{GetRedoMenuLabel}{\void}
Returns the string that will be shown for the redo menu item.
\membersection{wxCommandProcessor::GetUndoAccelerator}\label{wxcommandprocessorgetundoaccelerator}
\constfunc{const wxString\&}{GetUndoAccelerator}{\void}
Returns the string that will be appended to the Undo menu item.
\membersection{wxCommandProcessor::GetUndoMenuLabel}\label{wxcommandprocessorgetundomenulabel}
\constfunc{wxString}{GetUndoMenuLabel}{\void}
Returns the string that will be shown for the undo menu item.
\membersection{wxCommandProcessor::Initialize}
\func{virtual void}{Initialize}{\void}
@@ -111,25 +83,6 @@ menu as appropriate. Set this to NULL if the menu is about to be
destroyed and command operations may still be performed, or the command
processor may try to access an invalid pointer.
\membersection{wxCommandProcessor::SetMenuStrings}
\func{void}{SetMenuStrings}{\void}
Sets the menu labels according to the currently set menu and the current
command state.
\membersection{wxCommandProcessor::SetRedoAccelerator}\label{wxcommandprocessorsetredoaccelerator}
\func{void}{SetRedoAccelerator}{\param{const wxString\&}{accel}}
Sets the string that will be appended to the Redo menu item.
\membersection{wxCommandProcessor::SetUndoAccelerator}\label{wxcommandprocessorsetundoaccelerator}
\func{void}{SetUndoAccelerator}{\param{const wxString\&}{accel}}
Sets the string that will be appended to the Undo menu item.
\membersection{wxCommandProcessor::Submit}
\func{virtual bool}{Submit}{\param{wxCommand *}{command}, \param{bool}{ storeIt = TRUE}}

View File

@@ -9,20 +9,13 @@ This class represents the colour chooser dialog.
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/colordlg.h>
\wxheading{See also}
\helpref{wxColourDialog Overview}{wxcolourdialogoverview},\\
\helpref{wxColour}{wxcolour},\\
\helpref{wxColourData}{wxcolourdata},\\
\helpref{wxGetColourFromUser}{wxgetcolourfromuser}
\helpref{wxColourDialog Overview}{wxcolourdialogoverview}, \helpref{wxColour}{wxcolour}, \helpref{wxColourData}{wxcolourdata}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxColourDialog::wxColourDialog}\label{wxcolourdialogwxcolourdialog}
\membersection{wxColourDialog::wxColourDialog}
\func{}{wxColourDialog}{\param{wxWindow* }{parent}, \param{wxColourData* }{data = NULL}}
@@ -39,12 +32,6 @@ data, which will be copied to the colour dialog's colour data.
Destructor.
\membersection{wxColourDialog::Create}
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxColourData* }{data = NULL}}
Same as \helpref{constructor}{wxcolourdialogwxcolourdialog}.
\membersection{wxColourDialog::GetColourData}
\func{wxColourData\&}{GetColourData}{\void}

View File

@@ -11,26 +11,6 @@ Valid RGB values are in the range 0 to 255.
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/colour.h>
\wxheading{Predefined objects}
Objects:
{\bf wxNullColour}
Pointers:
{\bf wxBLACK\\
wxWHITE\\
wxRED\\
wxBLUE\\
wxGREEN\\
wxCYAN\\
wxLIGHT\_GREY}
\wxheading{See also}
\helpref{wxColourDatabase}{wxcolourdatabase}, \helpref{wxPen}{wxpen}, \helpref{wxBrush}{wxbrush},\rtfsp
@@ -53,10 +33,6 @@ Constructs a colour from red, green and blue values.
Constructs a colour object using a colour name
listed in {\bf wxTheColourDatabase}.
\func{}{wxColour}{\param{const wxColour\&}{ colour}}
Copy constructor.
\wxheading{Parameters}
\docparam{red}{The red value.}
@@ -67,20 +43,10 @@ Copy constructor.
\docparam{colourName}{The colour name.}
\docparam{colour}{The colour to copy.}
\wxheading{See also}
\helpref{wxColourDatabase}{wxcolourdatabase}
\pythonnote{Constructors supported by wxPython are:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf wxColour(red=0, green=0, blue=0)}}{}
\twocolitem{{\bf wxNamedColour(name)}}{}
\end{twocollist}}
}
\membersection{wxColour::Blue}\label{wxcolourblue}
\constfunc{unsigned char}{Blue}{\void}
@@ -140,12 +106,18 @@ Assignment operator, using a colour name to be found in the colour database.
Tests the equality of two colours by comparing individual red, green blue colours.
TODO: this may be different on platforms other than Windows - no reference counting
is done on Windows.
\membersection{wxColour::operator $!=$}\label{wxcolourinequality}
\func{bool}{operator $!=$}{\param{const wxColour\&}{ colour}}
Tests the inequality of two colours by comparing individual red, green blue colours.
TODO: this may be different on platforms other than Windows - no reference counting
is done on Windows.
\section{\class{wxColourData}}\label{wxcolourdata}
This class holds a variety of information related to colour dialogs.
@@ -154,10 +126,6 @@ This class holds a variety of information related to colour dialogs.
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/cmndata.h>
\wxheading{See also}
\helpref{wxColour}{wxcolour}, \helpref{wxColourDialog}{wxcolourdialog}, \helpref{wxColourDialog overview}{wxcolourdialogoverview}
@@ -222,7 +190,7 @@ The default colour is black.
\membersection{wxColourData::SetCustomColour}\label{wxcolourdatasetcustomcolour}
\func{void}{SetCustomColour}{\param{int}{ i}, \param{const wxColour\&}{ colour}}
\func{void}{SetColour}{\param{int}{ i}, \param{const wxColour\&}{ colour}}
Sets the {\it i}th custom colour for the colour dialog. {\it i} should
be an integer between 0 and 15.
@@ -233,7 +201,7 @@ The default custom colours are all white.
\func{void}{operator $=$}{\param{const wxColourData\&}{ data}}
Assignment operator for the colour data.
Assingment operator for the colour data.
\section{\class{wxColourDatabase}}\label{wxcolourdatabase}
@@ -247,10 +215,6 @@ is only one instance of this class: {\bf wxTheColourDatabase}.
\helpref{wxList}{wxlist}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/gdicmn.h>
\wxheading{Remarks}
The colours in the standard database are as follows:

View File

@@ -8,44 +8,27 @@ A combobox permits a single selection only. Combobox items are numbered from zer
\wxheading{Derived from}
\helpref{wxControlWithItems}{wxcontrolwithitems}\\
\helpref{wxChoice}{wxchoice}\\
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/combobox.h>
\wxheading{Window styles}
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxCB\_SIMPLE}}{Creates a combobox with a permanently displayed list. Windows only. }
\twocolitem{\windowstyle{wxCB\_SIMPLE}}{Creates a combobox with a permanently displayed list.}
\twocolitem{\windowstyle{wxCB\_DROPDOWN}}{Creates a combobox with a drop-down list.}
\twocolitem{\windowstyle{wxCB\_READONLY}}{Same as wxCB\_DROPDOWN but only the
strings specified as the combobox choices can be selected, it is impossible to
select (even from a program) a string which is not in the choices list.}
\twocolitem{\windowstyle{wxCB\_READONLY}}{Creates a combo box consisting of a drop-down list and static text item
displaying the current selection.}
\twocolitem{\windowstyle{wxCB\_SORT}}{Sorts the entries in the list alphabetically.}
\end{twocollist}
See also \helpref{window styles overview}{windowstyles}.
\wxheading{Event handling}
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_COMBOBOX(id, func)}}{Process a wxEVT\_COMMAND\_COMBOBOX\_SELECTED event,
when an item on the list is selected.}
\twocolitem{{\bf EVT\_TEXT(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_UPDATED event,
when the combobox text changes.}
\end{twocollist}
\wxheading{See also}
\helpref{wxListBox}{wxlistbox}, \helpref{wxTextCtrl}{wxtextctrl}, \helpref{wxChoice}{wxchoice},
\rtfsp\helpref{wxCommandEvent}{wxcommandevent}
\helpref{wxListBox}{wxlistbox}, \helpref{wxTextCtrl}{wxtextctrl}, \helpref{wxChoice}{wxchoice}
\latexignore{\rtfignore{\wxheading{Members}}}
@@ -68,8 +51,6 @@ Constructor, creating and showing a combobox.
\docparam{id}{Window identifier. A value of -1 indicates a default value.}
\docparam{value}{Initial selection string. An empty string indicates no selection.}
\docparam{pos}{Window position.}
\docparam{size}{Window size. If the default size (-1, -1) is specified then the window is sized
@@ -89,19 +70,35 @@ appropriately.}
\helpref{wxComboBox::Create}{wxcomboboxcreate}, \helpref{wxValidator}{wxvalidator}
\pythonnote{The wxComboBox constructor in wxPython reduces the {\tt n}
and {\tt choices} arguments are to a single argument, which is
a list of strings.}
\perlnote{In wxPerl there is just an array reference in place of {\tt n}
and {\tt choices}.}
\membersection{wxComboBox::\destruct{wxComboBox}}
\func{}{\destruct{wxComboBox}}{\void}
Destructor, destroying the combobox.
\membersection{wxComboBox::Append}\label{wxcomboboxappend}
\func{void}{Append}{\param{const wxString\& }{item}}
Adds the item to the end of the combobox.
\func{void}{Append}{\param{const wxString\& }{ item}, \param{char* }{clientData}}
Adds the item to the end of the combobox, associating the given data
with the item.
\wxheading{Parameters}
\docparam{item}{The string to add.}
\docparam{clientData}{Client data to associate with the item.}
\membersection{wxComboBox::Clear}\label{wxcomboboxclear}
\func{void}{Clear}{\void}
Clears all strings from the combobox.
\membersection{wxComboBox::Create}\label{wxcomboboxcreate}
\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
@@ -125,6 +122,44 @@ Copies the selected text to the clipboard.
Copies the selected text to the clipboard and removes the selection.
\membersection{wxComboBox::Delete}\label{wxcomboboxdelete}
\func{void}{Delete}{\param{int}{ n}}
Deletes an item from the combobox.
\wxheading{Parameters}
\docparam{n}{The item to delete, starting from zero.}
\membersection{wxComboBox::FindString}\label{wxcomboboxfindstring}
\func{int}{FindString}{\param{const wxString\& }{string}}
Finds a choice matching the given string.
\wxheading{Parameters}
\docparam{string}{The item to find.}
\wxheading{Return value}
The position if found, or -1 if not found.
\membersection{wxComboBox::GetClientData}\label{wxcomboboxgetclientdata}
\constfunc{char*}{GetClientData}{\param{int}{ n}}
Returns a pointer to the client data associated with the given item (if any).
\wxheading{Parameters}
\docparam{n}{An item, starting from zero.}
\wxheading{Return value}
A pointer to the client data, or NULL if the item was not found.
\membersection{wxComboBox::GetInsertionPoint}\label{wxcomboboxgetinsertionpoint}
\constfunc{long}{GetInsertionPoint}{\void}
@@ -137,12 +172,46 @@ Returns the insertion point for the combobox's text field.
Returns the last position in the combobox text field.
\membersection{wxComboBox::GetSelection}\label{wxcomboboxgetselection}
\constfunc{int}{GetSelection}{\void}
Gets the position of the selected string, or -1 if there is no selection.
\membersection{wxComboBox::GetString}\label{wxcomboboxgetstring}
\constfunc{wxString}{GetString}{\param{int}{ n}}
Returns the string at position {\it n}.
\wxheading{Parameters}
\docparam{n}{The item position, starting from zero.}
\wxheading{Return value}
The string if the item is found, otherwise the empty string.
\membersection{wxComboBox::GetStringSelection}\label{wxcomboboxgetstringselection}
\constfunc{wxString}{GetStringSelection}{\void}
Gets the selected string.
\membersection{wxComboBox::GetValue}\label{wxcomboboxgetvalue}
\constfunc{wxString}{GetValue}{\void}
Returns the current value in the combobox text field.
\membersection{wxComboBox::Number}\label{wxcomboboxnumber}
\constfunc{int}{Number}{\void}
Returns the number of items in the combobox list.
TODO: make this GetNumber or GetCount?
\membersection{wxComboBox::Paste}\label{wxcomboboxpaste}
\func{void}{Paste}{\void}
@@ -175,6 +244,18 @@ Removes the text between the two positions in the combobox text field.
\docparam{to}{The last position.}
\membersection{wxComboBox::SetClientData}\label{wxcomboboxsetclientdata}
\func{void}{SetClientData}{\param{int}{ n}, \param{char* }{data}}
Associates the given client data pointer with the given item.
\wxheading{Parameters}
\docparam{n}{The zero-based item.}
\docparam{data}{The client data.}
\membersection{wxComboBox::SetInsertionPoint}\label{wxcomboboxsetinsertionpoint}
\func{void}{SetInsertionPoint}{\param{long}{ pos}}
@@ -193,29 +274,28 @@ Sets the insertion point at the end of the combobox text field.
\membersection{wxComboBox::SetSelection}\label{wxcomboboxsetselection}
\func{void}{SetSelection}{\param{int}{ n}}
Selects the given item in the combobox list.
\func{void}{SetSelection}{\param{long}{ from}, \param{long}{ to}}
Selects the text between the two positions, in the combobox text field.
\wxheading{Parameters}
\docparam{n}{The zero-based item to select.}
\docparam{from}{The first position.}
\docparam{to}{The second position.}
\pythonnote{This method is called {\tt SetMark} in wxPython, {\tt SetSelection}
name is kept for
\helpref{wxControlWithItems::SetSelection}{wxcontrolwithitemssetselection}.}
\membersection{wxComboBox::SetValue}\label{wxcomboboxsetvalue}
\func{void}{SetValue}{\param{const wxString\& }{text}}
Sets the text for the combobox text field.
{\bf NB:} For a combobox with {\tt wxCB\_READONLY} style the string must be in
the combobox choices list, otherwise the call to SetValue() is ignored.
\wxheading{Parameters}
\docparam{text}{The text to set.}

View File

@@ -9,10 +9,6 @@ change the data or view.
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/cmdproc.h>
\wxheading{See also}
\overview{Overview}{wxcommandoverview}
@@ -28,7 +24,7 @@ a new class and call this constructor from your own constructor.
{\it canUndo} tells the command processor whether this command is undo-able. You
can achieve the same functionality by overriding the CanUndo member function (if for example
the criteria for undoability is context-dependent).
the criteria for undoability is context-dependant).
{\it name} must be supplied for the command processor to display the command name
in the application's edit menu.

View File

@@ -1,92 +1,11 @@
\section{\class{wxCondition}}\label{wxcondition}
wxCondition variables correspond to pthread conditions or to Win32 event
objects. They may be used in a multithreaded application to wait until the
given condition becomes true which happens when the condition becomes signaled.
For example, if a worker thread is doing some long task and another thread has
to wait until it is finished, the latter thread will wait on the condition
object and the worker thread will signal it on exit (this example is not
perfect because in this particular case it would be much better to just
\helpref{Wait()}{wxthreadwait} for the worker thread, but if there are several
worker threads it already makes much more sense).
Note that a call to \helpref{Signal()}{wxconditionsignal} may happen before the
other thread calls \helpref{Wait()}{wxconditionwait} and, just as with the
pthread conditions, the signal is then lost and so if you want to be sure to
get it you must use a mutex together with the condition variable.
\wxheading{Example}
This example shows how a main thread may launch a worker thread which starts
running and then waits until the main thread signals it to continue:
\begin{verbatim}
class MySignallingThread : public wxThread
{
public:
MySignallingThread(wxMutex *mutex, wxCondition *condition)
{
m_mutex = mutex;
m_condition = condition;
Create();
}
virtual ExitCode Entry()
{
... do our job ...
// tell the other(s) thread(s) that we're about to terminate: we must
// lock the mutex first or we might signal the condition before the
// waiting threads start waiting on it!
wxMutexLocker lock(m_mutex);
m_condition.Broadcast(); // same as Signal() here -- one waiter only
return 0;
}
private:
wxCondition *m_condition;
wxMutex *m_mutex;
};
int main()
{
wxMutex mutex;
wxCondition condition(mutex);
// the mutex should be initially locked
mutex.Lock();
// create and run the thread but notice that it won't be able to
// exit (and signal its exit) before we unlock the mutex below
MySignallingThread *thread = new MySignallingThread(&mutex, &condition);
thread->Run();
// wait for the thread termination: Wait() atomically unlocks the mutex
// which allows the thread to continue and starts waiting
condition.Wait();
// now we can exit
return 0;
}
\end{verbatim}
Of course, here it would be much better to simply use a joinable thread and
call \helpref{wxThread::Wait}{wxthreadwait} on it, but this example does
illustrate the importance of properly locking the mutex when using
wxCondition.
TODO
\wxheading{Derived from}
None.
\wxheading{Include files}
<wx/thread.h>
\wxheading{See also}
\helpref{wxThread}{wxthread}, \helpref{wxMutex}{wxmutex}
@@ -95,68 +14,48 @@ None.
\membersection{wxCondition::wxCondition}\label{wxconditionconstr}
\func{}{wxCondition}{\param{wxMutex\& }{mutex}}
\func{}{wxCondition}{\void}
Default and only constructor. The {\it mutex} must be locked by the caller
before calling \helpref{Wait}{wxconditionwait} function.
Default constructor.
\membersection{wxCondition::\destruct{wxCondition}}
\func{}{\destruct{wxCondition}}{\void}
Destroys the wxCondition object. The destructor is not virtual so this class
should not be used polymorphically.
Destroys the wxCondition object.
\membersection{wxCondition::Broadcast}\label{wxconditionbroadcast}
\func{void}{Broadcast}{\void}
Broadcasts to all waiting threads, waking all of them up. Note that this method
may be called whether the mutex associated with this condition is locked or
not.
\wxheading{See also}
\helpref{wxCondition::Signal}{wxconditionsignal}
Broadcasts to all waiting objects.
\membersection{wxCondition::Signal}\label{wxconditionsignal}
\func{void}{Signal}{\void}
Signals the object waking up at most one thread. If several threads are waiting
on the same condition, the exact thread which is woken up is undefined. If no
threads are waiting, the signal is lost and the condition would have to be
signalled again to wake up any thread which may start waiting on it later.
Note that this method may be called whether the mutex associated with this
condition is locked or not.
\wxheading{See also}
\helpref{wxCondition::Broadcast}{wxconditionbroadcast}
Signals the object.
\membersection{wxCondition::Wait}\label{wxconditionwait}
\func{void}{Wait}{\void}
\func{void}{Wait}{\param{wxMutex\&}{ mutex}}
Waits until the condition is signalled.
Waits indefinitely.
\func{bool}{Wait}{\param{unsigned long}{ sec}, \param{unsigned long}{ nsec}}
\func{bool}{Wait}{\param{wxMutex\&}{ mutex}, \param{unsigned long}{ sec}, \param{unsigned long}{ nsec}}
Waits until the condition is signalled or the timeout has elapsed.
Note that the mutex associated with this condition {\bf must} be acquired by
the thread before calling this method.
Waits until a signal is raised or the timeout has elapsed.
\wxheading{Parameters}
\docparam{mutex}{wxMutex object.}
\docparam{sec}{Timeout in seconds}
\docparam{nsec}{Timeout nanoseconds component (added to {\it sec}).}
\wxheading{Return value}
The second form returns {\tt TRUE} if the condition has been signalled, or
{\tt FALSE} if it returned because the timeout has elapsed.
The second form returns if the signal was raised, or FALSE if there was a timeout.

View File

@@ -1,771 +0,0 @@
\section{\class{wxConfigBase}}\label{wxconfigbase}
wxConfigBase class defines the basic interface of all config classes. It can
not be used by itself (it is an abstract base class) and you will always use one
of its derivations: wxIniConfig, wxFileConfig, wxRegConfig or any other.
However, usually you don't even need to know the precise nature of the class
you're working with but you would just use the wxConfigBase methods. This
allows you to write the same code regardless of whether you're working with
the registry under Win32 or text-based config files under Unix (or even
Windows 3.1 .INI files if you're really unlucky). To make writing the portable
code even easier, wxWindows provides a typedef wxConfig
which is mapped onto the native wxConfigBase implementation on the given
platform: i.e. wxRegConfig under Win32, wxIniConfig under Win16 and
wxFileConfig otherwise.
See \helpref{config overview}{wxconfigoverview} for the descriptions of all
features of this class.
It is highly recommended to use static functions {\it Get()} and/or {\it Set()},
so please have a \helpref{look at them.}{wxconfigstaticfunctions}
\wxheading{Derived from}
No base class
\wxheading{Include files}
<wx/config.h> (to let wxWindows choose a wxConfig class for your platform)\\
<wx/confbase.h> (base config class)\\
<wx/fileconf.h> (wxFileconfig class)\\
<wx/msw/regconf.h> (wxRegConfig class)\\
<wx/msw/iniconf.h> (wxIniConfig class)
\wxheading{Example}
Here is how you would typically use this class:
\begin{verbatim}
// using wxConfig instead of writing wxFileConfig or wxRegConfig enhances
// portability of the code
wxConfig *config = new wxConfig("MyAppName");
wxString str;
if ( config->Read("LastPrompt", &str) ) {
// last prompt was found in the config file/registry and its value is now
// in str
...
}
else {
// no last prompt...
}
// another example: using default values and the full path instead of just
// key name: if the key is not found , the value 17 is returned
long value = config->Read("/LastRun/CalculatedValues/MaxValue", 17);
...
...
...
// at the end of the program we would save everything back
config->Write("LastPrompt", str);
config->Write("/LastRun/CalculatedValues/MaxValue", value);
// the changes will be written back automatically
delete config;
\end{verbatim}
This basic example, of course, doesn't show all wxConfig features, such as
enumerating, testing for existence and deleting the entries and groups of
entries in the config file, its abilities to automatically store the default
values or expand the environment variables on the fly. However, the main idea
is that using this class is easy and that it should normally do what you
expect it to.
NB: in the documentation of this class, the words "config file" also mean
"registry hive" for wxRegConfig and, generally speaking, might mean any
physical storage where a wxConfigBase-derived class stores its data.
\latexignore{\rtfignore{\wxheading{Function groups}}}
\membersection{Static functions}\label{wxconfigstaticfunctions}
These functions deal with the "default" config object. Although its usage is
not at all mandatory it may be convenient to use a global config object
instead of creating and deleting the local config objects each time you need
one (especially because creating a wxFileConfig object might be a time
consuming operation). In this case, you may create this global config object
in the very start of the program and {\it Set()} it as the default. Then, from
anywhere in your program, you may access it using the {\it Get()} function.
Note that wxWindows will delete this config object for you during the program
shutdown (from \helpref{wxApp::OnExit}{wxapponexit} to be precise) but you can
also do it yourself earlier if needed.
As it happens, you may even further simplify the procedure described above:
you may forget about calling {\it Set()}. When {\it Get()} is called and there
is no current object, it will create one using {\it Create()} function. To
disable this behaviour {\it DontCreateOnDemand()} is provided.
{\bf Note:} You should use either {\it Set()} or {\it Get()} because wxWindows
library itself would take advantage of it and could save various information
in it. For example \helpref{wxFontMapper}{wxfontmapper} or Unix version
of \helpref{wxFileDialog}{wxfiledialog} have ability to use wxConfig class.
\helpref{Set}{wxconfigbaseset}\\
\helpref{Get}{wxconfigbaseget}\\
\helpref{Create}{wxconfigbasecreate}\\
\helpref{DontCreateOnDemand}{wxconfigbasedontcreateondemand}
\membersection{Constructor and destructor}
\helpref{wxConfigBase}{wxconfigbasector}\\
\helpref{\destruct{wxConfigBase}}{wxconfigbasedtor}
\membersection{Path management}
As explained in \helpref{config overview}{wxconfigoverview}, the config classes
support a file system-like hierarchy of keys (files) and groups (directories).
As in the file system case, to specify a key in the config class you must use
a path to it. Config classes also support the notion of the current group,
which makes it possible to use the relative paths. To clarify all this, here
is an example (it is only for the sake of demonstration, it doesn't do anything
sensible!):
\begin{verbatim}
wxConfig *config = new wxConfig("FooBarApp");
// right now the current path is '/'
conf->Write("RootEntry", 1);
// go to some other place: if the group(s) don't exist, they will be created
conf->SetPath("/Group/Subgroup");
// create an entry in subgroup
conf->Write("SubgroupEntry", 3);
// '..' is understood
conf->Write("../GroupEntry", 2);
conf->SetPath("..");
wxASSERT( conf->Read("Subgroup/SubgroupEntry", 0l) == 3 );
// use absolute path: it is allowed, too
wxASSERT( conf->Read("/RootEntry", 0l) == 1 );
\end{verbatim}
{\it Warning}: it is probably a good idea to always restore the path to its
old value on function exit:
\begin{verbatim}
void foo(wxConfigBase *config)
{
wxString strOldPath = config->GetPath();
config->SetPath("/Foo/Data");
...
config->SetPath(strOldPath);
}
\end{verbatim}
because otherwise the assert in the following example will surely fail
(we suppose here that {\it foo()} function is the same as above except that it
doesn't save and restore the path):
\begin{verbatim}
void bar(wxConfigBase *config)
{
config->Write("Test", 17);
foo(config);
// we're reading "/Foo/Data/Test" here! -1 will probably be returned...
wxASSERT( config->Read("Test", -1) == 17 );
}
\end{verbatim}
Finally, the path separator in wxConfigBase and derived classes is always '/',
regardless of the platform (i.e. it is {\bf not} '$\backslash\backslash$' under Windows).
\helpref{SetPath}{wxconfigbasesetpath}\\
\helpref{GetPath}{wxconfigbasegetpath}
\membersection{Enumeration}
The functions in this section allow to enumerate all entries and groups in the
config file. All functions here return FALSE when there are no more items.
You must pass the same index to GetNext and GetFirst (don't modify it).
Please note that it is {\bf not} the index of the current item (you will have
some great surprises with wxRegConfig if you assume this) and you shouldn't
even look at it: it is just a "cookie" which stores the state of the
enumeration. It can't be stored inside the class because it would prevent you
from running several enumerations simultaneously, that's why you must pass it
explicitly.
Having said all this, enumerating the config entries/groups is very simple:
\begin{verbatim}
wxArrayString aNames;
// enumeration variables
wxString str;
long dummy;
// first enum all entries
bool bCont = config->GetFirstEntry(str, dummy);
while ( bCont ) {
aNames.Add(str);
bCont = GetConfig()->GetNextEntry(str, dummy);
}
... we have all entry names in aNames...
// now all groups...
bCont = GetConfig()->GetFirstGroup(str, dummy);
while ( bCont ) {
aNames.Add(str);
bCont = GetConfig()->GetNextGroup(str, dummy);
}
... we have all group (and entry) names in aNames...
\end{verbatim}
There are also functions to get the number of entries/subgroups without
actually enumerating them, but you will probably never need them.
\helpref{GetFirstGroup}{wxconfigbasegetfirstgroup}\\
\helpref{GetNextGroup}{wxconfigbasegetnextgroup}\\
\helpref{GetFirstEntry}{wxconfigbasegetfirstentry}\\
\helpref{GetNextEntry}{wxconfigbasegetnextentry}\\
\helpref{GetNumberOfEntries}{wxconfigbasegetnumberofentries}\\
\helpref{GetNumberOfGroups}{wxconfigbasegetnumberofgroups}
\membersection{Tests of existence}
\helpref{HasGroup}{wxconfigbasehasgroup}\\
\helpref{HasEntry}{wxconfigbasehasentry}\\
\helpref{Exists}{wxconfigbaseexists}\\
\helpref{GetEntryType}{wxconfigbasegetentrytype}
\membersection{Miscellaneous functions}
\helpref{GetAppName}{wxconfigbasegetappname}\\
\helpref{GetVendorName}{wxconfigbasegetvendorname}\\
\helpref{SetUmask}{wxfileconfigsetumask}
\membersection{Key access}
These function are the core of wxConfigBase class: they allow you to read and
write config file data. All {\it Read} function take a default value which
will be returned if the specified key is not found in the config file.
Currently, only two types of data are supported: string and long (but it might
change in the near future). To work with other types: for {\it int} or {\it
bool} you can work with function taking/returning {\it long} and just use the
casts. Better yet, just use {\it long} for all variables which you're going to
save in the config file: chances are that {\tt sizeof(bool) == sizeof(int) == sizeof(long)} anyhow on your system. For {\it float}, {\it double} and, in
general, any other type you'd have to translate them to/from string
representation and use string functions.
Try not to read long values into string variables and vice versa: although it
just might work with wxFileConfig, you will get a system error with
wxRegConfig because in the Windows registry the different types of entries are
indeed used.
Final remark: the {\it szKey} parameter for all these functions can contain an
arbitrary path (either relative or absolute), not just the key name.
\helpref{Read}{wxconfigbaseread}\\
\helpref{Write}{wxconfigbasewrite}\\
\helpref{Flush}{wxconfigbaseflush}
\membersection{Rename entries/groups}
The functions in this section allow to rename entries or subgroups of the
current group. They will return FALSE on error. typically because either the
entry/group with the original name doesn't exist, because the entry/group with
the new name already exists or because the function is not supported in this
wxConfig implementation.
\helpref{RenameEntry}{wxconfigbaserenameentry}\\
\helpref{RenameGroup}{wxconfigbaserenamegroup}
\membersection{Delete entries/groups}
The functions in this section delete entries and/or groups of entries from the
config file. {\it DeleteAll()} is especially useful if you want to erase all
traces of your program presence: for example, when you uninstall it.
\helpref{DeleteEntry}{wxconfigbasedeleteentry}\\
\helpref{DeleteGroup}{wxconfigbasedeletegroup}\\
\helpref{DeleteAll}{wxconfigbasedeleteall}
\membersection{Options}
Some aspects of wxConfigBase behaviour can be changed during run-time. The
first of them is the expansion of environment variables in the string values
read from the config file: for example, if you have the following in your
config file:
\begin{verbatim}
# config file for my program
UserData = $HOME/data
# the following syntax is valud only under Windows
UserData = %windir%\\data.dat
\end{verbatim}
% $ % help EMACS syntax highlighting...
the call to {\tt config->Read("UserData")} will return something like
{\tt "/home/zeitlin/data"} if you're lucky enough to run a Linux system ;-)
Although this feature is very useful, it may be annoying if you read a value
which containts '\$' or '\%' symbols (\% is used for environment variables
expansion under Windows) which are not used for environment variable
expansion. In this situation you may call SetExpandEnvVars(FALSE) just before
reading this value and SetExpandEnvVars(TRUE) just after. Another solution
would be to prefix the offending symbols with a backslash.
The following functions control this option:
\helpref{IsExpandingEnvVars}{wxconfigbaseisexpandingenvvars}\\
\helpref{SetExpandEnvVars}{wxconfigbasesetexpandenvvars}\\
\helpref{SetRecordDefaults}{wxconfigbasesetrecorddefaults}\\
\helpref{IsRecordingDefaults}{wxconfigbaseisrecordingdefaults}
%%%%% MEMBERS HERE %%%%%
\helponly{\insertatlevel{2}{
\wxheading{Members}
}}
\membersection{wxConfigBase::wxConfigBase}\label{wxconfigbasector}
\func{}{wxConfigBase}{\param{const wxString\& }{appName = wxEmptyString},
\param{const wxString\& }{vendorName = wxEmptyString},
\param{const wxString\& }{localFilename = wxEmptyString},
\param{const wxString\& }{globalFilename = wxEmptyString},
\param{long}{ style = 0}}
This is the default and only constructor of the wxConfigBase class, and
derived classes.
\wxheading{Parameters}
\docparam{appName}{The application name. If this is empty, the class will
normally use \helpref{wxApp::GetAppName}{wxappgetappname} to set it. The
application name is used in the registry key on Windows, and can be used to
deduce the local filename parameter if that is missing.}
\docparam{vendorName}{The vendor name. If this is empty, it is assumed that
no vendor name is wanted, if this is optional for the current config class.
The vendor name is appended to the application name for wxRegConfig.}
\docparam{localFilename}{Some config classes require a local filename. If this
is not present, but required, the application name will be used instead.}
\docparam{globalFilename}{Some config classes require a global filename. If
this is not present, but required, the application name will be used instead.}
\docparam{style}{Can be one of wxCONFIG\_USE\_LOCAL\_FILE and
wxCONFIG\_USE\_GLOBAL\_FILE. The style interpretation depends on the config
class and is ignored by some. For wxFileConfig, these styles determine whether
a local or global config file is created or used. If the flag is present but
the parameter is empty, the parameter will be set to a default. If the
parameter is present but the style flag not, the relevant flag will be added
to the style. For wxFileConfig you can also add wxCONFIG\_USE\_RELATIVE\_PATH
by logically or'ing it to either of the \_FILE options to tell wxFileConfig to
use relative instead of absolute paths. For wxFileConfig, you can also
add wxCONFIG\_USE\_NO\_ESCAPE\_CHARACTERS which will turn off character
escaping for the values of entries stored in the config file: for example
a {\it foo} key with some backslash characters will be stored as {\tt foo=C:$\backslash$mydir} instead
of the usual storage of {\tt foo=C:$\backslash\backslash$mydir}.
The wxCONFIG\_USE\_NO\_ESCAPE\_CHARACTERS style can be helpful if your config
file must be read or written to by a non-wxWindows program (which might not
understand the escape characters). Note, however, that if
wxCONFIG\_USE\_NO\_ESCAPE\_CHARACTERS style is used, it is is now
your application's responsibility to ensure that there is no newline or
other illegal characters in a value, before writing that value to the file.}
\wxheading{Remarks}
By default, environment variable expansion is on and recording defaults is
off.
\membersection{wxConfigBase::\destruct{wxConfigBase}}\label{wxconfigbasedtor}
\func{}{\destruct{wxConfigBase}}{\void}
Empty but ensures that dtor of all derived classes is virtual.
\membersection{wxConfigBase::Create}\label{wxconfigbasecreate}
\func{static wxConfigBase *}{Create}{\void}
Create a new config object: this function will create the "best"
implementation of wxConfig available for the current platform, see comments
near the definition of wxCONFIG\_WIN32\_NATIVE for details. It returns the
created object and also sets it as the current one.
\membersection{wxConfigBase::DontCreateOnDemand}\label{wxconfigbasedontcreateondemand}
\func{void}{DontCreateOnDemand}{\void}
Calling this function will prevent {\it Get()} from automatically creating a
new config object if the current one is NULL. It might be useful to call it
near the program end to prevent new config object "accidental" creation.
\membersection{wxConfigBase::DeleteAll}\label{wxconfigbasedeleteall}
\func{bool}{DeleteAll}{\void}
Delete the whole underlying object (disk file, registry key, ...). Primarly
for use by desinstallation routine.
\membersection{wxConfigBase::DeleteEntry}\label{wxconfigbasedeleteentry}
\func{bool}{DeleteEntry}{\param{const wxString\& }{ key}, \param{bool}{ bDeleteGroupIfEmpty = TRUE}}
Deletes the specified entry and the group it belongs to if it was the last key
in it and the second parameter is true.
\membersection{wxConfigBase::DeleteGroup}\label{wxconfigbasedeletegroup}
\func{bool}{DeleteGroup}{\param{const wxString\& }{ key}}
Delete the group (with all subgroups)
\membersection{wxConfigBase::Exists}\label{wxconfigbaseexists}
\constfunc{bool}{Exists}{\param{wxString\& }{strName}}
returns TRUE if either a group or an entry with a given name exists
\membersection{wxConfigBase::Flush}\label{wxconfigbaseflush}
\func{bool}{Flush}{\param{bool }{bCurrentOnly = FALSE}}
permanently writes all changes (otherwise, they're only written from object's
destructor)
\membersection{wxConfigBase::Get}\label{wxconfigbaseget}
\func{static wxConfigBase *}{Get}{\param{bool }{CreateOnDemand = TRUE}}
Get the current config object. If there is no current object and
{\it CreateOnDemand} is TRUE, creates one
(using {\it Create}) unless DontCreateOnDemand was called previously.
\membersection{wxConfigBase::GetAppName}\label{wxconfigbasegetappname}
\constfunc{wxString}{GetAppName}{\void}
Returns the application name.
\membersection{wxConfigBase::GetEntryType}\label{wxconfigbasegetentrytype}
\constfunc{enum wxConfigBase::EntryType}{GetEntryType}{\param{const wxString\& }{name}}
Returns the type of the given entry or {\it Unknown} if the entry doesn't
exist. This function should be used to decide which version of Read() should
be used because some of wxConfig implementations will complain about type
mismatch otherwise: e.g., an attempt to read a string value from an integer
key with wxRegConfig will fail.
The result is an element of enum EntryType:
\begin{verbatim}
enum EntryType
{
Unknown,
String,
Boolean,
Integer,
Float
};
\end{verbatim}
\membersection{wxConfigBase::GetFirstGroup}\label{wxconfigbasegetfirstgroup}
\constfunc{bool}{GetFirstGroup}{\param{wxString\& }{str}, \param{long\&}{ index}}
Gets the first group.
\pythonnote{The wxPython version of this method returns a 3-tuple
consisting of the continue flag, the value string, and the index for
the next call.}
\perlnote{In wxPerl this method takes no arguments and returns a 3-element
list {\tt ( continue, str, index )}.}
\membersection{wxConfigBase::GetFirstEntry}\label{wxconfigbasegetfirstentry}
\constfunc{bool}{GetFirstEntry}{\param{wxString\& }{str}, \param{long\&}{ index}}
Gets the first entry.
\pythonnote{The wxPython version of this method returns a 3-tuple
consisting of the continue flag, the value string, and the index for
the next call.}
\perlnote{In wxPerl this method takes no arguments and returns a 3-element
list {\tt ( continue, str, index )}.}
\membersection{wxConfigBase::GetNextGroup}\label{wxconfigbasegetnextgroup}
\constfunc{bool}{GetNextGroup}{\param{wxString\& }{str}, \param{long\&}{ index}}
Gets the next group.
\pythonnote{The wxPython version of this method returns a 3-tuple
consisting of the continue flag, the value string, and the index for
the next call.}
\perlnote{In wxPerl this method only takes the {\tt index} parameter
and returns a 3-element list {\tt ( continue, str, index )}.}
\membersection{wxConfigBase::GetNextEntry}\label{wxconfigbasegetnextentry}
\constfunc{bool}{GetNextEntry}{\param{wxString\& }{str}, \param{long\&}{ index}}
Gets the next entry.
\pythonnote{The wxPython version of this method returns a 3-tuple
consisting of the continue flag, the value string, and the index for
the next call.}
\perlnote{In wxPerl this method only takes the {\tt index} parameter
and returns a 3-element list {\tt ( continue, str, index )}.}
\membersection{wxConfigBase::GetNumberOfEntries}\label{wxconfigbasegetnumberofentries}
\constfunc{uint }{GetNumberOfEntries}{\param{bool }{bRecursive = FALSE}}
\membersection{wxConfigBase::GetNumberOfGroups}\label{wxconfigbasegetnumberofgroups}
\constfunc{uint}{GetNumberOfGroups}{\param{bool }{bRecursive = FALSE}}
Get number of entries/subgroups in the current group, with or without its
subgroups.
\membersection{wxConfigBase::GetPath}\label{wxconfigbasegetpath}
\constfunc{const wxString\&}{GetPath}{\void}
Retrieve the current path (always as absolute path).
\membersection{wxConfigBase::GetVendorName}\label{wxconfigbasegetvendorname}
\constfunc{wxString}{GetVendorName}{\void}
Returns the vendor name.
\membersection{wxConfigBase::HasEntry}\label{wxconfigbasehasentry}
\constfunc{bool}{HasEntry}{\param{wxString\& }{strName}}
returns TRUE if the entry by this name exists
\membersection{wxConfigBase::HasGroup}\label{wxconfigbasehasgroup}
\constfunc{bool}{HasGroup}{\param{const wxString\& }{strName}}
returns TRUE if the group by this name exists
\membersection{wxConfigBase::IsExpandingEnvVars}\label{wxconfigbaseisexpandingenvvars}
\constfunc{bool}{IsExpandingEnvVars}{\void}
Returns TRUE if we are expanding environment variables in key values.
\membersection{wxConfigBase::IsRecordingDefaults}\label{wxconfigbaseisrecordingdefaults}
\constfunc{bool}{IsRecordingDefaults}{\void}
Returns TRUE if we are writing defaults back to the config file.
\membersection{wxConfigBase::Read}\label{wxconfigbaseread}
\constfunc{bool}{Read}{\param{const wxString\& }{key}, \param{wxString*}{ str}}
Read a string from the key, returning TRUE if the value was read. If the key
was not found, {\it str} is not changed.
\constfunc{bool}{Read}{\param{const wxString\& }{key}, \param{wxString*}{ str}, \param{const wxString\& }{defaultVal}}
Read a string from the key. The default value is returned if the key was not
found.
Returns TRUE if value was really read, FALSE if the default was used.
\constfunc{wxString}{Read}{\param{const wxString\& }{key}, \param{const
wxString\& }{defaultVal}}
Another version of {\it Read()}, returning the string value directly.
\constfunc{bool}{Read}{\param{const wxString\& }{ key}, \param{long*}{ l}}
Reads a long value, returning TRUE if the value was found. If the value was
not found, {\it l} is not changed.
\constfunc{bool}{Read}{\param{const wxString\& }{ key}, \param{long*}{ l},
\param{long}{ defaultVal}}
Reads a long value, returning TRUE if the value was found. If the value was
not found, {\it defaultVal} is used instead.
\constfunc{long }{Read}{\param{const wxString\& }{key}, \param{long}{ defaultVal}}
Reads a long value from the key and returns it. {\it defaultVal} is returned
if the key is not found.
NB: writing
{\small
\begin{verbatim}
conf->Read("key", 0);
\end{verbatim}
}
won't work because the call is ambiguous: compiler can not choose between two
{\it Read} functions. Instead, write:
{\small
\begin{verbatim}
conf->Read("key", 0l);
\end{verbatim}
}
\constfunc{bool}{Read}{\param{const wxString\& }{ key}, \param{double*}{ d}}
Reads a double value, returning TRUE if the value was found. If the value was
not found, {\it d} is not changed.
\constfunc{bool}{Read}{\param{const wxString\& }{ key}, \param{double*}{ d},
\param{double}{ defaultVal}}
Reads a double value, returning TRUE if the value was found. If the value was
not found, {\it defaultVal} is used instead.
\constfunc{bool}{Read}{\param{const wxString\& }{ key}, \param{bool*}{ b}}
Reads a bool value, returning TRUE if the value was found. If the value was
not found, {\it b} is not changed.
\constfunc{bool}{Read}{\param{const wxString\& }{ key}, \param{bool*}{ d},
\param{bool}{ defaultVal}}
Reads a bool value, returning TRUE if the value was found. If the value was
not found, {\it defaultVal} is used instead.
\pythonnote{In place of a single overloaded method name, wxPython
implements the following methods:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf Read(key, default="")}}{Returns a string.}
\twocolitem{{\bf ReadInt(key, default=0)}}{Returns an int.}
\twocolitem{{\bf ReadFloat(key, default=0.0)}}{Returns a floating point number.}
\end{twocollist}}
}
\perlnote{In place of a single overloaded method, wxPerl uses:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf Read(key, default="")}}{Returns a string}
\twocolitem{{\bf ReadInt(key, default=0)}}{Returns an integer}
\twocolitem{{\bf ReadFloat(key, default=0.0)}}{Returns a floating point number}
\twocolitem{{\bf ReadBool(key, default=0)}}{Returns a boolean}
\end{twocollist}
}}
\membersection{wxConfigBase::RenameEntry}\label{wxconfigbaserenameentry}
\func{bool}{RenameEntry}{\param{const wxString\& }{ oldName}, \param{const wxString\& }{ newName}}
Renames an entry in the current group. The entries names (both the old and
the new one) shouldn't contain backslashes, i.e. only simple names and not
arbitrary paths are accepted by this function.
Returns FALSE if the {\it oldName} doesn't exist or if {\it newName} already
exists.
\membersection{wxConfigBase::RenameGroup}\label{wxconfigbaserenamegroup}
\func{bool}{RenameGroup}{\param{const wxString\& }{ oldName}, \param{const wxString\& }{ newName}}
Renames a subgroup of the current group. The subgroup names (both the old and
the new one) shouldn't contain backslashes, i.e. only simple names and not
arbitrary paths are accepted by this function.
Returns FALSE if the {\it oldName} doesn't exist or if {\it newName} already
exists.
\membersection{wxConfigBase::Set}\label{wxconfigbaseset}
\func{static wxConfigBase *}{Set}{\param{wxConfigBase *}{pConfig}}
Sets the config object as the current one, returns the pointer to the previous
current object (both the parameter and returned value may be NULL)
\membersection{wxConfigBase::SetExpandEnvVars}\label{wxconfigbasesetexpandenvvars}
\func{void}{SetExpandEnvVars }{\param{bool }{bDoIt = TRUE}}
Determine whether we wish to expand environment variables in key values.
\membersection{wxConfigBase::SetPath}\label{wxconfigbasesetpath}
\func{void}{SetPath}{\param{const wxString\& }{strPath}}
Set current path: if the first character is '/', it is the absolute path,
otherwise it is a relative path. '..' is supported. If the strPath doesn't
exist it is created.
\membersection{wxConfigBase::SetRecordDefaults}\label{wxconfigbasesetrecorddefaults}
\func{void}{SetRecordDefaults}{\param{bool }{bDoIt = TRUE}}
Sets whether defaults are recorded to the config file whenever an attempt to
read read the value which is not present in it is done.
If on (default is off) all default values for the settings used by the program
are written back to the config file. This allows the user to see what config
options may be changed and is probably useful only for wxFileConfig.
\membersection{wxConfigBase::SetUmask}\label{wxfileconfigsetumask}
\func{void}{SetUmask}{\param{int }{mode}}
{\bf NB:} this function is not in the base wxConfigBase class but is only
implemented in wxFileConfig. Moreover, this function is Unix-specific and
doesn't do anything on other platforms.
SetUmask() allows to set the mode to be used for the config file creation.
For example, to create a config file which is not readable by other users
(useful if it stores some sensitive information, such as passwords), you
should do {\tt SetUmask(0077)}.
\membersection{wxConfigBase::Write}\label{wxconfigbasewrite}
\func{bool}{Write}{\param{const wxString\& }{ key}, \param{const wxString\& }{
value}}
\func{bool}{Write}{\param{const wxString\& }{ key}, \param{long}{ value}}
\func{bool}{Write}{\param{const wxString\& }{ key}, \param{double}{ value}}
\func{bool}{Write}{\param{const wxString\& }{ key}, \param{bool}{ value}}
These functions write the specified value to the config file and return TRUE
on success.
\pythonnote{In place of a single overloaded method name, wxPython
implements the following methods:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf Write(key, value)}}{Writes a string.}
\twocolitem{{\bf WriteInt(key, value)}}{Writes an int.}
\twocolitem{{\bf WriteFloat(key, value)}}{Writes a floating point number.}
\end{twocollist}}
}
\perlnote{In place of a single overloaded method, wxPerl uses:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf Write(key, value)}}{Writes a string}
\twocolitem{{\bf WriteInt(key, value)}}{Writes an integer}
\twocolitem{{\bf WriteFloat(key, value)}}{Writes a floating point number}
\twocolitem{{\bf WriteBool(key, value)}}{Writes a boolean}
\end{twocollist}
}}

View File

@@ -1,10 +0,0 @@
\chapter{Constants}\label{constants}
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}
This chapter describes the constants defined by wxWindows.
\input cppconst.tex
\input stdevtid.tex
\input keycode.tex

BIN
docs/latex/wx/contents.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

View File

@@ -11,10 +11,6 @@ of data.
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/control.h>
\wxheading{See also}
\helpref{wxValidator}{wxvalidator}

View File

@@ -1,46 +0,0 @@
% -----------------------------------------------------------------------------
% wxCountingOutputStream
% -----------------------------------------------------------------------------
\section{\class{wxCountingOutputStream}}\label{wxcountingoutputstream}
wxCountingOutputStream is a specialized output stream which does not write any data anyway,
instead it counts how many bytes would get written if this were a normal stream. This
can sometimes be useful or required if some data gets serialized to a stream or compressed
by using stream compression and thus the final size of the stream cannot be known other
than pretending to write the stream. One case where the resulting size would have to be
known is if the data has to be written to a piece of memory and the memory has to be
allocated before writing to it (which is probably always the case when writing to a
memory stream).
\wxheading{Derived from}
\helpref{wxOutputStream}{wxoutputstream}
\helpref{wxStreamBase}{wxstreambase}
\wxheading{Include files}
<wx/stream.h>
\latexignore{\rtfignore{\wxheading{Members}}}
% -----------
% ctor & dtor
% -----------
\membersection{wxCountingOutputStream::wxCountingOutputStream}
\func{}{wxCountingOutputStream}{\void}
Creates a wxCountingOutputStream object.
\membersection{wxCountingOutputStream::\destruct{wxCountingOutputStream}}
\func{}{\destruct{wxCountingOutputStream}}{\void}
Destructor.
\membersection{wxCountingOutputStream::GetSize}
\constfunc{size\_t}{GetSize}{\void}
Returns the current size of the stream.

BIN
docs/latex/wx/cpp.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B

View File

@@ -1,106 +0,0 @@
\section{Preprocesser symbols defined by wxWindows}\label{cppconst}
Here is the list of preprocessor symbols used in the wxWindows source grouped
by category (and sorted by alphabetical order inside each category).
\subsection{GUI system}
\begin{twocollist}\itemsep=0pt
\twocolitem{\_\_WINDOWS\_\_}{any Windows, yom may also use \_\_WXMSW\_\_}
\twocolitem{\_\_WIN16\_\_}{Win16 API}
\twocolitem{\_\_WIN32\_\_}{Win32 API}
\twocolitem{\_\_WIN95\_\_}{Windows 95 or NT 4.0 and above system (not NT 3.5x)}
\twocolitem{\_\_WXGTK\_\_}{GTK}
\twocolitem{\_\_WXGTK12\_\_}{GTK 1.2 or higher}
\twocolitem{\_\_WXGTK20\_\_}{GTK 2.0 or higher}
\twocolitem{\_\_WXMOTIF\_\_}{Motif}
\twocolitem{\_\_WXMAC\_\_}{Mac OS whether Classic (Mac OS 8/9 TARGET\_CARBON == 0) or Carbon (including Mac OS X TARGET\_CARBON == 1)}
\twocolitem{\_\_WXMGL\_\_}{SciTech Soft MGL (\_\_WXUNIVERSAL\_\_ will be also
defined)}
\twocolitem{\_\_WXMSW\_\_}{Any Windows}
\twocolitem{\_\_WXOS2\_\_}{Identical to \_\_WXPM\_\_}
\twocolitem{\_\_WXPM\_\_}{OS/2 native Presentation Manager}
\twocolitem{\_\_WXSTUBS\_\_}{Stubbed version ('template' wxWin implementation)}
\twocolitem{\_\_WXXT\_\_}{Xt; mutually exclusive with WX\_MOTIF, not
implemented in wxWindows 2.x}
\twocolitem{\_\_WXX11\_\_}{wxX11 (\_\_WXUNIVERSAL\_\_ will be also defined)}
\twocolitem{\_\_WXWINE\_\_}{WINE (i.e. Win32 on Unix)}
\twocolitem{\_\_WXUNIVERSAL\_\_}{wxUniversal port, always defined in addition
to one of the symbols above so this should be tested first.}
\twocolitem{\_\_X\_\_}{any X11-based GUI toolkit except GTK+}
\end{twocollist}
In fact, they should better all start with \_\_WX instead of \_\_ only. The
only GUIs implemented for 2.0 are \_\_WXGTK\_\_, \_\_WXMSW\_\_ and
\_\_WXMOTIF\_\_ yet. Any new ones, please start the define with \_\_WX.
\subsection{Operating systems}
\begin{twocollist}\itemsep=0pt
\twocolitem{\_\_APPLE\_\_}{any Mac OS version}
\twocolitem{\_\_AIX\_\_}{AIX}
\twocolitem{\_\_BSD\_\_}{Any *BSD system}
\twocolitem{\_\_CYGWIN\_\_}{Cygwin: Unix on Win32}
\twocolitem{\_\_DARWIN\_\_}{Mac OS X using the BSD Unix C library (as opposed to using the Metrowerks MSL C/C++ library)}
\twocolitem{\_\_DATA\_GENERAL\_\_}{DG-UX}
\twocolitem{\_\_DOS\_GENERAL\_\_}{DOS (used with wxMGL only)}
\twocolitem{\_\_FREEBSD\_\_}{FreeBSD}
\twocolitem{\_\_HPUX\_\_}{HP-UX (Unix)}
\twocolitem{\_\_LINUX\_\_}{Linux}
\twocolitem{\_\_MACH\_\_}{Mach-O Architecture (Mac OS X only builds)}
\twocolitem{\_\_OSF\_\_}{OSF/1}
\twocolitem{\_\_SGI\_\_}{IRIX}
\twocolitem{\_\_SOLARIS\_\_}{Solaris}
\twocolitem{\_\_SUN\_\_}{Any Sun}
\twocolitem{\_\_SUNOS\_\_}{Sun OS}
\twocolitem{\_\_SVR4\_\_}{SystemV R4}
\twocolitem{\_\_SYSV\_\_}{SystemV generic}
\twocolitem{\_\_ULTRIX\_\_}{Ultrix}
\twocolitem{\_\_UNIX\_\_}{any Unix}
\twocolitem{\_\_UNIX\_LIKE\_\_}{Unix, BeOS or VMS}
\twocolitem{\_\_VMS\_\_}{VMS}
\twocolitem{\_\_WINDOWS\_\_}{any Windows}
\end{twocollist}
\subsection{Hardware architectures}
Note that not all of these symbols are always defined, it depends on the
compiler used.
\begin{twocollist}\itemsep=0pt
\twocolitem{\_\_ALPHA\_\_}{DEC Alpha architecture}
\twocolitem{\_\_INTEL\_\_}{Intel i386 or compatible}
\twocolitem{\_\_POWERPC\_\_}{Motorola Power PC}
\end{twocollist}
\subsection{Compilers}
\begin{twocollist}\itemsep=0pt
\twocolitem{\_\_BORLANDC\_\_}{Borland C++. The value of the macro corresponds
to the compiler version: $500$ is $5.0$.}
\twocolitem{\_\_DJGPP\_\_}{DJGPP}
\twocolitem{\_\_GNUG\_\_}{Gnu C++ on any platform, see also
\helpref{wxCHECK\_GCC\_VERSION}{wxcheckgccversion}}
\twocolitem{\_\_GNUWIN32\_\_}{Gnu-Win32 compiler, see also
\helpref{wxCHECK\_W32API\_VERSION}{wxcheckw32apiversion}}
\twocolitem{\_\_MWERKS\_\_}{CodeWarrior MetroWerks compiler}
\twocolitem{\_\_SUNCC\_\_}{Sun CC}
\twocolitem{\_\_SYMANTECC\_\_}{Symantec C++}
\twocolitem{\_\_VISAGECPP\_\_}{IBM Visual Age (OS/2)}
\twocolitem{\_\_VISUALC\_\_}{Microsoft Visual C++. The value of this macro
corresponds to the compiler version: $1020$ for $4.2$ (the first supported
version), $1100$ for $5.0$, $1200$ for $6.0$ and so on}
\twocolitem{\_\_XLC\_\_}{AIX compiler}
\twocolitem{\_\_WATCOMC\_\_}{Watcom C++. The value of this macro corresponds to
the compiler version, $1100$ is $11.0$ and $1200$ is OpenWatcom.}
\end{twocollist}
\subsection{Miscellaneous}
\begin{twocollist}\itemsep=0pt
\twocolitem{\_\_WXDEBUG\_\_}{defined in debug mode, undefined in release mode}
\twocolitem{wxUSE\_XXX}{if defined as $1$, feature XXX is active
(the symbols of this form are always defined, use #if and not #ifdef to test
for them)}
\end{twocollist}

View File

@@ -1,58 +0,0 @@
\section{\class{wxCriticalSection}}\label{wxcriticalsection}
A critical section object is used for exactly the same purpose as
\helpref{mutexes}{wxmutex}. The only difference is that under Windows platform
critical sections are only visible inside one process, while mutexes may be
shared between processes, so using critical sections is slightly more
efficient. The terminology is also slightly different: mutex may be locked (or
acquired) and unlocked (or released) while critical section is entered and left
by the program.
Finally, you should try to use
\helpref{wxCriticalSectionLocker}{wxcriticalsectionlocker} class whenever
possible instead of directly using wxCriticalSection for the same reasons
\helpref{wxMutexLocker}{wxmutexlocker} is preferrable to
\helpref{wxMutex}{wxmutex} - please see wxMutex for an example.
\wxheading{Derived from}
None.
\wxheading{Include files}
<wx/thread.h>
\wxheading{See also}
\helpref{wxThread}{wxthread}, \helpref{wxCondition}{wxcondition},
\helpref{wxMutexLocker}{wxmutexlocker}, \helpref{wxCriticalSection}{wxcriticalsection}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCriticalSection::wxCriticalSection}\label{wxcriticalsectionctor}
\func{}{wxCriticalSection}{\void}
Default constructor initializes critical section object.
\membersection{wxCriticalSection::\destruct{wxCriticalSection}}\label{wxcriticalsectiondtor}
\func{}{\destruct{wxCriticalSection}}{\void}
Destructor frees the resources.
\membersection{wxCriticalSection::Enter}\label{wxcriticalsectionenter}
\func{void }{Enter}{\void}
Enter the critical section (same as locking a mutex). There is no error return
for this function. After entering the critical section protecting some global
data the thread running in critical section may safely use/modify it.
\membersection{wxCriticalSection::Leave}\label{wxcriticalsectionleave}
\func{void }{Leave}{\void}
Leave the critical section allowing other threads use the global data protected
by it. There is no error return for this function.

View File

@@ -1,63 +0,0 @@
\section{\class{wxCriticalSectionLocker}}\label{wxcriticalsectionlocker}
This is a small helper class to be used with \helpref{wxCriticalSection}{wxcriticalsection}
objects. A wxCriticalSectionLocker enters the critical section in the
constructor and leaves it in the destructor making it much more difficult to
forget to leave a critical section (which, in general, will lead to serious
and difficult to debug problems).
Example of using it:
\begin{verbatim}
void Set Foo()
{
// gs_critSect is some (global) critical section guarding access to the
// object "foo"
wxCriticalSectionLocker locker(gs_critSect);
if ( ... )
{
// do something
...
return;
}
// do something else
...
return;
}
\end{verbatim}
Without wxCriticalSectionLocker, you would need to remember to manually leave
the critical section before each {\tt return}.
\wxheading{Derived from}
None.
\wxheading{Include files}
<wx/thread.h>
\wxheading{See also}
\helpref{wxCriticalSection}{wxcriticalsection},
\helpref{wxMutexLocker}{wxmutexlocker}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCriticalSectionLocker::wxCriticalSectionLocker}\label{wxcriticalsectionlockerctor}
\func{}{wxCriticalSectionLocker}{\param{wxCriticalSection\& }{criticalsection}}
Constructs a wxCriticalSectionLocker object associated with given
{\it criticalsection} and enters it.
\membersection{wxCriticalSectionLocker::\destruct{wxCriticalSectionLocker}}\label{wxcriticalsectionlockerdtor}
\func{}{\destruct{wxCriticalSectionLocker}}{\void}
Destructor leaves the critical section.

View File

@@ -1,60 +0,0 @@
%
% automatically generated by HelpGen from
% ../include/wx/strconv.h at 25/Mar/00 10:20:56
%
\section{\class{wxCSConv}}\label{wxcsconv}
This class converts between any character sets and Unicode.
It has one predefined instance, {\bf wxConvLocal}, for the
default user character set.
\wxheading{Derived from}
\helpref{wxMBConv}{wxmbconv}
\wxheading{Include files}
<wx/strconv.h>
\wxheading{See also}
\helpref{wxMBConv}{wxmbconv},
\helpref{wxEncodingConverter}{wxencodingconverter},
\helpref{wxMBConv classes overview}{mbconvclasses}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCSConv::wxCSConv}\label{wxcsconvwxcsconv}
\func{}{wxCSConv}{\param{const wxChar* }{charset}}
Constructor. Specify the name of the character set you want to convert
from/to.
\membersection{wxCSConv::\destruct{wxCSConv}}\label{wxcsconvdtor}
\func{}{\destruct{wxCSConv}}{\void}
Destructor.
\membersection{wxCSConv::LoadNow}\label{wxcsconvloadnow}
\func{void}{LoadNow}{\void}
If the conversion tables needs to be loaded from disk, this method
will do so. Otherwise, they will be loaded when any of the conversion
methods are called.
\membersection{wxCSConv::MB2WC}\label{wxcsconvmb2wc}
\constfunc{size\_t}{MB2WC}{\param{wchar\_t* }{buf}, \param{const char* }{psz}, \param{size\_t }{n}}
Converts from the selected character set to Unicode. Returns the size of the destination buffer.
\membersection{wxCSConv::WC2MB}\label{wxcsconvwc2mb}
\constfunc{size\_t}{WC2MB}{\param{char* }{buf}, \param{const wchar\_t* }{psz}, \param{size\_t }{n}}
Converts from Unicode to the selected character set. Returns the size of the destination buffer.

View File

@@ -1,130 +0,0 @@
\section{\class{wxContextHelp}}\label{wxcontexthelp}
This class changes the cursor to a query and puts the application into a 'context-sensitive help mode'.
When the user left-clicks on a window within the specified window, a wxEVT\_HELP event is
sent to that control, and the application may respond to it by popping up some help.
For example:
\begin{verbatim}
wxContextHelp contextHelp(myWindow);
\end{verbatim}
There are a couple of ways to invoke this behaviour implicitly:
\begin{itemize}
\item Use the wxDIALOG\_EX\_CONTEXTHELP style for a dialog (Windows only). This will put a question mark
in the titlebar, and Windows will put the application into context-sensitive help mode automatically,
with further programming.
\item Create a \helpref{wxContextHelpButton}{wxcontexthelpbutton}, whose predefined behaviour is to create a context help object.
Normally you will write your application so that this button is only added to a dialog for non-Windows platforms
(use wxDIALOG\_EX\_CONTEXTHELP on Windows).
\end{itemize}
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/cshelp.h>
\wxheading{See also}
\helpref{wxHelpEvent}{wxhelpevent},
\helpref{wxHelpController}{wxhelpcontroller},
\helpref{wxContextHelpButton}{wxcontexthelpbutton}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxContextHelp::wxContextHelp}
\func{}{wxContextHelp}{\param{wxWindow*}{ window = NULL}, \param{bool}{ doNow = TRUE}}
Constructs a context help object, calling \helpref{BeginContextHelp}{wxcontexthelpbegincontexthelp} if\rtfsp
{\it doNow} is TRUE (the default).
If {\it window} is NULL, the top window is used.
\membersection{wxContextHelp::\destruct{wxContextHelp}}
\func{}{\destruct{wxContextHelp}}{\void}
Destroys the context help object.
\membersection{wxContextHelp::BeginContextHelp}\label{wxcontexthelpbegincontexthelp}
\func{bool}{BeginContextHelp}{\param{wxWindow*}{ window = NULL}}
Puts the application into context-sensitive help mode. {\it window} is the window
which will be used to catch events; if NULL, the top window will be used.
Returns TRUE if the application was successfully put into context-sensitive help mode.
This function only returns when the event loop has finished.
\membersection{wxContextHelp::EndContextHelp}\label{wxcontexthelpendcontexthelp}
\func{bool}{EndContextHelp}{\void}
Ends context-sensitive help mode. Not normally called by the application.
\section{\class{wxContextHelpButton}}\label{wxcontexthelpbutton}
Instances of this class may be used to add a question mark button that when pressed, puts the
application into context-help mode. It does this by creating a \helpref{wxContextHelp}{wxcontexthelp} object which itself
generates a wxEVT\_HELP event when the user clicks on a window.
On Windows, you may add a question-mark icon to a dialog by use of the wxDIALOG\_EX\_CONTEXTHELP extra style, but
on other platforms you will have to add a button explicitly, usually next to OK, Cancel or similar buttons.
\wxheading{Derived from}
\helpref{wxBitmapButton}{wxbitmapbutton}\\
\helpref{wxButton}{wxbutton}\\
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/cshelp.h>
\wxheading{See also}
\helpref{wxBitmapButton}{wxbitmapbutton}, \helpref{wxContextHelp}{wxcontexthelp}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxContextHelpButton::wxContextHelpButton}\label{wxcontexthelpbuttonconstr}
\func{}{wxContextHelpButton}{\void}
Default constructor.
\func{}{wxContextHelpButton}{
\param{wxWindow* }{parent},
\param{wxWindowID }{id = wxID\_CONTEXT\_HELP},
\param{const wxPoint\& }{pos = wxDefaultPosition},
\param{const wxSize\& }{size = wxDefaultSize},
\param{long }{style = wxBU\_AUTODRAW}}
Constructor, creating and showing a context help button.
\wxheading{Parameters}
\docparam{parent}{Parent window. Must not be NULL.}
\docparam{id}{Button identifier. Defaults to wxID\_CONTEXT\_HELP.}
\docparam{pos}{Button position.}
\docparam{size}{Button size. If the default size (-1, -1) is specified then the button is sized
appropriately for the question mark bitmap.}
\docparam{style}{Window style.}
\wxheading{Remarks}
Normally you need pass only the parent window to the constructor, and use the defaults for the remaining parameters.

View File

@@ -1,322 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: ctrlsub.tex
%% Purpose: wxControlWithItems documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 01.01.03
%% RCS-ID: $Id$
%% Copyright: (c) 2003 Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxControlWithItems}}\label{wxcontrolwithitems}
This class is an abstract base class for some wxWindows controls which contain
several items, such as \helpref{wxListBox}{wxlistbox} and
\helpref{wxCheckListBox}{wxchecklistbox} derived from it,
\helpref{wxChoice}{wxchoice} and \helpref{wxComboBox}{wxcombobox}.
It defines the methods for accessing the controls items and although each of
the derived classes implements them differently, they still all conform to the
same interface.
The items in a wxControlWithItems have (non empty) string labels and,
optionally, client data associated with them. Client data may be of two
different kinds: either simple untyped ({\tt void *}) pointers which are simply
stored by the control but not used in any way by it, or typed pointers
({\tt wxClientData *}) which are owned by the control meaning that the typed
client data (and only it) will be deleted when an item is
\helpref{deleted}{wxcontrolwithitemsdelete} or the entire control is
\helpref{cleared}{wxcontrolwithitemsclear} (which also happens when it is
destroyed). Finally note that in the same control all items must have client
data of the same type (typed or untyped), if any. This type is determined by
the first call to \helpref{Append}{wxcontrolwithitemsappend} (the version with
client data pointer) or \helpref{SetClientData}{wxcontrolwithitemssetclientdata}.
\wxheading{Derived from}
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/ctrlsub.h> but usually never included directly
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxControlWithItems::Append}\label{wxcontrolwithitemsappend}
\func{int}{Append}{\param{const wxString\& }{ item}}
Adds the item to the end of the list box.
\func{int}{Append}{\param{const wxString\& }{ item}, \param{void *}{clientData}}
\func{int}{Append}{\param{const wxString\& }{ item}, \param{wxClientData *}{clientData}}
Adds the item to the end of the list box, associating the given, typed or
untyped, client data pointer with the item.
\func{void}{Append}{\param{const wxArrayString\& }{strings}}
Appends several items at once to the control. Notice that calling this method
may be much faster than appending the items one by one if you need to add a lot
of items.
\wxheading{Parameters}
\docparam{item}{String to add.}
\docparam{clientData}{Client data to associate with the item.}
\wxheading{Return value}
When appending a single item, the return value is the index of the newly added
item which may be different from the last one if the control is sorted (e.g.
has {\tt wxLB\_SORT} or {\tt wxCB\_SORT} style).
\membersection{wxControlWithItems::Clear}\label{wxcontrolwithitemsclear}
\func{void}{Clear}{\void}
Removes all items from the control.
{\it Clear()} also deletes the client data of the existing items if it is owned
by the control.
\membersection{wxControlWithItems::Delete}\label{wxcontrolwithitemsdelete}
\func{void}{Delete}{\param{int}{ n}}
Deletes an item from the control. The client data associated with the item
will be also deleted if it is owned by the control.
Note that it is an error (signalled by an assert failure in debug builds) to
remove an item with the index negative or greater or equal than the number of
items in the control.
\wxheading{Parameters}
\docparam{n}{The zero-based item index.}
\wxheading{See also}
\helpref{Clear}{wxcontrolwithitemsclear}
\membersection{wxControlWithItems::FindString}\label{wxcontrolwithitemsfindstring}
\func{int}{FindString}{\param{const wxString\& }{string}}
Finds an item whose label matches the given string.
\wxheading{Parameters}
\docparam{string}{String to find.}
\wxheading{Return value}
The zero-based position of the item, or {\tt wxNOT\_FOUND} if the string was
not found.
\membersection{wxControlWithItems::GetClientData}\label{wxcontrolwithitemsgetclientdata}
\constfunc{void *}{GetClientData}{\param{int}{ n}}
Returns a pointer to the client data associated with the given item (if any).
It is an error to call this function for a control which doesn't have untyped
client data at all although it is ok to call it even if the given item doesn't
have any client data associated with it (but other items do).
\wxheading{Parameters}
\docparam{n}{The zero-based position of the item.}
\wxheading{Return value}
A pointer to the client data, or {\tt NULL} if not present.
\membersection{wxControlWithItems::GetClientObject}\label{wxcontrolwithitemsgetclientobject}
\constfunc{wxClientData *}{GetClientObject}{\param{int}{ n}}
Returns a pointer to the client data associated with the given item (if any).
It is an error to call this function for a control which doesn't have typed
client data at all although it is ok to call it even if the given item doesn't
have any client data associated with it (but other items do).
\wxheading{Parameters}
\docparam{n}{The zero-based position of the item.}
\wxheading{Return value}
A pointer to the client data, or {\tt NULL} if not present.
\membersection{wxControlWithItems::GetCount}\label{wxcontrolwithitemsgetcount}
\constfunc{int}{GetCount}{\void}
Returns the number of items in the control.
\wxheading{See also}
\helpref{IsEmpty}{wxcontrolwithitemsisempty}
\membersection{wxControlWithItems::GetSelection}\label{wxcontrolwithitemsgetselection}
\constfunc{int}{GetSelection}{\void}
Returns the index of the selected item or {\tt wxNOT\_FOUND} if no item is
selected.
\wxheading{Return value}
The position of the current selection.
\wxheading{Remarks}
This method can be used with single selection list boxes only, you should use
\helpref{wxListBox::GetSelections}{wxlistboxgetselections} for the list boxes
with {\tt wxLB\_MULTIPLE} style.
\wxheading{See also}
\helpref{SetSelection}{wxcontrolwithitemssetselection},\rtfsp
\helpref{GetStringSelection}{wxcontrolwithitemsgetstringselection}
\membersection{wxControlWithItems::GetString}\label{wxcontrolwithitemsgetstring}
\constfunc{wxString}{GetString}{\param{int}{ n}}
Returns the label of the item with the given index.
\wxheading{Parameters}
\docparam{n}{The zero-based index.}
\wxheading{Return value}
The label of the item or an empty string if the position was invalid.
\membersection{wxControlWithItems::GetStringSelection}\label{wxcontrolwithitemsgetstringselection}
\constfunc{wxString}{GetStringSelection}{\void}
Returns the label of the selected item or an empty string if no item is
selected.
\wxheading{See also}
\helpref{GetSelection}{wxcontrolwithitemsgetselection}
\membersection{wxControlWithItems::IsEmpty}\label{wxcontrolwithitemsisempty}
\constfunc{bool}{IsEmpty}{\void}
Returns {\tt TRUE} if the control is empty or {\tt FALSE} if it has some items.
\wxheading{See also}
\helpref{GetCount}{wxcontrolwithitemsgetcount}
\membersection{wxControlWithItems::Number}\label{wxcontrolwithitemsnumber}
\constfunc{int}{Number}{\void}
{\bf Obsolescence note:} This method is obsolete and was replaced with
\helpref{GetCount}{wxcontrolwithitemsgetcount}, please use the new method in
the new code. This method is only available if wxWindows was compiled with
{\tt WXWIN\_COMPATIBILITY\_2\_2} defined and will disappear completely in
future versions.
\membersection{wxControlWithItems::SetClientData}\label{wxcontrolwithitemssetclientdata}
\func{void}{SetClientData}{\param{int}{ n}, \param{void *}{data}}
Associates the given untyped client data pointer with the given item. Note that
it is an error to call this function if any typed client data pointers had been
associated with the control items before.
\wxheading{Parameters}
\docparam{n}{The zero-based item index.}
\docparam{data}{The client data to associate with the item.}
\membersection{wxControlWithItems::SetClientObject}\label{wxcontrolwithitemssetclientobject}
\func{void}{SetClientObject}{\param{int}{ n}, \param{wxClientData *}{data}}
Associates the given typed client data pointer with the given item: the
{\it data} object will be deleted when the item is deleted (either explicitly
by using \helpref{Deletes}{wxcontrolwithitemsdelete} or implicitly when the
control itself is destroyed).
Note that it is an error to call this function if any untyped client data
pointers had been associated with the control items before.
\wxheading{Parameters}
\docparam{n}{The zero-based item index.}
\docparam{data}{The client data to associate with the item.}
\membersection{wxControlWithItems::SetSelection}\label{wxcontrolwithitemssetselection}
\func{void}{SetSelection}{\param{int}{ n}}
Sets the choice by passing the desired string position. This does not cause
any command events to get emitted.
\wxheading{Parameters}
\docparam{n}{The string position to select, starting from zero.}
\wxheading{See also}
\helpref{SetString}{wxcontrolwithitemssetstring},\rtfsp
\helpref{SetStringSelection}{wxcontrolwithitemssetstringselection}
\membersection{wxControlWithItems::SetString}\label{wxcontrolwithitemssetstring}
\func{void}{SetString}{\param{int}{ n}, \param{const wxString\& }{ string}}
Sets the label for the given item.
\wxheading{Parameters}
\docparam{n}{The zero-based item index.}
\docparam{string}{The label to set.}
\membersection{wxControlWithItems::SetStringSelection}\label{wxcontrolwithitemssetstringselection}
\func{void}{SetStringSelection}{\param{const wxString\& }{ string}}
Selects the item with the specified string in the control. This doesn't cause
any command events being emitted.
\wxheading{Parameters}
\docparam{string}{The string to select.}
\wxheading{See also}
\helpref{SetSelection}{wxcontrolwithitemssetselection}

View File

@@ -20,22 +20,6 @@ global \helpref{::wxSetCursor}{wxsetcursor} is also available for MS Windows use
\helpref{wxGDIObject}{wxgdiobject}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/cursor.h>
\wxheading{Predefined objects}
Objects:
{\bf wxNullCursor}
Pointers:
{\bf wxSTANDARD\_CURSOR\\
wxHOURGLASS\_CURSOR\\
wxCROSS\_CURSOR}
\wxheading{See also}
\helpref{wxBitmap}{wxbitmap}, \helpref{wxIcon}{wxicon}, \helpref{wxWindow::SetCursor}{wxwindowsetcursor},\rtfsp
@@ -60,8 +44,6 @@ If either {\it hotSpotX} or {\it hotSpotY} is -1, the hotspot will be the centre
Constructs a cursor by passing a string resource name or filename.
On MacOS when specifying a string resource name, first the color cursors 'crsr' and then the black/white cursors 'CURS' in the resource chain are scanned through.
{\it hotSpotX} and {\it hotSpotY} are currently only used under Windows when loading from an
icon file, to specify the cursor hotspot relative to the top left of the image.
@@ -69,20 +51,14 @@ icon file, to specify the cursor hotspot relative to the top left of the image.
Constructs a cursor using a cursor identifier.
\func{}{wxCursor}{\param{const wxImage\&}{ image}}
Constructs a cursor from a wxImage. The cursor is monochrome, colors with the RGB elements all greater
than 127 will be foreground, colors less than this background. The mask (if any) will be used as transparent.
In MSW the foreground will be white and the background black. The cursor is resized to 32x32
In GTK, the two most frequent colors will be used for foreground and background. The cursor will be displayed
at the size of the image.
On MacOS the cursor is resized to 16x16 and currently only shown as black/white (mask respected).
\func{}{wxCursor}{\param{const wxCursor\&}{ cursor}}
Copy constructor. This uses reference counting so is a cheap operation.
\func{}{wxCursor}{\param{const wxCursor*}{ cursor}}
Copy constructor. This uses reference counting so is a cheap operation.
\wxheading{Parameters}
\docparam{bits}{An array of bits.}
@@ -98,7 +74,7 @@ Copy constructor. This uses reference counting so is a cheap operation.
\docparam{hotSpotY}{Hotspot y coordinate.}
\docparam{type}{Icon type to load. Under Motif, {\it type} defaults to {\bf wxBITMAP\_TYPE\_XBM}. Under Windows,
it defaults to {\bf wxBITMAP\_TYPE\_CUR\_RESOURCE}. Under MacOS, it defaults to {\bf wxBITMAP\_TYPE\_MACCURSOR\_RESOURCE}.
it defaults to {\bf wxBITMAP\_TYPE\_CUR\_RESOURCE}.
Under X, the permitted cursor types are:
@@ -112,10 +88,10 @@ Under Windows, the permitted types are:
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxBITMAP\_TYPE\_CUR}}{Load a cursor from a .cur cursor file (only if USE\_RESOURCE\_LOADING\_IN\_MSW
is enabled in setup.h).}
is enabled in wx\_setup.h).}
\twocolitem{\windowstyle{wxBITMAP\_TYPE\_CUR\_RESOURCE}}{Load a Windows resource (as specified in the .rc file).}
\twocolitem{\windowstyle{wxBITMAP\_TYPE\_ICO}}{Load a cursor from a .ico icon file (only if USE\_RESOURCE\_LOADING\_IN\_MSW
is enabled in setup.h). Specify {\it hotSpotX} and {\it hotSpotY}.}
is enabled in wx\_setup.h). Specify {\it hotSpotX} and {\it hotSpotY}.}
\end{twocollist}}
\docparam{cursorId}{A stock cursor identifier. May be one of:
@@ -123,9 +99,6 @@ is enabled in setup.h). Specify {\it hotSpotX} and {\it hotSpotY}.}
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf wxCURSOR\_ARROW}}{A standard arrow cursor.}
\twocolitem{{\bf wxCURSOR\_RIGHT\_ARROW}}{A standard arrow cursor
pointing to the right.}
\twocolitem{{\bf wxCURSOR\_BLANK}}{Transparent cursor.}
\twocolitem{{\bf wxCURSOR\_BULLSEYE}}{Bullseye cursor.}
\twocolitem{{\bf wxCURSOR\_CHAR}}{Rectangular character cursor.}
\twocolitem{{\bf wxCURSOR\_CROSS}}{A cross cursor.}
@@ -149,31 +122,12 @@ pointing to the right.}
\twocolitem{{\bf wxCURSOR\_SPRAYCAN}}{A spraycan cursor.}
\twocolitem{{\bf wxCURSOR\_WAIT}}{A wait cursor.}
\twocolitem{{\bf wxCURSOR\_WATCH}}{A watch cursor.}
\twocolitem{{\bf wxCURSOR\_ARROWWAIT}}{A cursor with both an arrow and
an hourglass, (windows.)}
\end{twocollist}\twocolwidtha{5cm}
Note that not all cursors are available on all platforms.}
\docparam{cursor}{Pointer or reference to a cursor to copy.}
\pythonnote{Constructors supported by wxPython are:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf wxCursor(name, flags, hotSpotX=0,
hotSpotY=0)}}{Constructs a cursor from a filename}
\twocolitem{{\bf wxStockCursor(id)}}{Constructs a stock cursor }
\end{twocollist}}
}
\perlnote{Constructors supported by wxPerl are:\par
\begin{itemize}
\item{Wx::Cursor->new( name, type, hotSpotX = 0, hotSpotY = 0 )}
\item{Wx::Cursor->new( id )}
\item{Wx::Cursor->new( image )}
\item{Wx::Cursor->newData( bits, width, height, hotSpotX = -1, hotSpotY = -1, maskBits = 0 )}
\end{itemize}
}
\membersection{wxCursor::\destruct{wxCursor}}
\func{}{\destruct{wxCursor}}{\void}
@@ -181,7 +135,7 @@ hotSpotY=0)}}{Constructs a cursor from a filename}
Destroys the cursor. A cursor can be reused for more
than one window, and does not get destroyed when the window is
destroyed. wxWindows destroys all cursors on application exit, although
it is best to clean them up explicitly.
it's best to clean them up explicitly.
\membersection{wxCursor::Ok}\label{wxcursorok}

View File

@@ -1,107 +0,0 @@
\section{\class{wxCustomDataObject}}\label{wxcustomdataobject}
wxCustomDataObject is a specialization of
\helpref{wxDataObjectSimple}{wxdataobjectsimple} for some
application-specific data in arbitrary (either custom or one of the standard
ones). The only restriction is that it is supposed that this data can be
copied bitwise (i.e. with {\tt memcpy()}), so it would be a bad idea to make
it contain a C++ object (though C struct is fine).
By default, wxCustomDataObject stores the data inside in a buffer. To put the
data into the buffer you may use either
\helpref{SetData}{wxcustomdataobjectsetdata} or
\helpref{TakeData}{wxcustomdataobjecttakedata} depending on whether you want
the object to make a copy of data or not.
If you already store the data in another place, it may be more convenient and
efficient to provide the data on-demand which is possible too if you override
the virtual functions mentioned below.
\wxheading{Virtual functions to override}
This class may be used as is, but if you don't want store the data inside the
object but provide it on demand instead, you should override
\helpref{GetSize}{wxcustomdataobjectgetsize},
\helpref{GetData}{wxcustomdataobjectgetdata} and
\helpref{SetData}{wxcustomdataobjectsetdata} (or may be only the first two or
only the last one if you only allow reading/writing the data)
\wxheading{Derived from}
\helpref{wxDataObjectSimple}{wxdataobjectsimple}\\
\helpref{wxDataObject}{wxdataobject}
\wxheading{Include files}
<wx/dataobj.h>
\wxheading{See also}
\helpref{wxDataObject}{wxdataobject}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCustomDataObject::wxCustomDataObject}\label{wxcustomdataobjectwxcustomdataobject}
\func{}{wxCustomDataObject}{\param{const wxDataFormat\& }{format = wxFormatInvalid}}
The constructor accepts a {\it format} argument which specifies the (single)
format supported by this object. If it isn't set here,
\helpref{SetFormat}{wxdataobjectsimplesetformat} should be used.
\membersection{wxCustomDataObject::\destruct{wxCustomDataObject}}\label{wxcustomdataobjectdtor}
\func{}{\destruct{wxCustomDataObject}}{\void}
The destructor will free the data hold by the object. Notice that although it
calls a virtual \helpref{Free()}{wxcustomdataobjectfree} function, the base
class version will always be called (C++ doesn't allow calling virtual
functions from constructors or destructors), so if you override {\tt Free()}, you
should override the destructor in your class as well (which would probably
just call the derived class' version of {\tt Free()}).
\membersection{wxCustomDataObject::Alloc}\label{wxcustomdataobjectalloc}
\func{virtual void *}{Alloc}{\param{size\_t }{size}}
This function is called to allocate {\it size} bytes of memory from SetData().
The default version just uses the operator new.
\membersection{wxCustomDataObject::Free}\label{wxcustomdataobjectfree}
\pythonnote{This method expects a string in wxPython. You can pass
nearly any object by pickling it first.}
\func{virtual void}{Free}{\void}
This function is called when the data is freed, you may override it to anything
you want (or may be nothing at all). The default version calls operator
delete$[]$ on the data.
\membersection{wxCustomDataObject::GetSize}\label{wxcustomdataobjectgetsize}
\constfunc{virtual size\_t}{GetSize}{\void}
Returns the data size in bytes.
\membersection{wxCustomDataObject::GetData}\label{wxcustomdataobjectgetdata}
\constfunc{virtual void *}{GetData}{\void}
Returns a pointer to the data.
\membersection{wxCustomDataObject::SetData}\label{wxcustomdataobjectsetdata}
\func{virtual void}{SetData}{
\param{size\_t }{size}, \param{const void }{*data}}
Set the data. The data object will make an internal copy.
\membersection{wxCustomDataObject::TakeData}\label{wxcustomdataobjecttakedata}
\func{virtual void}{TakeData}{
\param{size\_t }{size}, \param{const void }{*data}}
Like \helpref{SetData}{wxcustomdataobjectsetdata}, but doesn't copy the data -
instead the object takes ownership of the pointer.

View File

@@ -1,26 +1,15 @@
\section{\class{wxDatabase}}\label{wxdatabase}
Every database object represents an ODBC connection.
The connection may be closed and reopened.
Every database object represents an ODBC connection. The connection may be closed and reopened.
\wxheading{Derived from}
\wxheading{Derivation}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/odbc.h>
\wxheading{See also}
\overview{wxDatabase overview}{wxdatabaseoverview}, \helpref{wxRecordSet}{wxrecordset}
A much more robust and feature-rich set of ODBC classes is now
available and recommended for use in place of the wxDatabase class.
See details of these classes in:
\helpref{wxDb}{wxdb}, \helpref{wxDbTable}{wxdbtable}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDatabase::wxDatabase}
@@ -102,7 +91,7 @@ Returns the name of the database associated with the current connection.
\func{wxString}{GetDataSource}{\void}
Returns the name of the connected data source.
\membersection{wxDatabase::GetErrorClass}
\func{wxString}{GetErrorClass}{\void}
@@ -152,7 +141,7 @@ Returns the current ODBC database handle.
\func{HENV}{GetHENV}{\void}
Returns the ODBC environment handle.
\membersection{wxDatabase::GetInfo}
\func{bool}{GetInfo}{\param{long}{ infoType}, \param{long *}{buf}}
@@ -230,7 +219,7 @@ source. The parameters exclusive and readOnly are not used.
\func{void}{OnSetOptions}{\param{wxRecordSet *}{recordSet}}
Not implemented.
\membersection{wxDatabase::OnWaitForDataSource}
\func{void}{OnWaitForDataSource}{\param{bool}{ stillExecuting}}
@@ -248,13 +237,13 @@ Sends a rollback to the ODBC driver. Not implemented.
\func{void}{SetDataSource}{\param{const wxString\& }{s}}
Sets the name of the data source. Not implemented.
\membersection{wxDatabase::SetLoginTimeout}
\func{void}{SetLoginTimeout}{\param{long}{ seconds}}
Sets the time to wait for an user login. Not implemented.
\membersection{wxDatabase::SetPassword}
\func{void}{SetPassword}{\param{const wxString\& }{s}}
@@ -273,7 +262,7 @@ mode is supported, so this function has no effect.
\func{void}{SetQueryTimeout}{\param{long}{ seconds}}
Sets the time to wait for a response to a query. Not implemented.
\membersection{wxDatabase::SetUsername}
\func{void}{SetUsername}{\param{const wxString\& }{s}}

View File

@@ -1,122 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: dataform.tex
%% Purpose: wxDataFormat documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 03.11.99
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxDataFormat}}\label{wxdataformat}
A wxDataFormat is an encapsulation of a platform-specific format handle which
is used by the system for the clipboard and drag and drop operations. The
applications are usually only interested in, for example, pasting data from the
clipboard only if the data is in a format the program understands and a data
format is something which uniquely identifies this format.
On the system level, a data format is usually just a number ({\tt CLIPFORMAT}
under Windows or {\tt Atom} under X11, for example) and the standard formats
are, indeed, just numbers which can be implicitly converted to wxDataFormat.
The standard formats are:
\begin{twocollist}\itemsep=1cm
\twocolitem{wxDF\_INVALID}{An invalid format - used as default argument for
functions taking a wxDataFormat argument sometimes}
\twocolitem{wxDF\_TEXT}{Text format (wxString)}
\twocolitem{wxDF\_BITMAP}{A bitmap (wxBitmap)}
\twocolitem{wxDF\_METAFILE}{A metafile (wxMetafile, Windows only)}
\twocolitem{wxDF\_FILENAME}{A list of filenames}
\twocolitem{wxDF\_HTML}{An HTML string. This is only valid when passed to wxSetClipboardData
when compiled with Visual C++ in non-Unicode mode}
\end{twocollist}
As mentioned above, these standard formats may be passed to any function taking
wxDataFormat argument because wxDataFormat has an implicit conversion from
them (or, to be precise from the type {\tt wxDataFormat::NativeFormat} which is
the type used by the underlying platform for data formats).
Aside the standard formats, the application may also use custom formats which
are identified by their names (strings) and not numeric identifiers. Although
internally custom format must be created (or {\it registered}) first, you
shouldn't care about it because it is done automatically the first time the
wxDataFormat object corresponding to a given format name is created. The only
implication of this is that you should avoid having global wxDataFormat objects
with non-default constructor because their constructors are executed before the
program has time to perform all necessary initialisations and so an attempt to
do clipboard format registration at this time will usually lead to a crash!
\wxheading{Virtual functions to override}
None
\wxheading{Derived from}
None
\wxheading{See also}
\helpref{Clipboard and drag and drop overview}{wxdndoverview},
\helpref{DnD sample}{samplednd},
\helpref{wxDataObject}{wxdataobject}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDataFormat::wxDataFormat}\label{wxdataformatwxdataformatdef}
\func{}{wxDataFormat}{\param{NativeFormat}{ format = wxDF\_INVALID}}
Constructs a data format object for one of the standard data formats or an
empty data object (use \helpref{SetType}{wxdataformatsettype} or
\helpref{SetId}{wxdataformatsetid} later in this case)
\perlnote{In wxPerl this function is named {\tt newNative}.}
\membersection{wxDataFormat::wxDataFormat}\label{wxdataformatwxdataformat}
\func{}{wxDataFormat}{\param{const wxChar }{*format}}
Constructs a data format object for a custom format identified by its name
{\it format}.
\perlnote{In wxPerl this function is named {\tt newUser}.}
\membersection{wxDataFormat::operator $==$}\label{wxdataformatoperatoreq}
\constfunc{bool}{operator $==$}{\param{const wxDataFormat\&}{ format}}
Returns TRUE if the formats are equal.
\membersection{wxDataFormat::operator $!=$}\label{wxdataformatoperatorneq}
\constfunc{bool}{operator $!=$}{\param{const wxDataFormat\&}{ format}}
Returns TRUE if the formats are different.
\membersection{wxDataFormat::GetId}\label{wxdataformatgetid}
\constfunc{wxString}{GetId}{\void}
Returns the name of a custom format (this function will fail for a standard
format).
\membersection{wxDataFormat::GetType}\label{wxdataformatgettype}
\constfunc{NativeFormat}{GetType}{\void}
Returns the platform-specific number identifying the format.
\membersection{wxDataFormat::SetId}\label{wxdataformatsetid}
\func{void}{SetId}{\param{const wxChar }{*format}}
Sets the format to be the custom format identified by the given name.
\membersection{wxDataFormat::SetType}\label{wxdataformatsettype}
\func{void}{SetType}{\param{NativeFormat}{ format}}
Sets the format to the given value, which should be one of wxDF\_XXX constants.

View File

@@ -1,200 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: dataobj.tex
%% Purpose: wxDataObject documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 18.10.99
%% RCS-ID: $Id$
%% Copyright: (c) wxWindows team
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxDataObject}}\label{wxdataobject}
A wxDataObject represents data that can be copied to or from the clipboard, or
dragged and dropped. The important thing about wxDataObject is that this is a
'smart' piece of data unlike usual 'dumb' data containers such as memory
buffers or files. Being 'smart' here means that the data object itself should
know what data formats it supports and how to render itself in each of
supported formats.
A supported format, incidentally, is exactly the format in which the data can
be requested from a data object or from which the data object may be set. In
the general case, an object may support different formats on 'input' and
'output', i.e. it may be able to render itself in a given format but not be
created from data on this format or vice versa. wxDataObject defines an
enumeration type
\begin{verbatim}
enum Direction
{
Get = 0x01, // format is supported by GetDataHere()
Set = 0x02 // format is supported by SetData()
};
\end{verbatim}
which allows to distinguish between them. See
\helpref{wxDataFormat}{wxdataformat} documentation for more about formats.
Not surprisingly, being 'smart' comes at a price of added complexity. This is
reasonable for the situations when you really need to support multiple formats,
but may be annoying if you only want to do something simple like cut and paste
text.
To provide a solution for both cases, wxWindows has two predefined classes
which derive from wxDataObject: \helpref{wxDataObjectSimple}{wxdataobjectsimple} and
\helpref{wxDataObjectComposite}{wxdataobjectcomposite}.
\helpref{wxDataObjectSimple}{wxdataobjectsimple} is
the simplest wxDataObject possible and only holds data in a single format (such
as HTML or text) and \helpref{wxDataObjectComposite}{wxdataobjectcomposite} is
the simplest way to implement wxDataObject which does support multiple formats
because it achievs this by simply holding several wxDataObjectSimple objects.
So, you have several solutions when you need a wxDataObject class (and you need
one as soon as you want to transfer data via the clipboard or drag and drop):
\begin{twocollist}\itemsep=1cm
\twocolitem{{\bf 1. Use one of the built-in classes}}{You may use wxTextDataObject,
wxBitmapDataObject or wxFileDataObject in the simplest cases when you only need
to support one format and your data is either text, bitmap or list of files.}
\twocolitem{{\bf 2. Use wxDataObjectSimple}}{Deriving from wxDataObjectSimple is the simplest
solution for custom data - you will only support one format and so probably
won't be able to communicate with other programs, but data transfer will work
in your program (or between different copies of it).}
\twocolitem{{\bf 3. Use wxDataObjectComposite}}{This is a simple but powerful
solution which allows you to support any number of formats (either
standard or custom if you combine it with the previous solution).}
\twocolitem{{\bf 4. Use wxDataObject directly}}{This is the solution for
maximal flexibility and efficiency, but it is also is the most difficult to
implement.}
\end{twocollist}
Please note that the easiest way to use drag and drop and the clipboard with
multiple formats is by using wxDataObjectComposite, but it is not the most
efficient one as each wxDataObjectSimple would contain the whole data in its
respective formats. Now imagine that you want to paste 200 pages of text in
your proprietary format, as well as Word, RTF, HTML, Unicode and plain text to
the clipboard and even today's computers are in trouble. For this case, you
will have to derive from wxDataObject directly and make it enumerate its
formats and provide the data in the requested format on demand.
Note that neither the GTK data transfer mechanisms for the clipboard and
drag and drop, nor the OLE data transfer copy any data until another application
actually requests the data. This is in contrast to the 'feel' offered to the
user of a program who would normally think that the data resides in the
clipboard after having pressed 'Copy' - in reality it is only declared to be
available.
There are several predefined data object classes derived from
wxDataObjectSimple: \helpref{wxFileDataObject}{wxfiledataobject},
\helpref{wxTextDataObject}{wxtextdataobject} and
\helpref{wxBitmapDataObject}{wxbitmapdataobject} which can be used without
change.
You may also derive your own data object classes from
\helpref{wxCustomDataObject}{wxcustomdataobject} for user-defined types. The
format of user-defined data is given as mime-type string literal, such as
"application/word" or "image/png". These strings are used as they are under
Unix (so far only GTK) to identify a format and are translated into their
Windows equivalent under Win32 (using the OLE IDataObject for data exchange to
and from the clipboard and for drag and drop). Note that the format string
translation under Windows is not yet finished.
\pythonnote{At this time this class is not directly usable from wxPython.
Derive a class from \helpref{wxPyDataObjectSimple}{wxdataobjectsimple}
instead.}
\perlnote{This class is not currently usable from wxPerl; you may
use \helpref{Wx::PlDataObjectSimple}{wxdataobjectsimple} instead.}
\wxheading{Virtual functions to override}
Each class derived directly from wxDataObject must override and implement all
of its functions which are pure virtual in the base class.
The data objects which only render their data or only set it (i.e. work in
only one direction), should return 0 from
\helpref{GetFormatCount}{wxdataobjectgetformatcount}.
\wxheading{Derived from}
None
\wxheading{Include files}
<wx/dataobj.h>
\wxheading{See also}
\helpref{Clipboard and drag and drop overview}{wxdndoverview},
\helpref{DnD sample}{samplednd},
\helpref{wxFileDataObject}{wxfiledataobject},
\helpref{wxTextDataObject}{wxtextdataobject},
\helpref{wxBitmapDataObject}{wxbitmapdataobject},
\helpref{wxCustomDataObject}{wxcustomdataobject},
\helpref{wxDropTarget}{wxdroptarget},
\helpref{wxDropSource}{wxdropsource},
\helpref{wxTextDropTarget}{wxtextdroptarget},
\helpref{wxFileDropTarget}{wxfiledroptarget}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDataObject::wxDataObject}\label{wxdataobjectwxdataobject}
\func{}{wxDataObject}{\void}
Constructor.
\membersection{wxDataObject::\destruct{wxDataObject}}\label{wxdataobjectdtor}
\func{}{\destruct{wxDataObject}}{\void}
Destructor.
\membersection{wxDataObject::GetAllFormats}\label{wxdataobjectgetallformats}
\constfunc{virtual void}{GetAllFormats}{ \param{wxDataFormat *}{formats}, \param{Direction}{ dir = Get}}
Copy all supported formats in the given direction to the array pointed to by
{\it formats}. There is enough space for GetFormatCount(dir) formats in it.
\perlnote{In wxPerl this method only takes the {\tt dir} parameter.
In scalar context it returns the first format,
in list context it returns a list containing all the supported formats.}
\membersection{wxDataObject::GetDataHere}\label{wxdataobjectgetdatahere}
\constfunc{virtual bool}{GetDataHere}{\param{const wxDataFormat\&}{ format}, \param{void }{*buf} }
The method will write the data of the format {\it format} in the buffer {\it
buf} and return TRUE on success, FALSE on failure.
\membersection{wxDataObject::GetDataSize}\label{wxdataobjectgetdatasize}
\constfunc{virtual size\_t}{GetDataSize}{\param{const wxDataFormat\&}{ format} }
Returns the data size of the given format {\it format}.
\membersection{wxDataObject::GetFormatCount}\label{wxdataobjectgetformatcount}
\constfunc{virtual size\_t}{GetFormatCount}{\param{Direction}{ dir = Get}}
Returns the number of available formats for rendering or setting the data.
\membersection{wxDataObject::GetPreferredFormat}\label{wxdataobjectgetpreferredformat}
\constfunc{virtual wxDataFormat}{GetPreferredFormat}{\param{Direction}{ dir = Get}}
Returns the preferred format for either rendering the data (if {\it dir} is {\tt Get},
its default value) or for setting it. Usually this will be the
native format of the wxDataObject.
\membersection{wxDataObject::SetData}\label{wxdataobjectsetdata}
\func{virtual bool}{SetData}{ \param{const wxDataFormat\&}{ format}, \param{size\_t}{ len}, \param{const void }{*buf} }
Set the data in the format {\it format} of the length {\it len} provided in the
buffer {\it buf}.
Returns TRUE on success, FALSE on failure.

View File

@@ -2,18 +2,10 @@
A class for manipulating dates.
{\bf NOTE:} this class is retained only for compatibility,
and has been replaced by \helpref{wxDateTime}{wxdatetime}. wxDate
may be withdrawn in future versions of wxWindows.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/date.h>
\wxheading{See also}
\helpref{wxTime}{wxtime}

View File

@@ -1,323 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: datespan.tex
%% Purpose: wxDateSpan documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 04.04.00
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxDateSpan}}\label{wxdatespan}
This class is a "logical time span" and is useful for implementing program
logic for such things as "add one month to the date" which, in general,
doesn't mean to add $60*60*24*31$ seconds to it, but to take the same date
the next month (to understand that this is indeed different consider adding
one month to Feb, 15 -- we want to get Mar, 15, of course).
When adding a month to the date, all lesser components (days, hours, ...)
won't be changed unless the resulting date would be invalid: for example,
Jan 31 + 1 month will be Feb 28, not (non existing) Feb 31.
Because of this feature, adding and subtracting back again the same
wxDateSpan will {\bf not}, in general give back the original date: Feb 28 - 1
month will be Jan 28, not Jan 31!
wxDateSpan objects can be either positive or negative. They may be
multiplied by scalars which multiply all deltas by the scalar: i.e.
$2*(1 \hbox{ month and } 1 \hbox{ day})$ is $2$ months and $2$ days. They can
be added together and with \helpref{wxDateTime}{wxdatetime} or
\helpref{wxTimeSpan}{wxtimespan}, but the type of result is different for each
case.
Beware about weeks: if you specify both weeks and days, the total number of
days added will be $7*\hbox{weeks} + \hbox{days}$! See also GetTotalDays()
function.
Equality operators are defined for wxDateSpans. Two datespans are equal if
and only if they both give the same target date when added to {\bf every}
source date. Thus wxDateSpan::Months(1) is not equal to wxDateSpan::Days(30),
because they not give the same date when added to 1 Feb. But
wxDateSpan::Days(14) is equal to wxDateSpan::Weeks(2)
Finally, notice that for adding hours, minutes and so on you don't need this
class at all: \helpref{wxTimeSpan}{wxtimespan} will do the job because there
are no subtleties associated with those (we don't support leap seconds).
\wxheading{Derived from}
No base class
\wxheading{Include files}
<wx/datetime.h>
\wxheading{See also}
\helpref{Date classes overview}{wxdatetimeoverview},\rtfsp
\helpref{wxDateTime}{wxdatetime}
\latexignore{\rtfignore{\wxheading{Members}}}
% wxDateSpan ctor
\membersection{wxDateSpan::wxDateSpan}\label{wxdatespanwxdatespan}
\func{}{wxDateSpan}{\param{int }{years = $0$}, \param{int }{months = $0$}, \param{int }{weeks = $0$}, \param{int }{days = $0$}}
Constructs the date span object for the given number of years, months, weeks
and days. Note that the weeks and days add together if both are given.
% wxDateSpan::Add
\membersection{wxDateSpan::Add}{wxdatespanadd}
\constfunc{wxDateSpan}{Add}{\param{const wxDateSpan\& }{other}}
\func{wxDateSpan\&}{Add}{\param{const wxDateSpan\& }{other}}
\func{wxDateSpan\&}{operator$+=$}{\param{const wxDateSpan\& }{other}}
Returns the sum of two date spans. The first version returns a new object, the
second and third ones modify this object in place.
% wxDateSpan::Day
\membersection{wxDateSpan::Day}{wxdatespanday}
\func{static wxDateSpan}{Day}{\void}
Returns a date span object corresponding to one day.
\wxheading{See also}
\helpref{Days}{wxdatespandays}
% wxDateSpan::Days
\membersection{wxDateSpan::Days}{wxdatespandays}
\func{static wxDateSpan}{Days}{\param{int }{days}}
Returns a date span object corresponding to the given number of days.
\wxheading{See also}
\helpref{Day}{wxdatespanday}
% wxDateSpan::GetDays
\membersection{wxDateSpan::GetDays}{wxdatespangetdays}
\constfunc{int}{GetDays}{\void}
Returns the number of days (only, that it not counting the weeks component!)
in this date span.
\wxheading{See also}
\helpref{GetTotalDays}{wxdatespangettotaldays}
% wxDateSpan::GetMonths
\membersection{wxDateSpan::GetMonths}{wxdatespangetmonths}
\constfunc{int}{GetMonths}{\void}
Returns the number of the months (not counting the years) in this date span.
% wxDateSpan::GetTotalDays
\membersection{wxDateSpan::GetTotalDays}{wxdatespangettotaldays}
\constfunc{int}{GetTotalDays}{\void}
Returns the combined number of days in this date span, counting both weeks and
days. It still doesn't take neither months nor years into the account.
\wxheading{See also}
\helpref{GetWeeks}{wxdatespangetweeks}, \helpref{GetDays}{wxdatespangetdays}
% wxDateSpan::GetWeeks
\membersection{wxDateSpan::GetWeeks}{wxdatespangetweeks}
\constfunc{int}{GetWeeks}{\void}
Returns the number of weeks in this date span.
\wxheading{See also}
\helpref{GetTotalDays}{wxdatespangettotaldays}
% wxDateSpan::GetYears
\membersection{wxDateSpan::GetYears}{wxdatespangetyears}
\constfunc{int}{GetYears}{\void}
Returns the number of years in this date span.
% wxDateSpan::Month
\membersection{wxDateSpan::Month}{wxdatespanmonth}
\func{static wxDateSpan}{Month}{\void}
Returns a date span object corresponding to one month.
\wxheading{See also}
\helpref{Months}{wxdatespanmonths}
% wxDateSpan::Months
\membersection{wxDateSpan::Months}{wxdatespanmonths}
\func{static wxDateSpan}{Months}{\param{int }{mon}}
Returns a date span object corresponding to the given number of months.
\wxheading{See also}
\helpref{Month}{wxdatespanmonth}
% wxDateSpan::Multiply
\membersection{wxDateSpan::Multiply}{wxdatespanmultiply}
\constfunc{wxDateSpan}{Multiply}{\param{int }{factor}}
\func{wxDateSpan\&}{Multiply}{\param{int }{factor}}
\func{wxDateSpan\&}{operator$*=$}{\param{int }{factor}}
Returns the product of the date span by the specified {\it factor}. The
product is computed by multiplying each of the components by the factor.
The first version returns a new object, the second and third ones modify this
object in place.
% wxDateSpan::Negate
\membersection{wxDateSpan::Negate}{wxdatespannegate}
\constfunc{wxDateSpan}{Negate}{\void}
Returns the date span with the opposite sign.
\wxheading{See also}
\helpref{Neg}{wxdatespanneg}
% wxDateSpan::Neg
\membersection{wxDateSpan::Neg}{wxdatespanneg}
\func{wxDateSpan\&}{Neg}{\void}
\func{wxDateSpan\&}{operator$-$}{\void}
Changes the sign of this date span.
\wxheading{See also}
\helpref{Negate}{wxdatespannegate}
% wxDateSpan::SetDays
\membersection{wxDateSpan::SetDays}{wxdatespansetdays}
\func{wxDateSpan\&}{SetDays}{\param{int }{n}}
Sets the number of days (without modifying any other components) in this date
span.
% wxDateSpan::SetYears
\membersection{wxDateSpan::SetYears}{wxdatespansetyears}
\func{wxDateSpan\&}{SetYears}{\param{int }{n}}
Sets the number of years (without modifying any other components) in this date
span.
% wxDateSpan::SetMonths
\membersection{wxDateSpan::SetMonths}{wxdatespansetmonths}
\func{wxDateSpan\&}{SetMonths}{\param{int }{n}}
Sets the number of months (without modifying any other components) in this
date span.
% wxDateSpan::SetWeeks
\membersection{wxDateSpan::SetWeeks}{wxdatespansetweeks}
\func{wxDateSpan\&}{SetWeeks}{\param{int }{n}}
Sets the number of weeks (without modifying any other components) in this date
span.
% wxDateSpan::Subtract
\membersection{wxDateSpan::Subtract}{wxdatespansubtract}
\constfunc{wxDateSpan}{Subtract}{\param{const wxDateSpan\& }{other}}
\func{wxDateSpan\&}{Subtract}{\param{const wxDateSpan\& }{other}}
\func{wxDateSpan\&}{operator$+=$}{\param{const wxDateSpan\& }{other}}
Returns the difference of two date spans. The first version returns a new
object, the second and third ones modify this object in place.
% wxDateSpan::Week
\membersection{wxDateSpan::Week}{wxdatespanweek}
\func{static wxDateSpan}{Week}{\void}
Returns a date span object corresponding to one week.
\wxheading{See also}
\helpref{Weeks}{wxdatespanweeks}
% wxDateSpan::Weeks
\membersection{wxDateSpan::Weeks}{wxdatespanweeks}
\func{static wxDateSpan}{Weeks}{\param{int }{weeks}}
Returns a date span object corresponding to the given number of weeks.
\wxheading{See also}
\helpref{Week}{wxdatespanweek}
% wxDateSpan::Year
\membersection{wxDateSpan::Year}{wxdatespanyear}
\func{static wxDateSpan}{Year}{\void}
Returns a date span object corresponding to one year.
\wxheading{See also}
\helpref{Years}{wxdatespanyears}
% wxDateSpan::Years
\membersection{wxDateSpan::Years}{wxdatespanyears}
\func{static wxDateSpan}{Years}{\param{int }{years}}
Returns a date span object corresponding to the given number of years.
\wxheading{See also}
\helpref{Year}{wxdatespanyear}
% wxDateSpan::operator==
\membersection{wxDateSpan::operator$==$}{wxdatespanoperatorequal}
\constfunc{bool}{operator$==$}{\param{wxDateSpan\&}{ other}}
Returns {\tt TRUE} if this date span is equal to the other one. Two date spans
are considered equal if and only if they have the same number of years and
months and the same total number of days (counting both days and weeks).
% wxDateSpan::operator!=
\membersection{wxDateSpan::operator$!=$}{wxdatespanoperatornotequal}
\constfunc{bool}{operator$!=$}{\param{wxDateSpan\&}{ other}}
Returns {\tt TRUE} if this date span is different from the other one.
\wxheading{See also}
\helpref{operator==}{wxdatespanoperatorequal}

File diff suppressed because it is too large Load Diff

View File

@@ -1,119 +0,0 @@
\section{\class{wxDataInputStream}}\label{wxdatainputstream}
This class provides functions that read binary data types in a
portable way. Data can be read in either big-endian or little-endian
format, little-endian being the default on all architectures.
If you want to read data from text files (or streams) use
\helpref{wxTextInputStream}{wxtextinputstream} instead.
The >> operator is overloaded and you can use this class like a standard C++ iostream.
Note, however, that the arguments are the fixed size types wxUint32, wxInt32 etc
and on a typical 32-bit computer, none of these match to the "long" type (wxInt32
is defined as signed int on 32-bit architectures) so that you cannot use long. To avoid
problems (here and elsewhere), make use of the wxInt32, wxUint32, etc types.
For example:
\begin{verbatim}
wxFileInputStream input( "mytext.dat" );
wxDataInputStream store( input );
wxUint8 i1;
float f2;
wxString line;
store >> i1; // read a 8 bit integer.
store >> i1 >> f2; // read a 8 bit integer followed by float.
store >> line; // read a text line
\end{verbatim}
See also \helpref{wxDataOutputStream}{wxdataoutputstream}.
\wxheading{Derived from}
None
\wxheading{Include files}
<wx/datstrm.h>
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDataInputStream::wxDataInputStream}\label{wxdatainputstreamconstr}
\func{}{wxDataInputStream}{\param{wxInputStream\&}{ stream}}
\func{}{wxDataInputStream}{\param{wxInputStream\&}{ stream}, \param{wxMBConv\&}{ conv = wxMBConvUTF8}}
Constructs a datastream object from an input stream. Only read methods will
be available. The second form is only available in Unicode build of wxWindows.
\wxheading{Parameters}
\docparam{stream}{The input stream.}
\docparam{conv}{Charset conversion object object used to decode strings in Unicode
mode (see \helpref{wxDataInputStream::ReadString}{wxdatainputstreamreadstring}
documentation for detailed description). Note that you must not destroy
{\it conv} before you destroy this wxDataInputStream instance!}
\membersection{wxDataInputStream::\destruct{wxDataInputStream}}
\func{}{\destruct{wxDataInputStream}}{\void}
Destroys the wxDataInputStream object.
\membersection{wxDataInputStream::BigEndianOrdered}
\func{void}{BigEndianOrdered}{\param{bool}{ be\_order}}
If {\it be\_order} is TRUE, all data will be read in big-endian
order, such as written by programs on a big endian architecture
(e.g. Sparc) or written by Java-Streams (which always use
big-endian order).
\membersection{wxDataInputStream::Read8}
\func{wxUint8}{Read8}{\void}
Reads a single byte from the stream.
\membersection{wxDataInputStream::Read16}
\func{wxUint16}{Read16}{\void}
Reads a 16 bit unsigned integer from the stream.
\membersection{wxDataInputStream::Read32}
\func{wxUint32}{Read32}{\void}
Reads a 32 bit unsigned integer from the stream.
\membersection{wxDataInputStream::Read64}
\func{wxUint64}{Read64}{\void}
Reads a 64 bit unsigned integer from the stream.
\membersection{wxDataInputStream::ReadDouble}
\func{double}{ReadDouble}{\void}
Reads a double (IEEE encoded) from the stream.
\membersection{wxDataInputStream::ReadString}\label{wxdatainputstreamreadstring}
\func{wxString}{ReadString}{\void}
Reads a string from a stream. Actually, this function first reads a long
integer specifying the length of the string (without the last null character)
and then reads the string.
In Unicode build of wxWindows, the fuction first reads multibyte (char*)
string from the stream and then converts it to Unicode using the {\it conv}
object passed to constructor and returns the result as wxString. You are
responsible for using the same convertor as when writing the stream.
See also \helpref{wxDataOutputStream::WriteString}{wxdataoutputstreamwritestring}.

View File

@@ -1,100 +0,0 @@
\section{\class{wxDataOutputStream}}\label{wxdataoutputstream}
This class provides functions that write binary data types in a
portable way. Data can be written in either big-endian or little-endian
format, little-endian being the default on all architectures.
If you want to write data to text files (or streams) use
\helpref{wxTextOutputStream}{wxtextoutputstream} instead.
The << operator is overloaded and you can use this class like a standard
C++ iostream. See \helpref{wxDataInputStream}{wxdatainputstream} for its
usage and caveats.
See also \helpref{wxDataInputStream}{wxdatainputstream}.
\wxheading{Derived from}
None
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDataOutputStream::wxDataOutputStream}\label{wxdataoutputstreamconstr}
\func{}{wxDataOutputStream}{\param{wxOutputStream\&}{ stream}}
\func{}{wxDataOutputStream}{\param{wxOutputStream\&}{ stream}, \param{wxMBConv\&}{ conv = wxMBConvUTF8}}
Constructs a datastream object from an output stream. Only write methods will
be available. The second form is only available in Unicode build of wxWindows.
\wxheading{Parameters}
\docparam{stream}{The output stream.}
\docparam{conv}{Charset conversion object object used to encoding Unicode
strings before writing them to the stream
in Unicode mode (see \helpref{wxDataOutputStream::WriteString}{wxdataoutputstreamwritestring}
documentation for detailed description). Note that you must not destroy
{\it conv} before you destroy this wxDataOutputStream instance! It is
recommended to use default value (UTF-8).}
\membersection{wxDataOutputStream::\destruct{wxDataOutputStream}}
\func{}{\destruct{wxDataOutputStream}}{\void}
Destroys the wxDataOutputStream object.
\membersection{wxDataOutputStream::BigEndianOrdered}
\func{void}{BigEndianOrdered}{\param{bool}{ be\_order}}
If {\it be\_order} is TRUE, all data will be written in big-endian
order, e.g. for reading on a Sparc or from Java-Streams (which
always use big-endian order), otherwise data will be written in
little-endian order.
\membersection{wxDataOutputStream::Write8}
\func{void}{Write8}{{\param wxUint8 }{i8}}
Writes the single byte {\it i8} to the stream.
\membersection{wxDataOutputStream::Write16}
\func{void}{Write16}{{\param wxUint16 }{i16}}
Writes the 16 bit unsigned integer {\it i16} to the stream.
\membersection{wxDataOutputStream::Write32}
\func{void}{Write32}{{\param wxUint32 }{i32}}
Writes the 32 bit unsigned integer {\it i32} to the stream.
\membersection{wxDataOutputStream::Write64}
\func{void}{Write64}{{\param wxUint64 }{i64}}
Writes the 64 bit unsigned integer {\it i64} to the stream.
\membersection{wxDataOutputStream::WriteDouble}
\func{void}{WriteDouble}{{\param double }{f}}
Writes the double {\it f} to the stream using the IEEE format.
\membersection{wxDataOutputStream::WriteString}\label{wxdataoutputstreamwritestring}
\func{void}{WriteString}{{\param const wxString\&}{string}}
Writes {\it string} to the stream. Actually, this method writes the size of
the string before writing {\it string} itself.
In ANSI build of wxWindows, the string is written to the stream in exactly
same way it is represented in memory. In Unicode build, however, the string
is first converted to multibyte representation with {\it conv} object passed
to stream's constructor (consequently, ANSI application can read data
written by Unicode application, as long as they agree on encoding) and this
representation is written to the stream. UTF-8 is used by default.

109
docs/latex/wx/datstrm.tex Normal file
View File

@@ -0,0 +1,109 @@
\section{\class{wxDataStream}}\label{wxdatastream}
This class provides functions that read and write integers or double in a
portable way. So, a file written by an Intel processor can be read by a
Sparc or anything else.
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDataStream::wxDataStream}\label{wxwaveconstr}
\func{}{wxDataStream}{\param{istream\&}{ stream}}
Constructs a datastream object from a C++ input stream. Only read methods will
be available.
\wxheading{Parameters}
\docparam{stream}{The C++ input stream.}
\func{}{wxDataStream}{\param{istream\&}{ stream}}
Constructs a datastream object from a C++ input stream. Only read methods will
be available.
\wxheading{Parameters}
\docparam{stream}{The C++ input stream.}
\membersection{wxDataStream::\destruct{wxDataStream}}
\func{}{\destruct{wxDataStream}}{\void}
Destroys the wxDataStream object.
\membersection{wxDataStream::Read8}
\func{unsigned char}{Read8}{\void}
Reads a single byte from the stream.
\membersection{wxDataStream::Read16}
\func{unsigned short}{Read16}{\void}
Reads a 16 bit integer from the stream.
\membersection{wxDataStream::Read32}
\func{unsigned long}{Read32}{\void}
Reads a 32 bit integer from the stream.
\membersection{wxDataStream::ReadDouble}
\func{double}{ReadDouble}{\void}
Reads a double (IEEE encoded) from the stream.
\membersection{wxDataStream::ReadString}
\func{wxString}{wxDataStream::ReadString}{\void}
Reads a string from a stream. Actually, this function first reads a byte
specifying the length of the string (without the last null character) and then
reads the string.
\membersection{wxDataStream::ReadLine}
\func{wxString}{wxDataStream::ReadLine}{\void}
Reads a line from the stream. A line is a string which ends with \\n or \\r\\n.
\membersection{wxDataStream::Write8}
\func{void}{wxDataStream::Write8}{{\param unsigned char }{i8}}
Writes the single byte {\it i8} to the stream.
\membersection{wxDataStream::Write16}
\func{void}{wxDataStream::Write16}{{\param unsigned short }{i16}}
Writes the 16 bit integer {\it i16} to the stream.
\membersection{wxDataStream::Write32}
\func{void}{wxDataStream::Write32}{{\param unsigned long }{i32}}
Writes the 32 bit integer {\it i32} to the stream.
\membersection{wxDataStream::WriteDouble}
\func{void}{wxDataStream::WriteDouble}{{\param double }{f}}
Writes the double {\it f} to the stream using the IEEE format.
\membersection{wxDataStream::WriteString}
\func{void}{wxDataStream::WriteString}{{\param const wxString& }{string}}
Writes {\it string} to the stream. Actually, this method writes the size of
the string before writing {\it string} itself.
\membersection{wxDataStream::WriteLine}
\func{void}{wxDataStream::WriteLine}{{\param const wxString& }{string}}
Writes {\it string} as a line. Depending on the operating system, it adds
\\n or \\r\\n.

File diff suppressed because it is too large Load Diff

View File

@@ -9,21 +9,10 @@ if the device context is used as a parameter.
Derived types of wxDC have documentation for specific features
only, so refer to this section for most device context information.
% VZ: we should really document them instead of this lame excuse, but I don't
% have time for it now, when it is done please remove this
Please note that in addition to the versions of the methods documented here,
there are also versions which accept single {\tt wxPoint} parameter instead of
two {\tt wxCoord} ones or {\tt wxPoint} and {\tt wxSize} instead of four of
them.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/dc.h>
\wxheading{See also}
\helpref{Overview}{dcoverview}
@@ -59,13 +48,13 @@ released for each drawing operation.
\membersection{wxDC::Blit}\label{wxdcblit}
\func{bool}{Blit}{\param{wxCoord}{ xdest}, \param{wxCoord}{ ydest}, \param{wxCoord}{ width}, \param{wxCoord}{ height},
\param{wxDC* }{source}, \param{wxCoord}{ xsrc}, \param{wxCoord}{ ysrc}, \param{int}{ logicalFunc = wxCOPY},
\param{bool }{useMask = FALSE}, \param{wxCoord}{ xsrcMask = -1}, \param{wxCoord}{ ysrcMask = -1}}
\func{bool}{Blit}{\param{long}{ xdest}, \param{long}{ ydest}, \param{long}{ width}, \param{long}{ height},
\param{wxDC* }{source}, \param{long}{ xsrc}, \param{long}{ ysrc}, \param{int}{ logicalFunc},
\param{bool }{useMask}}
Copy from a source DC to this DC, specifying the destination
coordinates, size of area to copy, source DC, source coordinates,
logical function, whether to use a bitmap mask, and mask source position.
coordinates, size of area to copy, source DC, source coordinates, and
logical function.
\wxheading{Parameters}
@@ -86,7 +75,7 @@ logical function, whether to use a bitmap mask, and mask source position.
\docparam{logicalFunc}{Logical function to use: see \helpref{wxDC::SetLogicalFunction}{wxdcsetlogicalfunction}.}
\docparam{useMask}{If TRUE, Blit does a transparent blit using the mask that is associated with the bitmap
selected into the source device context. The Windows implementation does the following if MaskBlt cannot be used:
selected into the source device context. The Windows implementation does the following:
\begin{enumerate}
\item Creates a temporary bitmap and copies the destination area into it.
@@ -103,90 +92,27 @@ and the background colour set to WHITE.
This sequence of operations ensures that the source's transparent area need not be black,
and logical functions are supported.
{\bf Note:} on Windows, blitting with masks can be speeded up considerably by compiling
wxWindows with the wxUSE\_DC\_CACHE option enabled. You can also influence whether MaskBlt
or the explicit mask blitting code above is used, by using \helpref{wxSystemOptions}{wxsystemoptions} and
setting the {\bf no-maskblt} option to 1.
}
\docparam{xsrcMask}{Source x position on the mask. If both xsrcMask and ysrcMask are -1, xsrc and ysrc
will be assumed for the mask source position. Currently only implemented on Windows.}
\docparam{ysrcMask}{Source y position on the mask. If both xsrcMask and ysrcMask are -1, xsrc and ysrc
will be assumed for the mask source position. Currently only implemented on Windows.}
\wxheading{Remarks}
There is partial support for Blit in wxPostScriptDC, under X.
See \helpref{wxMemoryDC}{wxmemorydc} for typical usage.
\wxheading{See also}
wxheading{See also}
\helpref{wxMemoryDC}{wxmemorydc}, \helpref{wxBitmap}{wxbitmap}, \helpref{wxMask}{wxmask}
\begin{comment}
\membersection{wxDC::CacheEnabled}\label{wxdccacheenabled}
\func{static bool}{CacheEnabled}{\void}
On supported platforms (currently only Windows), returns TRUE
if the DC cache is enabled. The DC cache
can speed up the \helpref{Blit}{wxdcblit} operation when
drawing a large number of masked bitmaps.
If using the cache functions in your code, please test for the
wxUSE\_DC\_CACHEING preprocessor symbol for portability.
\wxheading{See also}
\helpref{wxDC::EnableCache}{wxdcenablecache}, \helpref{wxDC::ClearCache}
\end{comment}
\membersection{wxDC::CalcBoundingBox}\label{wxdccalcboundingbox}
\func{void}{CalcBoundingBox}{\param{wxCoord }{x}, \param{wxCoord }{y}}
Adds the specified point to the bounding box which can be retrieved with
\helpref{MinX}{wxdcminx}, \helpref{MaxX}{wxdcmaxx} and
\helpref{MinY}{wxdcminy}, \helpref{MaxY}{wxdcmaxy} functions.
\wxheading{See also}
\helpref{ResetBoundingBox}{wxdcresetboundingbox}
\membersection{wxDC::Clear}\label{wxdcclear}
\func{void}{Clear}{\void}
Clears the device context using the current background brush.
\begin{comment}
\membersection{wxDC::ClearCache}\label{wxdcclearcache}
\func{static void}{ClearCache}{\void}
On supported platforms (currently only Windows), clears
the contents of the DC cache (one bitmap and two Windows device contexts). The DC cache
can speed up the \helpref{Blit}{wxdcblit} operation when
drawing a large number of masked bitmaps. You should
call ClearCache at the end of length DC operations if you wish to only use
the cache transiently; you should also call it as your application exits.
If using the cache functions in your code, please test for the
wxUSE\_DC\_CACHEING preprocessor symbol for portability.
\wxheading{See also}
\helpref{wxDC::EnableCache}{wxdcenablecache}, \helpref{wxDC::CacheEnabled}
\end{comment}
\membersection{wxDC::CrossHair}\label{wxdccrosshair}
\func{void}{CrossHair}{\param{wxCoord}{ x}, \param{wxCoord}{ y}}
\func{void}{CrossHair}{\param{long}{ x}, \param{long}{ y}}
Displays a cross hair using the current pen. This is a vertical
and horizontal line the height and width of the window, centred
@@ -201,104 +127,61 @@ See also \helpref{wxDC::SetClippingRegion}{wxdcsetclippingregion}.
\membersection{wxDC::DeviceToLogicalX}\label{wxdcdevicetologicalx}
\func{wxCoord}{DeviceToLogicalX}{\param{wxCoord}{ x}}
\func{long}{DeviceToLogicalX}{\param{long}{ x}}
Convert device X coordinate to logical coordinate, using the current
mapping mode.
\membersection{wxDC::DeviceToLogicalXRel}\label{wxdcdevicetologicalxrel}
\func{wxCoord}{DeviceToLogicalXRel}{\param{wxCoord}{ x}}
\func{long}{DeviceToLogicalXRel}{\param{long}{ x}}
Convert device X coordinate to relative logical coordinate, using the current
mapping mode but ignoring the x axis orientation.
Use this function for converting a width, for example.
mapping mode. Use this function for converting a width, for example.
\membersection{wxDC::DeviceToLogicalY}\label{wxdcdevicetologicaly}
\func{wxCoord}{DeviceToLogicalY}{\param{wxCoord}{ y}}
\func{long}{DeviceToLogicalY}{\param{long}{ y}}
Converts device Y coordinate to logical coordinate, using the current
mapping mode.
\membersection{wxDC::DeviceToLogicalYRel}\label{wxdcdevicetologicalyrel}
\func{wxCoord}{DeviceToLogicalYRel}{\param{wxCoord}{ y}}
\func{long}{DeviceToLogicalYRel}{\param{long}{ y}}
Convert device Y coordinate to relative logical coordinate, using the current
mapping mode but ignoring the y axis orientation.
Use this function for converting a height, for example.
mapping mode. Use this function for converting a height, for example.
\membersection{wxDC::DrawArc}\label{wxdcdrawarc}
\func{void}{DrawArc}{\param{wxCoord}{ x1}, \param{wxCoord}{ y1}, \param{wxCoord}{ x2}, \param{wxCoord}{ y2}, \param{double}{ xc}, \param{double}{ yc}}
\func{void}{DrawArc}{\param{long}{ x1}, \param{long}{ y1}, \param{long}{ x2}, \param{long}{ y2}, \param{double}{ xc}, \param{double}{ yc}}
Draws an arc of a circle, centred on ({\it xc, yc}), with starting point ({\it x1, y1})
Draws an arc, centred on ({\it xc, yc}), with starting point ({\it x1, y1})
and ending at ({\it x2, y2}). The current pen is used for the outline
and the current brush for filling the shape.
The arc is drawn in an anticlockwise direction from the start point to the end point.
\membersection{wxDC::DrawBitmap}\label{wxdcdrawbitmap}
\func{void}{DrawBitmap}{\param{const wxBitmap\&}{ bitmap}, \param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{bool}{ transparent}}
Draw a bitmap on the device context at the specified point. If {\it transparent} is TRUE and the bitmap has
a transparency mask, the bitmap will be drawn transparently.
When drawing a mono-bitmap, the current text foreground colour will be used to draw the foreground
of the bitmap (all bits set to 1), and the current text background colour to draw the background
(all bits set to 0). See also \helpref{SetTextForeground}{wxdcsettextforeground},
\helpref{SetTextBackground}{wxdcsettextbackground} and \helpref{wxMemoryDC}{wxmemorydc}.
\membersection{wxDC::DrawCheckMark}\label{wxdcdrawcheckmark}
\func{void}{DrawCheckMark}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxCoord}{ width}, \param{wxCoord}{ height}}
\func{void}{DrawCheckMark}{\param{const wxRect \&}{rect}}
Draws a check mark inside the given rectangle.
\membersection{wxDC::DrawCircle}\label{wxdcdrawcircle}
\func{void}{DrawCircle}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxCoord}{ radius}}
\func{void}{DrawCircle}{\param{const wxPoint\&}{ pt}, \param{wxCoord}{ radius}}
Draws a circle with the given centre and radius.
\wxheading{See also}
\helpref{DrawEllipse}{wxdcdrawellipse}
\membersection{wxDC::DrawEllipse}\label{wxdcdrawellipse}
\func{void}{DrawEllipse}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxCoord}{ width}, \param{wxCoord}{ height}}
\func{void}{DrawEllipse}{\param{long}{ x}, \param{long}{ y}, \param{long}{ width}, \param{long}{ height}}
\func{void}{DrawEllipse}{\param{const wxPoint\&}{ pt}, \param{const wxSize\&}{ size}}
\func{void}{DrawEllipse}{\param{const wxRect\&}{ rect}}
Draws an ellipse contained in the rectangle specified either with the given top
left corner and the given size or directly. The current pen is used for the
outline and the current brush for filling the shape.
\wxheading{See also}
\helpref{DrawCircle}{wxdcdrawcircle}
Draws an ellipse contained in the rectangle with the given top left corner, and with the
given size. The current pen is used for the outline and the current brush for
filling the shape.
\membersection{wxDC::DrawEllipticArc}\label{wxdcdrawellipticarc}
\func{void}{DrawEllipticArc}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxCoord}{ width}, \param{wxCoord}{ height},
\func{void}{DrawEllipticArc}{\param{long}{ x}, \param{long}{ y}, \param{long}{ width}, \param{long}{ height},
\param{double}{ start}, \param{double}{ end}}
Draws an arc of an ellipse. The current pen is used for drawing the arc and
the current brush is used for drawing the pie.
Draws an arc of an ellipse. The current pen is used for drawing the arc and
the current brush is used for drawing the pie. This function is currently only available for
X window and PostScript device contexts.
{\it x} and {\it y} specify the x and y coordinates of the upper-left corner of the rectangle that contains
the ellipse.
{\it width} and {\it height} specify the width and height of the rectangle that contains
{\it width} and {\it height} specify the width and height of the rectangle that contains
the ellipse.
{\it start} and {\it end} specify the start and end of the arc relative to the three-o'clock
@@ -309,42 +192,35 @@ complete ellipse will be drawn.
\membersection{wxDC::DrawIcon}\label{wxdcdrawicon}
\func{void}{DrawIcon}{\param{const wxIcon\&}{ icon}, \param{wxCoord}{ x}, \param{wxCoord}{ y}}
\func{void}{DrawIcon}{\param{const wxIcon\&}{ icon}, \param{long}{ x}, \param{long}{ y}}
Draw an icon on the display (does nothing if the device context is PostScript).
This can be the simplest way of drawing bitmaps on a window.
\membersection{wxDC::DrawLine}\label{wxdcdrawline}
\func{void}{DrawLine}{\param{wxCoord}{ x1}, \param{wxCoord}{ y1}, \param{wxCoord}{ x2}, \param{wxCoord}{ y2}}
\func{void}{DrawLine}{\param{long}{ x1}, \param{long}{ y1}, \param{long}{ x2}, \param{long}{ y2}}
Draws a line from the first point to the second. The current pen is used
for drawing the line.
\membersection{wxDC::DrawLines}\label{wxdcdrawlines}
\func{void}{DrawLines}{\param{int}{ n}, \param{wxPoint}{ points[]}, \param{wxCoord}{ xoffset = 0}, \param{wxCoord}{ yoffset = 0}}
\func{void}{DrawLines}{\param{int}{ n}, \param{wxPoint}{ points[]}, \param{long}{ xoffset = 0}, \param{long}{ yoffset = 0}}
\func{void}{DrawLines}{\param{wxList *}{points}, \param{wxCoord}{ xoffset = 0}, \param{wxCoord}{ yoffset = 0}}
\func{void}{DrawLines}{\param{wxList *}{points}, \param{long}{ xoffset = 0}, \param{long}{ yoffset = 0}}
Draws lines using an array of {\it points} of size {\it n}, or list of
pointers to points, adding the optional offset coordinate. The current
pen is used for drawing the lines. The programmer is responsible for
deleting the list of points.
\pythonnote{The wxPython version of this method accepts a Python list
of wxPoint objects.}
\perlnote{The wxPerl version of this method accepts
as its first parameter a reference to an array
of wxPoint objects.}
\membersection{wxDC::DrawPolygon}\label{wxdcdrawpolygon}
\func{void}{DrawPolygon}{\param{int}{ n}, \param{wxPoint}{ points[]}, \param{wxCoord}{ xoffset = 0}, \param{wxCoord}{ yoffset = 0},\\
\func{void}{DrawPolygon}{\param{int}{ n}, \param{wxPoint}{ points[]}, \param{long}{ xoffset = 0}, \param{long}{ yoffset = 0},\\
\param{int }{fill\_style = wxODDEVEN\_RULE}}
\func{void}{DrawPolygon}{\param{wxList *}{points}, \param{wxCoord}{ xoffset = 0}, \param{wxCoord}{ yoffset = 0},\\
\func{void}{DrawPolygon}{\param{wxList *}{points}, \param{long}{ xoffset = 0}, \param{long}{ yoffset = 0},\\
\param{int }{fill\_style = wxODDEVEN\_RULE}}
Draws a filled polygon using an array of {\it points} of size {\it n},
@@ -359,45 +235,23 @@ The programmer is responsible for deleting the list of points.
Note that wxWindows automatically closes the first and last points.
\pythonnote{The wxPython version of this method accepts a Python list
of wxPoint objects.}
\perlnote{The wxPerl version of this method accepts
as its first parameter a reference to an array
of wxPoint objects.}
\membersection{wxDC::DrawPoint}\label{wxdcdrawpoint}
\func{void}{DrawPoint}{\param{wxCoord}{ x}, \param{wxCoord}{ y}}
\func{void}{DrawPoint}{\param{long}{ x}, \param{long}{ y}}
Draws a point using the current pen.
\membersection{wxDC::DrawRectangle}\label{wxdcdrawrectangle}
\func{void}{DrawRectangle}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxCoord}{ width}, \param{wxCoord}{ height}}
\func{void}{DrawRectangle}{\param{long}{ x}, \param{long}{ y}, \param{long}{ width}, \param{long}{ height}}
Draws a rectangle with the given top left corner, and with the given
size. The current pen is used for the outline and the current brush
for filling the shape.
\membersection{wxDC::DrawRotatedText}\label{wxdcdrawrotatedtext}
\func{void}{DrawRotatedText}{\param{const wxString\& }{text}, \param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{double}{ angle}}
Draws the text rotated by {\it angle} degrees.
{\bf NB:} Under Win9x only TrueType fonts can be drawn by this function. In
particular, a font different from {\tt wxNORMAL\_FONT} should be used as the
latter is not a TrueType font. {\tt wxSWISS\_FONT} is an example of a font
which is.
\wxheading{See also}
\helpref{DrawText}{wxdcdrawtext}
\membersection{wxDC::DrawRoundedRectangle}\label{wxdcdrawroundedrectangle}
\func{void}{DrawRoundedRectangle}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxCoord}{ width}, \param{wxCoord}{ height}, \param{double}{ radius = 20}}
\func{void}{DrawRoundedRectangle}{\param{long}{ x}, \param{long}{ y}, \param{long}{ width}, \param{long}{ height}, \param{double}{ radius = 20}}
Draws a rectangle with the given top left corner, and with the given
size. The corners are quarter-circles using the given radius. The
@@ -421,19 +275,13 @@ pen. Doesn't delete the wxList and contents. The spline is drawn
using a series of lines, using an algorithm taken from the X drawing
program `XFIG'.
\func{void}{DrawSpline}{\param{wxCoord}{ x1}, \param{wxCoord}{ y1}, \param{wxCoord}{ x2}, \param{wxCoord}{ y2}, \param{wxCoord}{ x3}, \param{wxCoord}{ y3}}
\func{void}{DrawSpline}{\param{long}{ x1}, \param{long}{ y1}, \param{long}{ x2}, \param{long}{ y2}, \param{long}{ x3}, \param{long}{ y3}}
Draws a three-point spline using the current pen.
\pythonnote{The wxPython version of this method accepts a Python list
of wxPoint objects.}
\perlnote{The wxPerl version of this method accepts a reference to an array
of wxPoint objects.}
\membersection{wxDC::DrawText}\label{wxdcdrawtext}
\func{void}{DrawText}{\param{const wxString\& }{text}, \param{wxCoord}{ x}, \param{wxCoord}{ y}}
\func{void}{DrawText}{\param{const wxString\& }{text}, \param{long}{ x}, \param{long}{ y}}
Draws a text string at the specified point, using the current text font,
and the current text foreground and background colours.
@@ -443,28 +291,6 @@ the string. See \helpref{wxDC::GetTextExtent}{wxdcgettextextent} for how
to get the dimensions of a text string, which can be used to position the
text more precisely.
{\bf NB:} under wxGTK the current
\helpref{logical function}{wxdcgetlogicalfunction} is used by this function
but it is ignored by wxMSW. Thus, you should avoid using logical functions
with this function in portable programs.
\begin{comment}
\membersection{wxDC::EnableCache}\label{wxdcenablecache}
\func{static void}{EnableCache}{\param{bool}{ enableCache}}
On supported platforms (currently only Windows), enables the DC cache
which can speed up the \helpref{Blit}{wxdcblit} operation when
drawing a large number of masked bitmaps.
If using the cache functions in your code, please test for the
wxUSE\_DC\_CACHEING preprocessor symbol for portability.
\wxheading{See also}
\helpref{wxDC::CacheEnabled}{wxdccacheenabled}, \helpref{wxDC::ClearCache}
\end{comment}
\membersection{wxDC::EndDoc}\label{wxdcenddoc}
\func{void}{EndDoc}{\void}
@@ -487,77 +313,51 @@ Ends a document page (only relevant when outputting to a printer).
\membersection{wxDC::FloodFill}\label{wxdcfloodfill}
\func{bool}{FloodFill}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{const wxColour\&}{ colour}, \param{int}{ style=wxFLOOD\_SURFACE}}
\func{void}{FloodFill}{\param{long}{ x}, \param{long}{ y}, \param{wxColour *}{colour}, \param{int}{ style=wxFLOOD\_SURFACE}}
Flood fills the device context starting from the given point, using
the {\it current brush colour}, and using a style:
Flood fills the device context starting from the given point, in the given colour,
and using a style:
\begin{itemize}\itemsep=0pt
\item wxFLOOD\_SURFACE: the flooding occurs until a colour other than the given colour is encountered.
\item wxFLOOD\_BORDER: the area to be flooded is bounded by the given colour.
\end{itemize}
Returns FALSE if the operation failed.
{\it Note:} The present implementation for non-Windows platforms may fail to find
colour borders if the pixels do not match the colour exactly. However the
function will still return TRUE.
{\it Note:} this function is available in MS Windows only.
\membersection{wxDC::GetBackground}\label{wxdcgetbackground}
\func{wxBrush\&}{GetBackground}{\void}
\constfunc{const wxBrush\&}{GetBackground}{\void}
\func{wxBrush *}{GetBackground}{\void}
Gets the brush used for painting the background (see \helpref{wxDC::SetBackground}{wxdcsetbackground}).
\membersection{wxDC::GetBackgroundMode}\label{wxdcgetbackgroundmode}
\constfunc{int}{GetBackgroundMode}{\void}
Returns the current background mode: {\tt wxSOLID} or {\tt wxTRANSPARENT}.
\wxheading{See also}
\helpref{SetBackgroundMode}{wxdcsetbackgroundmode}
\membersection{wxDC::GetBrush}\label{wxdcgetbrush}
\func{wxBrush\&}{GetBrush}{\void}
\constfunc{const wxBrush\&}{GetBrush}{\void}
\func{wxBrush *}{GetBrush}{\void}
Gets the current brush (see \helpref{wxDC::SetBrush}{wxdcsetbrush}).
\membersection{wxDC::GetCharHeight}\label{wxdcgetcharheight}
\func{wxCoord}{GetCharHeight}{\void}
\func{long}{GetCharHeight}{\void}
Gets the character height of the currently set font.
\membersection{wxDC::GetCharWidth}\label{wxdcgetcharwidth}
\func{wxCoord}{GetCharWidth}{\void}
\func{long}{GetCharWidth}{\void}
Gets the average character width of the currently set font.
\membersection{wxDC::GetClippingBox}\label{wxdcgetclippingbox}
\func{void}{GetClippingBox}{\param{wxCoord}{ *x}, \param{wxCoord}{ *y}, \param{wxCoord}{ *width}, \param{wxCoord}{ *height}}
\func{void}{GetClippingBox}{\param{long}{ *x}, \param{long}{ *y}, \param{long}{ *width}, \param{long}{ *height}}
Gets the rectangle surrounding the current clipping region.
\pythonnote{No arguments are required and the four values defining the
rectangle are returned as a tuple.}
\perlnote{This method takes no arguments and returns a four element list
{\tt ( x, y, width, height )}}
\membersection{wxDC::GetFont}\label{wxdcgetfont}
\func{wxFont\&}{GetFont}{\void}
\constfunc{const wxFont\&}{GetFont}{\void}
\func{wxFont *}{GetFont}{\void}
Gets the current font (see \helpref{wxDC::SetFont}{wxdcsetfont}).
@@ -582,28 +382,20 @@ See \helpref{wxDC::SetOptimization}{wxsetoptimization} for details.
\membersection{wxDC::GetPen}\label{wxdcgetpen}
\func{wxPen\&}{GetPen}{\void}
\constfunc{const wxPen\&}{GetPen}{\void}
\func{wxPen *}{GetPen}{\void}
Gets the current pen (see \helpref{wxDC::SetPen}{wxdcsetpen}).
\membersection{wxDC::GetPixel}\label{wxdcgetpixel}
\func{bool}{GetPixel}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxColour *}{colour}}
\func{bool}{GetPixel}{\param{long}{ x}, \param{long}{ y}, \param{wxColour *}{colour}}
Sets {\it colour} to the colour at the specified location. Windows only; an X implementation
is being worked on. Not available for wxPostScriptDC or wxMetafileDC.
\pythonnote{For wxPython the wxColour value is returned and is not
required as a parameter.}
\perlnote{This method only takes the parameters {\tt x} and {\tt y} and returns
a Wx::Colour value}
is being worked on. Not available for wxPostScriptDC or wxMetaFileDC.
\membersection{wxDC::GetSize}\label{wxdcgetsize}
\func{void}{GetSize}{\param{wxCoord *}{width}, \param{wxCoord *}{height}}
\func{void}{GetSize}{\param{long *}{width}, \param{long *}{height}}
For a PostScript device context, this gets the maximum size of graphics
drawn so far on the device context.
@@ -616,41 +408,23 @@ application, the following code will scale the graphic to fit on the
printer page:
\begin{verbatim}
wxCoord w, h;
long w, h;
dc.GetSize(&w, &h);
double scaleX=(double)(maxX/w);
double scaleY=(double)(maxY/h);
dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY));
\end{verbatim}
\pythonnote{In place of a single overloaded method name, wxPython
implements the following methods:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf GetSize()}}{Returns a wxSize}
\twocolitem{{\bf GetSizeTuple()}}{Returns a 2-tuple (width, height)}
\end{twocollist}}
}
\perlnote{In place of a single overloaded method, wxPerl uses:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf GetSize()}}{Returns a Wx::Size}
\twocolitem{{\bf GetSizeWH()}}{Returns a 2-element list
{\tt ( width, height )}}
\end{twocollist}
}}
\membersection{wxDC::GetTextBackground}\label{wxdcgettextbackground}
\func{wxColour\&}{GetTextBackground}{\void}
\constfunc{const wxColour\&}{GetTextBackground}{\void}
Gets the current text background colour (see \helpref{wxDC::SetTextBackground}{wxdcsettextbackground}).
\membersection{wxDC::GetTextExtent}\label{wxdcgettextextent}
\func{void}{GetTextExtent}{\param{const wxString\& }{string}, \param{wxCoord *}{w}, \param{wxCoord *}{h},\\
\param{wxCoord *}{descent = NULL}, \param{wxCoord *}{externalLeading = NULL}, \param{wxFont *}{font = NULL}}
\func{void}{GetTextExtent}{\param{const wxString\& }{string}, \param{long *}{w}, \param{long *}{h},\\
\param{long *}{descent = NULL}, \param{long *}{externalLeading = NULL}, \param{wxFont *}{font = NULL}}
Gets the dimensions of the string using the currently selected font.
\rtfsp{\it string} is the text string to measure, {\it w} and {\it h} are
@@ -666,88 +440,61 @@ the device context first.
See also \helpref{wxFont}{wxfont}, \helpref{wxDC::SetFont}{wxdcsetfont}.
\pythonnote{The following methods are implemented in wxPython:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf GetTextExtent(string)}}{Returns a 2-tuple, (width, height)}
\twocolitem{{\bf GetFullTextExtent(string, font=NULL)}}{Returns a
4-tuple, (width, height, descent, externalLeading) }
\end{twocollist}}
}
\perlnote{In wxPerl this method is implemented as
{\bf GetTextExtent( string, font = undef )} returning a four element
array {\tt ( width, height, descent, externalLeading )}
}
\membersection{wxDC::GetTextForeground}\label{wxdcgettextforeground}
\func{wxColour\&}{GetTextForeground}{\void}
\constfunc{const wxColour\&}{GetTextForeground}{\void}
Gets the current text foreground colour (see \helpref{wxDC::SetTextForeground}{wxdcsettextforeground}).
\membersection{wxDC::GetUserScale}\label{wxdcgetuserscale}
\func{void}{GetUserScale}{\param{double}{ *x}, \param{double}{ *y}}
Gets the current user scale factor (set by \helpref{SetUserScale}{wxdcsetuserscale}).
\perlnote{In wxPerl this method takes no arguments and return a two element
array {\tt ( x, y )}}
\membersection{wxDC::LogicalToDeviceX}\label{wxdclogicaltodevicex}
\func{wxCoord}{LogicalToDeviceX}{\param{wxCoord}{ x}}
\func{long}{LogicalToDeviceX}{\param{long}{ x}}
Converts logical X coordinate to device coordinate, using the current
mapping mode.
\membersection{wxDC::LogicalToDeviceXRel}\label{wxdclogicaltodevicexrel}
\func{wxCoord}{LogicalToDeviceXRel}{\param{wxCoord}{ x}}
\func{long}{LogicalToDeviceXRel}{\param{long}{ x}}
Converts logical X coordinate to relative device coordinate, using the current
mapping mode but ignoring the x axis orientation.
Use this for converting a width, for example.
mapping mode. Use this for converting a width, for example.
\membersection{wxDC::LogicalToDeviceY}\label{wxdclogicaltodevicey}
\func{wxCoord}{LogicalToDeviceY}{\param{wxCoord}{ y}}
\func{long}{LogicalToDeviceY}{\param{long}{ y}}
Converts logical Y coordinate to device coordinate, using the current
mapping mode.
\membersection{wxDC::LogicalToDeviceYRel}\label{wxdclogicaltodeviceyrel}
\func{wxCoord}{LogicalToDeviceYRel}{\param{wxCoord}{ y}}
\func{long}{LogicalToDeviceYRel}{\param{long}{ y}}
Converts logical Y coordinate to relative device coordinate, using the current
mapping mode but ignoring the y axis orientation.
Use this for converting a height, for example.
mapping mode. Use this for converting a height, for example.
\membersection{wxDC::MaxX}\label{wxdcmaxx}
\func{wxCoord}{MaxX}{\void}
\func{long}{MaxX}{\void}
Gets the maximum horizontal extent used in drawing commands so far.
\membersection{wxDC::MaxY}\label{wxdcmaxy}
\func{wxCoord}{MaxY}{\void}
\func{long}{MaxY}{\void}
Gets the maximum vertical extent used in drawing commands so far.
\membersection{wxDC::MinX}\label{wxdcminx}
\func{wxCoord}{MinX}{\void}
\func{long}{MinX}{\void}
Gets the minimum horizontal extent used in drawing commands so far.
\membersection{wxDC::MinY}\label{wxdcminy}
\func{wxCoord}{MinY}{\void}
\func{long}{MinY}{\void}
Gets the minimum vertical extent used in drawing commands so far.
@@ -757,37 +504,9 @@ Gets the minimum vertical extent used in drawing commands so far.
Returns TRUE if the DC is ok to use.
\membersection{wxDC::ResetBoundingBox}\label{wxdcresetboundingbox}
\func{void}{ResetBoundingBox}{\void}
Resets the bounding box: after a call to this function, the bounding box
doesn't contain anything.
\wxheading{See also}
\helpref{CalcBoundingBox}{wxdccalcboundingbox}
\membersection{wxDC::SetAxisOrientation}\label{wxdcsetaxisorientation}
\func{void}{SetAxisOrientation}{\param{bool}{ xLeftRight},
\param{bool}{ yBottomUp}}
Sets the x and y axis orientation (i.e., the direction from lowest to
highest values on the axis). The default orientation is the natural
orientation, e.g. x axis from left to right and y axis from bottom up.
\wxheading{Parameters}
\docparam{xLeftRight}{True to set the x axis orientation to the natural
left to right orientation, false to invert it.}
\docparam{yBottomUp}{True to set the y axis orientation to the natural
bottom up orientation, false to invert it.}
\membersection{wxDC::SetDeviceOrigin}\label{wxdcsetdeviceorigin}
\func{void}{SetDeviceOrigin}{\param{wxCoord}{ x}, \param{wxCoord}{ y}}
\func{void}{SetDeviceOrigin}{\param{long}{ x}, \param{long}{ y}}
Sets the device origin (i.e., the origin in pixels after scaling has been
applied).
@@ -810,27 +529,13 @@ whether text will be drawn with a background colour or not.
\membersection{wxDC::SetClippingRegion}\label{wxdcsetclippingregion}
\func{void}{SetClippingRegion}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxCoord}{ width}, \param{wxCoord}{ height}}
\func{void}{SetClippingRegion}{\param{long}{ x}, \param{long}{ y}, \param{long}{ width}, \param{long}{ height}}
\func{void}{SetClippingRegion}{\param{const wxPoint\& }{pt}, \param{const wxSize\& }{sz}}
Sets the clipping region for the DC. The clipping region is a rectangular area
to which drawing is restricted. Possible uses for the clipping region are for clipping text
or for speeding up window redraws when only a known area of the screen is damaged.
\func{void}{SetClippingRegion}{\param{const wxRect\&}{ rect}}
\func{void}{SetClippingRegion}{\param{const wxRegion\&}{ region}}
Sets the clipping region for this device context to the intersection of the
given region described by the parameters of this method and the previously set
clipping region. You should call
\helpref{DestroyClippingRegion}{wxdcdestroyclippingregion} if you want to set
the clipping region exactly to the region specified.
The clipping region is an area to which drawing is restricted. Possible uses
for the clipping region are for clipping text or for speeding up window redraws
when only a known area of the screen is damaged.
\wxheading{See also}
\helpref{wxDC::DestroyClippingRegion}{wxdcdestroyclippingregion}, \helpref{wxRegion}{wxregion}
See also \helpref{wxDC::DestroyClippingRegion}{wxdcdestroyclippingregion}.
\membersection{wxDC::SetPalette}\label{wxdcsetpalette}
@@ -855,15 +560,15 @@ be destroyed safely.
See also \helpref{wxBrush}{wxbrush}.
See also \helpref{wxMemoryDC}{wxmemorydc} for the interpretation of colours
when drawing into a monochrome bitmap.
\membersection{wxDC::SetFont}\label{wxdcsetfont}
\func{void}{SetFont}{\param{const wxFont\& }{font}}
Sets the current font for the DC. It must be a valid font, in particular you
should not pass {\tt wxNullFont} to this method.
Sets the current font for the DC.
If the argument is wxNullFont, the current font is selected out of the device
context, and the original font restored, allowing the current font to
be destroyed safely.
See also \helpref{wxFont}{wxfont}.
@@ -901,7 +606,7 @@ wxXOR src XOR dst
The default is wxCOPY, which simply draws with the current colour.
The others combine the current colour and the background using a
logical operation. wxINVERT is commonly used for drawing rubber bands or
logical operation. wxXOR is commonly used for drawing rubber bands or
moving outlines, since drawing twice reverts to the original colour.
\membersection{wxDC::SetMapMode}\label{wxdcsetmapmode}
@@ -913,7 +618,7 @@ measurement used to convert logical units to device units. Note that
in X, text drawing isn't handled consistently with the mapping mode; a
font is always specified in point size. However, setting the {\it
user scale} (see \helpref{wxDC::SetUserScale}{wxdcsetuserscale}) scales the text appropriately. In
Windows, scalable TrueType fonts are always used; in X, results depend
Windows, scaleable TrueType fonts are always used; in X, results depend
on availability of fonts, but usually a reasonable match is found.
Note that the coordinate origin should ideally be selectable, but for
@@ -926,12 +631,12 @@ PostScript output.
The mapping mode can be one of the following:
\begin{twocollist}\itemsep=0pt
\twocolitem{wxMM\_TWIPS}{Each logical unit is 1/20 of a point, or 1/1440 of
\twocolitem{MM\_TWIPS}{Each logical unit is 1/20 of a point, or 1/1440 of
an inch.}
\twocolitem{wxMM\_POINTS}{Each logical unit is a point, or 1/72 of an inch.}
\twocolitem{wxMM\_METRIC}{Each logical unit is 1 mm.}
\twocolitem{wxMM\_LOMETRIC}{Each logical unit is 1/10 of a mm.}
\twocolitem{wxMM\_TEXT}{Each logical unit is 1 pixel.}
\twocolitem{MM\_POINTS}{Each logical unit is a point, or 1/72 of an inch.}
\twocolitem{MM\_METRIC}{Each logical unit is 1 mm.}
\twocolitem{MM\_LOMETRIC}{Each logical unit is 1/10 of a mm.}
\twocolitem{MM\_TEXT}{Each logical unit is 1 pixel.}
\end{twocollist}
\membersection{wxDC::SetOptimization}\label{wxsetoptimization}
@@ -957,9 +662,6 @@ Sets the current pen for the DC.
If the argument is wxNullPen, the current pen is selected out of the device
context, and the original pen restored.
See also \helpref{wxMemoryDC}{wxmemorydc} for the interpretation of colours
when drawing into a monochrome bitmap.
\membersection{wxDC::SetTextBackground}\label{wxdcsettextbackground}
\func{void}{SetTextBackground}{\param{const wxColour\& }{colour}}
@@ -972,9 +674,6 @@ Sets the current text background colour for the DC.
Sets the current text foreground colour for the DC.
See also \helpref{wxMemoryDC}{wxmemorydc} for the interpretation of colours
when drawing into a monochrome bitmap.
\membersection{wxDC::SetUserScale}\label{wxdcsetuserscale}
\func{void}{SetUserScale}{\param{double}{ xScale}, \param{double}{ yScale}}
@@ -995,38 +694,3 @@ Message is a message to show whilst printing.
Starts a document page (only relevant when outputting to a printer).
\section{\class{wxDCClipper}}\label{wxdcclipper}
This is a small helper class which sets the specified to its constructor
clipping region and then automatically destroys it in its destructor. Using
it ensures that unwanted clipping region is not left set on the DC.
\wxheading{Derived from}
No base class
\wxheading{Include files}
<wx/dc.h>
\wxheading{See also}
\helpref{wxDC}{wxdc}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDCClipper::wxDCClipper}
\func{}{wxDCClipper}{\param{wxDC\& }{dc}, \param{wxCoord }{x},\param{wxCoord }{y},\param{wxCoord }{w},\param{wxCoord }{h},}
\func{}{wxDCClipper}{\param{wxDC\& }{dc}, \param{const wxRect\&}{ rect}}
Constructor: sets the the clipping region for the given device context to the
specified rectangle.
\membersection{wxDCClipper::\destruct{wxDCClipper}}
\func{}{\destruct{wxDCClipper}}{\void}
Destructor: destroys the clipping region set in the constructor.

View File

@@ -1,32 +1,27 @@
\section{\class{wxDDEClient}}\label{wxddeclient}
\overview{Interprocess communications overview}{ipcoverview}
A wxDDEClient object represents the client part of a client-server DDE
(Dynamic Data Exchange) conversation.
(Dynamic Data Exchange) conversation (available in {\it both}\/
Windows and UNIX).
To create a client which can communicate with a suitable server,
you need to derive a class from wxDDEConnection and another from wxDDEClient.
The custom wxDDEConnection class will intercept communications in
a `conversation' with a server, and the custom wxDDEServer is required
so that a user-overridden \helpref{wxDDEClient::OnMakeConnection}{wxddeclientonmakeconnection} member can return
so that a user-overriden \helpref{wxDDEClient::OnMakeConnection}{wxddeclientonmakeconnection} member can return
a wxDDEConnection of the required class, when a connection is made.
This DDE-based implementation is
available on Windows only, but a platform-independent, socket-based version
of this API is available using \helpref{wxTCPClient}{wxtcpclient}.
\wxheading{Derived from}
wxClientBase\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/dde.h>
wxDDEObject
\wxheading{See also}
\helpref{wxDDEServer}{wxddeserver}, \helpref{wxDDEConnection}{wxddeconnection},
\helpref{Interprocess communications overview}{ipcoverview}
\helpref{wxDDEServer}{wxddeserver}, \helpref{wxDDEConnection}{wxddeconnection},
the chapter on interprocess communication in the user manual, and
the programs in {\tt samples/ipc}.
\latexignore{\rtfignore{\wxheading{Members}}}
@@ -38,7 +33,7 @@ Constructs a client object.
\membersection{wxDDEClient::MakeConnection}\label{wxddeclientmakeconnection}
\func{wxConnectionBase *}{MakeConnection}{\param{const wxString\& }{host}, \param{const wxString\& }{service}, \param{const wxString\& }{topic}}
\func{wxDDEConnection *}{MakeConnection}{\param{const wxString\& }{host}, \param{const wxString\& }{service}, \param{const wxString\& }{topic}}
Tries to make a connection with a server specified by the host
(machine name under UNIX, ignored under Windows), service name (must
@@ -50,11 +45,11 @@ derived connection object.
\membersection{wxDDEClient::OnMakeConnection}\label{wxddeclientonmakeconnection}
\func{wxConnectionBase *}{OnMakeConnection}{\void}
\func{wxDDEConnection *}{OnMakeConnection}{\void}
The type of \helpref{wxDDEConnection}{wxddeconnection} returned from a \helpref{wxDDEClient::MakeConnection}{wxddeclientmakeconnection} call can
be altered by deriving the {\bf OnMakeConnection} member to return your
own derived connection object. By default, a wxDDEConnection
own derived connection object. By default, an ordinary wxDDEConnection
object is returned.
The advantage of deriving your own connection class is that it will
@@ -69,3 +64,4 @@ store application-specific data in instances of the new class.
Returns TRUE if this is a valid host name, FALSE otherwise. This always
returns TRUE under MS Windows.

View File

@@ -4,7 +4,7 @@ A wxDDEConnection object represents the connection between a client and a
server. It can be created by making a connection using a\rtfsp
\helpref{wxDDEClient}{wxddeclient} object, or by the acceptance of a connection by a\rtfsp
\helpref{wxDDEServer}{wxddeserver} object. The bulk of a DDE (Dynamic Data Exchange)
conversation is controlled by
conversation (available in both Windows and UNIX) is controlled by
calling members in a {\bf wxDDEConnection} object or by overriding its
members.
@@ -12,47 +12,10 @@ An application should normally derive a new connection class from
wxDDEConnection, in order to override the communication event handlers
to do something interesting.
This DDE-based implementation is available on Windows only,
but a platform-independent, socket-based version
of this API is available using \helpref{wxTCPConnection}{wxtcpconnection}.
\wxheading{Derived from}
wxConnectionBase\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/dde.h>
\wxheading{Types}
\index{wxIPCFormat}wxIPCFormat is defined as follows:
\begin{verbatim}
enum wxIPCFormat
{
wxIPC_INVALID = 0,
wxIPC_TEXT = 1, /* CF_TEXT */
wxIPC_BITMAP = 2, /* CF_BITMAP */
wxIPC_METAFILE = 3, /* CF_METAFILEPICT */
wxIPC_SYLK = 4,
wxIPC_DIF = 5,
wxIPC_TIFF = 6,
wxIPC_OEMTEXT = 7, /* CF_OEMTEXT */
wxIPC_DIB = 8, /* CF_DIB */
wxIPC_PALETTE = 9,
wxIPC_PENDATA = 10,
wxIPC_RIFF = 11,
wxIPC_WAVE = 12,
wxIPC_UNICODETEXT = 13,
wxIPC_ENHMETAFILE = 14,
wxIPC_FILENAME = 15, /* CF_HDROP */
wxIPC_LOCALE = 16,
wxIPC_PRIVATE = 20
};
\end{verbatim}
\wxheading{See also}
\helpref{wxDDEClient}{wxddeclient}, \helpref{wxDDEServer}{wxddeserver}, \helpref{Interprocess communications overview}{ipcoverview}
@@ -79,7 +42,7 @@ transactions.
\membersection{wxDDEConnection::Advise}
\func{bool}{Advise}{\param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size = -1}, \param{wxIPCFormat}{ format = wxCF\_TEXT}}
\func{bool}{Advise}{\param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size = -1}, \param{int}{ format = wxCF\_TEXT}}
Called by the server application to advise the client of a change in
the data associated with the given item. Causes the client
@@ -88,7 +51,8 @@ member to be called. Returns TRUE if successful.
\membersection{wxDDEConnection::Execute}
\func{bool}{Execute}{\param{char* }{data}, \param{int}{ size = -1}, \param{wxIPCFormat}{ format = wxCF\_TEXT}}
\func{bool}{Execute}{\param{char* }{data}, \param{int}{ size = -1},
\param{int}{ format = wxCF\_TEXT}}
Called by the client application to execute a command on the server. Can
also be used to transfer arbitrary data to the server (similar
@@ -110,14 +74,14 @@ successful.
\membersection{wxDDEConnection::OnAdvise}\label{wxddeconnectiononadvise}
\func{virtual bool}{OnAdvise}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size}, \param{wxIPCFormat}{ format}}
\func{bool}{OnAdvise}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size}, \param{int}{ format}}
Message sent to the client application when the server notifies it of a
change in the data associated with the given item.
\membersection{wxDDEConnection::OnDisconnect}\label{wxddeconnectionondisconnect}
\func{virtual bool}{OnDisconnect}{\void}
\func{bool}{OnDisconnect}{\void}
Message sent to the client or server application when the other
application notifies it to delete the connection. Default behaviour is
@@ -125,7 +89,7 @@ to delete the connection object.
\membersection{wxDDEConnection::OnExecute}\label{wxddeconnectiononexecute}
\func{virtual bool}{OnExecute}{\param{const wxString\& }{topic}, \param{char* }{data}, \param{int}{ size}, \param{wxIPCFormat}{ format}}
\func{bool}{OnExecute}{\param{const wxString\& }{topic}, \param{char* }{data}, \param{int}{ size}, \param{int}{ format}}
Message sent to the server application when the client notifies it to
execute the given data. Note that there is no item associated with
@@ -133,14 +97,14 @@ this message.
\membersection{wxDDEConnection::OnPoke}\label{wxddeconnectiononpoke}
\func{virtual bool}{OnPoke}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size}, \param{wxIPCFormat}{ format}}
\func{bool}{OnPoke}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size}, \param{int}{ format}}
Message sent to the server application when the client notifies it to
accept the given data.
\membersection{wxDDEConnection::OnRequest}\label{wxddeconnectiononrequest}
\func{virtual char*}{OnRequest}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{int *}{size}, \param{wxIPCFormat}{ format}}
\func{char*}{OnRequest}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{int *}{size}, \param{int}{ format}}
Message sent to the server application when the client
calls \helpref{wxDDEConnection::Request}{wxddeconnectionrequest}. The server
@@ -149,7 +113,7 @@ or NULL to indicate no data.
\membersection{wxDDEConnection::OnStartAdvise}\label{wxddeconnectiononstartadvise}
\func{virtual bool}{OnStartAdvise}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}}
\func{bool}{OnStartAdvise}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}}
Message sent to the server application by the client, when the client
wishes to start an `advise loop' for the given topic and item. The
@@ -157,7 +121,7 @@ server can refuse to participate by returning FALSE.
\membersection{wxDDEConnection::OnStopAdvise}\label{wxddeconnectiononstopadvise}
\func{virtual bool}{OnStopAdvise}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}}
\func{bool}{OnStopAdvise}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}}
Message sent to the server application by the client, when the client
wishes to stop an `advise loop' for the given topic and item. The
@@ -166,7 +130,7 @@ this doesn't have much meaning in practice.
\membersection{wxDDEConnection::Poke}\label{wxddeconnectionpoke}
\func{bool}{Poke}{\param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size = -1}, \param{wxIPCFormat}{ format = wxCF\_TEXT}}
\func{bool}{Poke}{\param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size = -1}, \param{int}{ format = wxCF\_TEXT}}
Called by the client application to poke data into the server. Can be
used to transfer arbitrary data to the server. Causes the server
@@ -175,7 +139,7 @@ to be called. Returns TRUE if successful.
\membersection{wxDDEConnection::Request}\label{wxddeconnectionrequest}
\func{char*}{Request}{\param{const wxString\& }{item}, \param{int *}{size}, \param{wxIPCFormat}{ format = wxIPC\_TEXT}}
\func{char*}{Request}{\param{const wxString\& }{item}, \param{int *}{size}, \param{int}{ format = wxCF\_TEXT}}
Called by the client application to request data from the server. Causes
the server connection's \helpref{wxDDEConnection::OnRequest}{wxddeconnectiononrequest} member to be called. Returns a
@@ -199,3 +163,4 @@ Called by the client application to ask if an advise loop can be
stopped. Causes the server connection's \helpref{wxDDEConnection::OnStopAdvise}{wxddeconnectiononstopadvise} member
to be called. Returns TRUE if the server okays it, FALSE otherwise.

View File

@@ -1,23 +1,16 @@
\section{\class{wxDDEServer}}\label{wxddeserver}
A wxDDEServer object represents the server part of a client-server DDE
(Dynamic Data Exchange) conversation.
This DDE-based implementation is
available on Windows only, but a platform-independent, socket-based version
of this API is available using \helpref{wxTCPServer}{wxtcpserver}.
(Dynamic Data Exchange) conversation (available under both Windows
and UNIX).
\wxheading{Derived from}
wxServerBase
\wxheading{Include files}
<wx/dde.h>
wxDDEObject
\wxheading{See also}
\helpref{wxDDEClient}{wxddeclient}, \helpref{wxDDEConnection}{wxddeconnection}, \helpref{IPC overview}{ipcoverview}
\helpref{IPC overview}{ipcoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
@@ -38,7 +31,7 @@ number is already in use).
\membersection{wxDDEServer::OnAcceptConnection}\label{wxddeserveronacceptconnection}
\func{virtual wxConnectionBase *}{OnAcceptConnection}{\param{const wxString\& }{topic}}
\func{wxDDEConnection *}{OnAcceptConnection}{\param{const wxString\& }{topic}}
When a client calls {\bf MakeConnection}, the server receives the
message and this member is called. The application should derive a
@@ -49,3 +42,4 @@ Under UNIX, when a server is created the OnAcceptConnection message is
always sent for standard input and output, but in the context of DDE
messages it doesn't make a lot of sense.

View File

@@ -3,18 +3,14 @@
A class for performing various debugging and memory tracing
operations. Full functionality (such as printing out objects
currently allocated) is only present in a debugging build of wxWindows,
i.e. if the \_\_WXDEBUG\_\_ symbol is defined. wxDebugContext
i.e. if the DEBUG symbol is defined and non-zero. wxDebugContext
and related functions and macros can be compiled out by setting
wxUSE\_DEBUG\_CONTEXT to 0 is setup.h
USE\_DEBUG\_CONTEXT to 0 is wx\_setup.h
\wxheading{Derived from}
No parent class.
\wxheading{Include files}
<wx/memory.h>
\wxheading{See also}
\overview{Overview}{wxdebugcontextoverview}
@@ -78,8 +74,6 @@ the WXTRACELEVEL macro to specify how detailed the trace information is; setting
a different level will only have an effect if trace statements in the application
specify a value other than one.
This is obsolete, replaced by \helpref{wxLog}{wxlog} functionality.
\wxheading{See also}
\helpref{wxDebugContext::SetLevel}{wxdebugcontextsetlevel}
@@ -90,8 +84,6 @@ This is obsolete, replaced by \helpref{wxLog}{wxlog} functionality.
Returns the output stream associated with the debug context.
This is obsolete, replaced by \helpref{wxLog}{wxlog} functionality.
\wxheading{See also}
\helpref{wxDebugContext::SetStream}{wxdebugcontextsetstream}
@@ -104,8 +96,6 @@ Returns a pointer to the output stream buffer associated with the debug context.
There may not necessarily be a stream buffer if the stream has been set
by the user.
This is obsolete, replaced by \helpref{wxLog}{wxlog} functionality.
\membersection{wxDebugContext::HasStream}\label{wxdebugcontexthasstream}
\func{bool}{HasStream}{\void}
@@ -113,8 +103,6 @@ This is obsolete, replaced by \helpref{wxLog}{wxlog} functionality.
Returns TRUE if there is a stream currently associated
with the debug context.
This is obsolete, replaced by \helpref{wxLog}{wxlog} functionality.
\wxheading{See also}
\helpref{wxDebugContext::SetStream}{wxdebugcontextsetstream}, \helpref{wxDebugContext::GetStream}{wxdebugcontextgetstream}
@@ -180,7 +168,7 @@ Sets the debug mode on or off. If debug mode is on, the wxObject new and delete
operators store or use information about memory allocation. Otherwise,
a straight malloc and free will be performed by these operators.
By default, debug mode is on if \_\_WXDEBUG\_\_ is defined. If the application
By default, debug mode is on if DEBUG is non-zero. If the application
uses this function, it should make sure that all object memory allocated
is deallocated with the same value of debug mode. Otherwise, the
delete operator might try to look for memory information that does not
@@ -207,8 +195,6 @@ the WXTRACELEVEL macro to specify how detailed the trace information is; setting
a different level will only have an effect if trace statements in the application
specify a value other than one.
This is obsolete, replaced by \helpref{wxLog}{wxlog} functionality.
\wxheading{See also}
\helpref{wxDebugContext::GetLevel}{wxdebugcontextgetlevel}
@@ -220,8 +206,6 @@ This is obsolete, replaced by \helpref{wxLog}{wxlog} functionality.
Sets the debugging stream to be the debugger (Windows) or standard error (other platforms).
This is the default setting. The existing stream will be flushed and deleted.
This is obsolete, replaced by \helpref{wxLog}{wxlog} functionality.
\membersection{wxDebugContext::SetStream}\label{wxdebugcontextsetstream}
\func{void}{SetStream}{\param{ostream* }{stream}, \param{streambuf* }{streamBuf = NULL}}
@@ -229,8 +213,6 @@ This is obsolete, replaced by \helpref{wxLog}{wxlog} functionality.
Sets the stream and optionally, stream buffer associated with the debug context.
This operation flushes and deletes the existing stream (and stream buffer if any).
This is obsolete, replaced by \helpref{wxLog}{wxlog} functionality.
\wxheading{Parameters}
\docparam{stream}{Stream to associate with the debug context. Do not set this to NULL.}
@@ -249,16 +231,10 @@ Windows, an ostream constructed with this buffer outputs
to the debugger, or other program that intercepts debugging
output. On other platforms, the output goes to standard error (cerr).
This is soon to be obsolete, replaced by \helpref{wxLog}{wxlog} functionality.
\wxheading{Derived from}
streambuf
\wxheading{Include files}
<wx/memory.h>
\wxheading{Example}
\begin{verbatim}

View File

@@ -1,48 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: dialevt.tex
%% Purpose: wxDialUpEvent documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 08.04.00
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxDialUpEvent}}\label{wxdialupevent}
This is the event class for the dialup events sent by
\helpref{wxDialUpManager}{wxdialupmanager}.
\wxheading{Derived from}
\helpref{wxEvent}{wxevent}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/dialup.h>
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDialUpEvent::wxDialUpEvent}\label{wxdialupeventwxdialupevent}
\func{}{wxDialUpEvent}{\param{bool }{isConnected}, \param{bool }{isOwnEvent}}
Constructor is only used by \helpref{wxDialUpManager}{wxdialupmanager}.
\membersection{wxDialUpEvent::IsConnectedEvent}\label{wxdialupeventisconnectedevent}
\constfunc{bool}{IsConnectedEvent}{\void}
Is this a {\tt CONNECTED} or {\tt DISCONNECTED} event? In other words, does it
notify about transition from offline to online state or vice versa?
\membersection{wxDialUpEvent::IsOwnEvent}\label{wxdialupeventisownevent}
\constfunc{bool}{IsOwnEvent}{\void}
Does this event come from wxDialUpManager::Dial() or from some extrenal
process (i.e. does it result from our own attempt to establish the
connection)?

View File

@@ -1,91 +1,42 @@
\section{\class{wxDialog}}\label{wxdialog}
A dialog box is a window with a title bar and sometimes a system menu, which
can be moved around the screen. It can contain controls and other windows and
is usually used to allow the user to make some choice or to answer a question.
A dialog box is a window with a title bar and sometimes a system menu, which can be moved around
the screen. It can contain controls and other windows.
\wxheading{Derived from}
\helpref{wxPanel}{wxpanel}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/dialog.h>
\wxheading{Remarks}
There are two kinds of dialog -- {\it modal}\ and {\it modeless}. A modal dialog
blocks program flow and user input on other windows until it is dismissed,
whereas a modeless dialog behaves more like a frame in that program flow
continues, and input on other windows is still possible. To show a modal dialog
you should use \helpref{ShowModal}{wxdialogshowmodal} method while to show
dialog modelessly you simply use \helpref{Show}{wxdialogshow}, just as with the
frames.
There are two kinds of dialog - {\it modal} and {\it modeless}. A modal dialog
blocks program flow and user input on other windows until it is dismissed, whereas a modeless dialog behaves more
like a frame in that program flow continues, and input on other windows is still possible.
You specify the type of dialog with the {\bf wxDIALOG\_MODAL} and {\bf wxDIALOG\_MODELESS} window
styles.
Note that the modal dialogs are one of the very few examples of
wxWindow-derived objects which may be created on the stack and not on the heap.
In other words, although this code snippet
\begin{verbatim}
void AskUser()
{
MyAskDialog *dlg = new MyAskDialog(...);
if ( dlg->ShowModal() == wxID_OK )
...
//else: dialog was cancelled or some another button pressed
A dialog may be loaded from a wxWindows resource file (extension {\tt wxr}).
dlg->Destroy();
}
\end{verbatim}
works, you can also achieve the same result by using a simpler code fragment
below:
\begin{verbatim}
void AskUser()
{
MyAskDialog dlg(...);
if ( dlg.ShowModal() == wxID_OK )
...
// no need to call Destroy() here
}
\end{verbatim}
A dialog may be loaded from a wxWindows resource file (extension {\tt wxr}),
which may itself be created by Dialog Editor. For details, see
\helpref{The wxWindows resource system}{resourceformats},
\helpref{wxWindows resource functions}{resourcefuncs}
and the resource sample.
An application can define an \helpref{wxCloseEvent}{wxcloseevent} handler for
the dialog to respond to system close events.
An application can define an \helpref{OnCloseWindow}{wxwindowonclosewindow} handler for the
dialog to respond to system close events.
\wxheading{Window styles}
\twocolwidtha{5cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxCAPTION}}{Puts a caption on the dialog box.}
\twocolitem{\windowstyle{wxDEFAULT\_DIALOG\_STYLE}}{Equivalent to a combination of wxCAPTION and wxSYSTEM\_MENU (the latter is not used under Unix)}
\twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Display a resizeable frame around the window.}
\twocolitem{\windowstyle{wxSYSTEM\_MENU}}{Display a system menu.}
\twocolitem{\windowstyle{wxTHICK\_FRAME}}{Display a thick frame around the window.}
\twocolitem{\windowstyle{wxSTAY\_ON\_TOP}}{The dialog stays on top of all other windows (Windows only).}
\twocolitem{\windowstyle{wxCAPTION}}{Puts a caption on the dialog box (Motif only).}
\twocolitem{\windowstyle{wxDEFAULT\_DIALOG\_STYLE}}{Equivalent to a combination of wxCAPTION, wxSYSTEM\_MENU and wxTHICK\_FRAME}
\twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Display a resizeable frame around the window (Motif only).}
\twocolitem{\windowstyle{wxSYSTEM\_MENU}}{Display a system menu (Motif only).}
\twocolitem{\windowstyle{wxTHICK\_FRAME}}{Display a thick frame around the window (Motif only).}
\twocolitem{\windowstyle{wxNO\_3D}}{Under Windows, specifies that the child controls
should not have 3D borders unless specified in the control.}
\twocolitem{\windowstyle{wxDIALOG\_NO\_PARENT}}{By default, the dialogs created
with {\tt NULL} parent window will be given the
\helpref{applications top level window}{wxappgettopwindow} as parent. Use this
style to prevent this from happening and create a really orphan dialog (note
that this is not recommended for modal dialogs).}
\twocolitem{\windowstyle{wxDIALOG\_EX\_CONTEXTHELP}}{Under Windows, puts a query button on the
caption. When pressed, Windows will go into a context-sensitive help mode and wxWindows will send
a wxEVT\_HELP event if the user clicked on an application window. {\it Note}\ that this is an extended
style and must be set by calling \helpref{SetExtraStyle}{wxwindowsetextrastyle} before Create is called (two-step construction).}
\end{twocollist}
Under Unix or Linux, MWM (the Motif Window Manager) or other window managers
recognizing the MHM hints should be running for any of these styles to have an
effect.
Under Motif, MWM (the Motif Window Manager) should be running for any of these styles to have an effect.
See also \helpref{Generic window styles}{windowstyles}.
@@ -177,24 +128,8 @@ invocation.
\wxheading{See also}
\helpref{wxDialog::ShowModal}{wxdialogshowmodal},\rtfsp
\helpref{wxDialog::GetReturnCode}{wxdialoggetreturncode},\rtfsp
\helpref{wxDialog::SetReturnCode}{wxdialogsetreturncode}
\membersection{wxDialog::GetReturnCode}\label{wxdialoggetreturncode}
\func{int}{GetReturnCode}{\void}
Gets the return code for this window.
\wxheading{Remarks}
A return code is normally associated with a modal dialog, where \helpref{wxDialog::ShowModal}{wxdialogshowmodal} returns
a code to the application.
\wxheading{See also}
\helpref{wxDialog::SetReturnCode}{wxdialogsetreturncode}, \helpref{wxDialog::ShowModal}{wxdialogshowmodal},\rtfsp
\helpref{wxDialog::EndModal}{wxdialogendmodal}
\helpref{wxWindow::GetReturnCode}{wxwindowgetreturncode},\rtfsp
\helpref{wxWindow::SetReturnCode}{wxwindowsetreturncode}
\membersection{wxDialog::GetTitle}\label{wxdialoggettitle}
@@ -206,7 +141,7 @@ Returns the title of the dialog box.
\func{void}{Iconize}{\param{const bool}{ iconize}}
Iconizes or restores the dialog. Windows only.
Iconizes or restores the dialog.
\wxheading{Parameters}
@@ -224,7 +159,7 @@ calling {\tt Iconize(FALSE)} will bring the window to the front, as does
\constfunc{bool}{IsIconized}{\void}
Returns TRUE if the dialog box is iconized. Windows only.
Returns TRUE if the dialog box is iconized.
\wxheading{Remarks}
@@ -243,7 +178,7 @@ Returns TRUE if the dialog box is modal, FALSE otherwise.
This member is called to allow the window to intercept keyboard events
before they are processed by child windows.
%For more information, see \helpref{wxWindow::OnCharHook}{wxwindowoncharhook}
For more information, see \helpref{wxWindow::OnCharHook}{wxwindowoncharhook}
\wxheading{Remarks}
@@ -311,44 +246,17 @@ The default handler for wxEVT\_SYS\_COLOUR\_CHANGED.
Changes the dialog's colour to conform to the current settings (Windows only).
Add an event table entry for your dialog class if you wish the behaviour
to be different (such as keeping a user-defined
background colour). If you do override this function, call wxEvent::Skip to
background colour). If you do override this function, call \helpref{wxWindow::OnSysColourChanged}{wxwindowonsyscolourchanged} to
propagate the notification to child windows and controls.
\wxheading{See also}
\helpref{wxSysColourChangedEvent}{wxsyscolourchangedevent}
\membersection{wxDialog::SetIcon}\label{wxdialogseticon}
\func{void}{SetIcon}{\param{const wxIcon\& }{icon}}
Sets the icon for this dialog.
\wxheading{Parameters}
\docparam{icon}{The icon to associate with this dialog.}
See also \helpref{wxIcon}{wxicon}.
\membersection{wxDialog::SetIcons}\label{wxdialogseticons}
\func{void}{SetIcons}{\param{const wxIconBundle\& }{icons}}
Sets the icons for this dialog.
\wxheading{Parameters}
\docparam{icons}{The icons to associate with this dialog.}
See also \helpref{wxIconBundle}{wxiconbundle}.
\membersection{wxDialog::SetModal}\label{wxdialogsetmodal}
\func{void}{SetModal}{\param{const bool}{ flag}}
{\bf NB:} This function is deprecated and doesn't work for all ports, just use
\helpref{ShowModal}{wxdialogshowmodal} to show a modal dialog instead.
Allows the programmer to specify whether the dialog box is modal (wxDialog::Show blocks control
until the dialog is hidden) or modeless (control returns immediately).
@@ -356,26 +264,6 @@ until the dialog is hidden) or modeless (control returns immediately).
\docparam{flag}{If TRUE, the dialog will be modal, otherwise it will be modeless.}
\membersection{wxDialog::SetReturnCode}\label{wxdialogsetreturncode}
\func{void}{SetReturnCode}{\param{int }{retCode}}
Sets the return code for this window.
\wxheading{Parameters}
\docparam{retCode}{The integer return code, usually a control identifier.}
\wxheading{Remarks}
A return code is normally associated with a modal dialog, where \helpref{wxDialog::ShowModal}{wxdialogshowmodal} returns
a code to the application. The function \helpref{wxDialog::EndModal}{wxdialogendmodal} calls {\bf SetReturnCode}.
\wxheading{See also}
\helpref{wxDialog::GetReturnCode}{wxdialoggetreturncode}, \helpref{wxDialog::ShowModal}{wxdialogshowmodal},\rtfsp
\helpref{wxDialog::EndModal}{wxdialogendmodal}
\membersection{wxDialog::SetTitle}\label{wxdialogsettitle}
\func{void}{SetTitle}{\param{const wxString\& }{ title}}
@@ -411,11 +299,12 @@ Shows a modal dialog. Program flow does not return until the dialog has been dis
\wxheading{Return value}
The return value is the value set with \helpref{wxDialog::SetReturnCode}{wxdialogsetreturncode}.
The return value is the value set with \helpref{wxWindow::SetReturnCode}{wxwindowsetreturncode}.
\wxheading{See also}
\helpref{wxDialog::EndModal}{wxdialogendmodal},\rtfsp
\helpref{wxDialog:GetReturnCode}{wxdialoggetreturncode},\rtfsp
\helpref{wxDialog::SetReturnCode}{wxdialogsetreturncode}
\helpref{wxWindow::GetReturnCode}{wxwindowgetreturncode},\rtfsp
\helpref{wxWindow::SetReturnCode}{wxwindowsetreturncode}

View File

@@ -1,215 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: dialup.tex
%% Purpose: wxDialUpManager documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 08.04.00
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxDialUpManager}}\label{wxdialupmanager}
This class encapsulates functions dealing with verifying the connection status
of the workstation (connected to the Internet via a direct connection,
connected through a modem or not connected at all) and to establish this
connection if possible/required (i.e. in the case of the modem).
The program may also wish to be notified about the change in the connection
status (for example, to perform some action when the user connects to the
network the next time or, on the contrary, to stop receiving data from the net
when the user hangs up the modem). For this, you need to use one of the event
macros described below.
This class is different from other wxWindows classes in that there is at most
one instance of this class in the program accessed via
\helpref{wxDialUpManager::Create()}{wxdialupmanagercreate} and you can't
create the objects of this class directly.
\wxheading{Derived from}
No base class
\wxheading{Include files}
<wx/dialup.h>
\wxheading{Event table macros}
To be notified about the change in the network connection status, use these
event handler macros to direct input to member functions that take a
\helpref{wxDialUpEvent}{wxdialupevent} argument.
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_DIALUP\_CONNECTED(func)}}{A connection with the network was established.}
\twocolitem{{\bf EVT\_DIALUP\_DISCONNECTED(func)}}{The connection with the network was lost.}
\end{twocollist}%
\wxheading{See also}
\helpref{dialup sample}{sampledialup}\\
\helpref{wxDialUpEvent}{wxdialupevent}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDialUpManager::Create}\label{wxdialupmanagercreate}
\func{wxDialUpManager*}{Create}{\void}
This function should create and return the object of the platform-specific
class derived from wxDialUpManager. You should delete the pointer when you are
done with it.
\membersection{wxDialUpManager::IsOk}\label{wxdialupmanagerisok}
\constfunc{bool}{IsOk}{\void}
Returns {\tt TRUE} if the dialup manager was initialized correctly. If this
function returns {\tt FALSE}, no other functions will work neither, so it is a
good idea to call this function and check its result before calling any other
wxDialUpManager methods
\membersection{wxDialUpManager::\destruct{wxDialUpManager}}\label{wxdialupmanagerdtor}
\func{}{\destruct{wxDialUpManager}}{\void}
Destructor.
\membersection{wxDialUpManager::GetISPNames}\label{wxdialupmanagergetispnames}
\constfunc{size\_t}{GetISPNames}{\param{wxArrayString\& }{names}}
This function is only implemented under Windows.
Fills the array with the names of all possible values for the first
parameter to \helpref{Dial()}{wxdialupmanagerdial} on this machine and returns
their number (may be $0$).
\membersection{wxDialUpManager::Dial}\label{wxdialupmanagerdial}
\func{bool}{Dial}{\param{const wxString\& }{nameOfISP = wxEmptyString}, \param{const wxString\& }{username = wxEmptyString}, \param{const wxString\& }{password = wxEmptyString}, \param{bool }{async = TRUE}}
Dial the given ISP, use {\it username} and {\it password} to authenticate.
The parameters are only used under Windows currently, for Unix you should use
\helpref{SetConnectCommand}{wxdialupmanagersetconnectcommand} to customize this
functions behaviour.
If no {\it nameOfISP} is given, the function will select the default one
(proposing the user to choose among all connections defined on this machine)
and if no username and/or password are given, the function will try to do
without them, but will ask the user if really needed.
If {\it async} parameter is {\tt FALSE}, the function waits until the end of dialing
and returns {\tt TRUE} upon successful completion.
If {\it async} is {\tt TRUE}, the function only initiates the connection and
returns immediately - the result is reported via events (an event is sent
anyhow, but if dialing failed it will be a DISCONNECTED one).
\membersection{wxDialUpManager::IsDialing}\label{wxdialupmanagerisdialing}
\constfunc{bool}{IsDialing}{\void}
Returns TRUE if (async) dialing is in progress.
\wxheading{See also}
\helpref{Dial}{wxdialupmanagerdial}
\membersection{wxDialUpManager::CancelDialing}\label{wxdialupmanagercanceldialing}
\func{bool}{CancelDialing}{\void}
Cancel dialing the number initiated with \helpref{Dial}{wxdialupmanagerdial}
with async parameter equal to {\tt TRUE}.
Note that this won't result in DISCONNECTED event being sent.
\wxheading{See also}
\helpref{IsDialing}{wxdialupmanagerisdialing}
\membersection{wxDialUpManager::HangUp}\label{wxdialupmanagerhangup}
\func{bool}{HangUp}{\void}
Hang up the currently active dial up connection.
\membersection{wxDialUpManager::IsAlwaysOnline}\label{wxdialupmanagerisalwaysonline}
\constfunc{bool}{IsAlwaysOnline}{\void}
Returns {\tt TRUE} if the computer has a permanent network connection (i.e. is
on a LAN) and so there is no need to use Dial() function to go online.
{\bf NB:} this functions tries to guess the result and it is not always
guaranteed to be correct, so it is better to ask user for
confirmation or give him a possibility to override it.
\membersection{wxDialUpManager::IsOnline}\label{wxdialupmanagerisonline}
\constfunc{bool}{IsOnline}{\void}
Returns {\tt TRUE} if the computer is connected to the network: under Windows,
this just means that a RAS connection exists, under Unix we check that
the "well-known host" (as specified by
\helpref{SetWellKnownHost}{wxdialupmanagersetwellknownhost}) is reachable.
\membersection{wxDialUpManager::SetOnlineStatus}\label{wxdialupmanagersetonlinestatus}
\func{void}{SetOnlineStatus}{\param{bool }{isOnline = TRUE}}
Sometimes the built-in logic for determining the online status may fail,
so, in general, the user should be allowed to override it. This function
allows to forcefully set the online status - whatever our internal
algorithm may think about it.
\wxheading{See also}
\helpref{IsOnline}{wxdialupmanagerisonline}
\membersection{wxDialUpManager::EnableAutoCheckOnlineStatus}\label{wxdialupmanagerenableautocheckonlinestatus}
\func{bool}{EnableAutoCheckOnlineStatus}{\param{size\_t }{nSeconds = 60}}
Enable automatic checks for the connection status and sending of
{\tt wxEVT\_DIALUP\_CONNECTED/wxEVT\_DIALUP\_DISCONNECTED} events. The interval
parameter is only for Unix where we do the check manually and specifies how
often should we repeat the check (each minute by default). Under Windows, the
notification about the change of connection status is sent by the system and so
we don't do any polling and this parameter is ignored.
Returns {\tt FALSE} if couldn't set up automatic check for online status.
\membersection{wxDialUpManager::DisableAutoCheckOnlineStatus}\label{wxdialupmanagerdisableautocheckonlinestatus}
\func{void}{DisableAutoCheckOnlineStatus}{\void}
Disable automatic check for connection status change - notice that the
{\tt wxEVT\_DIALUP\_XXX} events won't be sent any more neither.
\membersection{wxDialUpManager::SetWellKnownHost}\label{wxdialupmanagersetwellknownhost}
\func{void}{SetWellKnownHost}{\param{const wxString\& }{hostname}, \param{int }{portno = 80}}
This method is for Unix only.
Under Unix, the value of well-known host is used to check whether we're
connected to the internet. It is unused under Windows, but this function
is always safe to call. The default value is {\tt www.yahoo.com:80}.
\membersection{wxDialUpManager::SetConnectCommand}\label{wxdialupmanagersetconnectcommand}
\func{}{SetConnectCommand}{\param{const wxString\& }{commandDial = wxT("/usr/bin/pon")}, \param{const wxString\& }{commandHangup = wxT("/usr/bin/poff")}}
This method is for Unix only.
Sets the commands to start up the network and to hang up again.
\wxheading{See also}
\helpref{Dial}{wxdialupmanagerdial}

View File

@@ -1,180 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: dir.tex
%% Purpose: wxDir documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 04.04.00
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxDir}}\label{wxdir}
wxDir is a portable equivalent of Unix {open/read/close}dir functions which
allow enumerating of the files in a directory. wxDir allows enumerate files as
well as directories.
wxDir also provides a flexible way to enumerate files recursively using
\helpref{Traverse}{wxdirtraverse} or a simpler
\helpref{GetAllFiles}{wxdirgetallfiles} function.
Example of use:
\begin{verbatim}
wxDir dir(wxGetCwd());
if ( !dir.IsOpened() )
{
// deal with the error here - wxDir would already log an error message
// explaining the exact reason of the failure
return;
}
puts("Enumerating object files in current directory:");
wxString filename;
bool cont = dir.GetFirst(&filename, filespec, flags);
while ( cont )
{
printf("%s\n", filename.c_str());
cont = dir.GetNext(&filename);
}
\end{verbatim}
\wxheading{Derived from}
No base class
\wxheading{Constants}
These flags define what kind of filenames is included in the list of files
enumerated by GetFirst/GetNext
{\small
\begin{verbatim}
enum
{
wxDIR_FILES = 0x0001, // include files
wxDIR_DIRS = 0x0002, // include directories
wxDIR_HIDDEN = 0x0004, // include hidden files
wxDIR_DOTDOT = 0x0008, // include '.' and '..'
// by default, enumerate everything except '.' and '..'
wxDIR_DEFAULT = wxDIR_FILES | wxDIR_DIRS | wxDIR_HIDDEN
}
\end{verbatim}
}
\wxheading{Include files}
<wx/dir.h>
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDir::Exists}\label{wxdirexists}
\func{static bool}{Exists}{\param{const wxString\& }{dir}}
Test for existence of a directory with the given name
\membersection{wxDir::wxDir}\label{wxdirwxdir}
\func{}{wxDir}{\void}
Default constructor, use \helpref{Open()}{wxdiropen} afterwards.
\func{}{wxDir}{\param{const wxString\& }{dir}}
Opens the directory for enumeration, use \helpref{IsOpened()}{wxdirisopened}
to test for errors.
\membersection{wxDir::\destruct{wxDir}}\label{wxdirdtor}
\func{}{\destruct{wxDir}}{\void}
Destructor cleans up the associated resources. It is not virtual and so this
class is not meant to be used polymorphically.
\membersection{wxDir::Open}\label{wxdiropen}
\func{bool}{Open}{\param{const wxString\& }{dir}}
Open the directory for enumerating, returns TRUE on success or FALSE if an
error occurred.
\membersection{wxDir::IsOpened}\label{wxdirisopened}
\constfunc{bool}{IsOpened}{\void}
Returns TRUE if the directory was successfully opened by a previous call to
\helpref{Open}{wxdiropen}.
\membersection{wxDir::GetFirst}\label{wxdirgetfirst}
\constfunc{bool}{GetFirst}{\param{wxString* }{filename}, \param{const wxString\& }{filespec = wxEmptyString}, \param{int }{flags = wxDIR\_DEFAULT}}
Start enumerating all files matching {\it filespec} (or all files if it is
empty) and flags, return TRUE on success.
\membersection{wxDir::GetNext}\label{wxdirgetnext}
\constfunc{bool}{GetNext}{\param{wxString* }{filename}}
Continue enumerating files satisfying the criteria specified by the last call
to \helpref{GetFirst}{wxdirgetfirst}.
\membersection{wxDir::HasFiles}\label{wxdirhasfiles}
\func{bool}{HasFiles}{\param{const wxString\& }{filespec = wxEmptyString}}
Returns {\tt TRUE} if the directory contains any files matching the given
{\it filespec}. If {\it filespec} is empty, look for any files at all. In any
case, even hidden files are taken into account.
\membersection{wxDir::HasSubDirs}\label{wxdirhassubdirs}
\func{bool}{HasSubDirs}{\param{const wxString\& }{dirspec = wxEmptyString}}
Returns {\tt TRUE} if the directory contains any subdirectories (if a non
empty {\it filespec} is given, only check for directories matching it).
The hidden subdirectories are taken into account as well.
\membersection{wxDir::Traverse}\label{wxdirtraverse}
\func{size\_t}{Traverse}{\param{wxDirTraverser\& }{sink}, \param{const wxString\& }{filespec = wxEmptyString}, \param{int }{flags = wxDIR\_DEFAULT}}
Enumerate all files and directories under the given directory recursively
calling the element of the provided \helpref{wxDirTraverser}{wxdirtraverser}
object for each of them.
More precisely, the function will really recurse into subdirectories if
{\it flags} contains {\tt wxDIR\_DIRS} flag. It will ignore the files (but
still possibly recurse into subdirectories) if {\tt wxDIR\_FILES} flag is
given.
For each found directory, \helpref{sink.OnDir()}{wxdirtraverserondir} is called
and \helpref{sink.OnFile()}{wxdirtraverseronfile} is called for every file.
Depending on the return value, the enumeration may continue or stop.
The function returns the total number of files found or {\tt (size\_t)-1} on
error.
See also: \helpref{GetAllFiles}{wxdirgetallfiles}
\membersection{wxDir::GetAllFiles}\label{wxdirgetallfiles}
\func{static size\_t}{GetAllFiles}{\param{const wxString\& }{dirname}, \param{wxArrayString *}{files}, \param{const wxString\& }{filespec = wxEmptyString}, \param{int }{flags = wxDIR\_DEFAULT}}
The function appends the names of all the files under directory {\it dirname}
to the array {\it files} (note that its old contents is preserved). Only files
matching the {\it filespec} are taken, with empty spec matching all the files.
The {\it flags} parameter should always include {\tt wxDIR\_FILES} or the array
would be unchanged and should include {\tt wxDIR\_DIRS} flag to recurse into
subdirectories (both flags are included in the value by default).
See also: \helpref{Traverse}{wxdirtraverse}

View File

@@ -1,171 +0,0 @@
\section{\class{wxGenericDirCtrl}}\label{wxgenericdirctrl}
This control can be used to place a directory listing (with optional files) on an arbitrary window.
The control contains a \helpref{wxTreeCtrl}{wxtreectrl} window representing the directory
hierarchy, and optionally, a \helpref{wxChoice}{wxchoice} window containing a list of filters.
\wxheading{Derived from}
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/dirctrl.h>
\wxheading{Window styles}
\twocolwidtha{5cm}
\begin{twocollist}
\twocolitem{\indexit{wxDIRCTRL\_DIR\_ONLY}}{Only show directories, and not files.}
\twocolitem{\indexit{wxDIRCTRL\_3D\_INTERNAL}}{Use 3D borders for internal controls.}
\twocolitem{\indexit{wxDIRCTRL\_SELECT\_FIRST}}{When setting the default path, select the first file in the directory.}
\twocolitem{\indexit{wxDIRCTRL\_SHOW\_FILTERS}}{Show the drop-down filter list.}
\twocolitem{\indexit{wxDIRCTRL\_EDIT\_LABELS}}{Allow the folder and file labels to be editable.}
\end{twocollist}
See also \helpref{Generic window styles}{windowstyles}.
\wxheading{Data structures}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxGenericDirCtrl::wxGenericDirCtrl}\label{wxgenericdirctrlwxgenericdirctrl}
\func{}{wxGenericDirCtrl}{\void}
Default constructor.
\func{}{wxGenericDirCtrl}{\param{wxWindow* }{parent}, \param{const wxWindowID }{id = -1},
\param{const wxString\& }{dir = wxDirDialogDefaultFolderStr}, \param{const wxPoint\& }{pos = wxDefaultPosition},
\param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxDIRCTRL\_3D\_INTERNAL|wxSUNKEN\_BORDER},
\param{const wxString\& }{filter = wxEmptyString},
\param{int }{defaultFilter = 0},
\param{const wxString\& }{name = wxTreeCtrlNameStr}}
Main constructor.
\wxheading{Parameters}
\docparam{parent}{Parent window.}
\docparam{id}{Window identifier.}
\docparam{dir}{Initial folder.}
\docparam{pos}{Position.}
\docparam{size}{Size.}
\docparam{style}{Window style. Please see \helpref{wxGenericDirCtrl}{wxgenericdirctrl} for a list of possible styles.}
\docparam{filter}{A filter string, using the same syntax as that for \helpref{wxFileDialog}{wxfiledialog}. This may be empty if filters
are not being used.
Example: ``All files (*.*)|*.*|JPEG files (*.jpg)|*.jpg"}
\docparam{defaultFilter}{The zero-indexed default filter setting.}
\docparam{name}{The window name.}
\membersection{wxGenericDirCtrl::\destruct{wxGenericDirCtrl}}\label{wxgenericdirctrldtor}
\func{}{\destruct{wxGenericDirCtrl}}{\void}
Destructor.
\membersection{wxGenericDirCtrl::Create}\label{wxgenericdirctrlcreate}
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{const wxWindowID }{id = -1}, \param{const wxString\& }{dir = wxDirDialogDefaultFolderStr}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxDIRCTRL\_3D\_INTERNAL|wxSUNKEN\_BORDER}, \param{const wxString\& }{filter = wxEmptyString}, \param{int }{defaultFilter = 0}, \param{const wxString\& }{name = wxTreeCtrlNameStr}}
Create function for two-step construction. See \helpref{wxGenericDirCtrl::wxGenericDirCtrl}{wxgenericdirctrlwxgenericdirctrl} for details.
\membersection{wxGenericDirCtrl::Init}\label{wxgenericdirctrlinit}
\func{void}{Init}{\void}
Initializes variables.
\membersection{wxGenericDirCtrl::ExpandPath}\label{wxgenericdirctrlexpandpath}
\func{bool}{ExpandPath}{\param{const wxString\& }{path}}
Tries to expand as much of the given path as possible, so that the filename or directory is visible in the tree control.
\membersection{wxGenericDirCtrl::GetDefaultPath}\label{wxgenericdirctrlgetdefaultpath}
\constfunc{wxString}{GetDefaultPath}{\void}
Gets the default path.
\membersection{wxGenericDirCtrl::GetPath}\label{wxgenericdirctrlgetpath}
\constfunc{wxString}{GetPath}{\void}
Gets the currently-selected directory or filename.
\membersection{wxGenericDirCtrl::GetFilePath}\label{wxgenericdirctrlgetfilepath}
\constfunc{wxString}{GetFilePath}{\void}
Gets selected filename path only (else empty string).
This function doesn't count a directory as a selection.
\membersection{wxGenericDirCtrl::GetFilter}\label{wxgenericdirctrlgetfilter}
\constfunc{wxString}{GetFilter}{\void}
Returns the filter string.
\membersection{wxGenericDirCtrl::GetFilterIndex}\label{wxgenericdirctrlgetfilterindex}
\constfunc{int}{GetFilterIndex}{\void}
Returns the current filter index (zero-based).
\membersection{wxGenericDirCtrl::GetFilterListCtrl}\label{wxgenericdirctrlgetfilterlistctrl}
\constfunc{wxDirFilterListCtrl*}{GetFilterListCtrl}{\void}
Returns a pointer to the filter list control (if present).
\membersection{wxGenericDirCtrl::GetRootId}\label{wxgenericdirctrlgetrootid}
\func{wxTreeItemId}{GetRootId}{\void}
Returns the root id for the tree control.
\membersection{wxGenericDirCtrl::GetTreeCtrl}\label{wxgenericdirctrlgettreectrl}
\constfunc{wxTreeCtrl*}{GetTreeCtrl}{\void}
Returns a pointer to the tree control.
\membersection{wxGenericDirCtrl::SetDefaultPath}\label{wxgenericdirctrlsetdefaultpath}
\func{void}{SetDefaultPath}{\param{const wxString\& }{path}}
Sets the default path.
\membersection{wxGenericDirCtrl::SetFilter}\label{wxgenericdirctrlsetfilter}
\func{void}{SetFilter}{\param{const wxString\& }{filter}}
Sets the filter string.
\membersection{wxGenericDirCtrl::SetFilterIndex}\label{wxgenericdirctrlsetfilterindex}
\func{void}{SetFilterIndex}{\param{int }{n}}
Sets the current filter index (zero-based).
\membersection{wxGenericDirCtrl::SetPath}\label{wxgenericdirctrlsetpath}
\func{void}{SetPath}{\param{const wxString\& }{path}}
Sets the current path.

Some files were not shown because too many files have changed in this diff Show More