*** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
85
distrib/msw/docsrc.rsp
Normal 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
|
||||||
|
|
||||||
|
|
538
distrib/msw/generic.rsp
Normal file
@@ -0,0 +1,538 @@
|
|||||||
|
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/*.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/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
|
||||||
|
|
128
distrib/msw/msw.rsp
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
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/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
@@ -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
@@ -0,0 +1,2 @@
|
|||||||
|
docs/winhelp/*.hlp
|
||||||
|
docs/winhelp/*.cnt
|
38
distrib/msw/wx_html.rsp
Normal 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
@@ -0,0 +1 @@
|
|||||||
|
docs/pdf/*.pdf
|
34
distrib/msw/zipdist.bat
Executable 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\generic.rsp
|
||||||
|
zip32 -@ %2\wx200msw.zip < %1\distrib\msw.rsp
|
||||||
|
zip32 -@ %2\wx200doc.zip < %1\distrib\docsrc.rsp
|
||||||
|
|
||||||
|
rem zip32 -@ %2\wx200ps.zip < %1\distrib\wx_ps.rsp
|
||||||
|
zip32 -@ %2\wx200hlp.zip < %1\distrib\wx_hlp.rsp
|
||||||
|
zip32 -@ %2\wx200htm.zip < %1\distrib\wx_html.rsp
|
||||||
|
zip32 -@ %2\wx200pdf.zip < %1\distrib\wx_pdf.rsp
|
||||||
|
|
||||||
|
cd %2
|
||||||
|
|
||||||
|
echo wxWindows archived.
|
||||||
|
goto end
|
||||||
|
|
||||||
|
:usage
|
||||||
|
echo DOS wxWindows distribution.
|
||||||
|
echo Usage: zipdistgeneric source destination
|
||||||
|
echo e.g. zipdistgeneric c:\wx b:
|
||||||
|
|
||||||
|
:end
|
BIN
samples/checklst/bell.bmp
Normal file
After Width: | Height: | Size: 370 B |
185
samples/checklst/checklst.cpp
Normal file
@@ -0,0 +1,185 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: checklst.cpp
|
||||||
|
// Purpose: wxCheckListBox sample
|
||||||
|
// Author: Vadim Zeitlin
|
||||||
|
// Modified by:
|
||||||
|
// Created: 13.11.97
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||||
|
// Licence: wxWindows license
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// headers & declarations
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
// For compilers that support precompilation, includes "wx.h".
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#ifdef __BORLANDC__
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WX_PRECOMP
|
||||||
|
#include "wx/wx.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "wx/ownerdrw.h"
|
||||||
|
#include "wx/menuitem.h"
|
||||||
|
#include "wx/msw/checklst.h"
|
||||||
|
|
||||||
|
// Define a new application type
|
||||||
|
class CheckListBoxApp: public wxApp
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
bool OnInit();
|
||||||
|
};
|
||||||
|
|
||||||
|
// Define a new frame type
|
||||||
|
class CheckListBoxFrame : public wxFrame
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// ctor & dtor
|
||||||
|
CheckListBoxFrame(wxFrame *frame, char *title, int x, int y, int w, int h);
|
||||||
|
~CheckListBoxFrame();
|
||||||
|
|
||||||
|
// notifications
|
||||||
|
void OnQuit (wxCommandEvent& event);
|
||||||
|
void OnAbout (wxCommandEvent& event);
|
||||||
|
void OnListboxSelect (wxCommandEvent& event);
|
||||||
|
void OnCheckboxToggle (wxCommandEvent& event);
|
||||||
|
void OnListboxDblClick (wxCommandEvent& event);
|
||||||
|
bool OnClose () { return TRUE; }
|
||||||
|
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
|
|
||||||
|
private:
|
||||||
|
wxCheckListBox *m_pListBox;
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
Menu_Quit = 1,
|
||||||
|
Control_First = 1000,
|
||||||
|
Control_Listbox, Control_Listbox2,
|
||||||
|
};
|
||||||
|
|
||||||
|
BEGIN_EVENT_TABLE(CheckListBoxFrame, wxFrame)
|
||||||
|
EVT_MENU(Menu_Quit, CheckListBoxFrame::OnQuit)
|
||||||
|
EVT_LISTBOX(Control_Listbox, CheckListBoxFrame::OnListboxSelect)
|
||||||
|
EVT_CHECKLISTBOX(Control_Listbox, CheckListBoxFrame::OnCheckboxToggle)
|
||||||
|
EVT_COMMAND(Control_Listbox, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED,
|
||||||
|
CheckListBoxFrame::OnListboxDblClick)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
IMPLEMENT_APP(CheckListBoxApp);
|
||||||
|
|
||||||
|
// init our app: create windows
|
||||||
|
bool CheckListBoxApp::OnInit(void)
|
||||||
|
{
|
||||||
|
CheckListBoxFrame *pFrame = new CheckListBoxFrame(NULL, "wxWindows Ownerdraw Sample",
|
||||||
|
50, 50, 450, 320);
|
||||||
|
SetTopWindow(pFrame);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// main frame constructor
|
||||||
|
CheckListBoxFrame::CheckListBoxFrame(wxFrame *frame, char *title, int x, int y, int w, int h)
|
||||||
|
: wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h))
|
||||||
|
{
|
||||||
|
// set the icon
|
||||||
|
SetIcon(wxIcon("mondrian"));
|
||||||
|
|
||||||
|
// Make a menubar
|
||||||
|
wxMenu *file_menu = new wxMenu;
|
||||||
|
|
||||||
|
// construct submenu
|
||||||
|
file_menu->Append(Menu_Quit, "E&xit");
|
||||||
|
|
||||||
|
wxMenuBar *menu_bar = new wxMenuBar;
|
||||||
|
menu_bar->Append(file_menu, "&File");
|
||||||
|
SetMenuBar(menu_bar);
|
||||||
|
|
||||||
|
// make a panel with some controls
|
||||||
|
wxPanel *pPanel = new wxPanel(this, -1, wxPoint(0, 0),
|
||||||
|
wxSize(400, 200), wxTAB_TRAVERSAL);
|
||||||
|
|
||||||
|
// check list box
|
||||||
|
static const char* aszChoices[] = { "Hello", "world", "and",
|
||||||
|
"goodbye", "cruel", "world",
|
||||||
|
"-------", "owner-drawn", "listbox" };
|
||||||
|
|
||||||
|
wxString *astrChoices = new wxString[WXSIZEOF(aszChoices)];
|
||||||
|
uint ui;
|
||||||
|
for ( ui = 0; ui < WXSIZEOF(aszChoices); ui++ )
|
||||||
|
astrChoices[ui] = aszChoices[ui];
|
||||||
|
|
||||||
|
m_pListBox = new wxCheckListBox
|
||||||
|
(
|
||||||
|
pPanel, // parent
|
||||||
|
Control_Listbox, // control id
|
||||||
|
wxPoint(10, 10), // listbox poistion
|
||||||
|
wxSize(400, 200), // listbox size
|
||||||
|
WXSIZEOF(aszChoices), // number of strings
|
||||||
|
astrChoices // array of strings
|
||||||
|
);
|
||||||
|
|
||||||
|
delete [] astrChoices;
|
||||||
|
|
||||||
|
for ( ui = 0; ui < WXSIZEOF(aszChoices); ui += 2 ) {
|
||||||
|
m_pListBox->GetItem(ui)->SetBackColor(wxColor(200, 200, 200));
|
||||||
|
}
|
||||||
|
|
||||||
|
m_pListBox->Check(2);
|
||||||
|
|
||||||
|
// create the status line
|
||||||
|
const int widths[] = { -1, 60 };
|
||||||
|
CreateStatusBar(2);
|
||||||
|
SetStatusWidths(2, widths);
|
||||||
|
SetStatusText("no selection", 0);
|
||||||
|
|
||||||
|
Show(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
CheckListBoxFrame::~CheckListBoxFrame()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void CheckListBoxFrame::OnQuit(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
Close(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CheckListBoxFrame::OnAbout(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
wxMessageDialog dialog(this, "Demo of wxCheckListBox control\n"
|
||||||
|
"About wxCheckListBox", wxYES_NO | wxCANCEL);
|
||||||
|
dialog.ShowModal();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CheckListBoxFrame::OnListboxSelect(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
wxString strSelection;
|
||||||
|
uint nSel = event.GetSelection();
|
||||||
|
strSelection.sprintf("item %d selected (%schecked)", nSel,
|
||||||
|
m_pListBox->IsChecked(nSel) ? "" : "not ");
|
||||||
|
SetStatusText(strSelection);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CheckListBoxFrame::OnListboxDblClick(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
wxString strSelection;
|
||||||
|
strSelection.sprintf("item %d double clicked", m_pListBox->GetSelection());
|
||||||
|
wxMessageDialog dialog(this, strSelection);
|
||||||
|
dialog.ShowModal();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CheckListBoxFrame::OnCheckboxToggle(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
wxString strSelection;
|
||||||
|
uint nItem = event.GetInt();
|
||||||
|
strSelection.sprintf("item %d was %schecked", nItem,
|
||||||
|
m_pListBox->IsChecked(nItem) ? "" : "un");
|
||||||
|
SetStatusText(strSelection);
|
||||||
|
}
|
8
samples/checklst/checklst.def
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
NAME CHECKLST
|
||||||
|
DESCRIPTION 'wxCheckListBox sample'
|
||||||
|
EXETYPE WINDOWS
|
||||||
|
STUB 'WINSTUB.EXE'
|
||||||
|
CODE PRELOAD MOVEABLE DISCARDABLE
|
||||||
|
DATA PRELOAD MOVEABLE MULTIPLE
|
||||||
|
HEAPSIZE 4048
|
||||||
|
STACKSIZE 16000
|
6
samples/checklst/checklst.rc
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
mondrian ICON "mondrian.ico"
|
||||||
|
bell BITMAP "bell.bmp"
|
||||||
|
sound BITMAP "sound.bmp"
|
||||||
|
nosound BITMAP "nosound.bmp"
|
||||||
|
#include "wx/msw/wx.rc"
|
||||||
|
|
64
samples/checklst/makefile.b32
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.bcc
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1993
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile : Builds checklst example (DOS).
|
||||||
|
|
||||||
|
# WXWIN and BCCDIR are set by parent make
|
||||||
|
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
!include $(WXDIR)\src\makeb32.env
|
||||||
|
|
||||||
|
WXLIBDIR = $(WXDIR)\lib
|
||||||
|
WXINC = $(WXDIR)\include\msw
|
||||||
|
WXLIB = $(WXLIBDIR)\wx32.lib
|
||||||
|
LIBS=$(WXLIB) cw32 import32
|
||||||
|
|
||||||
|
TARGET=checklst
|
||||||
|
|
||||||
|
!if "$(FINAL)" == "0"
|
||||||
|
LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
|
||||||
|
OPT = -Od
|
||||||
|
DEBUG_FLAGS= -v
|
||||||
|
!else
|
||||||
|
LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
|
||||||
|
OPT = -Od
|
||||||
|
DEBUG_FLAGS =
|
||||||
|
!endif
|
||||||
|
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
|
||||||
|
|
||||||
|
OBJECTS = checklst.obj
|
||||||
|
|
||||||
|
$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res
|
||||||
|
tlink32 $(LINKFLAGS) @&&!
|
||||||
|
c0w32.obj $(OBJECTS)
|
||||||
|
$(TARGET)
|
||||||
|
nul
|
||||||
|
$(LIBS)
|
||||||
|
$(TARGET).def
|
||||||
|
!
|
||||||
|
brc32 -K $(TARGET).res
|
||||||
|
|
||||||
|
.$(SRCSUFF).obj:
|
||||||
|
bcc32 $(CPPFLAGS) -c {$< }
|
||||||
|
|
||||||
|
.c.obj:
|
||||||
|
bcc32 $(CPPFLAGS) -P- -c {$< }
|
||||||
|
|
||||||
|
checklst.obj: checklst.$(SRCSUFF)
|
||||||
|
|
||||||
|
$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
|
||||||
|
brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-erase *.obj
|
||||||
|
-erase *.exe
|
||||||
|
-erase *.res
|
||||||
|
-erase *.map
|
||||||
|
-erase *.rws
|
||||||
|
|
65
samples/checklst/makefile.dos
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.dos
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1993
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile : Builds checklst example (DOS).
|
||||||
|
# Use FINAL=1 argument to nmake to build final version with no debugging
|
||||||
|
# info
|
||||||
|
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\makemsc.env
|
||||||
|
|
||||||
|
THISDIR = $(WXDIR)\samples\checklst
|
||||||
|
|
||||||
|
!ifndef FINAL
|
||||||
|
FINAL=0
|
||||||
|
!endif
|
||||||
|
|
||||||
|
HEADERS =
|
||||||
|
SOURCES = checklst.$(SRCSUFF)
|
||||||
|
OBJECTS = checklst.obj
|
||||||
|
|
||||||
|
all: checklst.exe
|
||||||
|
|
||||||
|
wx:
|
||||||
|
cd $(WXDIR)\src\msw
|
||||||
|
nmake -f makefile.dos FINAL=$(FINAL)
|
||||||
|
cd $(THISDIR)
|
||||||
|
|
||||||
|
wxclean:
|
||||||
|
cd $(WXDIR)\src\msw
|
||||||
|
nmake -f makefile.dos clean
|
||||||
|
cd $(THISDIR)
|
||||||
|
|
||||||
|
checklst.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) checklst.obj checklst.def checklst.res
|
||||||
|
link $(LINKFLAGS) @<<
|
||||||
|
checklst.obj $(WXDIR)\src\msw\dummy.obj,
|
||||||
|
checklst,
|
||||||
|
NUL,
|
||||||
|
$(LIBS),
|
||||||
|
checklst.def
|
||||||
|
;
|
||||||
|
<<
|
||||||
|
rc -K checklst.res
|
||||||
|
|
||||||
|
checklst.obj: checklst.$(SRCSUFF)
|
||||||
|
cl @<<
|
||||||
|
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
|
||||||
|
<<
|
||||||
|
|
||||||
|
checklst.res : checklst.rc $(WXDIR)\include\wx\msw\wx.rc
|
||||||
|
rc -r /i$(WXDIR)\include checklst
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-erase *.obj
|
||||||
|
-erase *.exe
|
||||||
|
-erase *.res
|
||||||
|
-erase *.map
|
||||||
|
-erase *.sbr
|
||||||
|
-erase *.pdb
|
37
samples/checklst/makefile.g95
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.unx
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1993
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile for checklst example (UNIX).
|
||||||
|
|
||||||
|
WXDIR = ../..
|
||||||
|
|
||||||
|
# All common UNIX compiler flags and options are now in
|
||||||
|
# this central makefile.
|
||||||
|
include $(WXDIR)/src/makeg95.env
|
||||||
|
|
||||||
|
OBJECTS = $(OBJDIR)/checklst.$(OBJSUFF) $(OBJDIR)/checklst_resources.$(OBJSUFF)
|
||||||
|
|
||||||
|
all: $(OBJDIR) checklst$(GUISUFFIX)$(EXESUFF)
|
||||||
|
|
||||||
|
wx:
|
||||||
|
|
||||||
|
$(OBJDIR):
|
||||||
|
mkdir $(OBJDIR)
|
||||||
|
|
||||||
|
checklst$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB)
|
||||||
|
$(CC) $(LDFLAGS) -o checklst$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS)
|
||||||
|
|
||||||
|
$(OBJDIR)/checklst.$(OBJSUFF): checklst.$(SRCSUFF)
|
||||||
|
$(CC) -c $(CPPFLAGS) -o $@ checklst.$(SRCSUFF)
|
||||||
|
|
||||||
|
$(OBJDIR)/checklst_resources.o: checklst.rc
|
||||||
|
$(RESCOMP) -i checklst.rc -o $(OBJDIR)/checklst_resources.o $(RESFLAGS)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(OBJECTS) checklst$(GUISUFFIX).exe core *.rsc *.res
|
64
samples/checklst/makefile.nt
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.nt
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1993
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile : Builds checklst example (MS VC++).
|
||||||
|
# Use FINAL=1 argument to nmake to build final version with no debugging
|
||||||
|
# info
|
||||||
|
|
||||||
|
# Set WXDIR for your system
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
|
WXUSINGDLL=0
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\ntwxwin.mak
|
||||||
|
|
||||||
|
THISDIR = $(WXDIR)\samples\checklst
|
||||||
|
PROGRAM=checklst
|
||||||
|
|
||||||
|
OBJECTS = $(PROGRAM).obj
|
||||||
|
|
||||||
|
$(PROGRAM): $(PROGRAM).exe
|
||||||
|
|
||||||
|
all: wx $(PROGRAM).exe
|
||||||
|
|
||||||
|
wx:
|
||||||
|
cd $(WXDIR)\src\msw
|
||||||
|
nmake -f makefile.nt FINAL=$(FINAL)
|
||||||
|
cd $(THISDIR)
|
||||||
|
|
||||||
|
wxclean:
|
||||||
|
cd $(WXDIR)\src\msw
|
||||||
|
nmake -f makefile.nt clean
|
||||||
|
cd $(THISDIR)
|
||||||
|
|
||||||
|
$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res
|
||||||
|
$(link) @<<
|
||||||
|
-out:$(PROGRAM).exe
|
||||||
|
$(LINKFLAGS)
|
||||||
|
$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res
|
||||||
|
$(LIBS)
|
||||||
|
<<
|
||||||
|
|
||||||
|
|
||||||
|
$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ)
|
||||||
|
$(cc) @<<
|
||||||
|
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
|
||||||
|
<<
|
||||||
|
|
||||||
|
$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
|
||||||
|
$(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc
|
||||||
|
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-erase *.obj
|
||||||
|
-erase *.exe
|
||||||
|
-erase *.res
|
||||||
|
-erase *.map
|
||||||
|
-erase *.sbr
|
||||||
|
-erase *.pdb
|
BIN
samples/checklst/mondrian.ico
Normal file
After Width: | Height: | Size: 766 B |
BIN
samples/checklst/nosound.bmp
Normal file
After Width: | Height: | Size: 370 B |
BIN
samples/checklst/sound.bmp
Normal file
After Width: | Height: | Size: 370 B |
BIN
samples/dialogs/aiai.ico
Normal file
After Width: | Height: | Size: 766 B |
293
samples/dialogs/dialogs.cpp
Normal file
@@ -0,0 +1,293 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: dialogs.cpp
|
||||||
|
// Purpose: Common dialogs demo
|
||||||
|
// Author: Julian Smart
|
||||||
|
// Modified by:
|
||||||
|
// Created: 04/01/98
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) Julian Smart and Markus Holzem
|
||||||
|
// Licence: wxWindows license
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifdef __GNUG__
|
||||||
|
#pragma implementation
|
||||||
|
#pragma interface
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// For compilers that support precompilation, includes "wx/wx.h".
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#ifdef __BORLANDC__
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WX_PRECOMP
|
||||||
|
#include "wx/wx.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <wx/colordlg.h>
|
||||||
|
#include <wx/filedlg.h>
|
||||||
|
#include <wx/dirdlg.h>
|
||||||
|
#include <wx/fontdlg.h>
|
||||||
|
#include <wx/choicdlg.h>
|
||||||
|
|
||||||
|
#if !defined(__WINDOWS__) || USE_GENERIC_DIALOGS_IN_MSW
|
||||||
|
#include <wx/generic/colrdlgg.h>
|
||||||
|
#include <wx/generic/fontdlgg.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "dialogs.h"
|
||||||
|
|
||||||
|
IMPLEMENT_APP(MyApp)
|
||||||
|
|
||||||
|
MyCanvas *myCanvas = NULL;
|
||||||
|
|
||||||
|
// A macro needed for some compilers (AIX) that need 'main' to be defined
|
||||||
|
// in the application itself.
|
||||||
|
IMPLEMENT_WXWIN_MAIN
|
||||||
|
|
||||||
|
// `Main program' equivalent, creating windows and returning main app frame
|
||||||
|
bool MyApp::OnInit(void)
|
||||||
|
{
|
||||||
|
m_canvasTextColour = wxColour("BLACK");
|
||||||
|
m_canvasFont = *wxNORMAL_FONT;
|
||||||
|
|
||||||
|
// Create the main frame window
|
||||||
|
MyFrame *frame = new MyFrame(NULL, "wxWindows dialogs example", wxPoint(50, 50), wxSize(400, 300));
|
||||||
|
|
||||||
|
// Make a menubar
|
||||||
|
wxMenu *file_menu = new wxMenu;
|
||||||
|
|
||||||
|
file_menu->Append(DIALOGS_CHOOSE_COLOUR, "&Choose colour");
|
||||||
|
|
||||||
|
#if !defined(__WINDOWS__) || USE_GENERIC_DIALOGS_IN_MSW
|
||||||
|
file_menu->Append(DIALOGS_CHOOSE_COLOUR_GENERIC, "Choose colour (&generic)");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
file_menu->AppendSeparator();
|
||||||
|
file_menu->Append(DIALOGS_CHOOSE_FONT, "Choose &font");
|
||||||
|
|
||||||
|
#if !defined(__WINDOWS__) || USE_GENERIC_DIALOGS_IN_MSW
|
||||||
|
file_menu->Append(DIALOGS_CHOOSE_FONT_GENERIC, "Choose f&ont (generic)");
|
||||||
|
|
||||||
|
#endif
|
||||||
|
file_menu->AppendSeparator();
|
||||||
|
file_menu->Append(DIALOGS_MESSAGE_BOX, "&Message box");
|
||||||
|
file_menu->Append(DIALOGS_TEXT_ENTRY, "Text &entry");
|
||||||
|
file_menu->Append(DIALOGS_SINGLE_CHOICE, "&Single choice");
|
||||||
|
file_menu->AppendSeparator();
|
||||||
|
file_menu->Append(DIALOGS_FILE_OPEN, "&Open file");
|
||||||
|
file_menu->Append(DIALOGS_FILE_SAVE, "Sa&ve file");
|
||||||
|
file_menu->Append(DIALOGS_DIR_CHOOSE, "&Choose a directory");
|
||||||
|
file_menu->AppendSeparator();
|
||||||
|
file_menu->Append(wxID_EXIT, "E&xit");
|
||||||
|
wxMenuBar *menu_bar = new wxMenuBar;
|
||||||
|
menu_bar->Append(file_menu, "&File");
|
||||||
|
frame->SetMenuBar(menu_bar);
|
||||||
|
|
||||||
|
myCanvas = new MyCanvas(frame);
|
||||||
|
myCanvas->SetBackgroundColour(*wxWHITE);
|
||||||
|
|
||||||
|
frame->Centre(wxBOTH);
|
||||||
|
|
||||||
|
// Show the frame
|
||||||
|
frame->Show(TRUE);
|
||||||
|
|
||||||
|
SetTopWindow(frame);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// My frame constructor
|
||||||
|
MyFrame::MyFrame(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size):
|
||||||
|
wxFrame(parent, -1, title, pos, size)
|
||||||
|
{}
|
||||||
|
|
||||||
|
void MyFrame::ChooseColour(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
wxColourData data;
|
||||||
|
data.SetChooseFull(TRUE);
|
||||||
|
for (int i = 0; i < 16; i++)
|
||||||
|
{
|
||||||
|
wxColour colour(i*16, i*16, i*16);
|
||||||
|
data.SetCustomColour(i, colour);
|
||||||
|
}
|
||||||
|
|
||||||
|
wxColourDialog *dialog = new wxColourDialog(this, &data);
|
||||||
|
if (dialog->ShowModal() == wxID_OK)
|
||||||
|
{
|
||||||
|
wxColourData retData = dialog->GetColourData();
|
||||||
|
wxColour col = retData.GetColour();
|
||||||
|
// wxBrush *brush = wxTheBrushList->FindOrCreateBrush(&col, wxSOLID);
|
||||||
|
myCanvas->SetBackgroundColour(col);
|
||||||
|
myCanvas->Clear();
|
||||||
|
myCanvas->Refresh();
|
||||||
|
}
|
||||||
|
dialog->Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyFrame::ChooseFont(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
wxFontData data;
|
||||||
|
data.SetInitialFont(wxGetApp().m_canvasFont);
|
||||||
|
data.SetColour(wxGetApp().m_canvasTextColour);
|
||||||
|
|
||||||
|
wxFontDialog *dialog = new wxFontDialog(this, &data);
|
||||||
|
if (dialog->ShowModal() == wxID_OK)
|
||||||
|
{
|
||||||
|
wxFontData retData = dialog->GetFontData();
|
||||||
|
wxGetApp().m_canvasFont = retData.GetChosenFont();
|
||||||
|
wxGetApp().m_canvasTextColour = retData.GetColour();
|
||||||
|
myCanvas->Refresh();
|
||||||
|
}
|
||||||
|
dialog->Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !defined(__WINDOWS__) || USE_GENERIC_DIALOGS_IN_MSW
|
||||||
|
void MyFrame::ChooseColourGeneric(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
wxColourData data;
|
||||||
|
data.SetChooseFull(TRUE);
|
||||||
|
for (int i = 0; i < 16; i++)
|
||||||
|
{
|
||||||
|
wxColour colour(i*16, i*16, i*16);
|
||||||
|
data.SetCustomColour(i, colour);
|
||||||
|
}
|
||||||
|
|
||||||
|
wxGenericColourDialog *dialog = new wxGenericColourDialog(this, &data);
|
||||||
|
if (dialog->ShowModal() == wxID_OK)
|
||||||
|
{
|
||||||
|
wxColourData retData = dialog->GetColourData();
|
||||||
|
wxColour col = retData.GetColour();
|
||||||
|
// wxBrush *brush = wxTheBrushList->FindOrCreateBrush(&col, wxSOLID);
|
||||||
|
myCanvas->SetBackgroundColour(col);
|
||||||
|
myCanvas->Clear();
|
||||||
|
myCanvas->Refresh();
|
||||||
|
}
|
||||||
|
dialog->Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyFrame::ChooseFontGeneric(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
wxFontData data;
|
||||||
|
data.SetInitialFont(wxGetApp().m_canvasFont);
|
||||||
|
data.SetColour(wxGetApp().m_canvasTextColour);
|
||||||
|
|
||||||
|
wxGenericFontDialog *dialog = new wxGenericFontDialog(this, &data);
|
||||||
|
if (dialog->ShowModal() == wxID_OK)
|
||||||
|
{
|
||||||
|
wxFontData retData = dialog->GetFontData();
|
||||||
|
wxGetApp().m_canvasFont = retData.GetChosenFont();
|
||||||
|
wxGetApp().m_canvasTextColour = retData.GetColour();
|
||||||
|
myCanvas->Refresh();
|
||||||
|
}
|
||||||
|
dialog->Close();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void MyFrame::MessageBox(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
wxMessageDialog dialog(this, "This is a message box\nA long, long string to test out the message box properly",
|
||||||
|
"Message box text", wxYES_NO|wxCANCEL);
|
||||||
|
|
||||||
|
dialog.ShowModal();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyFrame::TextEntry(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
wxTextEntryDialog dialog(this, "This is a small sample\nA long, long string to test out the text entrybox",
|
||||||
|
"Please enter a string", "Default value", wxOK|wxCANCEL);
|
||||||
|
|
||||||
|
if (dialog.ShowModal() == wxID_OK)
|
||||||
|
{
|
||||||
|
wxMessageDialog dialog2(this, dialog.GetValue(), "Got string");
|
||||||
|
dialog2.ShowModal();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyFrame::SingleChoice(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
const wxString choices[] = { "One", "Two", "Three", "Four", "Five" } ;
|
||||||
|
int n = 5;
|
||||||
|
|
||||||
|
wxSingleChoiceDialog dialog(this, "This is a small sample\nA single-choice convenience dialog",
|
||||||
|
"Please select a value", n, (const wxString *)choices);
|
||||||
|
|
||||||
|
if (dialog.ShowModal() == wxID_OK)
|
||||||
|
{
|
||||||
|
wxMessageDialog dialog2(this, dialog.GetStringSelection(), "Got string");
|
||||||
|
dialog2.ShowModal();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyFrame::FileOpen(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
wxFileDialog dialog(this, "Testing open file dialog", "", "", "*.txt", 0);
|
||||||
|
|
||||||
|
if (dialog.ShowModal() == wxID_OK)
|
||||||
|
{
|
||||||
|
wxMessageDialog dialog2(this, dialog.GetPath(), "Selected path");
|
||||||
|
dialog2.ShowModal();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyFrame::FileSave(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
wxFileDialog dialog(this, "Testing save file dialog", "", "",
|
||||||
|
"Text files (*.txt)|*.txt|Document files (*.doc)|*.doc",
|
||||||
|
wxSAVE|wxOVERWRITE_PROMPT);
|
||||||
|
|
||||||
|
if (dialog.ShowModal() == wxID_OK)
|
||||||
|
{
|
||||||
|
char buf[400];
|
||||||
|
sprintf(buf, "%s, filter %d", (const char *)dialog.GetPath(), dialog.GetFilterIndex());
|
||||||
|
wxMessageDialog dialog2(this, wxString(buf), "Selected path");
|
||||||
|
dialog2.ShowModal();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyFrame::DirChoose(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
wxDirDialog dialog(this, "Testing directory picker", "");
|
||||||
|
|
||||||
|
if (dialog.ShowModal() == wxID_OK)
|
||||||
|
{
|
||||||
|
wxMessageDialog dialog2(this, dialog.GetPath(), "Selected path");
|
||||||
|
dialog2.ShowModal();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyFrame::OnExit(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
Close(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyCanvas::OnPaint(wxPaintEvent& event)
|
||||||
|
{
|
||||||
|
wxPaintDC dc(this);
|
||||||
|
dc.SetFont(wxGetApp().m_canvasFont);
|
||||||
|
dc.SetTextForeground(wxGetApp().m_canvasTextColour);
|
||||||
|
dc.SetBackgroundMode(wxTRANSPARENT);
|
||||||
|
dc.DrawText("wxWindows common dialogs test application", 10, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
||||||
|
EVT_PAINT(MyCanvas::OnPaint)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
|
EVT_MENU(DIALOGS_CHOOSE_COLOUR, MyFrame::ChooseColour)
|
||||||
|
EVT_MENU(DIALOGS_CHOOSE_FONT, MyFrame::ChooseFont)
|
||||||
|
EVT_MENU(DIALOGS_MESSAGE_BOX, MyFrame::MessageBox)
|
||||||
|
EVT_MENU(DIALOGS_TEXT_ENTRY, MyFrame::TextEntry)
|
||||||
|
EVT_MENU(DIALOGS_SINGLE_CHOICE, MyFrame::SingleChoice)
|
||||||
|
EVT_MENU(DIALOGS_FILE_OPEN, MyFrame::FileOpen)
|
||||||
|
EVT_MENU(DIALOGS_FILE_SAVE, MyFrame::FileSave)
|
||||||
|
EVT_MENU(DIALOGS_DIR_CHOOSE, MyFrame::DirChoose)
|
||||||
|
#if !defined(__WINDOWS__) || USE_GENERIC_DIALOGS_IN_MSW
|
||||||
|
EVT_MENU(DIALOGS_CHOOSE_COLOUR_GENERIC, MyFrame::ChooseColourGeneric)
|
||||||
|
EVT_MENU(DIALOGS_CHOOSE_FONT_GENERIC, MyFrame::ChooseFontGeneric)
|
||||||
|
#endif
|
||||||
|
EVT_MENU(wxID_EXIT, MyFrame::OnExit)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
8
samples/dialogs/dialogs.def
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
NAME Dialogs
|
||||||
|
DESCRIPTION 'wxWindows Dialogs example'
|
||||||
|
EXETYPE WINDOWS
|
||||||
|
STUB 'WINSTUB.EXE'
|
||||||
|
CODE PRELOAD MOVEABLE DISCARDABLE
|
||||||
|
DATA PRELOAD MOVEABLE MULTIPLE
|
||||||
|
HEAPSIZE 1024
|
||||||
|
STACKSIZE 8192
|
73
samples/dialogs/dialogs.h
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: dialogs.h
|
||||||
|
// Purpose: Common dialogs demo
|
||||||
|
// Author: Julian Smart
|
||||||
|
// Modified by:
|
||||||
|
// Created: 04/01/98
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) Julian Smart and Markus Holzem
|
||||||
|
// Licence: wxWindows license
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifndef __DIALOGSH__
|
||||||
|
#define __DIALOGSH__
|
||||||
|
|
||||||
|
// Define a new application type
|
||||||
|
class MyApp: public wxApp
|
||||||
|
{ public:
|
||||||
|
bool OnInit(void);
|
||||||
|
|
||||||
|
wxFont m_canvasFont;
|
||||||
|
wxColour m_canvasTextColour;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Define a new frame type
|
||||||
|
class MyFrame: public wxFrame
|
||||||
|
{ public:
|
||||||
|
MyFrame(wxWindow *parent, const wxString& title, const wxPoint& pos,
|
||||||
|
const wxSize& size);
|
||||||
|
bool OnClose(void) { return TRUE; }
|
||||||
|
|
||||||
|
void ChooseColour(wxCommandEvent& event);
|
||||||
|
void ChooseFont(wxCommandEvent& event);
|
||||||
|
void MessageBox(wxCommandEvent& event);
|
||||||
|
void SingleChoice(wxCommandEvent& event);
|
||||||
|
void TextEntry(wxCommandEvent& event);
|
||||||
|
void FileOpen(wxCommandEvent& event);
|
||||||
|
void FileSave(wxCommandEvent& event);
|
||||||
|
void DirChoose(wxCommandEvent& event);
|
||||||
|
|
||||||
|
#if !defined(__WINDOWS__) || USE_GENERIC_DIALOGS_IN_MSW
|
||||||
|
void ChooseColourGeneric(wxCommandEvent& event);
|
||||||
|
void ChooseFontGeneric(wxCommandEvent& event);
|
||||||
|
#endif
|
||||||
|
void OnExit(wxCommandEvent& event);
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
|
};
|
||||||
|
|
||||||
|
class MyCanvas: public wxScrolledWindow
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
MyCanvas(wxWindow *parent):
|
||||||
|
wxScrolledWindow(parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
void OnPaint(wxPaintEvent& event);
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Menu IDs
|
||||||
|
#define DIALOGS_CHOOSE_COLOUR 1
|
||||||
|
#define DIALOGS_CHOOSE_COLOUR_GENERIC 2
|
||||||
|
#define DIALOGS_CHOOSE_FONT 3
|
||||||
|
#define DIALOGS_CHOOSE_FONT_GENERIC 4
|
||||||
|
#define DIALOGS_MESSAGE_BOX 5
|
||||||
|
#define DIALOGS_SINGLE_CHOICE 6
|
||||||
|
#define DIALOGS_TEXT_ENTRY 7
|
||||||
|
#define DIALOGS_FILE_OPEN 8
|
||||||
|
#define DIALOGS_FILE_SAVE 9
|
||||||
|
#define DIALOGS_DIR_CHOOSE 10
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
3
samples/dialogs/dialogs.rc
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
aiai_icn ICON "aiai.ico"
|
||||||
|
#include "wx/msw/wx.rc"
|
||||||
|
|
62
samples/dialogs/makefile.b32
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.bcc
|
||||||
|
# Author: Adnre Beltman
|
||||||
|
# Created: 1995
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1995, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile : Builds dialogs example (DOS).
|
||||||
|
|
||||||
|
# WXWIN and BCCDIR are set by parent make
|
||||||
|
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
!include $(WXDIR)\src\makeb32.env
|
||||||
|
|
||||||
|
WXLIBDIR = $(WXDIR)\lib
|
||||||
|
WXLIB=$(WXLIBDIR)\wx32.lib
|
||||||
|
LIBS=$(WXLIB) cw32 import32
|
||||||
|
|
||||||
|
TARGET=dialogs
|
||||||
|
|
||||||
|
!if "$(FINAL)" == "0"
|
||||||
|
LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
|
||||||
|
OPT = -Od
|
||||||
|
DEBUG_FLAGS= -v
|
||||||
|
!else
|
||||||
|
LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
|
||||||
|
OPT = -Od
|
||||||
|
DEBUG_FLAGS =
|
||||||
|
!endif
|
||||||
|
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
|
||||||
|
|
||||||
|
OBJECTS = dialogs.obj
|
||||||
|
|
||||||
|
$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res
|
||||||
|
tlink32 $(LINKFLAGS) @&&!
|
||||||
|
c0w32.obj $(OBJECTS)
|
||||||
|
$(TARGET)
|
||||||
|
nul
|
||||||
|
$(LIBS)
|
||||||
|
!
|
||||||
|
brc32 -K $(TARGET).res
|
||||||
|
|
||||||
|
.$(SRCSUFF).obj:
|
||||||
|
bcc32 $(CPPFLAGS) -c {$< }
|
||||||
|
|
||||||
|
.c.obj:
|
||||||
|
bcc32 $(CPPFLAGS) -P- -c {$< }
|
||||||
|
|
||||||
|
dialogs.obj: dialogs.$(SRCSUFF)
|
||||||
|
|
||||||
|
$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
|
||||||
|
brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-erase *.obj
|
||||||
|
-erase *.exe
|
||||||
|
-erase *.res
|
||||||
|
-erase *.map
|
||||||
|
-erase *.rws
|
||||||
|
|
74
samples/dialogs/makefile.bcc
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.bcc
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1993
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile : Builds dialogs example (DOS).
|
||||||
|
|
||||||
|
!if "$(BCCDIR)" == ""
|
||||||
|
!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!if "$(WXWIN)" == ""
|
||||||
|
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
|
||||||
|
!endif
|
||||||
|
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
!include $(WXDIR)\src\makebcc.env
|
||||||
|
|
||||||
|
THISDIR = $(WXDIR)\samples\dialogs
|
||||||
|
WXLIB = $(WXDIR)\lib\wx.lib
|
||||||
|
LIBS=$(WXLIB) mathwl cwl import
|
||||||
|
INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
|
||||||
|
CFG=$(WXDIR)\src\wxwin.cfg
|
||||||
|
|
||||||
|
!ifndef FINAL
|
||||||
|
FINAL=0
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!if "$(FINAL)" == "0"
|
||||||
|
#LINKFLAGS=/v /Vt /Twe /s /L$(WXDIR)\lib;$(BCCDIR)\lib
|
||||||
|
LINKFLAGS=/Vt /Twe /s /L$(WXDIR)\lib;$(BCCDIR)\lib
|
||||||
|
OPT = -Od
|
||||||
|
DEBUG_FLAGS= -v
|
||||||
|
!else
|
||||||
|
LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
|
||||||
|
OPT = -O2
|
||||||
|
DEBUG_FLAGS=
|
||||||
|
!endif
|
||||||
|
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
|
||||||
|
|
||||||
|
OBJECTS = dialogs.obj
|
||||||
|
|
||||||
|
dialogs: dialogs.exe
|
||||||
|
|
||||||
|
all: dialogs.exe
|
||||||
|
|
||||||
|
dialogs.exe: $(WXLIB) dialogs.obj dialogs.def dialogs.res
|
||||||
|
tlink $(LINKFLAGS) @&&!
|
||||||
|
c0wl.obj dialogs.obj
|
||||||
|
dialogs
|
||||||
|
nul
|
||||||
|
$(LIBS)
|
||||||
|
dialogs.def
|
||||||
|
!
|
||||||
|
rc -31 -K dialogs.res
|
||||||
|
|
||||||
|
.$(SRCSUFF).obj:
|
||||||
|
bcc $(CPPFLAGS) -c {$< }
|
||||||
|
|
||||||
|
dialogs.obj: dialogs.$(SRCSUFF)
|
||||||
|
|
||||||
|
dialogs.res : dialogs.rc $(WXDIR)\include\msw\wx.rc
|
||||||
|
rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa dialogs
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-erase *.obj
|
||||||
|
-erase *.exe
|
||||||
|
-erase *.res
|
||||||
|
-erase *.map
|
||||||
|
-erase *.rws
|
81
samples/dialogs/makefile.dos
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.dos
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1993
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile : Builds dialogs example (DOS).
|
||||||
|
# Use FINAL=1 argument to nmake to build final version with no debugging
|
||||||
|
# info
|
||||||
|
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\makemsc.env
|
||||||
|
|
||||||
|
THISDIR = $(WXDIR)\samples\dialogs
|
||||||
|
WXLIB = $(WXDIR)\lib\wx.lib
|
||||||
|
LIBS=$(WXLIB) oldnames libw llibcew commdlg shell ddeml
|
||||||
|
|
||||||
|
!ifndef FINAL
|
||||||
|
FINAL=0
|
||||||
|
!endif
|
||||||
|
|
||||||
|
INC=/I$(WXDIR)\include\msw /I$(WXDIR)\include\base
|
||||||
|
|
||||||
|
# Set this to nothing if using MS C++ 7
|
||||||
|
ZOPTION=/Z7
|
||||||
|
|
||||||
|
!if "$(FINAL)" == "0"
|
||||||
|
CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od /YuWX_PREC.H /DDEBUG=$(DEBUG) /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC)
|
||||||
|
LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:512
|
||||||
|
!else
|
||||||
|
CPPFLAGS=/AL /W3 /G2sw /Ox /YuWX_PREC.H /Dwx_msw /DDEBUG=$(DEBUG) /Fp$(WXDIR)\src\msw\wx.pch $(INC)
|
||||||
|
LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:512
|
||||||
|
!endif
|
||||||
|
|
||||||
|
HEADERS =
|
||||||
|
SOURCES = dialogs.$(SRCSUFF)
|
||||||
|
OBJECTS = dialogs.obj
|
||||||
|
|
||||||
|
all: dialogs.exe
|
||||||
|
|
||||||
|
wx:
|
||||||
|
cd $(WXDIR)\src\msw
|
||||||
|
nmake -f makefile.dos FINAL=$(FINAL)
|
||||||
|
cd $(THISDIR)
|
||||||
|
|
||||||
|
wxclean:
|
||||||
|
cd $(WXDIR)\src\msw
|
||||||
|
nmake -f makefile.dos clean
|
||||||
|
cd $(THISDIR)
|
||||||
|
|
||||||
|
|
||||||
|
dialogs.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) $(OBJECTS) dialogs.def dialogs.res
|
||||||
|
link $(LINKFLAGS) @<<
|
||||||
|
$(OBJECTS) $(WXDIR)\src\msw\dummy.obj,
|
||||||
|
dialogs,
|
||||||
|
NUL,
|
||||||
|
$(LIBS),
|
||||||
|
dialogs.def
|
||||||
|
;
|
||||||
|
<<
|
||||||
|
rc -30 -K dialogs.res
|
||||||
|
|
||||||
|
dialogs.obj: dialogs.$(SRCSUFF)
|
||||||
|
cl @<<
|
||||||
|
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
|
||||||
|
<<
|
||||||
|
|
||||||
|
dialogs.res : dialogs.rc $(WXDIR)\include\msw\wx.rc
|
||||||
|
rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw dialogs
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-erase *.obj
|
||||||
|
-erase *.exe
|
||||||
|
-erase *.res
|
||||||
|
-erase *.map
|
||||||
|
-erase *.sbr
|
||||||
|
-erase *.pdb
|
35
samples/dialogs/makefile.g95
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.unx
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1993
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile for dialogs example (UNIX).
|
||||||
|
|
||||||
|
WXDIR = ../..
|
||||||
|
|
||||||
|
# All common UNIX compiler flags and options are now in
|
||||||
|
# this central makefile.
|
||||||
|
include $(WXDIR)/src/makeg95.env
|
||||||
|
|
||||||
|
OBJECTS = $(OBJDIR)/dialogs.$(OBJSUFF) $(OBJDIR)/dialogs_resources.$(OBJSUFF)
|
||||||
|
|
||||||
|
all: $(OBJDIR) dialogs$(GUISUFFIX)
|
||||||
|
|
||||||
|
$(OBJDIR):
|
||||||
|
mkdir $(OBJDIR)
|
||||||
|
|
||||||
|
dialogs$(GUISUFFIX): $(OBJECTS) $(WXLIB)
|
||||||
|
$(CC) $(LDFLAGS) -o dialogs$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS)
|
||||||
|
|
||||||
|
$(OBJDIR)/dialogs.$(OBJSUFF): dialogs.$(SRCSUFF)
|
||||||
|
$(CC) -c $(CPPFLAGS) -o $@ dialogs.$(SRCSUFF)
|
||||||
|
|
||||||
|
$(OBJDIR)/dialogs_resources.o: dialogs.rc
|
||||||
|
$(RESCOMP) -i dialogs.rc -o $(OBJDIR)/dialogs_resources.o $(RESFLAGS)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(OBJECTS) dialogs$(GUISUFFIX).exe core *.rsc *.res
|
63
samples/dialogs/makefile.nt
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.nt
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1993
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile : Builds dialogs example (MS VC++).
|
||||||
|
# Use FINAL=1 argument to nmake to build final version with no debugging
|
||||||
|
# info
|
||||||
|
|
||||||
|
# Set WXDIR for your system
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\ntwxwin.mak
|
||||||
|
|
||||||
|
THISDIR = $(WXDIR)\samples\dialogs
|
||||||
|
PROGRAM=dialogs
|
||||||
|
|
||||||
|
OBJECTS = $(PROGRAM).obj
|
||||||
|
|
||||||
|
$(PROGRAM): $(PROGRAM).exe
|
||||||
|
|
||||||
|
all: wx $(PROGRAM).exe
|
||||||
|
|
||||||
|
wx:
|
||||||
|
cd $(WXDIR)\src\msw
|
||||||
|
nmake -f makefile.nt FINAL=$(FINAL)
|
||||||
|
cd $(THISDIR)
|
||||||
|
|
||||||
|
wxclean:
|
||||||
|
cd $(WXDIR)\src\msw
|
||||||
|
nmake -f makefile.nt clean
|
||||||
|
cd $(THISDIR)
|
||||||
|
|
||||||
|
$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res
|
||||||
|
$(link) @<<
|
||||||
|
-out:$(PROGRAM).exe
|
||||||
|
$(LINKFLAGS)
|
||||||
|
$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res
|
||||||
|
$(LIBS)
|
||||||
|
<<
|
||||||
|
|
||||||
|
|
||||||
|
$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) dialogs.h $(DUMMYOBJ)
|
||||||
|
$(cc) @<<
|
||||||
|
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
|
||||||
|
<<
|
||||||
|
|
||||||
|
$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
|
||||||
|
$(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc
|
||||||
|
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-erase *.obj
|
||||||
|
-erase *.sbr
|
||||||
|
-erase *.exe
|
||||||
|
-erase *.res
|
||||||
|
-erase *.map
|
||||||
|
-erase *.pdb
|
||||||
|
|
35
samples/dialogs/makefile.sc
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
# Symantec C++ makefile for dialogs example
|
||||||
|
# NOTE that peripheral libraries are now dealt in main wxWindows makefile.
|
||||||
|
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
!include $(WXDIR)\src\makesc.env
|
||||||
|
|
||||||
|
WXLIB = $(WXDIR)\lib\wx.lib
|
||||||
|
INCDIR = $(WXDIR)\include
|
||||||
|
MSWINC = $(INCDIR)\msw
|
||||||
|
BASEINC = $(INCDIR)\base
|
||||||
|
|
||||||
|
CC=sc
|
||||||
|
RC=rc
|
||||||
|
CFLAGS = -o -ml -W -Dwx_msw
|
||||||
|
LDFLAGS = -ml -W
|
||||||
|
|
||||||
|
INCLUDE=$(BASEINC);$(MSWINC)
|
||||||
|
|
||||||
|
LIBS=$(WXLIB) libw.lib commdlg.lib shell.lib
|
||||||
|
|
||||||
|
.$(SRCSUFF).obj:
|
||||||
|
*$(CC) -c $(CFLAGS) -I$(INCLUDE) $<
|
||||||
|
|
||||||
|
.rc.res:
|
||||||
|
*$(RC) -r -I$(INCLUDE) $<
|
||||||
|
|
||||||
|
dialogs.exe: dialogs.obj dialogs.def dialogs.res
|
||||||
|
*$(CC) $(LDFLAGS) -o$@ $** $(LIBS)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-del *.obj
|
||||||
|
-del *.exe
|
||||||
|
-del *.res
|
||||||
|
-del *.map
|
||||||
|
-del *.rws
|
58
samples/dialogs/makefile.unx
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.unx
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1993
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile for dialogs example (UNIX).
|
||||||
|
|
||||||
|
WXDIR = ../..
|
||||||
|
|
||||||
|
# All common UNIX compiler flags and options are now in
|
||||||
|
# this central makefile.
|
||||||
|
include $(WXDIR)/src/make.env
|
||||||
|
|
||||||
|
OBJECTS = $(OBJDIR)/dialogs.$(OBJSUFF)
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
|
||||||
|
all: $(OBJDIR) dialogs$(GUISUFFIX)
|
||||||
|
|
||||||
|
wx:
|
||||||
|
|
||||||
|
|
||||||
|
motif:
|
||||||
|
$(MAKE) -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' WXLIB=$(WXDIR)/lib/libwx_motif.a OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK=
|
||||||
|
|
||||||
|
xview:
|
||||||
|
cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview
|
||||||
|
$(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol CC=$(CC) OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)'
|
||||||
|
|
||||||
|
hp:
|
||||||
|
cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx hp
|
||||||
|
$(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' WARN='-w' \
|
||||||
|
XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' LDLIBS='$(HPLDLIBS)'
|
||||||
|
|
||||||
|
$(OBJDIR):
|
||||||
|
mkdir $(OBJDIR)
|
||||||
|
|
||||||
|
dialogs$(GUISUFFIX): $(OBJDIR)/dialogs.$(OBJSUFF) $(WXLIB)
|
||||||
|
$(CC) $(LDFLAGS) -o dialogs$(GUISUFFIX) $(OBJDIR)/dialogs.$(OBJSUFF) $(XVIEW_LINK) $(LDLIBS)
|
||||||
|
|
||||||
|
$(OBJDIR)/dialogs.$(OBJSUFF): dialogs.$(SRCSUFF)
|
||||||
|
$(CC) -c $(CPPFLAGS) -o $@ dialogs.$(SRCSUFF)
|
||||||
|
|
||||||
|
clean_motif:
|
||||||
|
$(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany
|
||||||
|
|
||||||
|
clean_ol:
|
||||||
|
$(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany
|
||||||
|
|
||||||
|
clean_hp:
|
||||||
|
$(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany
|
||||||
|
|
||||||
|
cleanany:
|
||||||
|
rm -f $(OBJECTS) dialogs$(GUISUFFIX) core
|
38
samples/dialogs/makefile.vms
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
#************************************************************************
|
||||||
|
# Makefile for MINIMAL under VMS
|
||||||
|
# by Stefan Hammes
|
||||||
|
# (incomplete) update history:
|
||||||
|
# 11.04.95
|
||||||
|
#************************************************************************
|
||||||
|
|
||||||
|
#************************************************************************
|
||||||
|
# Definition section
|
||||||
|
# (cave: definitions and includes must begin with ',')
|
||||||
|
#************************************************************************
|
||||||
|
|
||||||
|
APPOPTS =
|
||||||
|
APPDEFS =
|
||||||
|
APPINCS =
|
||||||
|
|
||||||
|
#************************************************************************
|
||||||
|
# Module section
|
||||||
|
#************************************************************************
|
||||||
|
|
||||||
|
# Name of main module
|
||||||
|
MAIN = minimal
|
||||||
|
|
||||||
|
# Object modules of the application.
|
||||||
|
OBJS = minimal.obj
|
||||||
|
OBJLIST =minimal.obj
|
||||||
|
|
||||||
|
.include [--.src]makevms.env
|
||||||
|
|
||||||
|
# main dependency
|
||||||
|
$(MAIN).exe : $(OBJS)
|
||||||
|
$(LINK) $(LINKFLAGS) /exec=$(MAIN).exe $(OBJLIST),$(WXLIB)/lib,$(OPTSFILE)/option
|
||||||
|
- purge *.exe
|
||||||
|
|
||||||
|
#************************************************************************
|
||||||
|
# Header file depedencies following
|
||||||
|
#************************************************************************
|
||||||
|
|
43
samples/dialogs/makefile.wat
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
#
|
||||||
|
# Makefile for WATCOM
|
||||||
|
#
|
||||||
|
# Created by D.Chubraev, chubraev@iem.ee.ethz.ch
|
||||||
|
# 8 Nov 1994
|
||||||
|
#
|
||||||
|
|
||||||
|
WXDIR = ..\..
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\makewat.env
|
||||||
|
|
||||||
|
WXLIB = $(WXDIR)\lib
|
||||||
|
NAME = dialogs
|
||||||
|
LNK = $(name).lnk
|
||||||
|
OBJS = $(name).obj
|
||||||
|
|
||||||
|
all: $(name).exe
|
||||||
|
|
||||||
|
$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib
|
||||||
|
wlink @$(LNK)
|
||||||
|
$(BINDCOMMAND) $(name).res
|
||||||
|
|
||||||
|
$(name).res : $(name).rc $(WXDIR)\include\msw\wx.rc
|
||||||
|
$(RC) $(RESFLAGS1) $(name).rc
|
||||||
|
|
||||||
|
$(LNK) : makefile.wat
|
||||||
|
%create $(LNK)
|
||||||
|
@%append $(LNK) debug all
|
||||||
|
@%append $(LNK) system $(LINKOPTION)
|
||||||
|
@%append $(LNK) $(MINDATA)
|
||||||
|
@%append $(LNK) $(MAXDATA)
|
||||||
|
@%append $(LNK) $(STACK)
|
||||||
|
@%append $(LNK) name $(name)
|
||||||
|
@%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib
|
||||||
|
@for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i
|
||||||
|
@for %i in ($(OBJS)) do @%append $(LNK) file %i
|
||||||
|
|
||||||
|
thing: .SYMBOLIC
|
||||||
|
echo $(WATLIBDIR)
|
||||||
|
|
||||||
|
clean: .SYMBOLIC
|
||||||
|
-erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe *.rex
|
||||||
|
|
167
samples/dnd/d_and_d.txt
Normal file
@@ -0,0 +1,167 @@
|
|||||||
|
Drag-and-Drop Support in wxWindows
|
||||||
|
==================================
|
||||||
|
|
||||||
|
1. Overview
|
||||||
|
--------
|
||||||
|
|
||||||
|
a) What is it?
|
||||||
|
|
||||||
|
We're calling drag-and-drop (or d&d for short) the OLE mechanism of data
|
||||||
|
transfer. Please note that it's not the same thing as the file oriented d&d
|
||||||
|
of Windows 3.1 "File Manager" which is designed for and limited to the file
|
||||||
|
names only.
|
||||||
|
|
||||||
|
OLE d&d allows application to transfer data of any type to the same or
|
||||||
|
another process.
|
||||||
|
|
||||||
|
|
||||||
|
b) How is it done? (user's point of view)
|
||||||
|
|
||||||
|
To start a d&d operation the user presses the mouse button 1 (left) and
|
||||||
|
drags the selected object to another window (which must be at least partially
|
||||||
|
visible on the screen) or to an icon on the taskbar in which case the
|
||||||
|
corresponding window will be automatically restored. To finish the operation,
|
||||||
|
the user releases the button. Default d&d operation is "move", but several key
|
||||||
|
act as modifiers: keeping down the <Ctrl> key at the moment of drop does
|
||||||
|
"copy", while <Shift> or <Alt> force the "move" (makes sense if default isn't
|
||||||
|
"move").
|
||||||
|
|
||||||
|
|
||||||
|
c) How is it done? (programmer's point of view)
|
||||||
|
|
||||||
|
There are several objects participating in a d&d operation. First of all,
|
||||||
|
there is the data object itself. Second, there is the drop source which is
|
||||||
|
responsible for creating the data object (if it doesn't exist yet) and starting
|
||||||
|
the d&d operation. Finally, the drop target recieves the notification when
|
||||||
|
the data is dropped onto the associated window (see below) and is responsible
|
||||||
|
for pasting the data and returning the result code (copy, move or failure).
|
||||||
|
There is one class for each one of these roles in wxWindows d&d implementation,
|
||||||
|
plese see their descriptions below for details.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2. Drop Target
|
||||||
|
-----------
|
||||||
|
|
||||||
|
a) Being a drop target
|
||||||
|
|
||||||
|
... is as easy as deriving your window class from wxDropTarget and
|
||||||
|
associating it with a wxWindow object (or perhaps some wxWindow-derived class,
|
||||||
|
such as wxFrame). The pure virtual function wxDropTarget::OnDrop() must be
|
||||||
|
implemented in your application and will be called whenever the mouse button
|
||||||
|
is released over the window in question. Other virtual functions that will be
|
||||||
|
called in the process of the d&d operation are OnEnter and OnLeave.
|
||||||
|
|
||||||
|
@@ should OnDragOver() be user overridable also?
|
||||||
|
|
||||||
|
You should associate wxDropTarget and wxWindow calling SetDropTarget:
|
||||||
|
wxWindow *pWindow = GetTopWindow();
|
||||||
|
pWindow->SetDropTarget(new MyDropTarget);
|
||||||
|
|
||||||
|
The object created passed to SetDropTarget becomes the propriety of wxWindow
|
||||||
|
and will be deleted with the window (or when you call SetDropTarget next
|
||||||
|
time). You can always break the association by calling SetDropTarget(NULL).
|
||||||
|
|
||||||
|
When some data is dragged over a window, the program must decide if it's
|
||||||
|
going to accept this data or not. The virtual function IsAcceptedData() is
|
||||||
|
called to do it. The default implementation takes care of OLE interface
|
||||||
|
pointer manipulations and only requires you to override GetCountFormats()
|
||||||
|
and GetFormat(n) functions to let it know what data formats you support.
|
||||||
|
If it's not flexible enough for your application (i.e. the set of supported
|
||||||
|
formats changes over time...), you should override IsAcceptedData(). In 99%
|
||||||
|
of cases the default implementation is ok and you only have to return count
|
||||||
|
of supported formats (CF_xxx constants or one of your custom formats which
|
||||||
|
must have been registered) and their values.
|
||||||
|
|
||||||
|
b) OnDrop(long x, long y, const void *pData)
|
||||||
|
|
||||||
|
(x, y) are drop point (client) coordinates, pData is the pointer to data
|
||||||
|
(whatever it is).
|
||||||
|
|
||||||
|
If 'true' is returned from OnDrop, the operation is considered to be
|
||||||
|
successful and the corresponding code (MOVE or COPY depending on the
|
||||||
|
keyboard control keys) is returned. Otherwise, the operation is cancelled.
|
||||||
|
|
||||||
|
Please remember that returning 'true' here may mean 'move' and so the
|
||||||
|
drop source will delete the corresponding data - which would lead to
|
||||||
|
data loss if you didn't paste it properly.
|
||||||
|
|
||||||
|
c) OnEnter()
|
||||||
|
|
||||||
|
called when the mouse enters the window: you might use this function to
|
||||||
|
give some additional visual feedback.
|
||||||
|
|
||||||
|
d) OnLeave()
|
||||||
|
|
||||||
|
called when the mouse leaves the window; might be a good place to clean
|
||||||
|
up things allocated in OnEnter.
|
||||||
|
|
||||||
|
e) Simple wxDropTarget specializations
|
||||||
|
|
||||||
|
Two (very simple) wxDropTarget-derived classes are provided for two most
|
||||||
|
common situations: d&d of text and file d&d. To use them you only need to
|
||||||
|
override one virtual function OnDropText in wxTextDropTarget's case and
|
||||||
|
OnDropFiles for wxFileDropTarget.
|
||||||
|
|
||||||
|
The (x, y) are the same as for OnDrop() function. OnDropText's last
|
||||||
|
parameter points to a (always ANSI, not Unicode) text string, while
|
||||||
|
OnDropFiles() parameter is the array of file names just dropped (and the
|
||||||
|
count of them is passed in the 3rd parameter).
|
||||||
|
|
||||||
|
3. Data Object
|
||||||
|
-----------
|
||||||
|
|
||||||
|
a) Drag and drop and clipboard
|
||||||
|
|
||||||
|
The effect of a d&d operation is the same as using the clipboard to
|
||||||
|
cut/copy and paste data and it would be nice to use the same code to implement
|
||||||
|
these two data transfer mechanisms. The wxDataObject allows you to do exactly
|
||||||
|
this. It encapsulates the data which can be passed either through the clipboard
|
||||||
|
or d&d.
|
||||||
|
|
||||||
|
|
||||||
|
b) Data format
|
||||||
|
|
||||||
|
There are several standard clipboard formats, such as text, bitmap or
|
||||||
|
metafile picture. All of them are defined in wxDataObject::StdFormats
|
||||||
|
enumeration. Of course, it's not always enough and you'll often need your
|
||||||
|
own format for data transfer. The simple helper class wxDataFormat may help
|
||||||
|
you: when you create an object of this class, it registers a new clipboard
|
||||||
|
data format identified by the string passed to it's ctor.
|
||||||
|
|
||||||
|
After your new format is registered, you may use it as any other one.
|
||||||
|
|
||||||
|
4. Drop Source
|
||||||
|
-----------
|
||||||
|
|
||||||
|
a) Starting the d&d operation
|
||||||
|
|
||||||
|
In order to start the d&d operation you should call the DoDragDrop function
|
||||||
|
(typically in reply to a "mouse button press" message). NB: DoDragDrop() is a
|
||||||
|
blocking function which enters into it's own message loop and may return after
|
||||||
|
an arbitrarily long time interval. During it, the QueryContinueDrag() is called
|
||||||
|
whenever the mouse or keyboard state changes. The default behaviour is quite
|
||||||
|
reasonable for 99% of cases: the drag operation is cancelled if the <Esc> key
|
||||||
|
is preessed and the drop is initiated if the mouse button is released.
|
||||||
|
|
||||||
|
b) After the end of d&d
|
||||||
|
|
||||||
|
The drop source behaviour depends on DoDragDrop() return code. If it
|
||||||
|
returns wxDropSource::None or wxDropSource::Copy there is normally nothing to
|
||||||
|
do, but you shouldn't forget to delete your data if it returns the
|
||||||
|
wxDropSource::Move code.
|
||||||
|
|
||||||
|
c) DoDragDrop
|
||||||
|
|
||||||
|
d) QueryContinueDrag
|
||||||
|
|
||||||
|
|
||||||
|
5. Remarks
|
||||||
|
-------
|
||||||
|
|
||||||
|
|
||||||
|
@@@@ TODO: support tymed != TYMED_HGLOBAL;
|
||||||
|
better support of CF_BMP, CF_METAFILE
|
||||||
|
scrolling support!! (how?)
|
||||||
|
sample demonstrating use of user-defined formats
|
||||||
|
sample which really does something useful
|
264
samples/dnd/dnd.cpp
Normal file
@@ -0,0 +1,264 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: dnd.cpp
|
||||||
|
// Purpose: Drag and drop sample
|
||||||
|
// Author: Vadim Zeitlin
|
||||||
|
// Modified by:
|
||||||
|
// Created: 13.11.97
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||||
|
// Licence: wxWindows license
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// headers & declarations
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
// For compilers that support precompilation, includes "wx.h".
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#ifdef __BORLANDC__
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WX_PRECOMP
|
||||||
|
#include "wx/wx.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "wx/intl.h"
|
||||||
|
#include "wx/log.h"
|
||||||
|
|
||||||
|
#include "wx/dnd.h"
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Derive 2 simple classes which just put in the listbox the strings (text or
|
||||||
|
// file names) we drop on them
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
class DnDText : public wxTextDropTarget
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DnDText(wxListBox *pOwner) { m_pOwner = pOwner; }
|
||||||
|
|
||||||
|
virtual bool OnDropText(long x, long y, const char *psz);
|
||||||
|
|
||||||
|
private:
|
||||||
|
wxListBox *m_pOwner;
|
||||||
|
};
|
||||||
|
|
||||||
|
class DnDFile : public wxFileDropTarget
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DnDFile(wxListBox *pOwner) { m_pOwner = pOwner; }
|
||||||
|
|
||||||
|
virtual bool OnDropFiles(long x, long y,
|
||||||
|
size_t nFiles, const char * const aszFiles[]);
|
||||||
|
|
||||||
|
private:
|
||||||
|
wxListBox *m_pOwner;
|
||||||
|
};
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Define a new application type
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
class DnDApp : public wxApp
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
bool OnInit();
|
||||||
|
};
|
||||||
|
|
||||||
|
IMPLEMENT_APP(DnDApp);
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Define a new frame type
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
class DnDFrame : public wxFrame
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DnDFrame(wxFrame *frame, char *title, int x, int y, int w, int h);
|
||||||
|
~DnDFrame();
|
||||||
|
|
||||||
|
void OnPaint(wxPaintEvent& event);
|
||||||
|
void OnQuit (wxCommandEvent& event);
|
||||||
|
void OnAbout(wxCommandEvent& event);
|
||||||
|
void OnHelp (wxCommandEvent& event);
|
||||||
|
|
||||||
|
bool OnClose();
|
||||||
|
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
|
|
||||||
|
private:
|
||||||
|
wxListBox *m_ctrlFile,
|
||||||
|
*m_ctrlText;
|
||||||
|
wxTextCtrl *m_ctrlLog;
|
||||||
|
|
||||||
|
wxLogTarget *m_pLog, *m_pLogPrev;
|
||||||
|
};
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// IDs for the menu commands
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
Menu_Quit = 1,
|
||||||
|
Menu_About = 101,
|
||||||
|
Menu_Help,
|
||||||
|
};
|
||||||
|
|
||||||
|
BEGIN_EVENT_TABLE(DnDFrame, wxFrame)
|
||||||
|
EVT_MENU(Menu_Quit, DnDFrame::OnQuit)
|
||||||
|
EVT_MENU(Menu_About, DnDFrame::OnAbout)
|
||||||
|
EVT_MENU(Menu_Help, DnDFrame::OnHelp)
|
||||||
|
|
||||||
|
//EVT_PAINT(DnDFrame::OnPaint)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
// `Main program' equivalent, creating windows and returning main app frame
|
||||||
|
bool DnDApp::OnInit(void)
|
||||||
|
{
|
||||||
|
// create the main frame window
|
||||||
|
DnDFrame *frame = new DnDFrame(NULL, "Drag & Drop wxWindows App",
|
||||||
|
50, 50, 450, 340);
|
||||||
|
|
||||||
|
// activate it
|
||||||
|
frame->Show(TRUE);
|
||||||
|
|
||||||
|
SetTopWindow(frame);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
DnDFrame::DnDFrame(wxFrame *frame, char *title, int x, int y, int w, int h)
|
||||||
|
: wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h))
|
||||||
|
{
|
||||||
|
SetIcon(wxIcon("mondrian"));
|
||||||
|
|
||||||
|
// construct menu
|
||||||
|
wxMenu *file_menu = new wxMenu;
|
||||||
|
file_menu->Append(Menu_Help, "&Help");
|
||||||
|
file_menu->Append(Menu_About, "&About");
|
||||||
|
file_menu->AppendSeparator();
|
||||||
|
file_menu->Append(Menu_Quit, "E&xit");
|
||||||
|
wxMenuBar *menu_bar = new wxMenuBar;
|
||||||
|
menu_bar->Append(file_menu, "&File");
|
||||||
|
SetMenuBar(menu_bar);
|
||||||
|
|
||||||
|
// make a panel with 3 subwindows
|
||||||
|
wxPoint pos(0, 0);
|
||||||
|
wxSize size(400, 200);
|
||||||
|
|
||||||
|
wxString strFile("Drop files here!"), strText("Drop text on me");
|
||||||
|
|
||||||
|
m_ctrlFile = new wxListBox(this, -1, pos, size, 1, &strFile, wxLB_HSCROLL);
|
||||||
|
m_ctrlText = new wxListBox(this, -1, pos, size, 1, &strText, wxLB_HSCROLL);
|
||||||
|
m_ctrlLog = new wxTextCtrl(this, -1, "", pos, size,
|
||||||
|
wxTE_MULTILINE | wxTE_READONLY |
|
||||||
|
wxSUNKEN_BORDER| wxHSCROLL);
|
||||||
|
|
||||||
|
// redirect log messages to the text window (don't forget to delete it!)
|
||||||
|
// m_pLog = new wxLogTextCtrl(m_ctrlLog);
|
||||||
|
m_pLog = NULL;
|
||||||
|
m_pLogPrev = wxLogTarget::SetActiveTarget(m_pLog);
|
||||||
|
|
||||||
|
// associate drop targets with 2 text controls
|
||||||
|
m_ctrlFile->SetDropTarget(new DnDFile(m_ctrlFile));
|
||||||
|
m_ctrlText->SetDropTarget(new DnDText(m_ctrlText));
|
||||||
|
|
||||||
|
wxLayoutConstraints *c;
|
||||||
|
|
||||||
|
c = new wxLayoutConstraints;
|
||||||
|
c->left.SameAs (this, wxLeft);
|
||||||
|
c->top.SameAs (this, wxTop);
|
||||||
|
c->right.PercentOf(this, wxRight, 50);
|
||||||
|
c->height.PercentOf(this, wxHeight, 50);
|
||||||
|
m_ctrlFile->SetConstraints(c);
|
||||||
|
|
||||||
|
c = new wxLayoutConstraints;
|
||||||
|
c->left.SameAs (m_ctrlFile, wxRight);
|
||||||
|
c->top.SameAs (this, wxTop);
|
||||||
|
c->right.SameAs (this, wxRight);
|
||||||
|
c->height.PercentOf(this, wxHeight, 50);
|
||||||
|
m_ctrlText->SetConstraints(c);
|
||||||
|
|
||||||
|
c = new wxLayoutConstraints;
|
||||||
|
c->left.SameAs (this, wxLeft);
|
||||||
|
c->right.SameAs (this, wxRight);
|
||||||
|
c->height.PercentOf(this, wxHeight, 50);
|
||||||
|
c->bottom.SameAs(this, wxBottom);
|
||||||
|
|
||||||
|
m_ctrlLog->SetConstraints(c);
|
||||||
|
|
||||||
|
SetAutoLayout(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DnDFrame::OnQuit(wxCommandEvent& /* event */)
|
||||||
|
{
|
||||||
|
Close(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DnDFrame::OnAbout(wxCommandEvent& /* event */)
|
||||||
|
{
|
||||||
|
wxMessageDialog dialog(this,
|
||||||
|
"Drag-&-Drop Demo\n"
|
||||||
|
"Please see File|Help for details",
|
||||||
|
"About wxDnD");
|
||||||
|
|
||||||
|
dialog.ShowModal();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DnDFrame::OnHelp(wxCommandEvent& /* event */)
|
||||||
|
{
|
||||||
|
wxMessageDialog dialog(this,
|
||||||
|
"This small program demonstrates drag & drop support in wxWindows.\n"
|
||||||
|
"The program window consists of 3 parts: the bottom pane is for\n"
|
||||||
|
"debug messages, so that you can see what's going on inside.\n"
|
||||||
|
"The top part is split into 2 listboxes, the left one accepts\n"
|
||||||
|
"files and the right one accepts text.\n"
|
||||||
|
"\n"
|
||||||
|
"To test it: open wordpad (write.exe), select some text in it and\n"
|
||||||
|
"drag it to the right listbox (you'll notice the usual visual\n"
|
||||||
|
"feedback, i.e. the cursor will change). Also, try dragging some\n"
|
||||||
|
"files (you can select several at once) from Windows Explorer (or\n"
|
||||||
|
"File Manager) to the left pane. Hold down Ctrl/Shift keys when\n"
|
||||||
|
"you drop text (doesn't work with files) and see what changes.\n"
|
||||||
|
"\n"
|
||||||
|
"Please address any questions/bug reports/suggestions &c to\n"
|
||||||
|
"Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>",
|
||||||
|
"wxDnD Help");
|
||||||
|
|
||||||
|
dialog.ShowModal();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool DnDFrame::OnClose()
|
||||||
|
{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
DnDFrame::~DnDFrame()
|
||||||
|
{
|
||||||
|
if ( m_pLog != NULL ) {
|
||||||
|
if ( wxLogTarget::SetActiveTarget(m_pLogPrev) == m_pLog )
|
||||||
|
delete m_pLog;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Notifications called by the base class
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
bool DnDText::OnDropText(long, long, const char *psz)
|
||||||
|
{
|
||||||
|
m_pOwner->Append(psz);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool DnDFile::OnDropFiles(long, long, size_t nFiles,
|
||||||
|
const char * const aszFiles[])
|
||||||
|
{
|
||||||
|
wxString str;
|
||||||
|
str.Printf("%d files dropped", nFiles);
|
||||||
|
m_pOwner->Append(str);
|
||||||
|
for ( size_t n = 0; n < nFiles; n++ ) {
|
||||||
|
m_pOwner->Append(aszFiles[n]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
8
samples/dnd/dnd.def
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
NAME DND
|
||||||
|
DESCRIPTION 'Drag and drop sample'
|
||||||
|
EXETYPE WINDOWS
|
||||||
|
STUB 'WINSTUB.EXE'
|
||||||
|
CODE PRELOAD MOVEABLE DISCARDABLE
|
||||||
|
DATA PRELOAD MOVEABLE MULTIPLE
|
||||||
|
HEAPSIZE 4048
|
||||||
|
STACKSIZE 16000
|
3
samples/dnd/dnd.rc
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
mondrian ICON "mondrian.ico"
|
||||||
|
#include "wx/msw/wx.rc"
|
||||||
|
|
64
samples/dnd/makefile.b32
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.bcc
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1993
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile : Builds dnd example (DOS).
|
||||||
|
|
||||||
|
# WXWIN and BCCDIR are set by parent make
|
||||||
|
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
!include $(WXDIR)\src\makeb32.env
|
||||||
|
|
||||||
|
WXLIBDIR = $(WXDIR)\lib
|
||||||
|
WXINC = $(WXDIR)\include\msw
|
||||||
|
WXLIB = $(WXLIBDIR)\wx32.lib
|
||||||
|
LIBS=$(WXLIB) cw32 import32 ole2w32
|
||||||
|
|
||||||
|
TARGET=dnd
|
||||||
|
|
||||||
|
!if "$(FINAL)" == "0"
|
||||||
|
LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
|
||||||
|
OPT = -Od
|
||||||
|
DEBUG_FLAGS= -v
|
||||||
|
!else
|
||||||
|
LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
|
||||||
|
OPT = -Od
|
||||||
|
DEBUG_FLAGS =
|
||||||
|
!endif
|
||||||
|
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
|
||||||
|
|
||||||
|
OBJECTS = dnd.obj
|
||||||
|
|
||||||
|
$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res
|
||||||
|
tlink32 $(LINKFLAGS) @&&!
|
||||||
|
c0w32.obj $(OBJECTS)
|
||||||
|
$(TARGET)
|
||||||
|
nul
|
||||||
|
$(LIBS)
|
||||||
|
$(TARGET).def
|
||||||
|
!
|
||||||
|
brc32 -K $(TARGET).res
|
||||||
|
|
||||||
|
.$(SRCSUFF).obj:
|
||||||
|
bcc32 $(CPPFLAGS) -c {$< }
|
||||||
|
|
||||||
|
.c.obj:
|
||||||
|
bcc32 $(CPPFLAGS) -P- -c {$< }
|
||||||
|
|
||||||
|
dnd.obj: dnd.$(SRCSUFF)
|
||||||
|
|
||||||
|
$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
|
||||||
|
brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-erase *.obj
|
||||||
|
-erase *.exe
|
||||||
|
-erase *.res
|
||||||
|
-erase *.map
|
||||||
|
-erase *.rws
|
||||||
|
|
65
samples/dnd/makefile.dos
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.dos
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1993
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile : Builds dnd example (DOS).
|
||||||
|
# Use FINAL=1 argument to nmake to build final version with no debugging
|
||||||
|
# info
|
||||||
|
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\makemsc.env
|
||||||
|
|
||||||
|
THISDIR = $(WXDIR)\samples\dnd
|
||||||
|
|
||||||
|
!ifndef FINAL
|
||||||
|
FINAL=0
|
||||||
|
!endif
|
||||||
|
|
||||||
|
HEADERS =
|
||||||
|
SOURCES = dnd.$(SRCSUFF)
|
||||||
|
OBJECTS = dnd.obj
|
||||||
|
|
||||||
|
all: dnd.exe
|
||||||
|
|
||||||
|
wx:
|
||||||
|
cd $(WXDIR)\src\msw
|
||||||
|
nmake -f makefile.dos FINAL=$(FINAL)
|
||||||
|
cd $(THISDIR)
|
||||||
|
|
||||||
|
wxclean:
|
||||||
|
cd $(WXDIR)\src\msw
|
||||||
|
nmake -f makefile.dos clean
|
||||||
|
cd $(THISDIR)
|
||||||
|
|
||||||
|
dnd.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) dnd.obj dnd.def dnd.res
|
||||||
|
link $(LINKFLAGS) @<<
|
||||||
|
dnd.obj $(WXDIR)\src\msw\dummy.obj,
|
||||||
|
dnd,
|
||||||
|
NUL,
|
||||||
|
$(LIBS),
|
||||||
|
dnd.def
|
||||||
|
;
|
||||||
|
<<
|
||||||
|
rc -K dnd.res
|
||||||
|
|
||||||
|
dnd.obj: dnd.$(SRCSUFF)
|
||||||
|
cl @<<
|
||||||
|
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
|
||||||
|
<<
|
||||||
|
|
||||||
|
dnd.res : dnd.rc $(WXDIR)\include\wx\msw\wx.rc
|
||||||
|
rc -r /i$(WXDIR)\include dnd
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-erase *.obj
|
||||||
|
-erase *.exe
|
||||||
|
-erase *.res
|
||||||
|
-erase *.map
|
||||||
|
-erase *.sbr
|
||||||
|
-erase *.pdb
|
37
samples/dnd/makefile.g95
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.unx
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1993
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile for dnd example (UNIX).
|
||||||
|
|
||||||
|
WXDIR = ../..
|
||||||
|
|
||||||
|
# All common UNIX compiler flags and options are now in
|
||||||
|
# this central makefile.
|
||||||
|
include $(WXDIR)/src/makeg95.env
|
||||||
|
|
||||||
|
OBJECTS = $(OBJDIR)/dnd.$(OBJSUFF) $(OBJDIR)/dnd_resources.$(OBJSUFF)
|
||||||
|
|
||||||
|
all: $(OBJDIR) dnd$(GUISUFFIX)$(EXESUFF)
|
||||||
|
|
||||||
|
wx:
|
||||||
|
|
||||||
|
$(OBJDIR):
|
||||||
|
mkdir $(OBJDIR)
|
||||||
|
|
||||||
|
dnd$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB)
|
||||||
|
$(CC) $(LDFLAGS) -o dnd$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS)
|
||||||
|
|
||||||
|
$(OBJDIR)/dnd.$(OBJSUFF): dnd.$(SRCSUFF)
|
||||||
|
$(CC) -c $(CPPFLAGS) -o $@ dnd.$(SRCSUFF)
|
||||||
|
|
||||||
|
$(OBJDIR)/dnd_resources.o: dnd.rc
|
||||||
|
$(RESCOMP) -i dnd.rc -o $(OBJDIR)/dnd_resources.o $(RESFLAGS)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(OBJECTS) dnd$(GUISUFFIX).exe core *.rsc *.res
|
64
samples/dnd/makefile.nt
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.nt
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1993
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile : Builds dnd example (MS VC++).
|
||||||
|
# Use FINAL=1 argument to nmake to build final version with no debugging
|
||||||
|
# info
|
||||||
|
|
||||||
|
# Set WXDIR for your system
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
|
WXUSINGDLL=0
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\ntwxwin.mak
|
||||||
|
|
||||||
|
THISDIR = $(WXDIR)\samples\dnd
|
||||||
|
PROGRAM=dnd
|
||||||
|
|
||||||
|
OBJECTS = $(PROGRAM).obj
|
||||||
|
|
||||||
|
$(PROGRAM): $(PROGRAM).exe
|
||||||
|
|
||||||
|
all: wx $(PROGRAM).exe
|
||||||
|
|
||||||
|
wx:
|
||||||
|
cd $(WXDIR)\src\msw
|
||||||
|
nmake -f makefile.nt FINAL=$(FINAL)
|
||||||
|
cd $(THISDIR)
|
||||||
|
|
||||||
|
wxclean:
|
||||||
|
cd $(WXDIR)\src\msw
|
||||||
|
nmake -f makefile.nt clean
|
||||||
|
cd $(THISDIR)
|
||||||
|
|
||||||
|
$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res
|
||||||
|
$(link) @<<
|
||||||
|
-out:$(PROGRAM).exe
|
||||||
|
$(LINKFLAGS)
|
||||||
|
$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res
|
||||||
|
$(LIBS)
|
||||||
|
<<
|
||||||
|
|
||||||
|
|
||||||
|
$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ)
|
||||||
|
$(cc) @<<
|
||||||
|
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
|
||||||
|
<<
|
||||||
|
|
||||||
|
$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
|
||||||
|
$(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc
|
||||||
|
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-erase *.obj
|
||||||
|
-erase *.exe
|
||||||
|
-erase *.res
|
||||||
|
-erase *.map
|
||||||
|
-erase *.sbr
|
||||||
|
-erase *.pdb
|
BIN
samples/dnd/mondrian.ico
Normal file
After Width: | Height: | Size: 766 B |
BIN
samples/docview/aiai.ico
Normal file
After Width: | Height: | Size: 766 B |
BIN
samples/docview/chart.ico
Normal file
After Width: | Height: | Size: 766 B |
275
samples/docview/doc.cpp
Normal file
@@ -0,0 +1,275 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: doc.cpp
|
||||||
|
// Purpose: Implements document functionality
|
||||||
|
// Author: Julian Smart
|
||||||
|
// Modified by:
|
||||||
|
// Created: 04/01/98
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) Julian Smart and Markus Holzem
|
||||||
|
// Licence: wxWindows license
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifdef __GNUG__
|
||||||
|
// #pragma implementation
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// For compilers that support precompilation, includes "wx/wx.h".
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#ifdef __BORLANDC__
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WX_PRECOMP
|
||||||
|
#include "wx/wx.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !USE_DOC_VIEW_ARCHITECTURE
|
||||||
|
#error You must set USE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h!
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "doc.h"
|
||||||
|
#include "view.h"
|
||||||
|
|
||||||
|
IMPLEMENT_DYNAMIC_CLASS(DrawingDocument, wxDocument)
|
||||||
|
|
||||||
|
DrawingDocument::DrawingDocument(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
DrawingDocument::~DrawingDocument(void)
|
||||||
|
{
|
||||||
|
doodleSegments.DeleteContents(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
ostream& DrawingDocument::SaveObject(ostream& stream)
|
||||||
|
{
|
||||||
|
wxDocument::SaveObject(stream);
|
||||||
|
|
||||||
|
stream << doodleSegments.Number() << '\n';
|
||||||
|
wxNode *node = doodleSegments.First();
|
||||||
|
while (node)
|
||||||
|
{
|
||||||
|
DoodleSegment *segment = (DoodleSegment *)node->Data();
|
||||||
|
segment->SaveObject(stream);
|
||||||
|
stream << '\n';
|
||||||
|
|
||||||
|
node = node->Next();
|
||||||
|
}
|
||||||
|
return stream;
|
||||||
|
}
|
||||||
|
|
||||||
|
istream& DrawingDocument::LoadObject(istream& stream)
|
||||||
|
{
|
||||||
|
wxDocument::LoadObject(stream);
|
||||||
|
|
||||||
|
int n = 0;
|
||||||
|
stream >> n;
|
||||||
|
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
DoodleSegment *segment = new DoodleSegment;
|
||||||
|
segment->LoadObject(stream);
|
||||||
|
doodleSegments.Append(segment);
|
||||||
|
}
|
||||||
|
|
||||||
|
return stream;
|
||||||
|
}
|
||||||
|
|
||||||
|
DoodleSegment::DoodleSegment(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
DoodleSegment::DoodleSegment(DoodleSegment& seg)
|
||||||
|
{
|
||||||
|
wxNode *node = seg.lines.First();
|
||||||
|
while (node)
|
||||||
|
{
|
||||||
|
DoodleLine *line = (DoodleLine *)node->Data();
|
||||||
|
DoodleLine *newLine = new DoodleLine;
|
||||||
|
newLine->x1 = line->x1;
|
||||||
|
newLine->y1 = line->y1;
|
||||||
|
newLine->x2 = line->x2;
|
||||||
|
newLine->y2 = line->y2;
|
||||||
|
|
||||||
|
lines.Append(newLine);
|
||||||
|
|
||||||
|
node = node->Next();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DoodleSegment::~DoodleSegment(void)
|
||||||
|
{
|
||||||
|
lines.DeleteContents(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
ostream& DoodleSegment::SaveObject(ostream& stream)
|
||||||
|
{
|
||||||
|
stream << lines.Number() << '\n';
|
||||||
|
wxNode *node = lines.First();
|
||||||
|
while (node)
|
||||||
|
{
|
||||||
|
DoodleLine *line = (DoodleLine *)node->Data();
|
||||||
|
stream << line->x1 << " " << line->y1 << " " << line->x2 << " " << line->y2 << "\n";
|
||||||
|
node = node->Next();
|
||||||
|
}
|
||||||
|
return stream;
|
||||||
|
}
|
||||||
|
|
||||||
|
istream& DoodleSegment::LoadObject(istream& stream)
|
||||||
|
{
|
||||||
|
int n = 0;
|
||||||
|
stream >> n;
|
||||||
|
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
DoodleLine *line = new DoodleLine;
|
||||||
|
stream >> line->x1 >> line->y1 >> line->x2 >> line->y2;
|
||||||
|
lines.Append(line);
|
||||||
|
}
|
||||||
|
return stream;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DoodleSegment::Draw(wxDC *dc)
|
||||||
|
{
|
||||||
|
wxNode *node = lines.First();
|
||||||
|
while (node)
|
||||||
|
{
|
||||||
|
DoodleLine *line = (DoodleLine *)node->Data();
|
||||||
|
dc->DrawLine(line->x1, line->y1, line->x2, line->y2);
|
||||||
|
node = node->Next();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Implementation of drawing command
|
||||||
|
*/
|
||||||
|
|
||||||
|
DrawingCommand::DrawingCommand(const wxString& name, int command, DrawingDocument *ddoc, DoodleSegment *seg):
|
||||||
|
wxCommand(TRUE, name)
|
||||||
|
{
|
||||||
|
doc = ddoc;
|
||||||
|
segment = seg;
|
||||||
|
cmd = command;
|
||||||
|
}
|
||||||
|
|
||||||
|
DrawingCommand::~DrawingCommand(void)
|
||||||
|
{
|
||||||
|
if (segment)
|
||||||
|
delete segment;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool DrawingCommand::Do(void)
|
||||||
|
{
|
||||||
|
switch (cmd)
|
||||||
|
{
|
||||||
|
case DOODLE_CUT:
|
||||||
|
{
|
||||||
|
// Cut the last segment
|
||||||
|
if (doc->GetDoodleSegments().Number() > 0)
|
||||||
|
{
|
||||||
|
wxNode *node = doc->GetDoodleSegments().Last();
|
||||||
|
if (segment)
|
||||||
|
delete segment;
|
||||||
|
|
||||||
|
segment = (DoodleSegment *)node->Data();
|
||||||
|
delete node;
|
||||||
|
|
||||||
|
doc->Modify(TRUE);
|
||||||
|
doc->UpdateAllViews();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case DOODLE_ADD:
|
||||||
|
{
|
||||||
|
doc->GetDoodleSegments().Append(new DoodleSegment(*segment));
|
||||||
|
doc->Modify(TRUE);
|
||||||
|
doc->UpdateAllViews();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool DrawingCommand::Undo(void)
|
||||||
|
{
|
||||||
|
switch (cmd)
|
||||||
|
{
|
||||||
|
case DOODLE_CUT:
|
||||||
|
{
|
||||||
|
// Paste the segment
|
||||||
|
if (segment)
|
||||||
|
{
|
||||||
|
doc->GetDoodleSegments().Append(segment);
|
||||||
|
doc->Modify(TRUE);
|
||||||
|
doc->UpdateAllViews();
|
||||||
|
segment = NULL;
|
||||||
|
}
|
||||||
|
doc->Modify(TRUE);
|
||||||
|
doc->UpdateAllViews();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case DOODLE_ADD:
|
||||||
|
{
|
||||||
|
// Cut the last segment
|
||||||
|
if (doc->GetDoodleSegments().Number() > 0)
|
||||||
|
{
|
||||||
|
wxNode *node = doc->GetDoodleSegments().Last();
|
||||||
|
DoodleSegment *seg = (DoodleSegment *)node->Data();
|
||||||
|
delete seg;
|
||||||
|
delete node;
|
||||||
|
|
||||||
|
doc->Modify(TRUE);
|
||||||
|
doc->UpdateAllViews();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
IMPLEMENT_DYNAMIC_CLASS(TextEditDocument, wxDocument)
|
||||||
|
|
||||||
|
// Since text windows have their own method for saving to/loading from files,
|
||||||
|
// we override OnSave/OpenDocument instead of Save/LoadObject
|
||||||
|
bool TextEditDocument::OnSaveDocument(const wxString& filename)
|
||||||
|
{
|
||||||
|
TextEditView *view = (TextEditView *)GetFirstView();
|
||||||
|
|
||||||
|
if (!view->textsw->SaveFile(filename))
|
||||||
|
return FALSE;
|
||||||
|
Modify(FALSE);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TextEditDocument::OnOpenDocument(const wxString& filename)
|
||||||
|
{
|
||||||
|
TextEditView *view = (TextEditView *)GetFirstView();
|
||||||
|
if (!view->textsw->LoadFile(filename))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
SetFilename(filename, TRUE);
|
||||||
|
Modify(FALSE);
|
||||||
|
UpdateAllViews();
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TextEditDocument::IsModified(void) const
|
||||||
|
{
|
||||||
|
TextEditView *view = (TextEditView *)GetFirstView();
|
||||||
|
if (view)
|
||||||
|
{
|
||||||
|
return (wxDocument::IsModified() || view->textsw->Modified());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return wxDocument::IsModified();
|
||||||
|
}
|
||||||
|
|
||||||
|
void TextEditDocument::Modify(bool mod)
|
||||||
|
{
|
||||||
|
TextEditView *view = (TextEditView *)GetFirstView();
|
||||||
|
|
||||||
|
wxDocument::Modify(mod);
|
||||||
|
|
||||||
|
if (!mod && view && view->textsw)
|
||||||
|
view->textsw->DiscardEdits();
|
||||||
|
}
|
98
samples/docview/doc.h
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: doc.h
|
||||||
|
// Purpose: Document classes
|
||||||
|
// Author: Julian Smart
|
||||||
|
// Modified by:
|
||||||
|
// Created: 04/01/98
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) Julian Smart and Markus Holzem
|
||||||
|
// Licence: wxWindows license
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifdef __GNUG__
|
||||||
|
// #pragma interface
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __DOCSAMPLEH__
|
||||||
|
#define __DOCSAMPLEH__
|
||||||
|
|
||||||
|
#include "wx/docview.h"
|
||||||
|
|
||||||
|
// Plots a line from one point to the other
|
||||||
|
class DoodleLine: public wxObject
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
long x1;
|
||||||
|
long y1;
|
||||||
|
long x2;
|
||||||
|
long y2;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Contains a list of lines: represents a mouse-down doodle
|
||||||
|
class DoodleSegment: public wxObject
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
wxList lines;
|
||||||
|
|
||||||
|
DoodleSegment(void);
|
||||||
|
DoodleSegment(DoodleSegment& seg);
|
||||||
|
~DoodleSegment(void);
|
||||||
|
|
||||||
|
void Draw(wxDC *dc);
|
||||||
|
ostream& SaveObject(ostream& stream);
|
||||||
|
istream& LoadObject(istream& stream);
|
||||||
|
};
|
||||||
|
|
||||||
|
class DrawingDocument: public wxDocument
|
||||||
|
{
|
||||||
|
DECLARE_DYNAMIC_CLASS(DrawingDocument)
|
||||||
|
private:
|
||||||
|
public:
|
||||||
|
wxList doodleSegments;
|
||||||
|
|
||||||
|
DrawingDocument(void);
|
||||||
|
~DrawingDocument(void);
|
||||||
|
|
||||||
|
ostream& SaveObject(ostream& stream);
|
||||||
|
istream& LoadObject(istream& stream);
|
||||||
|
|
||||||
|
inline wxList& GetDoodleSegments(void) const { return (wxList&) doodleSegments; };
|
||||||
|
};
|
||||||
|
|
||||||
|
#define DOODLE_CUT 1
|
||||||
|
#define DOODLE_ADD 2
|
||||||
|
|
||||||
|
class DrawingCommand: public wxCommand
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
DoodleSegment *segment;
|
||||||
|
DrawingDocument *doc;
|
||||||
|
int cmd;
|
||||||
|
public:
|
||||||
|
DrawingCommand(const wxString& name, int cmd, DrawingDocument *ddoc, DoodleSegment *seg);
|
||||||
|
~DrawingCommand(void);
|
||||||
|
|
||||||
|
bool Do(void);
|
||||||
|
bool Undo(void);
|
||||||
|
};
|
||||||
|
|
||||||
|
class TextEditDocument: public wxDocument
|
||||||
|
{
|
||||||
|
DECLARE_DYNAMIC_CLASS(TextEditDocument)
|
||||||
|
private:
|
||||||
|
public:
|
||||||
|
/*
|
||||||
|
ostream& SaveObject(ostream& stream);
|
||||||
|
istream& LoadObject(istream& stream);
|
||||||
|
*/
|
||||||
|
virtual bool OnSaveDocument(const wxString& filename);
|
||||||
|
virtual bool OnOpenDocument(const wxString& filename);
|
||||||
|
virtual bool IsModified(void) const;
|
||||||
|
virtual void Modify(bool mod);
|
||||||
|
|
||||||
|
TextEditDocument(void) {}
|
||||||
|
~TextEditDocument(void) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
BIN
samples/docview/doc.ico
Normal file
After Width: | Height: | Size: 766 B |
274
samples/docview/docview.cpp
Normal file
@@ -0,0 +1,274 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: docview.cpp
|
||||||
|
// Purpose: Document/view demo
|
||||||
|
// Author: Julian Smart
|
||||||
|
// Modified by:
|
||||||
|
// Created: 04/01/98
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) Julian Smart and Markus Holzem
|
||||||
|
// Licence: wxWindows license
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifdef __GNUG__
|
||||||
|
// #pragma implementation "docview.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Purpose: Document/view architecture demo for wxWindows class library
|
||||||
|
* Run with no arguments for multiple top-level windows, -single
|
||||||
|
* for a single window.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// For compilers that support precompilation, includes "wx/wx.h".
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#ifdef __BORLANDC__
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WX_PRECOMP
|
||||||
|
#include "wx/wx.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !USE_DOC_VIEW_ARCHITECTURE
|
||||||
|
#error You must set USE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h!
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "wx/docview.h"
|
||||||
|
|
||||||
|
#include "docview.h"
|
||||||
|
#include "doc.h"
|
||||||
|
#include "view.h"
|
||||||
|
|
||||||
|
MyFrame *frame = NULL;
|
||||||
|
|
||||||
|
// In single window mode, don't have any child windows; use
|
||||||
|
// main window.
|
||||||
|
bool singleWindowMode = FALSE;
|
||||||
|
|
||||||
|
IMPLEMENT_APP(MyApp)
|
||||||
|
|
||||||
|
MyApp::MyApp(void)
|
||||||
|
{
|
||||||
|
m_docManager = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MyApp::OnInit(void)
|
||||||
|
{
|
||||||
|
//// Find out if we're:
|
||||||
|
//// SDI : multiple windows and documents but not MDI
|
||||||
|
//// MDI : multiple windows and documents with containing frame - MSW only)
|
||||||
|
/// single window : (one document at a time, only one frame, as in Windows Write)
|
||||||
|
if (argc > 1)
|
||||||
|
{
|
||||||
|
if (strcmp(argv[1], "-single") == 0)
|
||||||
|
{
|
||||||
|
singleWindowMode = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//// Create a document manager
|
||||||
|
m_docManager = new wxDocManager;
|
||||||
|
|
||||||
|
//// Create a template relating drawing documents to their views
|
||||||
|
(void) new wxDocTemplate(m_docManager, "Drawing", "*.drw", "", "drw", "Drawing Doc", "Drawing View",
|
||||||
|
CLASSINFO(DrawingDocument), CLASSINFO(DrawingView));
|
||||||
|
|
||||||
|
if (singleWindowMode)
|
||||||
|
{
|
||||||
|
// If we've only got one window, we only get to edit
|
||||||
|
// one document at a time. Therefore no text editing, just
|
||||||
|
// doodling.
|
||||||
|
m_docManager->SetMaxDocsOpen(1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
//// Create a template relating text documents to their views
|
||||||
|
(void) new wxDocTemplate(m_docManager, "Text", "*.txt", "", "txt", "Text Doc", "Text View",
|
||||||
|
CLASSINFO(TextEditDocument), CLASSINFO(TextEditView));
|
||||||
|
|
||||||
|
//// Create the main frame window
|
||||||
|
frame = new MyFrame(m_docManager, NULL, "DocView Demo", wxPoint(0, 0), wxSize(500, 400), wxDEFAULT_FRAME_STYLE);
|
||||||
|
|
||||||
|
//// Give it an icon (this is ignored in MDI mode: uses resources)
|
||||||
|
#ifdef __WINDOWS__
|
||||||
|
frame->SetIcon(wxIcon("doc_icn"));
|
||||||
|
#endif
|
||||||
|
#ifdef __X__
|
||||||
|
frame->SetIcon(wxIcon("aiai.xbm"));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//// Make a menubar
|
||||||
|
wxMenu *file_menu = new wxMenu;
|
||||||
|
wxMenu *edit_menu = NULL;
|
||||||
|
|
||||||
|
file_menu->Append(wxID_NEW, "&New...");
|
||||||
|
file_menu->Append(wxID_OPEN, "&Open...");
|
||||||
|
|
||||||
|
if (singleWindowMode)
|
||||||
|
{
|
||||||
|
file_menu->Append(wxID_CLOSE, "&Close");
|
||||||
|
file_menu->Append(wxID_SAVE, "&Save");
|
||||||
|
file_menu->Append(wxID_SAVEAS, "Save &As...");
|
||||||
|
file_menu->AppendSeparator();
|
||||||
|
file_menu->Append(wxID_PRINT, "&Print...");
|
||||||
|
file_menu->Append(wxID_PRINT_SETUP, "Print &Setup...");
|
||||||
|
file_menu->Append(wxID_PREVIEW, "Print Pre&view");
|
||||||
|
|
||||||
|
edit_menu = new wxMenu;
|
||||||
|
edit_menu->Append(wxID_UNDO, "&Undo");
|
||||||
|
edit_menu->Append(wxID_REDO, "&Redo");
|
||||||
|
edit_menu->AppendSeparator();
|
||||||
|
edit_menu->Append(DOCVIEW_CUT, "&Cut last segment");
|
||||||
|
|
||||||
|
frame->editMenu = edit_menu;
|
||||||
|
}
|
||||||
|
|
||||||
|
file_menu->AppendSeparator();
|
||||||
|
file_menu->Append(wxID_EXIT, "E&xit");
|
||||||
|
|
||||||
|
// A nice touch: a history of files visited. Use this menu.
|
||||||
|
m_docManager->FileHistoryUseMenu(file_menu);
|
||||||
|
|
||||||
|
wxMenu *help_menu = new wxMenu;
|
||||||
|
help_menu->Append(DOCVIEW_ABOUT, "&About");
|
||||||
|
|
||||||
|
wxMenuBar *menu_bar = new wxMenuBar;
|
||||||
|
|
||||||
|
menu_bar->Append(file_menu, "&File");
|
||||||
|
if (edit_menu)
|
||||||
|
menu_bar->Append(edit_menu, "&Edit");
|
||||||
|
menu_bar->Append(help_menu, "&Help");
|
||||||
|
|
||||||
|
if (singleWindowMode)
|
||||||
|
frame->canvas = frame->CreateCanvas(NULL, frame);
|
||||||
|
|
||||||
|
//// Associate the menu bar with the frame
|
||||||
|
frame->SetMenuBar(menu_bar);
|
||||||
|
|
||||||
|
frame->Centre(wxBOTH);
|
||||||
|
frame->Show(TRUE);
|
||||||
|
|
||||||
|
SetTopWindow(frame);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
int MyApp::OnExit(void)
|
||||||
|
{
|
||||||
|
delete m_docManager;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Centralised code for creating a document frame.
|
||||||
|
* Called from view.cpp, when a view is created, but not used at all
|
||||||
|
* in 'single window' mode.
|
||||||
|
*/
|
||||||
|
|
||||||
|
wxFrame *MyApp::CreateChildFrame(wxDocument *doc, wxView *view, bool isCanvas)
|
||||||
|
{
|
||||||
|
//// Make a child frame
|
||||||
|
wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, GetMainFrame(), "Child Frame",
|
||||||
|
wxPoint(10, 10), wxSize(300, 300), wxDEFAULT_FRAME_STYLE);
|
||||||
|
|
||||||
|
#ifdef __WINDOWS__
|
||||||
|
subframe->SetIcon(wxString(isCanvas ? "chrt_icn" : "notepad_icn"));
|
||||||
|
#endif
|
||||||
|
#ifdef __X__
|
||||||
|
subframe->SetIcon(wxIcon("aiai.xbm"));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//// Make a menubar
|
||||||
|
wxMenu *file_menu = new wxMenu;
|
||||||
|
|
||||||
|
file_menu->Append(wxID_NEW, "&New...");
|
||||||
|
file_menu->Append(wxID_OPEN, "&Open...");
|
||||||
|
file_menu->Append(wxID_CLOSE, "&Close");
|
||||||
|
file_menu->Append(wxID_SAVE, "&Save");
|
||||||
|
file_menu->Append(wxID_SAVEAS, "Save &As...");
|
||||||
|
|
||||||
|
if (isCanvas)
|
||||||
|
{
|
||||||
|
file_menu->AppendSeparator();
|
||||||
|
file_menu->Append(wxID_PRINT, "&Print...");
|
||||||
|
file_menu->Append(wxID_PRINT_SETUP, "Print &Setup...");
|
||||||
|
file_menu->Append(wxID_PREVIEW, "Print Pre&view");
|
||||||
|
}
|
||||||
|
|
||||||
|
wxMenu *edit_menu = NULL;
|
||||||
|
|
||||||
|
if (isCanvas)
|
||||||
|
{
|
||||||
|
edit_menu = new wxMenu;
|
||||||
|
edit_menu->Append(wxID_UNDO, "&Undo");
|
||||||
|
edit_menu->Append(wxID_REDO, "&Redo");
|
||||||
|
edit_menu->AppendSeparator();
|
||||||
|
edit_menu->Append(DOCVIEW_CUT, "&Cut last segment");
|
||||||
|
|
||||||
|
doc->GetCommandProcessor()->SetEditMenu(edit_menu);
|
||||||
|
}
|
||||||
|
|
||||||
|
wxMenu *help_menu = new wxMenu;
|
||||||
|
help_menu->Append(DOCVIEW_ABOUT, "&About");
|
||||||
|
|
||||||
|
wxMenuBar *menu_bar = new wxMenuBar;
|
||||||
|
|
||||||
|
menu_bar->Append(file_menu, "&File");
|
||||||
|
if (isCanvas)
|
||||||
|
menu_bar->Append(edit_menu, "&Edit");
|
||||||
|
menu_bar->Append(help_menu, "&Help");
|
||||||
|
|
||||||
|
//// Associate the menu bar with the frame
|
||||||
|
subframe->SetMenuBar(menu_bar);
|
||||||
|
|
||||||
|
subframe->Centre(wxBOTH);
|
||||||
|
|
||||||
|
return subframe;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is the top-level window of the application.
|
||||||
|
*/
|
||||||
|
|
||||||
|
IMPLEMENT_CLASS(MyFrame, wxDocParentFrame)
|
||||||
|
BEGIN_EVENT_TABLE(MyFrame, wxDocParentFrame)
|
||||||
|
EVT_MENU(DOCVIEW_ABOUT, MyFrame::OnAbout)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
MyFrame::MyFrame(wxDocManager *manager, wxFrame *frame, const wxString& title,
|
||||||
|
const wxPoint& pos, const wxSize& size, const long type):
|
||||||
|
wxDocParentFrame(manager, frame, title, pos, size, type)
|
||||||
|
{
|
||||||
|
// This pointer only needed if in single window mode
|
||||||
|
canvas = NULL;
|
||||||
|
editMenu = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyFrame::OnAbout(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
(void)wxMessageBox("DocView Demo\nAuthor: Julian Smart julian.smart@ukonline.co.uk\nUsage: docview.exe [-single]", "About DocView");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Creates a canvas. Called either from view.cc when a new drawing
|
||||||
|
// view is created, or in OnInit as a child of the main window,
|
||||||
|
// if in 'single window' mode.
|
||||||
|
MyCanvas *MyFrame::CreateCanvas(wxView *view, wxFrame *parent)
|
||||||
|
{
|
||||||
|
int width, height;
|
||||||
|
parent->GetClientSize(&width, &height);
|
||||||
|
|
||||||
|
// Non-retained canvas
|
||||||
|
MyCanvas *canvas = new MyCanvas(view, parent, wxPoint(0, 0), wxSize(width, height), 0);
|
||||||
|
canvas->SetCursor(wxCursor(wxCURSOR_PENCIL));
|
||||||
|
|
||||||
|
// Give it scrollbars
|
||||||
|
canvas->SetScrollbars(20, 20, 50, 50);
|
||||||
|
|
||||||
|
return canvas;
|
||||||
|
}
|
||||||
|
|
||||||
|
MyFrame *GetMainFrame(void)
|
||||||
|
{
|
||||||
|
return frame;
|
||||||
|
}
|
||||||
|
|
8
samples/docview/docview.def
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
NAME DocView
|
||||||
|
DESCRIPTION 'Document architecture test'
|
||||||
|
EXETYPE WINDOWS
|
||||||
|
STUB 'WINSTUB.EXE'
|
||||||
|
CODE PRELOAD MOVEABLE DISCARDABLE
|
||||||
|
DATA PRELOAD MOVEABLE MULTIPLE
|
||||||
|
HEAPSIZE 1024
|
||||||
|
STACKSIZE 8192
|
66
samples/docview/docview.h
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: docview.h
|
||||||
|
// Purpose: Document/view demo
|
||||||
|
// Author: Julian Smart
|
||||||
|
// Modified by:
|
||||||
|
// Created: 04/01/98
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) Julian Smart and Markus Holzem
|
||||||
|
// Licence: wxWindows license
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifdef __GNUG__
|
||||||
|
// #pragma interface "docview.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __DOCVIEWSAMPLEH__
|
||||||
|
#define __DOCVIEWSAMPLEH__
|
||||||
|
|
||||||
|
#include "wx/docview.h"
|
||||||
|
|
||||||
|
class wxDocManager;
|
||||||
|
|
||||||
|
// Define a new application
|
||||||
|
class MyApp: public wxApp
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
MyApp(void);
|
||||||
|
bool OnInit(void);
|
||||||
|
int OnExit(void);
|
||||||
|
|
||||||
|
wxFrame *CreateChildFrame(wxDocument *doc, wxView *view, bool isCanvas);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
wxDocManager* m_docManager;
|
||||||
|
};
|
||||||
|
|
||||||
|
DECLARE_APP(MyApp)
|
||||||
|
|
||||||
|
// Define a new frame
|
||||||
|
class MyCanvas;
|
||||||
|
class MyFrame: public wxDocParentFrame
|
||||||
|
{
|
||||||
|
DECLARE_CLASS(MyFrame)
|
||||||
|
public:
|
||||||
|
wxMenu *editMenu;
|
||||||
|
|
||||||
|
// This pointer only needed if in single window mode
|
||||||
|
MyCanvas *canvas;
|
||||||
|
|
||||||
|
MyFrame(wxDocManager *manager, wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size,
|
||||||
|
const long type);
|
||||||
|
|
||||||
|
void OnAbout(wxCommandEvent& event);
|
||||||
|
MyCanvas *CreateCanvas(wxView *view, wxFrame *parent);
|
||||||
|
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
|
};
|
||||||
|
|
||||||
|
extern MyFrame *GetMainFrame(void);
|
||||||
|
|
||||||
|
#define DOCVIEW_CUT 1
|
||||||
|
#define DOCVIEW_ABOUT 2
|
||||||
|
|
||||||
|
extern bool singleWindowMode;
|
||||||
|
|
||||||
|
#endif
|
6
samples/docview/docview.rc
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
doc_icn ICON "doc.ico"
|
||||||
|
aiai_icn ICON "aiai.ico"
|
||||||
|
chrt_icn ICON "chart.ico"
|
||||||
|
notepad_icn ICON "notepad.ico"
|
||||||
|
#include "wx/msw/wx.rc"
|
||||||
|
|
67
samples/docview/makefile.b32
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.b32
|
||||||
|
# Author: Patrick Halke
|
||||||
|
# Created: 1995
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile : Builds 32bit buttonbar example.
|
||||||
|
|
||||||
|
# WXWIN and BCCDIR are set by parent make
|
||||||
|
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\makeb32.env
|
||||||
|
|
||||||
|
WXLIBDIR = $(WXDIR)\lib
|
||||||
|
WXLIB=$(WXLIBDIR)\wx32.lib
|
||||||
|
LIBS=$(WXLIB) cw32 import32
|
||||||
|
|
||||||
|
TARGET=docview
|
||||||
|
|
||||||
|
!if "$(FINAL)" == "0"
|
||||||
|
LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
|
||||||
|
OPT = -Od
|
||||||
|
DEBUG_FLAGS= -v
|
||||||
|
!else
|
||||||
|
LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
|
||||||
|
OPT = -Od
|
||||||
|
DEBUG_FLAGS =
|
||||||
|
!endif
|
||||||
|
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
|
||||||
|
|
||||||
|
OBJECTS = docview.obj doc.obj view.obj
|
||||||
|
|
||||||
|
$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res
|
||||||
|
tlink32 $(LINKFLAGS) @&&!
|
||||||
|
c0w32.obj $(OBJECTS)
|
||||||
|
$(TARGET)
|
||||||
|
nul
|
||||||
|
$(LIBS)
|
||||||
|
!
|
||||||
|
brc32 -K $(TARGET).res
|
||||||
|
|
||||||
|
.$(SRCSUFF).obj:
|
||||||
|
bcc32 $(CPPFLAGS) -c {$< }
|
||||||
|
|
||||||
|
.c.obj:
|
||||||
|
bcc32 $(CPPFLAGS) -P- -c {$< }
|
||||||
|
|
||||||
|
docview.obj: docview.$(SRCSUFF) docview.h
|
||||||
|
|
||||||
|
doc.obj: doc.$(SRCSUFF) doc.h
|
||||||
|
|
||||||
|
view.obj: view.$(SRCSUFF) view.h
|
||||||
|
|
||||||
|
$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
|
||||||
|
brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-erase *.obj
|
||||||
|
-erase *.exe
|
||||||
|
-erase *.res
|
||||||
|
-erase *.map
|
||||||
|
-erase *.rws
|
||||||
|
|
77
samples/docview/makefile.bcc
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.bcc
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1993
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile : Builds docview example (DOS).
|
||||||
|
|
||||||
|
!if "$(BCCDIR)" == ""
|
||||||
|
!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!if "$(WXWIN)" == ""
|
||||||
|
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifndef FINAL
|
||||||
|
FINAL=0
|
||||||
|
!endif
|
||||||
|
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
!include $(WXDIR)\src\makebcc.env
|
||||||
|
|
||||||
|
THISDIR = $(WXDIR)\samples\docview
|
||||||
|
WXLIB = $(WXDIR)\lib\wx.lib
|
||||||
|
LIBS=$(WXLIB) mathwl cwl import
|
||||||
|
INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
|
||||||
|
CFG=$(WXDIR)\src\wxwin.cfg
|
||||||
|
|
||||||
|
!if "$(FINAL)" == "0"
|
||||||
|
LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
|
||||||
|
OPT = -Od
|
||||||
|
DEBUG_FLAGS= -v
|
||||||
|
!else
|
||||||
|
LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
|
||||||
|
OPT = -O2
|
||||||
|
DEBUG_FLAGS =
|
||||||
|
!endif
|
||||||
|
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
|
||||||
|
|
||||||
|
OBJECTS = docview.obj doc.obj view.obj
|
||||||
|
|
||||||
|
docview: docview.exe
|
||||||
|
|
||||||
|
all: docview.exe
|
||||||
|
|
||||||
|
docview.exe: $(WXLIB) $(OBJECTS) docview.def docview.res
|
||||||
|
tlink $(LINKFLAGS) @&&!
|
||||||
|
c0wl.obj $(OBJECTS)
|
||||||
|
docview
|
||||||
|
nul
|
||||||
|
$(LIBS)
|
||||||
|
docview.def
|
||||||
|
!
|
||||||
|
rc -30 -K docview.res
|
||||||
|
|
||||||
|
.$(SRCSUFF).obj:
|
||||||
|
bcc $(CPPFLAGS) -c {$< }
|
||||||
|
|
||||||
|
docview.obj: docview.$(SRCSUFF)
|
||||||
|
|
||||||
|
doc.obj: doc.$(SRCSUFF)
|
||||||
|
|
||||||
|
view.obj: view.$(SRCSUFF)
|
||||||
|
|
||||||
|
docview.res : docview.rc $(WXDIR)\include\msw\wx.rc
|
||||||
|
rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa docview
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-erase *.obj
|
||||||
|
-erase *.exe
|
||||||
|
-erase *.res
|
||||||
|
-erase *.map
|
||||||
|
-erase *.rws
|
74
samples/docview/makefile.dos
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.dos
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1995
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1995, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile : Builds docview example (DOS).
|
||||||
|
# Use FINAL=1 argument to nmake to build final version with no debugging
|
||||||
|
# info
|
||||||
|
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\makemsc.env
|
||||||
|
|
||||||
|
THISDIR = $(WXDIR)\samples\docview
|
||||||
|
INC=/I$(WXDIR)\include
|
||||||
|
|
||||||
|
HEADERS = docview.h
|
||||||
|
SOURCES = docview.$(SRCSUFF)
|
||||||
|
OBJECTS = docview.obj doc.obj view.obj
|
||||||
|
|
||||||
|
all: docview.exe
|
||||||
|
|
||||||
|
wx:
|
||||||
|
cd $(WXDIR)\src\msw
|
||||||
|
nmake -f makefile.dos
|
||||||
|
cd $(THISDIR)
|
||||||
|
|
||||||
|
wxclean:
|
||||||
|
cd $(WXDIR)\src\msw
|
||||||
|
nmake -f makefile.dos clean
|
||||||
|
cd $(THISDIR)
|
||||||
|
|
||||||
|
|
||||||
|
docview.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) $(OBJECTS) docview.def docview.res
|
||||||
|
link $(LINKFLAGS) @<<
|
||||||
|
$(WXDIR)\src\msw\dummy.obj $(OBJECTS),
|
||||||
|
docview,
|
||||||
|
NUL,
|
||||||
|
$(LIBS),
|
||||||
|
docview.def
|
||||||
|
;
|
||||||
|
<<
|
||||||
|
rc -30 -K docview.res
|
||||||
|
|
||||||
|
docview.obj: docview.h docview.$(SRCSUFF)
|
||||||
|
cl @<<
|
||||||
|
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
|
||||||
|
<<
|
||||||
|
|
||||||
|
view.obj: view.h view.$(SRCSUFF)
|
||||||
|
cl @<<
|
||||||
|
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
|
||||||
|
<<
|
||||||
|
|
||||||
|
doc.obj: doc.h doc.$(SRCSUFF)
|
||||||
|
cl @<<
|
||||||
|
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
|
||||||
|
<<
|
||||||
|
|
||||||
|
docview.res : docview.rc $(WXDIR)\include\wx\msw\wx.rc
|
||||||
|
rc -r /dFAFA_LIB /i$(WXDIR)\include docview
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-erase *.obj
|
||||||
|
-erase *.exe
|
||||||
|
-erase *.res
|
||||||
|
-erase *.map
|
||||||
|
-erase *.sbr
|
||||||
|
-erase *.pdb
|
||||||
|
|
43
samples/docview/makefile.g95
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.unx
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1993
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile for docview example (UNIX).
|
||||||
|
|
||||||
|
WXDIR = ../..
|
||||||
|
|
||||||
|
# All common UNIX compiler flags and options are now in
|
||||||
|
# this central makefile.
|
||||||
|
include $(WXDIR)/src/makeg95.env
|
||||||
|
|
||||||
|
OBJECTS = $(OBJDIR)/docview.$(OBJSUFF) $(OBJDIR)/view.$(OBJSUFF) $(OBJDIR)/doc.$(OBJSUFF)\
|
||||||
|
$(OBJDIR)/docview_resources.$(OBJSUFF)
|
||||||
|
|
||||||
|
|
||||||
|
all: $(OBJDIR) docview$(GUISUFFIX)
|
||||||
|
|
||||||
|
$(OBJDIR):
|
||||||
|
mkdir $(OBJDIR)
|
||||||
|
|
||||||
|
docview$(GUISUFFIX): $(OBJECTS) $(WXLIB)
|
||||||
|
$(CC) $(LDFLAGS) -o docview$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(XVIEW_LINK) $(LDLIBS)
|
||||||
|
|
||||||
|
$(OBJDIR)/docview.$(OBJSUFF): docview.$(SRCSUFF) docview.h doc.h view.h
|
||||||
|
$(CC) -c $(CPPFLAGS) -o $@ docview.$(SRCSUFF)
|
||||||
|
|
||||||
|
$(OBJDIR)/doc.$(OBJSUFF): doc.$(SRCSUFF) doc.h
|
||||||
|
$(CC) -c $(CPPFLAGS) -o $@ doc.$(SRCSUFF)
|
||||||
|
|
||||||
|
$(OBJDIR)/view.$(OBJSUFF): view.$(SRCSUFF) view.h
|
||||||
|
$(CC) -c $(CPPFLAGS) -o $@ view.$(SRCSUFF)
|
||||||
|
|
||||||
|
$(OBJDIR)/docview_resources.o: docview.rc
|
||||||
|
$(RESCOMP) -i docview.rc -o $(OBJDIR)/docview_resources.o $(RESFLAGS)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(OBJECTS) docview$(GUISUFFIX).exe core *.rsc *.res
|
75
samples/docview/makefile.nt
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.nt
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1993
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile : Builds docview example (MS VC++).
|
||||||
|
# Use FINAL=1 argument to nmake to build final version with no debugging
|
||||||
|
# info
|
||||||
|
|
||||||
|
# Set WXDIR for your system
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
|
WXUSINGDLL=0
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\ntwxwin.mak
|
||||||
|
|
||||||
|
THISDIR = $(WXDIR)\samples\docview
|
||||||
|
PROGRAM=docview
|
||||||
|
|
||||||
|
OBJECTS = $(PROGRAM).obj doc.obj view.obj
|
||||||
|
|
||||||
|
$(PROGRAM): $(PROGRAM).exe
|
||||||
|
|
||||||
|
all: wx $(PROGRAM).exe
|
||||||
|
|
||||||
|
wx:
|
||||||
|
cd $(WXDIR)\src\msw
|
||||||
|
nmake -f makefile.nt FINAL=$(FINAL)
|
||||||
|
cd $(THISDIR)
|
||||||
|
|
||||||
|
wxclean:
|
||||||
|
cd $(WXDIR)\src\msw
|
||||||
|
nmake -f makefile.nt clean
|
||||||
|
cd $(THISDIR)
|
||||||
|
|
||||||
|
$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res
|
||||||
|
$(link) @<<
|
||||||
|
-out:$(PROGRAM).exe
|
||||||
|
$(LINKFLAGS)
|
||||||
|
$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res
|
||||||
|
$(LIBS)
|
||||||
|
<<
|
||||||
|
|
||||||
|
$(PROGRAM).obj: $(PROGRAM).h doc.h view.h $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ)
|
||||||
|
$(cc) @<<
|
||||||
|
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
|
||||||
|
<<
|
||||||
|
|
||||||
|
doc.obj: doc.h doc.$(SRCSUFF) $(DUMMYOBJ)
|
||||||
|
$(cc) @<<
|
||||||
|
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
|
||||||
|
<<
|
||||||
|
|
||||||
|
view.obj: view.h view.$(SRCSUFF) $(DUMMYOBJ)
|
||||||
|
$(cc) @<<
|
||||||
|
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
|
||||||
|
<<
|
||||||
|
|
||||||
|
$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
|
||||||
|
$(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc
|
||||||
|
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-erase *.obj
|
||||||
|
-erase *.exe
|
||||||
|
-erase *.res
|
||||||
|
-erase *.map
|
||||||
|
-erase *.pdb
|
||||||
|
-erase *.sbr
|
||||||
|
|
||||||
|
|
38
samples/docview/makefile.sc
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
# Symantec C++ makefile for docview example
|
||||||
|
# NOTE that peripheral libraries are now dealt in main wxWindows makefile.
|
||||||
|
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
!include $(WXDIR)\src\makesc.env
|
||||||
|
|
||||||
|
WXLIB = $(WXDIR)\lib\wx.lib
|
||||||
|
INCDIR = $(WXDIR)\include
|
||||||
|
MSWINC = $(INCDIR)\msw
|
||||||
|
BASEINC = $(INCDIR)\base
|
||||||
|
|
||||||
|
CC=sc
|
||||||
|
RC=rc
|
||||||
|
CFLAGS = -o -ml -W -Dwx_msw
|
||||||
|
LDFLAGS = -ml -W
|
||||||
|
|
||||||
|
INCLUDE=$(BASEINC);$(MSWINC)
|
||||||
|
|
||||||
|
LIBS=$(WXLIB) libw.lib commdlg.lib shell.lib
|
||||||
|
|
||||||
|
OBJECTS=docview.obj view.obj doc.obj
|
||||||
|
|
||||||
|
.$(SRCSUFF).obj:
|
||||||
|
*$(CC) -c $(CFLAGS) -I$(INCLUDE) $<
|
||||||
|
|
||||||
|
.rc.res:
|
||||||
|
*$(RC) -r -I$(INCLUDE) $<
|
||||||
|
|
||||||
|
docview.exe: $(OBJECTS) docview.def docview.res
|
||||||
|
*$(CC) $(LDFLAGS) -o$@ $(OBJECTS) docview.def $(LIBS)
|
||||||
|
*$(RC) -k docview.res
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-del *.obj
|
||||||
|
-del *.exe
|
||||||
|
-del *.res
|
||||||
|
-del *.map
|
||||||
|
-del *.rws
|
64
samples/docview/makefile.unx
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.unx
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1993
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile for docview example (UNIX).
|
||||||
|
|
||||||
|
WXDIR = ../..
|
||||||
|
|
||||||
|
# All common UNIX compiler flags and options are now in
|
||||||
|
# this central makefile.
|
||||||
|
include $(WXDIR)/src/make.env
|
||||||
|
|
||||||
|
OBJECTS = $(OBJDIR)/docview.$(OBJSUFF) $(OBJDIR)/view.$(OBJSUFF) $(OBJDIR)/doc.$(OBJSUFF)
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
|
||||||
|
all: $(OBJDIR) wx$(GUISUFFIX) docview$(GUISUFFIX)
|
||||||
|
|
||||||
|
wx_motif:
|
||||||
|
cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif
|
||||||
|
|
||||||
|
wx_ol:
|
||||||
|
cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview
|
||||||
|
motif:
|
||||||
|
$(MAKE) -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK=
|
||||||
|
|
||||||
|
xview:
|
||||||
|
$(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol CC=$(CC) OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)'
|
||||||
|
|
||||||
|
hp:
|
||||||
|
$(MAKE) -f makefile,unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' WARN='-w' \
|
||||||
|
XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' LDLIBS='$(HPLDLIBS)'
|
||||||
|
|
||||||
|
$(OBJDIR):
|
||||||
|
mkdir $(OBJDIR)
|
||||||
|
|
||||||
|
docview$(GUISUFFIX): $(OBJECTS) $(WXLIB)
|
||||||
|
$(CC) $(LDFLAGS) -o docview$(GUISUFFIX) $(OBJECTS) $(XVIEW_LINK) $(LDLIBS)
|
||||||
|
|
||||||
|
$(OBJDIR)/docview.$(OBJSUFF): docview.$(SRCSUFF) docview.h doc.h view.h
|
||||||
|
$(CC) -c $(CPPFLAGS) -o $@ docview.$(SRCSUFF)
|
||||||
|
|
||||||
|
$(OBJDIR)/doc.$(OBJSUFF): doc.$(SRCSUFF) doc.h
|
||||||
|
$(CC) -c $(CPPFLAGS) -o $@ doc.$(SRCSUFF)
|
||||||
|
|
||||||
|
$(OBJDIR)/view.$(OBJSUFF): view.$(SRCSUFF) view.h
|
||||||
|
$(CC) -c $(CPPFLAGS) -o $@ view.$(SRCSUFF)
|
||||||
|
|
||||||
|
clean_motif:
|
||||||
|
$(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany
|
||||||
|
|
||||||
|
clean_ol:
|
||||||
|
$(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany
|
||||||
|
|
||||||
|
clean_hp:
|
||||||
|
$(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany
|
||||||
|
|
||||||
|
cleanany:
|
||||||
|
rm -f $(OBJECTS) docview$(GUISUFFIX) core
|
44
samples/docview/makefile.vms
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
#************************************************************************
|
||||||
|
# Makefile for DOCVIEW under VMS
|
||||||
|
# by Stefan Hammes
|
||||||
|
# (incomplete) update history:
|
||||||
|
# 09.06.95
|
||||||
|
#************************************************************************
|
||||||
|
|
||||||
|
#************************************************************************
|
||||||
|
# Definition section
|
||||||
|
# (cave: definitions and includes must begin with ',')
|
||||||
|
#************************************************************************
|
||||||
|
|
||||||
|
APPOPTS =
|
||||||
|
APPDEFS =
|
||||||
|
APPINCS =
|
||||||
|
|
||||||
|
#************************************************************************
|
||||||
|
# Module section
|
||||||
|
#************************************************************************
|
||||||
|
|
||||||
|
# Name of main module
|
||||||
|
MAIN = docview
|
||||||
|
|
||||||
|
# Object modules of the application.
|
||||||
|
OBJS = docview.obj view.obj doc.obj
|
||||||
|
OBJLIST =docview.obj,view.obj,doc.obj
|
||||||
|
|
||||||
|
.include [--.src]makevms.env
|
||||||
|
|
||||||
|
# main dependency
|
||||||
|
$(MAIN).exe : $(OBJS)
|
||||||
|
$(LINK) $(LINKFLAGS) /exec=$(MAIN).exe $(OBJLIST),$(WXLIB)/lib,$(OPTSFILE)/option
|
||||||
|
- purge *.exe
|
||||||
|
|
||||||
|
#************************************************************************
|
||||||
|
# Header file depedencies following
|
||||||
|
#************************************************************************
|
||||||
|
|
||||||
|
docview.$(OBJSUFF) : docview.$(SRCSUFF) docview.h doc.h view.h
|
||||||
|
|
||||||
|
doc.$(OBJSUFF) : doc.$(SRCSUFF) doc.h
|
||||||
|
|
||||||
|
view.$(OBJSUFF) : view.$(SRCSUFF) view.h
|
||||||
|
|
43
samples/docview/makefile.wat
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
#
|
||||||
|
# Makefile for WATCOM
|
||||||
|
#
|
||||||
|
# Created by D.Chubraev, chubraev@iem.ee.ethz.ch
|
||||||
|
# 8 Nov 1994
|
||||||
|
#
|
||||||
|
|
||||||
|
WXDIR = ..\..
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\makewat.env
|
||||||
|
|
||||||
|
WXLIB = $(WXDIR)\lib
|
||||||
|
NAME = docview
|
||||||
|
LNK = $(name).lnk
|
||||||
|
OBJS = $(name).obj doc.obj view.obj
|
||||||
|
|
||||||
|
all: $(name).exe
|
||||||
|
|
||||||
|
$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib
|
||||||
|
wlink @$(LNK)
|
||||||
|
$(BINDCOMMAND) $(name).res
|
||||||
|
|
||||||
|
$(name).res : $(name).rc $(WXDIR)\include\msw\wx.rc
|
||||||
|
$(RC) $(RESFLAGS1) $(name).rc
|
||||||
|
|
||||||
|
$(LNK) : makefile.wat
|
||||||
|
%create $(LNK)
|
||||||
|
@%append $(LNK) debug all
|
||||||
|
@%append $(LNK) system $(LINKOPTION)
|
||||||
|
@%append $(LNK) $(MINDATA)
|
||||||
|
@%append $(LNK) $(MAXDATA)
|
||||||
|
@%append $(LNK) $(STACK)
|
||||||
|
@%append $(LNK) name $(name)
|
||||||
|
@%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib
|
||||||
|
@for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i
|
||||||
|
@for %i in ($(OBJS)) do @%append $(LNK) file %i
|
||||||
|
|
||||||
|
thing: .SYMBOLIC
|
||||||
|
echo $(WATLIBDIR)
|
||||||
|
|
||||||
|
clean: .SYMBOLIC
|
||||||
|
-erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe *.rex
|
||||||
|
|
BIN
samples/docview/notepad.ico
Normal file
After Width: | Height: | Size: 766 B |
284
samples/docview/view.cpp
Normal file
@@ -0,0 +1,284 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: view.cpp
|
||||||
|
// Purpose: View classes
|
||||||
|
// Author: Julian Smart
|
||||||
|
// Modified by:
|
||||||
|
// Created: 04/01/98
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) Julian Smart and Markus Holzem
|
||||||
|
// Licence: wxWindows license
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifdef __GNUG__
|
||||||
|
// #pragma implementation
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// For compilers that support precompilation, includes "wx/wx.h".
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#ifdef __BORLANDC__
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WX_PRECOMP
|
||||||
|
#include "wx/wx.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !USE_DOC_VIEW_ARCHITECTURE
|
||||||
|
#error You must set USE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h!
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "docview.h"
|
||||||
|
#include "doc.h"
|
||||||
|
#include "view.h"
|
||||||
|
|
||||||
|
IMPLEMENT_DYNAMIC_CLASS(DrawingView, wxView)
|
||||||
|
|
||||||
|
// For drawing lines in a canvas
|
||||||
|
float xpos = -1;
|
||||||
|
float ypos = -1;
|
||||||
|
|
||||||
|
BEGIN_EVENT_TABLE(DrawingView, wxView)
|
||||||
|
EVT_MENU(DOODLE_CUT, DrawingView::OnCut)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
// What to do when a view is created. Creates actual
|
||||||
|
// windows for displaying the view.
|
||||||
|
bool DrawingView::OnCreate(wxDocument *doc, long flags)
|
||||||
|
{
|
||||||
|
if (!singleWindowMode)
|
||||||
|
{
|
||||||
|
// Multiple windows
|
||||||
|
frame = wxGetApp().CreateChildFrame(doc, this, TRUE);
|
||||||
|
frame->SetTitle("DrawingView");
|
||||||
|
|
||||||
|
canvas = GetMainFrame()->CreateCanvas(this, frame);
|
||||||
|
#ifdef __X__
|
||||||
|
// X seems to require a forced resize
|
||||||
|
int x, y;
|
||||||
|
frame->GetSize(&x, &y);
|
||||||
|
frame->SetSize(x, y);
|
||||||
|
#endif
|
||||||
|
frame->Show(TRUE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Single-window mode
|
||||||
|
frame = GetMainFrame();
|
||||||
|
canvas = GetMainFrame()->canvas;
|
||||||
|
canvas->view = this;
|
||||||
|
|
||||||
|
// Associate the appropriate frame with this view.
|
||||||
|
SetFrame(frame);
|
||||||
|
|
||||||
|
// Make sure the document manager knows that this is the
|
||||||
|
// current view.
|
||||||
|
Activate(TRUE);
|
||||||
|
|
||||||
|
// Initialize the edit menu Undo and Redo items
|
||||||
|
doc->GetCommandProcessor()->SetEditMenu(((MyFrame *)frame)->editMenu);
|
||||||
|
doc->GetCommandProcessor()->Initialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sneakily gets used for default print/preview
|
||||||
|
// as well as drawing on the screen.
|
||||||
|
void DrawingView::OnDraw(wxDC *dc)
|
||||||
|
{
|
||||||
|
dc->SetFont(*wxNORMAL_FONT);
|
||||||
|
dc->SetPen(*wxBLACK_PEN);
|
||||||
|
|
||||||
|
wxNode *node = ((DrawingDocument *)GetDocument())->GetDoodleSegments().First();
|
||||||
|
while (node)
|
||||||
|
{
|
||||||
|
DoodleSegment *seg = (DoodleSegment *)node->Data();
|
||||||
|
seg->Draw(dc);
|
||||||
|
node = node->Next();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void DrawingView::OnUpdate(wxView *sender, wxObject *hint)
|
||||||
|
{
|
||||||
|
if (canvas)
|
||||||
|
canvas->Refresh();
|
||||||
|
|
||||||
|
/* Is the following necessary?
|
||||||
|
#ifdef __WINDOWS__
|
||||||
|
if (canvas)
|
||||||
|
canvas->Refresh();
|
||||||
|
#else
|
||||||
|
if (canvas)
|
||||||
|
{
|
||||||
|
wxClientDC dc(canvas);
|
||||||
|
dc.Clear();
|
||||||
|
OnDraw(& dc);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean up windows used for displaying the view.
|
||||||
|
bool DrawingView::OnClose(bool deleteWindow)
|
||||||
|
{
|
||||||
|
if (!GetDocument()->Close())
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
// Clear the canvas in case we're in single-window mode,
|
||||||
|
// and the canvas stays.
|
||||||
|
canvas->Clear();
|
||||||
|
canvas->view = NULL;
|
||||||
|
canvas = NULL;
|
||||||
|
|
||||||
|
wxString s(wxTheApp->GetAppName());
|
||||||
|
if (frame)
|
||||||
|
frame->SetTitle(s);
|
||||||
|
|
||||||
|
SetFrame(NULL);
|
||||||
|
|
||||||
|
Activate(FALSE);
|
||||||
|
|
||||||
|
if (deleteWindow && !singleWindowMode)
|
||||||
|
{
|
||||||
|
delete frame;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DrawingView::OnCut(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
DrawingDocument *doc = (DrawingDocument *)GetDocument();
|
||||||
|
doc->GetCommandProcessor()->Submit(new DrawingCommand("Cut Last Segment", DOODLE_CUT, doc, NULL));
|
||||||
|
}
|
||||||
|
|
||||||
|
IMPLEMENT_DYNAMIC_CLASS(TextEditView, wxView)
|
||||||
|
|
||||||
|
bool TextEditView::OnCreate(wxDocument *doc, long flags)
|
||||||
|
{
|
||||||
|
frame = wxGetApp().CreateChildFrame(doc, this, FALSE);
|
||||||
|
|
||||||
|
int width, height;
|
||||||
|
frame->GetClientSize(&width, &height);
|
||||||
|
textsw = new MyTextWindow(this, frame, wxPoint(0, 0), wxSize(width, height), wxTE_MULTILINE);
|
||||||
|
frame->SetTitle("TextEditView");
|
||||||
|
|
||||||
|
#ifdef __X__
|
||||||
|
// X seems to require a forced resize
|
||||||
|
int x, y;
|
||||||
|
frame->GetSize(&x, &y);
|
||||||
|
frame->SetSize(x, y);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
frame->Show(TRUE);
|
||||||
|
Activate(TRUE);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handled by wxTextWindow
|
||||||
|
void TextEditView::OnDraw(wxDC *dc)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void TextEditView::OnUpdate(wxView *sender, wxObject *hint)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TextEditView::OnClose(bool deleteWindow)
|
||||||
|
{
|
||||||
|
if (!GetDocument()->Close())
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
Activate(FALSE);
|
||||||
|
|
||||||
|
if (deleteWindow)
|
||||||
|
{
|
||||||
|
delete frame;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Window implementations
|
||||||
|
*/
|
||||||
|
|
||||||
|
BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
||||||
|
EVT_MOUSE_EVENTS(MyCanvas::OnMouseEvent)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
// Define a constructor for my canvas
|
||||||
|
MyCanvas::MyCanvas(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style):
|
||||||
|
wxScrolledWindow(frame, -1, pos, size, style)
|
||||||
|
{
|
||||||
|
view = v;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Define the repainting behaviour
|
||||||
|
void MyCanvas::OnDraw(wxDC& dc)
|
||||||
|
{
|
||||||
|
if (view)
|
||||||
|
view->OnDraw(& dc);
|
||||||
|
}
|
||||||
|
|
||||||
|
// This implements a tiny doodling program. Drag the mouse using
|
||||||
|
// the left button.
|
||||||
|
void MyCanvas::OnMouseEvent(wxMouseEvent& event)
|
||||||
|
{
|
||||||
|
if (!view)
|
||||||
|
return;
|
||||||
|
|
||||||
|
static DoodleSegment *currentSegment = NULL;
|
||||||
|
|
||||||
|
wxClientDC dc(this);
|
||||||
|
PrepareDC(dc);
|
||||||
|
|
||||||
|
dc.SetPen(*wxBLACK_PEN);
|
||||||
|
|
||||||
|
wxPoint pt(event.GetLogicalPosition(dc));
|
||||||
|
|
||||||
|
if (currentSegment && event.LeftUp())
|
||||||
|
{
|
||||||
|
if (currentSegment->lines.Number() == 0)
|
||||||
|
{
|
||||||
|
delete currentSegment;
|
||||||
|
currentSegment = NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// We've got a valid segment on mouse left up, so store it.
|
||||||
|
DrawingDocument *doc = (DrawingDocument *)view->GetDocument();
|
||||||
|
|
||||||
|
doc->GetCommandProcessor()->Submit(new DrawingCommand("Add Segment", DOODLE_ADD, doc, currentSegment));
|
||||||
|
|
||||||
|
view->GetDocument()->Modify(TRUE);
|
||||||
|
currentSegment = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (xpos > -1 && ypos > -1 && event.Dragging())
|
||||||
|
{
|
||||||
|
if (!currentSegment)
|
||||||
|
currentSegment = new DoodleSegment;
|
||||||
|
|
||||||
|
DoodleLine *newLine = new DoodleLine;
|
||||||
|
newLine->x1 = xpos; newLine->y1 = ypos;
|
||||||
|
newLine->x2 = pt.x; newLine->y2 = pt.y;
|
||||||
|
currentSegment->lines.Append(newLine);
|
||||||
|
|
||||||
|
dc.DrawLine(xpos, ypos, pt.x, pt.y);
|
||||||
|
}
|
||||||
|
xpos = pt.x;
|
||||||
|
ypos = pt.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Define a constructor for my text subwindow
|
||||||
|
MyTextWindow::MyTextWindow(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style):
|
||||||
|
wxTextCtrl(frame, -1, "", pos, size, style)
|
||||||
|
{
|
||||||
|
view = v;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
79
samples/docview/view.h
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: view.h
|
||||||
|
// Purpose: View classes
|
||||||
|
// Author: Julian Smart
|
||||||
|
// Modified by:
|
||||||
|
// Created: 04/01/98
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) Julian Smart and Markus Holzem
|
||||||
|
// Licence: wxWindows license
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifdef __GNUG__
|
||||||
|
// #pragma interface
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VIEWSAMPLEH__
|
||||||
|
#define __VIEWSAMPLEH__
|
||||||
|
|
||||||
|
#include "wx/docview.h"
|
||||||
|
|
||||||
|
class MyCanvas: public wxScrolledWindow
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
wxView *view;
|
||||||
|
|
||||||
|
MyCanvas(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style);
|
||||||
|
virtual void OnDraw(wxDC& dc);
|
||||||
|
void OnMouseEvent(wxMouseEvent& event);
|
||||||
|
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
|
};
|
||||||
|
|
||||||
|
class MyTextWindow: public wxTextCtrl
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
wxView *view;
|
||||||
|
|
||||||
|
MyTextWindow(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style);
|
||||||
|
};
|
||||||
|
|
||||||
|
class DrawingView: public wxView
|
||||||
|
{
|
||||||
|
DECLARE_DYNAMIC_CLASS(DrawingView)
|
||||||
|
private:
|
||||||
|
public:
|
||||||
|
wxFrame *frame;
|
||||||
|
MyCanvas *canvas;
|
||||||
|
|
||||||
|
DrawingView(void) { canvas = NULL; frame = NULL; };
|
||||||
|
~DrawingView(void) {};
|
||||||
|
|
||||||
|
bool OnCreate(wxDocument *doc, long flags);
|
||||||
|
void OnDraw(wxDC *dc);
|
||||||
|
void OnUpdate(wxView *sender, wxObject *hint = NULL);
|
||||||
|
bool OnClose(bool deleteWindow = TRUE);
|
||||||
|
|
||||||
|
void OnCut(wxCommandEvent& event);
|
||||||
|
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
|
};
|
||||||
|
|
||||||
|
class TextEditView: public wxView
|
||||||
|
{
|
||||||
|
DECLARE_DYNAMIC_CLASS(TextEditView)
|
||||||
|
private:
|
||||||
|
public:
|
||||||
|
wxFrame *frame;
|
||||||
|
MyTextWindow *textsw;
|
||||||
|
|
||||||
|
TextEditView(wxDocument *doc = NULL): wxView(doc) { frame = NULL; textsw = NULL; }
|
||||||
|
~TextEditView(void) {}
|
||||||
|
|
||||||
|
bool OnCreate(wxDocument *doc, long flags);
|
||||||
|
void OnDraw(wxDC *dc);
|
||||||
|
void OnUpdate(wxView *sender, wxObject *hint = NULL);
|
||||||
|
bool OnClose(bool deleteWindow = TRUE);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
BIN
samples/listctrl/aiai.ico
Normal file
After Width: | Height: | Size: 766 B |
BIN
samples/listctrl/bitmaps/small1.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
samples/listctrl/bitmaps/toolbrai.ico
Normal file
After Width: | Height: | Size: 766 B |
BIN
samples/listctrl/bitmaps/toolchar.ico
Normal file
After Width: | Height: | Size: 766 B |
BIN
samples/listctrl/bitmaps/toolchec.ico
Normal file
After Width: | Height: | Size: 766 B |
BIN
samples/listctrl/bitmaps/tooldata.ico
Normal file
After Width: | Height: | Size: 766 B |
BIN
samples/listctrl/bitmaps/toolgame.ico
Normal file
After Width: | Height: | Size: 766 B |
BIN
samples/listctrl/bitmaps/toolnote.ico
Normal file
After Width: | Height: | Size: 766 B |
BIN
samples/listctrl/bitmaps/tooltime.ico
Normal file
After Width: | Height: | Size: 766 B |
BIN
samples/listctrl/bitmaps/tooltodo.ico
Normal file
After Width: | Height: | Size: 766 B |
BIN
samples/listctrl/bitmaps/toolword.ico
Normal file
After Width: | Height: | Size: 766 B |
480
samples/listctrl/listtest.cpp
Normal file
@@ -0,0 +1,480 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: listctrl.cpp
|
||||||
|
// Purpose: wxListCtrl sample
|
||||||
|
// Author: Julian Smart
|
||||||
|
// Modified by:
|
||||||
|
// Created: 04/01/98
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) Julian Smart and Markus Holzem
|
||||||
|
// Licence: wxWindows license
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifdef __GNUG__
|
||||||
|
#pragma implementation
|
||||||
|
#pragma interface
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// For compilers that support precompilation, includes "wx/wx.h".
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#ifdef __BORLANDC__
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WX_PRECOMP
|
||||||
|
#include "wx/wx.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "wx/listctrl.h"
|
||||||
|
#include "listtest.h"
|
||||||
|
|
||||||
|
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
|
EVT_MENU(LIST_QUIT, MyFrame::OnQuit)
|
||||||
|
EVT_MENU(LIST_ABOUT, MyFrame::OnAbout)
|
||||||
|
EVT_MENU(LIST_LIST_VIEW, MyFrame::OnListView)
|
||||||
|
EVT_MENU(LIST_REPORT_VIEW, MyFrame::OnReportView)
|
||||||
|
EVT_MENU(LIST_ICON_VIEW, MyFrame::OnIconView)
|
||||||
|
EVT_MENU(LIST_ICON_TEXT_VIEW, MyFrame::OnIconTextView)
|
||||||
|
EVT_MENU(LIST_SMALL_ICON_VIEW, MyFrame::OnSmallIconView)
|
||||||
|
EVT_MENU(LIST_SMALL_ICON_TEXT_VIEW, MyFrame::OnSmallIconTextView)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
BEGIN_EVENT_TABLE(MyListCtrl, wxListCtrl)
|
||||||
|
EVT_LIST_BEGIN_DRAG(LIST_CTRL, MyListCtrl::OnBeginDrag)
|
||||||
|
EVT_LIST_BEGIN_RDRAG(LIST_CTRL, MyListCtrl::OnBeginRDrag)
|
||||||
|
EVT_LIST_BEGIN_LABEL_EDIT(LIST_CTRL, MyListCtrl::OnBeginLabelEdit)
|
||||||
|
EVT_LIST_END_LABEL_EDIT(LIST_CTRL, MyListCtrl::OnEndLabelEdit)
|
||||||
|
EVT_LIST_DELETE_ITEM(LIST_CTRL, MyListCtrl::OnDeleteItem)
|
||||||
|
EVT_LIST_GET_INFO(LIST_CTRL, MyListCtrl::OnGetInfo)
|
||||||
|
EVT_LIST_SET_INFO(LIST_CTRL, MyListCtrl::OnSetInfo)
|
||||||
|
EVT_LIST_ITEM_SELECTED(LIST_CTRL, MyListCtrl::OnSelected)
|
||||||
|
EVT_LIST_ITEM_DESELECTED(LIST_CTRL, MyListCtrl::OnDeselected)
|
||||||
|
EVT_LIST_KEY_DOWN(LIST_CTRL, MyListCtrl::OnKeyDown)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
IMPLEMENT_APP(MyApp)
|
||||||
|
|
||||||
|
// `Main program' equivalent, creating windows and returning main app frame
|
||||||
|
bool MyApp::OnInit(void)
|
||||||
|
{
|
||||||
|
// Create the main frame window
|
||||||
|
MyFrame *frame = new MyFrame(NULL, "wxListCtrl Test", 50, 50, 450, 340);
|
||||||
|
|
||||||
|
// This reduces flicker effects - even better would be to define OnEraseBackground
|
||||||
|
// to do nothing. When the list control's scrollbars are show or hidden, the
|
||||||
|
// frame is sent a background erase event.
|
||||||
|
frame->SetBackgroundColour(wxColour(255, 255, 255));
|
||||||
|
|
||||||
|
// Give it an icon
|
||||||
|
#ifdef __WINDOWS__
|
||||||
|
frame->SetIcon(wxIcon("mondrian"));
|
||||||
|
#endif
|
||||||
|
#ifdef __X__
|
||||||
|
frame->SetIcon(wxIcon("aiai.xbm"));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Make an image list containing large icons
|
||||||
|
m_imageListNormal = new wxImageList(32, 32, TRUE);
|
||||||
|
m_imageListSmall = new wxImageList(16, 16, TRUE);
|
||||||
|
|
||||||
|
wxIcon *icon = new wxIcon("icon1", wxBITMAP_TYPE_ICO_RESOURCE);
|
||||||
|
m_imageListNormal->Add(*icon);
|
||||||
|
delete icon;
|
||||||
|
icon = new wxIcon("icon2", wxBITMAP_TYPE_ICO_RESOURCE);
|
||||||
|
m_imageListNormal->Add(*icon);
|
||||||
|
delete icon;
|
||||||
|
icon = new wxIcon("icon3", wxBITMAP_TYPE_ICO_RESOURCE);
|
||||||
|
m_imageListNormal->Add(*icon);
|
||||||
|
delete icon;
|
||||||
|
icon = new wxIcon("icon4", wxBITMAP_TYPE_ICO_RESOURCE);
|
||||||
|
m_imageListNormal->Add(*icon);
|
||||||
|
delete icon;
|
||||||
|
icon = new wxIcon("icon5", wxBITMAP_TYPE_ICO_RESOURCE);
|
||||||
|
m_imageListNormal->Add(*icon);
|
||||||
|
delete icon;
|
||||||
|
icon = new wxIcon("icon6", wxBITMAP_TYPE_ICO_RESOURCE);
|
||||||
|
m_imageListNormal->Add(*icon);
|
||||||
|
delete icon;
|
||||||
|
icon = new wxIcon("icon7", wxBITMAP_TYPE_ICO_RESOURCE);
|
||||||
|
m_imageListNormal->Add(*icon);
|
||||||
|
delete icon;
|
||||||
|
icon = new wxIcon("icon8", wxBITMAP_TYPE_ICO_RESOURCE);
|
||||||
|
m_imageListNormal->Add(*icon);
|
||||||
|
delete icon;
|
||||||
|
icon = new wxIcon("icon9", wxBITMAP_TYPE_ICO_RESOURCE);
|
||||||
|
m_imageListNormal->Add(*icon);
|
||||||
|
delete icon;
|
||||||
|
|
||||||
|
icon = new wxIcon("iconsmall", wxBITMAP_TYPE_ICO_RESOURCE);
|
||||||
|
m_imageListSmall->Add(*icon);
|
||||||
|
delete icon;
|
||||||
|
|
||||||
|
// Make a menubar
|
||||||
|
wxMenu *file_menu = new wxMenu;
|
||||||
|
|
||||||
|
file_menu->Append(LIST_LIST_VIEW, "&List view");
|
||||||
|
file_menu->Append(LIST_REPORT_VIEW, "&Report view");
|
||||||
|
file_menu->Append(LIST_ICON_VIEW, "&Icon view");
|
||||||
|
file_menu->Append(LIST_ICON_TEXT_VIEW, "Icon view with &text");
|
||||||
|
file_menu->Append(LIST_SMALL_ICON_VIEW, "&Small icon view");
|
||||||
|
file_menu->Append(LIST_SMALL_ICON_TEXT_VIEW, "Small icon &view with text");
|
||||||
|
file_menu->AppendSeparator();
|
||||||
|
file_menu->Append(LIST_ABOUT, "&About");
|
||||||
|
file_menu->Append(LIST_QUIT, "E&xit");
|
||||||
|
wxMenuBar *menu_bar = new wxMenuBar;
|
||||||
|
menu_bar->Append(file_menu, "&File");
|
||||||
|
frame->SetMenuBar(menu_bar);
|
||||||
|
|
||||||
|
// Make a panel with a message
|
||||||
|
frame->m_listCtrl = new MyListCtrl(frame, LIST_CTRL, wxPoint(0, 0), wxSize(400, 200),
|
||||||
|
wxLC_LIST|wxSUNKEN_BORDER);
|
||||||
|
// wxLC_LIST|wxLC_USER_TEXT|wxSUNKEN_BORDER); // wxLC_USER_TEXT requires app to supply all text on demand
|
||||||
|
frame->m_logWindow = new wxTextCtrl(frame, -1, "", wxPoint(0, 0), wxSize(400, 200), wxTE_MULTILINE|wxSUNKEN_BORDER);
|
||||||
|
|
||||||
|
wxLayoutConstraints *c = new wxLayoutConstraints;
|
||||||
|
c->top.SameAs (frame, wxTop);
|
||||||
|
c->left.SameAs (frame, wxLeft);
|
||||||
|
c->right.SameAs (frame, wxRight);
|
||||||
|
c->height.PercentOf (frame, wxHeight, 66);
|
||||||
|
frame->m_listCtrl->SetConstraints(c);
|
||||||
|
|
||||||
|
c = new wxLayoutConstraints;
|
||||||
|
c->top.Below (frame->m_listCtrl);
|
||||||
|
c->left.SameAs (frame, wxLeft);
|
||||||
|
c->right.SameAs (frame, wxRight);
|
||||||
|
c->bottom.SameAs (frame, wxBottom);
|
||||||
|
frame->m_logWindow->SetConstraints(c);
|
||||||
|
frame->SetAutoLayout(TRUE);
|
||||||
|
|
||||||
|
for ( int i=0; i < 30; i++)
|
||||||
|
{
|
||||||
|
char buf[20];
|
||||||
|
sprintf(buf, "Item %d", i);
|
||||||
|
long tmp = frame->m_listCtrl->InsertItem(i, buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
frame->CreateStatusBar(3);
|
||||||
|
frame->SetStatusText("", 0);
|
||||||
|
|
||||||
|
// Show the frame
|
||||||
|
frame->Show(TRUE);
|
||||||
|
|
||||||
|
SetTopWindow(frame);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// My frame constructor
|
||||||
|
MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h):
|
||||||
|
wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h))
|
||||||
|
{
|
||||||
|
m_listCtrl = NULL;
|
||||||
|
m_logWindow = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
MyFrame::~MyFrame(void)
|
||||||
|
{
|
||||||
|
delete wxGetApp().m_imageListNormal;
|
||||||
|
delete wxGetApp().m_imageListSmall;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyFrame::OnQuit(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
Close(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyFrame::OnAbout(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
wxMessageDialog dialog(this, "List test sample\nJulian Smart (c) 1997",
|
||||||
|
"About list test", wxOK|wxCANCEL);
|
||||||
|
|
||||||
|
dialog.ShowModal();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyFrame::OnListView(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
m_logWindow->Clear();
|
||||||
|
m_listCtrl->DeleteAllItems();
|
||||||
|
m_listCtrl->SetSingleStyle(wxLC_LIST);
|
||||||
|
m_listCtrl->SetImageList(NULL, wxIMAGE_LIST_NORMAL);
|
||||||
|
m_listCtrl->SetImageList(NULL, wxIMAGE_LIST_SMALL);
|
||||||
|
|
||||||
|
for ( int i=0; i < 30; i++)
|
||||||
|
{
|
||||||
|
char buf[20];
|
||||||
|
sprintf(buf, "Item %d", i);
|
||||||
|
long tmp = m_listCtrl->InsertItem(i, buf);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyFrame::OnReportView(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
m_logWindow->Clear();
|
||||||
|
m_listCtrl->DeleteAllItems();
|
||||||
|
m_listCtrl->SetSingleStyle(wxLC_REPORT);
|
||||||
|
m_listCtrl->SetImageList(NULL, wxIMAGE_LIST_NORMAL);
|
||||||
|
m_listCtrl->SetImageList(wxGetApp().m_imageListSmall, wxIMAGE_LIST_SMALL);
|
||||||
|
|
||||||
|
m_listCtrl->InsertColumn(0, "Column 1", wxLIST_FORMAT_LEFT, 140);
|
||||||
|
m_listCtrl->InsertColumn(1, "Column 2", wxLIST_FORMAT_LEFT, 140);
|
||||||
|
|
||||||
|
for ( int i=0; i < 30; i++)
|
||||||
|
{
|
||||||
|
char buf[20];
|
||||||
|
sprintf(buf, "Item %d, col 1", i);
|
||||||
|
long tmp = m_listCtrl->InsertItem(i, buf, 0);
|
||||||
|
|
||||||
|
sprintf(buf, "Item %d, col 2", i);
|
||||||
|
tmp = m_listCtrl->SetItem(i, 1, buf);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyFrame::OnIconView(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
m_logWindow->Clear();
|
||||||
|
m_listCtrl->DeleteAllItems();
|
||||||
|
m_listCtrl->SetSingleStyle(wxLC_ICON);
|
||||||
|
m_listCtrl->SetImageList(wxGetApp().m_imageListNormal, wxIMAGE_LIST_NORMAL);
|
||||||
|
m_listCtrl->SetImageList(wxGetApp().m_imageListSmall, wxIMAGE_LIST_SMALL);
|
||||||
|
|
||||||
|
for ( int i=0; i < 9; i++)
|
||||||
|
{
|
||||||
|
long tmp = m_listCtrl->InsertItem(i, i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyFrame::OnIconTextView(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
m_logWindow->Clear();
|
||||||
|
m_listCtrl->DeleteAllItems();
|
||||||
|
m_listCtrl->SetSingleStyle(wxLC_ICON);
|
||||||
|
m_listCtrl->SetImageList(wxGetApp().m_imageListNormal, wxIMAGE_LIST_NORMAL);
|
||||||
|
m_listCtrl->SetImageList(wxGetApp().m_imageListSmall, wxIMAGE_LIST_SMALL);
|
||||||
|
|
||||||
|
for ( int i=0; i < 9; i++)
|
||||||
|
{
|
||||||
|
char buf[20];
|
||||||
|
sprintf(buf, "Label %d", i);
|
||||||
|
long tmp = m_listCtrl->InsertItem(i, buf, i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyFrame::OnSmallIconView(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
m_logWindow->Clear();
|
||||||
|
m_listCtrl->DeleteAllItems();
|
||||||
|
m_listCtrl->SetSingleStyle(wxLC_SMALL_ICON);
|
||||||
|
m_listCtrl->SetImageList(wxGetApp().m_imageListNormal, wxIMAGE_LIST_NORMAL);
|
||||||
|
m_listCtrl->SetImageList(wxGetApp().m_imageListSmall, wxIMAGE_LIST_SMALL);
|
||||||
|
|
||||||
|
for ( int i=0; i < 9; i++)
|
||||||
|
{
|
||||||
|
long tmp = m_listCtrl->InsertItem(i, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyFrame::OnSmallIconTextView(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
m_logWindow->Clear();
|
||||||
|
m_listCtrl->DeleteAllItems();
|
||||||
|
m_listCtrl->SetSingleStyle(wxLC_SMALL_ICON);
|
||||||
|
m_listCtrl->SetImageList(wxGetApp().m_imageListNormal, wxIMAGE_LIST_NORMAL);
|
||||||
|
m_listCtrl->SetImageList(wxGetApp().m_imageListSmall, wxIMAGE_LIST_SMALL);
|
||||||
|
|
||||||
|
for ( int i=0; i < 9; i++)
|
||||||
|
{
|
||||||
|
long tmp = m_listCtrl->InsertItem(i, "Label", 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// MyListCtrl
|
||||||
|
|
||||||
|
void MyListCtrl::OnBeginDrag(wxListEvent& event)
|
||||||
|
{
|
||||||
|
if ( !wxGetApp().GetTopWindow() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow;
|
||||||
|
if ( !text )
|
||||||
|
return;
|
||||||
|
|
||||||
|
#ifndef __GNUWIN32__
|
||||||
|
ostream str(text);
|
||||||
|
|
||||||
|
str << "OnBeginDrag\n";
|
||||||
|
str.flush();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyListCtrl::OnBeginRDrag(wxListEvent& event)
|
||||||
|
{
|
||||||
|
if ( !wxGetApp().GetTopWindow() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow;
|
||||||
|
if ( !text )
|
||||||
|
return;
|
||||||
|
#ifndef __GNUWIN32__
|
||||||
|
ostream str(text);
|
||||||
|
|
||||||
|
str << "OnBeginRDrag\n";
|
||||||
|
str.flush();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyListCtrl::OnBeginLabelEdit(wxListEvent& event)
|
||||||
|
{
|
||||||
|
if ( !wxGetApp().GetTopWindow() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow;
|
||||||
|
if ( !text )
|
||||||
|
return;
|
||||||
|
|
||||||
|
#ifndef __GNUWIN32__
|
||||||
|
ostream str(text);
|
||||||
|
|
||||||
|
str << "OnBeginLabelEdit\n";
|
||||||
|
str.flush();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyListCtrl::OnEndLabelEdit(wxListEvent& event)
|
||||||
|
{
|
||||||
|
if ( !wxGetApp().GetTopWindow() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow;
|
||||||
|
if ( !text )
|
||||||
|
return;
|
||||||
|
|
||||||
|
#ifndef __GNUWIN32__
|
||||||
|
ostream str(text);
|
||||||
|
|
||||||
|
str << "OnEndLabelEdit\n";
|
||||||
|
str.flush();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyListCtrl::OnDeleteItem(wxListEvent& event)
|
||||||
|
{
|
||||||
|
if ( !wxGetApp().GetTopWindow() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow;
|
||||||
|
if ( !text )
|
||||||
|
return;
|
||||||
|
|
||||||
|
#ifndef __GNUWIN32__
|
||||||
|
ostream str(text);
|
||||||
|
|
||||||
|
str << "OnDeleteItem\n";
|
||||||
|
str.flush();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyListCtrl::OnGetInfo(wxListEvent& event)
|
||||||
|
{
|
||||||
|
if ( !wxGetApp().GetTopWindow() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow;
|
||||||
|
if ( !text )
|
||||||
|
return;
|
||||||
|
|
||||||
|
#ifndef __GNUWIN32__
|
||||||
|
ostream str(text);
|
||||||
|
|
||||||
|
str << "OnGetInfo (" << event.m_item.m_itemId << ", " << event.m_item.m_col << ")";
|
||||||
|
if ( event.m_item.m_mask & wxLIST_MASK_STATE )
|
||||||
|
str << " wxLIST_MASK_STATE";
|
||||||
|
if ( event.m_item.m_mask & wxLIST_MASK_TEXT )
|
||||||
|
str << " wxLIST_MASK_TEXT";
|
||||||
|
if ( event.m_item.m_mask & wxLIST_MASK_IMAGE )
|
||||||
|
str << " wxLIST_MASK_IMAGE";
|
||||||
|
if ( event.m_item.m_mask & wxLIST_MASK_DATA )
|
||||||
|
str << " wxLIST_MASK_DATA";
|
||||||
|
if ( event.m_item.m_mask & wxLIST_SET_ITEM )
|
||||||
|
str << " wxLIST_SET_ITEM";
|
||||||
|
if ( event.m_item.m_mask & wxLIST_MASK_WIDTH )
|
||||||
|
str << " wxLIST_MASK_WIDTH";
|
||||||
|
if ( event.m_item.m_mask & wxLIST_MASK_FORMAT )
|
||||||
|
str << " wxLIST_MASK_WIDTH";
|
||||||
|
|
||||||
|
if ( event.m_item.m_mask & wxLIST_MASK_TEXT )
|
||||||
|
{
|
||||||
|
event.m_item.m_text = "My callback text";
|
||||||
|
}
|
||||||
|
str << "\n";
|
||||||
|
str.flush();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyListCtrl::OnSetInfo(wxListEvent& event)
|
||||||
|
{
|
||||||
|
if ( !wxGetApp().GetTopWindow() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow;
|
||||||
|
if ( !text )
|
||||||
|
return;
|
||||||
|
|
||||||
|
#ifndef __GNUWIN32__
|
||||||
|
ostream str(text);
|
||||||
|
|
||||||
|
str << "OnSetInfo\n";
|
||||||
|
str.flush();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyListCtrl::OnSelected(wxListEvent& event)
|
||||||
|
{
|
||||||
|
if ( !wxGetApp().GetTopWindow() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow;
|
||||||
|
if ( !text )
|
||||||
|
return;
|
||||||
|
|
||||||
|
#ifndef __GNUWIN32__
|
||||||
|
ostream str(text);
|
||||||
|
|
||||||
|
str << "OnSelected\n";
|
||||||
|
str.flush();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyListCtrl::OnDeselected(wxListEvent& event)
|
||||||
|
{
|
||||||
|
if ( !wxGetApp().GetTopWindow() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow;
|
||||||
|
if ( !text )
|
||||||
|
return;
|
||||||
|
|
||||||
|
#ifndef __GNUWIN32__
|
||||||
|
ostream str(text);
|
||||||
|
|
||||||
|
str << "OnDeselected\n";
|
||||||
|
str.flush();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyListCtrl::OnKeyDown(wxListEvent& event)
|
||||||
|
{
|
||||||
|
if ( !wxGetApp().GetTopWindow() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow;
|
||||||
|
if ( !text )
|
||||||
|
return;
|
||||||
|
|
||||||
|
#ifndef __GNUWIN32__
|
||||||
|
ostream str(text);
|
||||||
|
|
||||||
|
str << "OnKeyDown\n";
|
||||||
|
str.flush();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
8
samples/listctrl/listtest.def
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
NAME ListCtrl
|
||||||
|
DESCRIPTION 'ListCtrl wxWindows application'
|
||||||
|
EXETYPE WINDOWS
|
||||||
|
STUB 'WINSTUB.EXE'
|
||||||
|
CODE PRELOAD MOVEABLE DISCARDABLE
|
||||||
|
DATA PRELOAD MOVEABLE MULTIPLE
|
||||||
|
HEAPSIZE 1024
|
||||||
|
STACKSIZE 8192
|
80
samples/listctrl/listtest.h
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: listctrl.h
|
||||||
|
// Purpose: wxListCtrl sample
|
||||||
|
// Author: Julian Smart
|
||||||
|
// Modified by:
|
||||||
|
// Created: 04/01/98
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) Julian Smart and Markus Holzem
|
||||||
|
// Licence: wxWindows license
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// Define a new application type
|
||||||
|
class MyApp: public wxApp
|
||||||
|
{ public:
|
||||||
|
bool OnInit(void);
|
||||||
|
|
||||||
|
wxImageList *m_imageListNormal;
|
||||||
|
wxImageList *m_imageListSmall;
|
||||||
|
};
|
||||||
|
|
||||||
|
class MyListCtrl: public wxListCtrl
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
MyListCtrl(wxWindow *parent, const wxWindowID id, const wxPoint& pos,
|
||||||
|
const wxSize& size, long style):
|
||||||
|
wxListCtrl(parent, id, pos, size, style)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnBeginDrag(wxListEvent& event);
|
||||||
|
void OnBeginRDrag(wxListEvent& event);
|
||||||
|
void OnBeginLabelEdit(wxListEvent& event);
|
||||||
|
void OnEndLabelEdit(wxListEvent& event);
|
||||||
|
void OnDeleteItem(wxListEvent& event);
|
||||||
|
void OnGetInfo(wxListEvent& event);
|
||||||
|
void OnSetInfo(wxListEvent& event);
|
||||||
|
void OnSelected(wxListEvent& event);
|
||||||
|
void OnDeselected(wxListEvent& event);
|
||||||
|
void OnKeyDown(wxListEvent& event);
|
||||||
|
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
|
};
|
||||||
|
|
||||||
|
// Define a new frame type
|
||||||
|
class MyFrame: public wxFrame
|
||||||
|
{ public:
|
||||||
|
MyListCtrl *m_listCtrl;
|
||||||
|
wxTextCtrl *m_logWindow;
|
||||||
|
|
||||||
|
MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h);
|
||||||
|
~MyFrame(void);
|
||||||
|
|
||||||
|
public:
|
||||||
|
void OnQuit(wxCommandEvent& event);
|
||||||
|
void OnAbout(wxCommandEvent& event);
|
||||||
|
void OnListView(wxCommandEvent& event);
|
||||||
|
void OnReportView(wxCommandEvent& event);
|
||||||
|
void OnIconView(wxCommandEvent& event);
|
||||||
|
void OnIconTextView(wxCommandEvent& event);
|
||||||
|
void OnSmallIconView(wxCommandEvent& event);
|
||||||
|
void OnSmallIconTextView(wxCommandEvent& event);
|
||||||
|
bool OnClose(void) { return TRUE; }
|
||||||
|
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// ID for the menu quit command
|
||||||
|
#define LIST_QUIT 1
|
||||||
|
#define LIST_LIST_VIEW 2
|
||||||
|
#define LIST_ICON_VIEW 3
|
||||||
|
#define LIST_ICON_TEXT_VIEW 4
|
||||||
|
#define LIST_SMALL_ICON_VIEW 5
|
||||||
|
#define LIST_SMALL_ICON_TEXT_VIEW 6
|
||||||
|
#define LIST_REPORT_VIEW 7
|
||||||
|
#define LIST_ABOUT 102
|
||||||
|
|
||||||
|
#define LIST_CTRL 1000
|
||||||
|
|
||||||
|
|
16
samples/listctrl/listtest.rc
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
aaaa ICON "mondrian.ico"
|
||||||
|
mondrian ICON "mondrian.ico"
|
||||||
|
#include "wx/msw/wx.rc"
|
||||||
|
|
||||||
|
icon1 ICON "bitmaps\\toolbrai.ico"
|
||||||
|
icon2 ICON "bitmaps\\toolchar.ico"
|
||||||
|
icon3 ICON "bitmaps\\toolchec.ico"
|
||||||
|
icon4 ICON "bitmaps\\tooldata.ico"
|
||||||
|
icon5 ICON "bitmaps\\toolgame.ico"
|
||||||
|
icon6 ICON "bitmaps\\toolnote.ico"
|
||||||
|
icon7 ICON "bitmaps\\tooltime.ico"
|
||||||
|
icon8 ICON "bitmaps\\tooltodo.ico"
|
||||||
|
icon9 ICON "bitmaps\\toolword.ico"
|
||||||
|
|
||||||
|
iconsmall ICON "bitmaps\\small1.ico"
|
||||||
|
|
63
samples/listctrl/makefile.b32
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.bcc
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1993
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile : Builds listtest example (DOS).
|
||||||
|
|
||||||
|
# WXWIN and BCCDIR are set by parent make
|
||||||
|
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
!include $(WXDIR)\src\makeb32.env
|
||||||
|
|
||||||
|
WXLIBDIR = $(WXDIR)\lib
|
||||||
|
WXLIB = $(WXLIBDIR)\wx32.lib
|
||||||
|
LIBS=$(WXLIB) cw32 import32
|
||||||
|
|
||||||
|
TARGET=listtest
|
||||||
|
|
||||||
|
!if "$(FINAL)" == "0"
|
||||||
|
LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
|
||||||
|
OPT = -Od
|
||||||
|
DEBUG_FLAGS= -v
|
||||||
|
!else
|
||||||
|
LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
|
||||||
|
OPT = -Od
|
||||||
|
DEBUG_FLAGS =
|
||||||
|
!endif
|
||||||
|
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
|
||||||
|
|
||||||
|
OBJECTS = listtest.obj
|
||||||
|
|
||||||
|
$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res
|
||||||
|
tlink32 $(LINKFLAGS) @&&!
|
||||||
|
c0w32.obj $(OBJECTS)
|
||||||
|
$(TARGET)
|
||||||
|
nul
|
||||||
|
$(LIBS)
|
||||||
|
$(TARGET).def
|
||||||
|
!
|
||||||
|
brc32 -K $(TARGET).res
|
||||||
|
|
||||||
|
.$(SRCSUFF).obj:
|
||||||
|
bcc32 $(CPPFLAGS) -c {$< }
|
||||||
|
|
||||||
|
.c.obj:
|
||||||
|
bcc32 $(CPPFLAGS) -P- -c {$< }
|
||||||
|
|
||||||
|
listtest.obj: listtest.$(SRCSUFF)
|
||||||
|
|
||||||
|
$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
|
||||||
|
brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-erase *.obj
|
||||||
|
-erase *.exe
|
||||||
|
-erase *.res
|
||||||
|
-erase *.map
|
||||||
|
-erase *.rws
|
||||||
|
|
73
samples/listctrl/makefile.bcc
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.bcc
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1993
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile : Builds minimal example (DOS).
|
||||||
|
|
||||||
|
!if "$(BCCDIR)" == ""
|
||||||
|
!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!if "$(WXWIN)" == ""
|
||||||
|
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
|
||||||
|
!endif
|
||||||
|
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
!include $(WXDIR)\src\makebcc.env
|
||||||
|
|
||||||
|
THISDIR = $(WXDIR)\samples\minimal
|
||||||
|
WXLIB = $(WXDIR)\lib\wx.lib
|
||||||
|
LIBS=$(WXLIB) mathwl cwl import
|
||||||
|
INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
|
||||||
|
CFG=$(WXDIR)\src\wxwin.cfg
|
||||||
|
|
||||||
|
!ifndef FINAL
|
||||||
|
FINAL=0
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!if "$(FINAL)" == "0"
|
||||||
|
LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
|
||||||
|
OPT = -Od
|
||||||
|
DEBUG_FLAGS= -v
|
||||||
|
!else
|
||||||
|
LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
|
||||||
|
OPT = -O2
|
||||||
|
DEBUG_FLAGS=
|
||||||
|
!endif
|
||||||
|
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
|
||||||
|
|
||||||
|
OBJECTS = minimal.obj
|
||||||
|
|
||||||
|
minimal: minimal.exe
|
||||||
|
|
||||||
|
all: minimal.exe
|
||||||
|
|
||||||
|
minimal.exe: $(WXLIB) minimal.obj minimal.def minimal.res
|
||||||
|
tlink $(LINKFLAGS) @&&!
|
||||||
|
c0wl.obj minimal.obj
|
||||||
|
minimal
|
||||||
|
nul
|
||||||
|
$(LIBS)
|
||||||
|
minimal.def
|
||||||
|
!
|
||||||
|
rc -31 -K minimal.res
|
||||||
|
|
||||||
|
.$(SRCSUFF).obj:
|
||||||
|
bcc $(CPPFLAGS) -c {$< }
|
||||||
|
|
||||||
|
minimal.obj: minimal.$(SRCSUFF)
|
||||||
|
|
||||||
|
minimal.res : minimal.rc $(WXDIR)\include\msw\wx.rc
|
||||||
|
rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa minimal
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-erase *.obj
|
||||||
|
-erase *.exe
|
||||||
|
-erase *.res
|
||||||
|
-erase *.map
|
||||||
|
-erase *.rws
|
81
samples/listctrl/makefile.dos
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.dos
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1993
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile : Builds minimal example (DOS).
|
||||||
|
# Use FINAL=1 argument to nmake to build final version with no debugging
|
||||||
|
# info
|
||||||
|
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\makemsc.env
|
||||||
|
|
||||||
|
THISDIR = $(WXDIR)\samples\minimal
|
||||||
|
WXLIB = $(WXDIR)\lib\wx.lib
|
||||||
|
LIBS=$(WXLIB) oldnames libw llibcew commdlg shell ddeml
|
||||||
|
|
||||||
|
!ifndef FINAL
|
||||||
|
FINAL=0
|
||||||
|
!endif
|
||||||
|
|
||||||
|
INC=/I$(WXDIR)\include\msw /I$(WXDIR)\include\base
|
||||||
|
|
||||||
|
# Set this to nothing if using MS C++ 7
|
||||||
|
ZOPTION=/Z7
|
||||||
|
|
||||||
|
!if "$(FINAL)" == "0"
|
||||||
|
CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC)
|
||||||
|
LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:512
|
||||||
|
!else
|
||||||
|
CPPFLAGS=/AL /W3 /G2sw /Ox /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC)
|
||||||
|
LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:512
|
||||||
|
!endif
|
||||||
|
|
||||||
|
HEADERS =
|
||||||
|
SOURCES = minimal.$(SRCSUFF)
|
||||||
|
OBJECTS = minimal.obj
|
||||||
|
|
||||||
|
all: minimal.exe
|
||||||
|
|
||||||
|
wx:
|
||||||
|
cd $(WXDIR)\src\msw
|
||||||
|
nmake -f makefile.dos FINAL=$(FINAL)
|
||||||
|
cd $(THISDIR)
|
||||||
|
|
||||||
|
wxclean:
|
||||||
|
cd $(WXDIR)\src\msw
|
||||||
|
nmake -f makefile.dos clean
|
||||||
|
cd $(THISDIR)
|
||||||
|
|
||||||
|
|
||||||
|
minimal.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) minimal.obj minimal.def minimal.res
|
||||||
|
link $(LINKFLAGS) @<<
|
||||||
|
minimal.obj $(WXDIR)\src\msw\dummy.obj,
|
||||||
|
minimal,
|
||||||
|
NUL,
|
||||||
|
$(LIBS),
|
||||||
|
minimal.def
|
||||||
|
;
|
||||||
|
<<
|
||||||
|
rc -30 -K minimal.res
|
||||||
|
|
||||||
|
minimal.obj: minimal.$(SRCSUFF)
|
||||||
|
cl @<<
|
||||||
|
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
|
||||||
|
<<
|
||||||
|
|
||||||
|
minimal.res : minimal.rc $(WXDIR)\include\msw\wx.rc
|
||||||
|
rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw minimal
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-erase *.obj
|
||||||
|
-erase *.exe
|
||||||
|
-erase *.res
|
||||||
|
-erase *.map
|
||||||
|
-erase *.sbr
|
||||||
|
-erase *.pdb
|
37
samples/listctrl/makefile.g95
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.unx
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1993
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile for listtest example (UNIX).
|
||||||
|
|
||||||
|
WXDIR = ../..
|
||||||
|
|
||||||
|
# All common UNIX compiler flags and options are now in
|
||||||
|
# this central makefile.
|
||||||
|
include $(WXDIR)/src/makeg95.env
|
||||||
|
|
||||||
|
OBJECTS = $(OBJDIR)/listtest.$(OBJSUFF) $(OBJDIR)/listtest_resources.$(OBJSUFF)
|
||||||
|
|
||||||
|
all: $(OBJDIR) listtest$(GUISUFFIX)$(EXESUFF)
|
||||||
|
|
||||||
|
wx:
|
||||||
|
|
||||||
|
$(OBJDIR):
|
||||||
|
mkdir $(OBJDIR)
|
||||||
|
|
||||||
|
listtest$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB)
|
||||||
|
$(CC) $(LDFLAGS) -o listtest$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS)
|
||||||
|
|
||||||
|
$(OBJDIR)/listtest.$(OBJSUFF): listtest.$(SRCSUFF)
|
||||||
|
$(CC) -c $(CPPFLAGS) -o $@ listtest.$(SRCSUFF)
|
||||||
|
|
||||||
|
$(OBJDIR)/listtest_resources.o: listtest.rc
|
||||||
|
$(RESCOMP) -i listtest.rc -o $(OBJDIR)/listtest_resources.o $(RESFLAGS)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(OBJECTS) listtest$(GUISUFFIX).exe core *.rsc *.res
|
64
samples/listctrl/makefile.nt
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.nt
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1993
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile : Builds wxListCtrl example (MS VC++).
|
||||||
|
# Use FINAL=1 argument to nmake to build final version with no debugging
|
||||||
|
# info
|
||||||
|
|
||||||
|
# Set WXDIR for your system
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
|
WXUSINGDLL=0
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\ntwxwin.mak
|
||||||
|
|
||||||
|
THISDIR = $(WXDIR)\samples\listctrl
|
||||||
|
PROGRAM=listtest
|
||||||
|
|
||||||
|
OBJECTS = $(PROGRAM).obj
|
||||||
|
|
||||||
|
$(PROGRAM): $(PROGRAM).exe
|
||||||
|
|
||||||
|
all: wx $(PROGRAM).exe
|
||||||
|
|
||||||
|
wx:
|
||||||
|
cd $(WXDIR)\src\msw
|
||||||
|
nmake -f makefile.nt FINAL=$(FINAL)
|
||||||
|
cd $(THISDIR)
|
||||||
|
|
||||||
|
wxclean:
|
||||||
|
cd $(WXDIR)\src\msw
|
||||||
|
nmake -f makefile.nt clean
|
||||||
|
cd $(THISDIR)
|
||||||
|
|
||||||
|
$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res
|
||||||
|
$(link) @<<
|
||||||
|
-out:$(PROGRAM).exe
|
||||||
|
$(LINKFLAGS)
|
||||||
|
$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res
|
||||||
|
$(LIBS)
|
||||||
|
<<
|
||||||
|
|
||||||
|
|
||||||
|
$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(PROGRAM).h $(DUMMYOBJ)
|
||||||
|
$(cc) @<<
|
||||||
|
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
|
||||||
|
<<
|
||||||
|
|
||||||
|
$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
|
||||||
|
$(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc
|
||||||
|
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-erase *.obj
|
||||||
|
-erase *.exe
|
||||||
|
-erase *.res
|
||||||
|
-erase *.map
|
||||||
|
-erase *.sbr
|
||||||
|
-erase *.pdb
|
35
samples/listctrl/makefile.sc
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
# Symantec C++ makefile for minimal example
|
||||||
|
# NOTE that peripheral libraries are now dealt in main wxWindows makefile.
|
||||||
|
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
!include $(WXDIR)\src\makesc.env
|
||||||
|
|
||||||
|
WXLIB = $(WXDIR)\lib\wx.lib
|
||||||
|
INCDIR = $(WXDIR)\include
|
||||||
|
MSWINC = $(INCDIR)\msw
|
||||||
|
BASEINC = $(INCDIR)\base
|
||||||
|
|
||||||
|
CC=sc
|
||||||
|
RC=rc
|
||||||
|
CFLAGS = -o -ml -W -Dwx_msw
|
||||||
|
LDFLAGS = -ml -W
|
||||||
|
|
||||||
|
INCLUDE=$(BASEINC);$(MSWINC)
|
||||||
|
|
||||||
|
LIBS=$(WXLIB) libw.lib commdlg.lib shell.lib
|
||||||
|
|
||||||
|
.$(SRCSUFF).obj:
|
||||||
|
*$(CC) -c $(CFLAGS) -I$(INCLUDE) $<
|
||||||
|
|
||||||
|
.rc.res:
|
||||||
|
*$(RC) -r -I$(INCLUDE) $<
|
||||||
|
|
||||||
|
minimal.exe: minimal.obj minimal.def minimal.res
|
||||||
|
*$(CC) $(LDFLAGS) -o$@ $** $(LIBS)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-del *.obj
|
||||||
|
-del *.exe
|
||||||
|
-del *.res
|
||||||
|
-del *.map
|
||||||
|
-del *.rws
|
58
samples/listctrl/makefile.unx
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.unx
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1993
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile for minimal example (UNIX).
|
||||||
|
|
||||||
|
WXDIR = ../..
|
||||||
|
|
||||||
|
# All common UNIX compiler flags and options are now in
|
||||||
|
# this central makefile.
|
||||||
|
include $(WXDIR)/src/make.env
|
||||||
|
|
||||||
|
OBJECTS = $(OBJDIR)/minimal.$(OBJSUFF)
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
|
||||||
|
all: $(OBJDIR) minimal$(GUISUFFIX)
|
||||||
|
|
||||||
|
wx:
|
||||||
|
|
||||||
|
|
||||||
|
motif:
|
||||||
|
$(MAKE) -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' WXLIB=$(WXDIR)/lib/libwx_motif.a OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK=
|
||||||
|
|
||||||
|
xview:
|
||||||
|
cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview
|
||||||
|
$(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol CC=$(CC) OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)'
|
||||||
|
|
||||||
|
hp:
|
||||||
|
cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx hp
|
||||||
|
$(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' WARN='-w' \
|
||||||
|
XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' LDLIBS='$(HPLDLIBS)'
|
||||||
|
|
||||||
|
$(OBJDIR):
|
||||||
|
mkdir $(OBJDIR)
|
||||||
|
|
||||||
|
minimal$(GUISUFFIX): $(OBJDIR)/minimal.$(OBJSUFF) $(WXLIB)
|
||||||
|
$(CC) $(LDFLAGS) -o minimal$(GUISUFFIX) $(OBJDIR)/minimal.$(OBJSUFF) $(XVIEW_LINK) $(LDLIBS)
|
||||||
|
|
||||||
|
$(OBJDIR)/minimal.$(OBJSUFF): minimal.$(SRCSUFF)
|
||||||
|
$(CC) -c $(CPPFLAGS) -o $@ minimal.$(SRCSUFF)
|
||||||
|
|
||||||
|
clean_motif:
|
||||||
|
$(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany
|
||||||
|
|
||||||
|
clean_ol:
|
||||||
|
$(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany
|
||||||
|
|
||||||
|
clean_hp:
|
||||||
|
$(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany
|
||||||
|
|
||||||
|
cleanany:
|
||||||
|
rm -f $(OBJECTS) minimal$(GUISUFFIX) core
|
38
samples/listctrl/makefile.vms
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
#************************************************************************
|
||||||
|
# Makefile for MINIMAL under VMS
|
||||||
|
# by Stefan Hammes
|
||||||
|
# (incomplete) update history:
|
||||||
|
# 11.04.95
|
||||||
|
#************************************************************************
|
||||||
|
|
||||||
|
#************************************************************************
|
||||||
|
# Definition section
|
||||||
|
# (cave: definitions and includes must begin with ',')
|
||||||
|
#************************************************************************
|
||||||
|
|
||||||
|
APPOPTS =
|
||||||
|
APPDEFS =
|
||||||
|
APPINCS =
|
||||||
|
|
||||||
|
#************************************************************************
|
||||||
|
# Module section
|
||||||
|
#************************************************************************
|
||||||
|
|
||||||
|
# Name of main module
|
||||||
|
MAIN = minimal
|
||||||
|
|
||||||
|
# Object modules of the application.
|
||||||
|
OBJS = minimal.obj
|
||||||
|
OBJLIST =minimal.obj
|
||||||
|
|
||||||
|
.include [--.src]makevms.env
|
||||||
|
|
||||||
|
# main dependency
|
||||||
|
$(MAIN).exe : $(OBJS)
|
||||||
|
$(LINK) $(LINKFLAGS) /exec=$(MAIN).exe $(OBJLIST),$(WXLIB)/lib,$(OPTSFILE)/option
|
||||||
|
- purge *.exe
|
||||||
|
|
||||||
|
#************************************************************************
|
||||||
|
# Header file depedencies following
|
||||||
|
#************************************************************************
|
||||||
|
|
43
samples/listctrl/makefile.wat
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
#
|
||||||
|
# Makefile for WATCOM
|
||||||
|
#
|
||||||
|
# Created by D.Chubraev, chubraev@iem.ee.ethz.ch
|
||||||
|
# 8 Nov 1994
|
||||||
|
#
|
||||||
|
|
||||||
|
WXDIR = ..\..
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\makewat.env
|
||||||
|
|
||||||
|
WXLIB = $(WXDIR)\lib
|
||||||
|
NAME = minimal
|
||||||
|
LNK = $(name).lnk
|
||||||
|
OBJS = $(name).obj
|
||||||
|
|
||||||
|
all: $(name).exe
|
||||||
|
|
||||||
|
$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib
|
||||||
|
wlink @$(LNK)
|
||||||
|
$(BINDCOMMAND) $(name).res
|
||||||
|
|
||||||
|
$(name).res : $(name).rc $(WXDIR)\include\msw\wx.rc
|
||||||
|
$(RC) $(RESFLAGS1) $(name).rc
|
||||||
|
|
||||||
|
$(LNK) : makefile.wat
|
||||||
|
%create $(LNK)
|
||||||
|
@%append $(LNK) debug all
|
||||||
|
@%append $(LNK) system $(LINKOPTION)
|
||||||
|
@%append $(LNK) $(MINDATA)
|
||||||
|
@%append $(LNK) $(MAXDATA)
|
||||||
|
@%append $(LNK) $(STACK)
|
||||||
|
@%append $(LNK) name $(name)
|
||||||
|
@%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib
|
||||||
|
@for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i
|
||||||
|
@for %i in ($(OBJS)) do @%append $(LNK) file %i
|
||||||
|
|
||||||
|
thing: .SYMBOLIC
|
||||||
|
echo $(WATLIBDIR)
|
||||||
|
|
||||||
|
clean: .SYMBOLIC
|
||||||
|
-erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe
|
||||||
|
|
BIN
samples/listctrl/mondrian.ico
Normal file
After Width: | Height: | Size: 766 B |
BIN
samples/mdi/bitmaps/abacus.bmp
Normal file
After Width: | Height: | Size: 566 B |
38
samples/mdi/bitmaps/aiai.xbm
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
#define aiai_width 64
|
||||||
|
#define aiai_height 64
|
||||||
|
static char aiai_bits[] = {
|
||||||
|
0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
|
||||||
|
0x11,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,
|
||||||
|
0x44,0x44,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
|
||||||
|
0x11,0x11,0x11,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,
|
||||||
|
0x44,0x44,0x44,0x44,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
|
||||||
|
0x11,0x11,0x11,0x11,0x11,0x44,0x44,0x44,0x42,0x44,0x44,0x44,0x44,0x44,0x44,
|
||||||
|
0x44,0x47,0x44,0x44,0x44,0x44,0x11,0x11,0x11,0x17,0x11,0x11,0x11,0x11,0x11,
|
||||||
|
0x11,0x91,0x1f,0x11,0x11,0x11,0x11,0x44,0x44,0xc4,0x4f,0x44,0x44,0x44,0x44,
|
||||||
|
0x44,0x44,0xc4,0x5f,0x44,0xf4,0x45,0x44,0x11,0x11,0xf1,0x1f,0x11,0xf9,0x13,
|
||||||
|
0x11,0x11,0x11,0xf1,0x3f,0x11,0xfd,0x13,0x11,0x44,0x44,0xf4,0x7f,0x44,0xfc,
|
||||||
|
0x47,0x44,0x44,0x44,0xf4,0x7f,0x44,0xfc,0x47,0x44,0x11,0x11,0xf9,0x7f,0x11,
|
||||||
|
0xf9,0x13,0x11,0x11,0x11,0xfd,0xff,0x11,0xf1,0x11,0x11,0x44,0x44,0xfc,0xff,
|
||||||
|
0x44,0x44,0x44,0x44,0x44,0x44,0xfe,0xff,0x45,0x44,0x44,0x44,0x11,0x11,0xff,
|
||||||
|
0xff,0x11,0xfd,0x13,0x11,0x11,0x11,0xff,0xff,0x13,0xfd,0x13,0x11,0x44,0xc4,
|
||||||
|
0xff,0xff,0x07,0xfc,0x43,0x44,0x44,0xff,0xff,0xf9,0xff,0xfd,0xfb,0xff,0x11,
|
||||||
|
0xc0,0xff,0x00,0x00,0xfc,0x03,0x00,0x11,0xc0,0x7f,0x00,0x00,0xfc,0x03,0x00,
|
||||||
|
0x04,0xe0,0x7f,0x00,0x00,0xfc,0x03,0x00,0xf4,0xf7,0xbf,0xff,0xff,0xfd,0xfb,
|
||||||
|
0x7f,0x01,0xf0,0x1f,0x00,0x00,0xfc,0x03,0x00,0x01,0xf8,0x1f,0x00,0x00,0xfc,
|
||||||
|
0x03,0x00,0x00,0xfc,0x0f,0x00,0x00,0xfc,0x03,0x40,0xfe,0xfd,0xef,0xff,0xff,
|
||||||
|
0xfd,0xfb,0x4f,0x00,0xfe,0x07,0x00,0x00,0xfc,0x03,0x10,0x00,0xfe,0x03,0x00,
|
||||||
|
0x00,0xfc,0x03,0x10,0x00,0xff,0x03,0x00,0x00,0xfc,0x03,0x44,0x7f,0xff,0x01,
|
||||||
|
0x00,0x00,0xfc,0xfb,0x44,0x91,0xff,0xff,0xff,0xff,0xff,0x13,0x11,0xd1,0xff,
|
||||||
|
0xff,0xff,0xff,0xff,0x13,0x11,0xe4,0xff,0xff,0xff,0xff,0xff,0x47,0x44,0xe4,
|
||||||
|
0xff,0xff,0xff,0xff,0xff,0x47,0x44,0xf1,0xff,0xff,0xff,0xff,0xff,0x13,0x11,
|
||||||
|
0xf1,0xff,0xff,0xff,0xff,0xff,0x13,0x11,0xfc,0xff,0xff,0xff,0xff,0xff,0x47,
|
||||||
|
0x44,0xfc,0xff,0xff,0xff,0xff,0xff,0x47,0x44,0x11,0x11,0x11,0x11,0x11,0x11,
|
||||||
|
0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x10,0x11,0x44,0x44,0xc4,0x44,0x44,
|
||||||
|
0xc4,0x44,0x44,0x44,0x4e,0xc4,0x44,0x4e,0xc4,0x44,0x44,0x11,0x1f,0xd1,0x11,
|
||||||
|
0x1f,0xd1,0x11,0x11,0x91,0x31,0xd1,0x91,0x31,0xd1,0x11,0x11,0xc4,0x64,0xcc,
|
||||||
|
0xcc,0x64,0xcc,0x44,0x44,0x64,0xc4,0xcc,0x6c,0xc4,0xcc,0x44,0x44,0xf1,0xff,
|
||||||
|
0xd1,0xf1,0xff,0xd1,0x11,0x11,0xf9,0xff,0xd3,0xf9,0xff,0xd3,0x11,0x11,0x4c,
|
||||||
|
0x44,0xc6,0x4c,0x44,0xc6,0x44,0x44,0x4c,0x44,0xc6,0x4c,0x44,0xc6,0x44,0x44,
|
||||||
|
0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
|
||||||
|
0x11,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,
|
||||||
|
0x44,0x44};
|
BIN
samples/mdi/bitmaps/bitmap1.bmp
Normal file
After Width: | Height: | Size: 238 B |
BIN
samples/mdi/bitmaps/bitmap2.bmp
Normal file
After Width: | Height: | Size: 238 B |
BIN
samples/mdi/bitmaps/brush.bmp
Normal file
After Width: | Height: | Size: 740 B |
BIN
samples/mdi/bitmaps/calc.bmp
Normal file
After Width: | Height: | Size: 702 B |
BIN
samples/mdi/bitmaps/chart.bmp
Normal file
After Width: | Height: | Size: 600 B |
BIN
samples/mdi/bitmaps/colour.bmp
Normal file
After Width: | Height: | Size: 734 B |
BIN
samples/mdi/bitmaps/copy.bmp
Normal file
After Width: | Height: | Size: 238 B |
BIN
samples/mdi/bitmaps/cut.bmp
Normal file
After Width: | Height: | Size: 238 B |
14
samples/mdi/bitmaps/dirplain.xbm
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#define dirplain_width 32
|
||||||
|
#define dirplain_height 32
|
||||||
|
static char dirplain_bits[] = {
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x01, 0x04,
|
||||||
|
0xfc, 0xff, 0xff, 0x1f, 0x02, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x60,
|
||||||
|
0x02, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x60,
|
||||||
|
0x02, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x60,
|
||||||
|
0x02, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x60,
|
||||||
|
0x02, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x60,
|
||||||
|
0x02, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x60,
|
||||||
|
0x02, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x60,
|
||||||
|
0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x7f};
|
14
samples/mdi/bitmaps/draft.xbm
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#define draft_width 32
|
||||||
|
#define draft_height 32
|
||||||
|
static char draft_bits[] = {
|
||||||
|
0x00, 0x80, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x20, 0x02, 0x00,
|
||||||
|
0x00, 0x10, 0x04, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x04, 0x10, 0x00,
|
||||||
|
0x00, 0x02, 0x20, 0x00, 0x00, 0x01, 0x40, 0x00, 0x80, 0x00, 0x80, 0x18,
|
||||||
|
0x40, 0x00, 0x00, 0x3d, 0x20, 0x00, 0x00, 0x76, 0x10, 0x00, 0x00, 0xeb,
|
||||||
|
0xe8, 0xff, 0xff, 0xd5, 0x44, 0x00, 0xc0, 0x6a, 0x82, 0x00, 0x60, 0x35,
|
||||||
|
0x01, 0xf1, 0xb1, 0x5a, 0x02, 0x22, 0xfc, 0x8d, 0x04, 0x44, 0x02, 0x47,
|
||||||
|
0x08, 0x08, 0x01, 0x22, 0x10, 0x90, 0x0c, 0x14, 0x20, 0x80, 0x13, 0x08,
|
||||||
|
0x40, 0x70, 0xfe, 0xf1, 0x80, 0x40, 0x0c, 0xe0, 0x00, 0xb1, 0x00, 0xe0,
|
||||||
|
0x00, 0x5b, 0x01, 0xe0, 0x00, 0xaf, 0x06, 0xe0, 0x00, 0x57, 0xfb, 0xe7,
|
||||||
|
0x00, 0xaf, 0x11, 0xf8, 0x00, 0xde, 0x08, 0xe0, 0x00, 0x7c, 0x04, 0x00,
|
||||||
|
0x00, 0xf8, 0x02, 0x00, 0x00, 0xf0, 0x01, 0x00};
|