region->GetSize(&w, &h);
- wxStringList *stringList = oglFormatText(dc, s, (w-5), (h-5), region->GetFormatMode());
+ wxStringList *stringList = oglFormatText(dc, s, (w-2*m_textMarginX), (h-2*m_textMarginY), region->GetFormatMode());
node = (wxNode*)stringList->GetFirst();
while (node)
{
(m_regions.GetCount() == 1) && !GraphicsInSizeToContents)
{
oglGetCentredTextExtent(dc, &(region->GetFormattedText()), m_xpos, m_ypos, w, h, &actualW, &actualH);
- if ((actualW+m_textMarginX != w ) || (actualH+m_textMarginY != h))
+ if ((actualW+2*m_textMarginX != w ) || (actualH+2*m_textMarginY != h))
{
// If we are a descendant of a composite, must make sure the composite gets
// resized properly
wxCompositeShape *composite = (wxCompositeShape *)topAncestor;
composite->Erase(dc);
- SetSize(actualW+m_textMarginX, actualH+m_textMarginY);
+ SetSize(actualW+2*m_textMarginX, actualH+2*m_textMarginY);
Move(dc, m_xpos, m_ypos);
composite->CalculateSize();
if (composite->Selected())
else
{
Erase(dc);
- SetSize(actualW+m_textMarginX, actualH+m_textMarginY);
+ SetSize(actualW+2*m_textMarginX, actualH+2*m_textMarginY);
Move(dc, m_xpos, m_ypos);
}
- SetSize(actualW+m_textMarginX, actualH+m_textMarginY);
+ SetSize(actualW+2*m_textMarginX, actualH+2*m_textMarginY);
Move(dc, m_xpos, m_ypos);
EraseContents(dc);
}
}
- oglCentreText(dc, &(region->GetFormattedText()), m_xpos, m_ypos, actualW, actualH, region->GetFormatMode());
+ oglCentreText(dc, &(region->GetFormattedText()), m_xpos, m_ypos, actualW-2*m_textMarginX, actualH-2*m_textMarginY, region->GetFormatMode());
m_formatted = TRUE;
}
if (node)
{
wxShapeRegion *region = (wxShapeRegion *)node->GetData();
- oglCentreText(dc, &(region->GetFormattedText()), m_xpos, m_ypos, w, h, region->GetFormatMode());
+ oglCentreText(dc, &(region->GetFormattedText()), m_xpos, m_ypos, w-2*m_textMarginX, h-2*m_textMarginY, region->GetFormatMode());
}
}
}
dc.SetBackgroundMode(wxTRANSPARENT);
if (!m_formatted)
{
- oglCentreText(dc, &(region->GetFormattedText()), m_xpos, m_ypos, bound_x, bound_y, region->GetFormatMode());
+ oglCentreText(dc, &(region->GetFormattedText()), m_xpos, m_ypos, bound_x-2*m_textMarginX, bound_y-2*m_textMarginY, region->GetFormatMode());
m_formatted = TRUE;
}
if (!GetDisableLabel())
{
- oglDrawFormattedText(dc, &(region->GetFormattedText()), m_xpos, m_ypos, bound_x, bound_y, region->GetFormatMode());
+ oglDrawFormattedText(dc, &(region->GetFormattedText()), m_xpos, m_ypos, bound_x-2*m_textMarginX, bound_y-2*m_textMarginY, region->GetFormatMode());
}
}
copy mondrian.ico \wxmsw_dist\wxMSW\utils\glcanvas\samples\penguin
cd ..\..\..
-echo DialogEd..
-
-cd dialoged\src
-md \wxmsw_dist\wxMSW\utils\dialoged
-md \wxmsw_dist\wxMSW\utils\dialoged\src
-copy Makefile.* \wxmsw_dist\wxMSW\utils\dialoged\src
-copy dialoged.def \wxmsw_dist\wxMSW\utils\dialoged\src
-copy dialoged.rc \wxmsw_dist\wxMSW\utils\dialoged\src
-copy dialoged.ico \wxmsw_dist\wxMSW\utils\dialoged\src
-copy dialoged.cpp \wxmsw_dist\wxMSW\utils\dialoged\src
-copy dlghndlr.cpp \wxmsw_dist\wxMSW\utils\dialoged\src
-copy edlist.cpp \wxmsw_dist\wxMSW\utils\dialoged\src
-copy edtree.cpp \wxmsw_dist\wxMSW\utils\dialoged\src
-copy reseditr.cpp \wxmsw_dist\wxMSW\utils\dialoged\src
-copy reswrite.cpp \wxmsw_dist\wxMSW\utils\dialoged\src
-copy symbtabl.cpp \wxmsw_dist\wxMSW\utils\dialoged\src
-copy winprop.cpp \wxmsw_dist\wxMSW\utils\dialoged\src
-copy winstyle.cpp \wxmsw_dist\wxMSW\utils\dialoged\src
-copy dialoged.h \wxmsw_dist\wxMSW\utils\dialoged\src
-copy dlghndlr.h \wxmsw_dist\wxMSW\utils\dialoged\src
-copy edlist.h \wxmsw_dist\wxMSW\utils\dialoged\src
-copy edtree.h \wxmsw_dist\wxMSW\utils\dialoged\src
-copy reseditr.h \wxmsw_dist\wxMSW\utils\dialoged\src
-copy symbtabl.h \wxmsw_dist\wxMSW\utils\dialoged\src
-copy winprop.h \wxmsw_dist\wxMSW\utils\dialoged\src
-copy winstyle.h \wxmsw_dist\wxMSW\utils\dialoged\src
-
-cd bitmaps
-md \wxmsw_dist\wxMSW\utils\dialoged\src\bitmaps
-copy *.bmp \wxmsw_dist\wxMSW\utils\dialoged\src\bitmaps
-copy *.ico \wxmsw_dist\wxMSW\utils\dialoged\src\bitmaps
-cd ..\..\..
-
-
cd ..
echo Samples dir..
samples/wizard/*W7.xml
samples/wxtest/*W7.xml
-utils/dialoged/src/*W7.xml
utils/helpview/src/*W7.xml
utils/tex2rtf/src/*W7.xml
utils/hhp2cached/*W7.xml
samples/wxtest/*M?.xml
samples/wxtest/*.mcp
-utils/dialoged/src/*M?.xml
-utils/dialoged/src/*.mcp
-
utils/helpview/src/*M?.xml
utils/helpview/src/*.mcp
+++ /dev/null
-utils/dialoged/Makefile.in
-utils/dialoged/src/bitmaps/*.xbm
-utils/dialoged/src/bitmaps/*.xpm
-utils/dialoged/src/bitmaps/*.bmp
-utils/dialoged/src/bitmaps/*.ico
-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/*.xpm
-utils/dialoged/src/*.txt
-utils/dialoged/src/*.inf
-utils/dialoged/src/*.ico
-utils/dialoged/src/*.prj
-utils/dialoged/src/*.bmp
-
-docs/html/dialoged/*.htm
-docs/html/dialoged/*.gif
-docs/winhelp/dialoged.hlp
-docs/winhelp/dialoged.cnt
-docs/pdf/dialoged.pdf
-
utils/tex2rtf/docs/*.wmf
utils/tex2rtf/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
-
contrib/docs/latex/svg/*.gif
contrib/docs/latex/svg/*.tex
contrib/docs/latex/svg/*.ini
utils/configure
utils/configure.in
-utils/dialoged/Makefile.in
-utils/dialoged/src/bitmaps/*.xbm
-utils/dialoged/src/bitmaps/*.xpm
-utils/dialoged/src/bitmaps/*.bmp
-utils/dialoged/src/bitmaps/*.ico
-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/*.xpm
-utils/dialoged/src/*.txt
-utils/dialoged/src/*.inf
-utils/dialoged/src/*.ico
-utils/dialoged/src/*.prj
-utils/dialoged/src/*.bmp
-
utils/hhp2cached/*.h
utils/hhp2cached/*.cpp
utils/hhp2cached/*.def
erase /S *.exe
cd %WXDIR%\contrib\samples
erase /S *.exe
-cd %WXDIR%\utils\dialoged\src
-erase /S *.exe
cd %WXDIR%\utils\tex2rtf\src
erase /S *.exe
cd %WXDIR%\contrib\src\ogl
nmake -f makefile.vc clean FINAL=1
-Rem Compile Dialog Editor
-cd %WXDIR%\utils\dialoged\src
-nmake -f makefile.vc clean FINAL=1
-nmake -f makefile.vc FINAL=1
-copy *.exe %BUILDDEST%\VC6Release
-nmake -f makefile.vc clean FINAL=1
-
Rem Compile Tex2RTF
cd %WXDIR%\utils\tex2rtf\src
nmake -f makefile.vc clean FINAL=1
cd %WXDIR%\contrib\src\ogl
make -f makefile.b32 clean FINAL=1
-Rem Compile Dialog Editor
-cd %WXDIR%\utils\dialoged\src
-make -f makefile.b32 clean FINAL=1
-make -f makefile.b32 FINAL=1
-copy *.exe %BUILDDEST%\BC55Release
-make -f makefile.b32 clean FINAL=1
-
Rem Compile Tex2RTF
cd %WXDIR%\utils\tex2rtf\src
make -f makefile.b32 clean FINAL=1
cd %WXDIR%\contrib\src\ogl
make -f makefile.g95 clean FINAL=1
-Rem Compile Dialog Editor
-cd %WXDIR%\utils\dialoged\src
-make -f makefile.g95 clean FINAL=1
-make -f makefile.g95 FINAL=1
-copy *.exe %BUILDDEST%\Cygwin11Release
-make -f makefile.g95 clean FINAL=1
-
Rem Compile Tex2RTF
cd %WXDIR%\utils\tex2rtf\src
make -f makefile.g95 clean FINAL=1
cd %WXDIR%\contrib\src\ogl
make -f makefile.g95 clean FINAL=1
-Rem Compile Dialog Editor
-cd %WXDIR%\utils\dialoged\src
-make -f makefile.g95 clean FINAL=1
-make -f makefile.g95 FINAL=1
-copy *.exe %BUILDDEST%\Ming2952Release
-make -f makefile.g95 clean FINAL=1
-
Rem Compile Tex2RTF
cd %WXDIR%\utils\tex2rtf\src
make -f makefile.g95 clean FINAL=1
echo "Building wxWindows documents"
nmake -f makefile.vc cleandocs docs
- cd "$SRC/utils/dialoged/src"
- nmake -f makefile.vc html htmlhelp htb hlp pdfrtf
-
cd "$SRC/utils/tex2rtf/src"
nmake -f makefile.vc html htmlhelp htb hlp pdfrtf
echo "Building wxWindows PDF documents"
if [ -e "$WORDEXE" ]; then
"$WORDEXE" "$WXWIN\\docs\\pdf\\wx.rtf"
- "$WORDEXE" "$WXWIN\\docs\\pdf\\dialoged.rtf"
"$WORDEXE" "$WXWIN\\docs\\pdf\\tex2rtf.rtf"
"$WORDEXE" "$WXWIN\\contrib\\docs\\pdf\\ogl.rtf"
"$WORDEXE" "$WXWIN\\contrib\\docs\\mmedia\\ogl.rtf"
msdev wxvc.dsw /useenv /make "wxvc - Win32 Release" /rebuild | egrep -v "$WARNINGS"
}
-build_dialog_editor() {
- echo "---------------------------------"
- echo "Building Dialog Editor using VC++"
- cd "$SRC/utils/dialoged/src"
- msdev DialogEdVC.dsw /useenv /make "DialogEdVC - Win32 Release" /rebuild | egrep -v "$WARNINGS" | tee $TMPDIR/buildlog.txt
-
- check_compile "Dialog Editor"
-}
-
build_tex2rtf() {
echo "---------------------------------"
echo "Building Tex2RTF using VC++"
}
build_executables() {
- build_dialog_editor
build_tex2rtf
build_life
}
copy_files() {
- cp "$SRC/utils/dialoged/src/Release/dialoged.exe" "$SRC/bin"
- cp "$SRC/docs/winhelp/dialoged.hlp" "$SRC/docs/winhelp/dialoged.cnt" "$SRC/bin"
-
cp "$SRC/utils/tex2rtf/src/Release/tex2rtf.exe" "$SRC/bin"
cp "$SRC/docs/winhelp/tex2rtf.hlp" "$SRC/docs/winhelp/tex2rtf.cnt" "$SRC/bin"
src/unix/descrip.mms
src/zlib/descrip.mms
src/regex/descrip.mms
-utils/dialoged/src/descrip.mms
utils/helpview/src/descrip.mms
utils/tex2rtf/src/descrip.mms
# unzip $ZIPFLAGS -o $APPDIR/distrib/os2/os2-specific.zip
rm -f src/gtk/descrip.mms src/motif/descrip.mms docs/pdf/*.pdf
rm -f src/tiff/*.mcp src/jpeg/*.mcp src/png/*.mcp src/zlib/*.mcp
- rm -f -r docs/html/dialoged docs/html/tex2rtf
+ rm -f -r docs/html/tex2rtf
# echo Making OS/2 files lower case...
# no longer necessary
cd $DESTDIR/wxWindows-$VERSION
unzip $ZIPFLAGS ../wxMac-$VERSION.zip
rm -f src/gtk/descrip.mms src/motif/descrip.mms docs/pdf/*.pdf
- rm -f -r docs/html/dialoged docs/html/tex2rtf docs/htmlhelp
+ rm -f -r docs/html/tex2rtf docs/htmlhelp
echo Copying readme files...
cp $APPDIR/docs/mac/readme.txt README-MAC.txt
if [ ! -d bin ]; then
mkdir bin
fi
- #cp $APPDIR/bin/dialoged.exe bin
- #cp $APPDIR/bin/dialoged.hlp bin
- #cp $APPDIR/bin/dialoged.chm bin
cp $APPDIR/bin/tex2rtf.exe bin
cp $APPDIR/bin/tex2rtf.chm bin
cp $APPDIR/bin/widgets.exe bin
cp $APPDIR/bin/life.exe bin
cp $APPDIR/demos/life/breeder.lif bin
- #cp $APPDIR/docs/htmlhelp/dialoged.chm bin
cp $APPDIR/docs/htmlhelp/tex2rtf.chm bin
if [ ! -d docs/pdf ]; then
echo Tarring wxGTK...
cd $WXSRC
-cat $WXSRC/distrib/msw/generic.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/deprecated.rsp $WXSRC/distrib/msw/stc.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/utils.rsp $WXSRC/distrib/msw/ogl.rsp $WXSRC/distrib/msw/tex2rtf.rsp $WXSRC/distrib/msw/dialoged.rsp $WXSRC/distrib/msw/gtk.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp > /tmp/wxgtk_in.txt
+cat $WXSRC/distrib/msw/generic.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/deprecated.rsp $WXSRC/distrib/msw/stc.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/utils.rsp $WXSRC/distrib/msw/ogl.rsp $WXSRC/distrib/msw/tex2rtf.rsp $WXSRC/distrib/msw/gtk.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp > /tmp/wxgtk_in.txt
expandlines /tmp/wxgtk_in.txt /tmp/wxgtk.txt
$TAR cf $WXDEST/wxGTK-${WXVER}.tar -T /tmp/wxgtk.txt
### wxX11: combined wxMotif and wxX11 distributions
cd $WXSRC
-cat $WXSRC/distrib/msw/generic.rsp $WXSRC/distrib/msw/motif.rsp $WXSRC/distrib/msw/x11.rsp $WXSRC/distrib/msw/univ.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/deprecated.rsp $WXSRC/distrib/msw/stc.rsp $WXSRC/distrib/msw/utils.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/dialoged.rsp $WXSRC/distrib/msw/ogl.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp > /tmp/wxx11_in.txt
+cat $WXSRC/distrib/msw/generic.rsp $WXSRC/distrib/msw/motif.rsp $WXSRC/distrib/msw/x11.rsp $WXSRC/distrib/msw/univ.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/deprecated.rsp $WXSRC/distrib/msw/stc.rsp $WXSRC/distrib/msw/utils.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/ogl.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp > /tmp/wxx11_in.txt
expandlines /tmp/wxx11_in.txt /tmp/wxx11.txt
$TAR cf $WXDEST/wxX11-${WXVER}.tar -T /tmp/wxx11.txt
### wxMac
cp $WXSRC/include/wx/mac/setup0.h $WXSRC/include/wx/setup.h
cd $WXSRC
-cat $WXSRC/distrib/msw/mac.rsp $WXSRC/distrib/msw/generic.rsp $WXSRC/distrib/msw/cw_mac.rsp $WXSRC/distrib/msw/tex2rtf.rsp $WXSRC/distrib/msw/utils.rsp $WXSRC/distrib/msw/dialoged.rsp $WXSRC/distrib/msw/ogl.rsp $WXSRC/distrib/msw/stc.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/deprecated.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp > /tmp/wxmac_in.txt
+cat $WXSRC/distrib/msw/mac.rsp $WXSRC/distrib/msw/generic.rsp $WXSRC/distrib/msw/cw_mac.rsp $WXSRC/distrib/msw/tex2rtf.rsp $WXSRC/distrib/msw/utils.rsp $WXSRC/distrib/msw/ogl.rsp $WXSRC/distrib/msw/stc.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/deprecated.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp > /tmp/wxmac_in.txt
expandlines /tmp/wxmac_in.txt /tmp/wxmac.txt
$TAR cf $WXDEST/wxMac-${WXVER}.tar -T /tmp/wxmac.txt
### wxAll: all distributions in one giant archive
cd $WXSRC
-cat $WXSRC/distrib/msw/generic.rsp $WXSRC/distrib/msw/msw.rsp $WXSRC/distrib/msw/vc.rsp $WXSRC/distrib/msw/cw.rsp $WXSRC/distrib/msw/cw_mac.rsp $WXSRC/distrib/msw/gtk.rsp $WXSRC/distrib/msw/x11.rsp $WXSRC/distrib/msw/motif.rsp $WXSRC/distrib/msw/mac.rsp $WXSRC/distrib/msw/os2.rsp $WXSRC/distrib/msw/x11.rsp $WXSRC/distrib/msw/univ.rsp $WXSRC/distrib/msw/mgl.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/deprecated.rsp $WXSRC/distrib/msw/utilmake.rsp $WXSRC/distrib/msw/utils.rsp $WXSRC/distrib/msw/mmedia.rsp $WXSRC/distrib/msw/tex2rtf.rsp $WXSRC/distrib/msw/stc.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/dialoged.rsp $WXSRC/distrib/msw/ogl.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp $WXSRC/distrib/msw/docsrc.rsp | uniq > /tmp/wxall_in.txt
+cat $WXSRC/distrib/msw/generic.rsp $WXSRC/distrib/msw/msw.rsp $WXSRC/distrib/msw/vc.rsp $WXSRC/distrib/msw/cw.rsp $WXSRC/distrib/msw/cw_mac.rsp $WXSRC/distrib/msw/gtk.rsp $WXSRC/distrib/msw/x11.rsp $WXSRC/distrib/msw/motif.rsp $WXSRC/distrib/msw/mac.rsp $WXSRC/distrib/msw/os2.rsp $WXSRC/distrib/msw/x11.rsp $WXSRC/distrib/msw/univ.rsp $WXSRC/distrib/msw/mgl.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/deprecated.rsp $WXSRC/distrib/msw/utilmake.rsp $WXSRC/distrib/msw/utils.rsp $WXSRC/distrib/msw/mmedia.rsp $WXSRC/distrib/msw/tex2rtf.rsp $WXSRC/distrib/msw/stc.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/ogl.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp $WXSRC/distrib/msw/docsrc.rsp | uniq > /tmp/wxall_in.txt
expandlines /tmp/wxall_in.txt /tmp/wxall.txt
$TAR cf $WXDEST/wxAll-${WXVER}.tar -T /tmp/wxall.txt
### wxAll: all distributions in one giant archive
cd $1
-cat $1/distrib/msw/generic.rsp $1/distrib/msw/msw.rsp $1/distrib/msw/vc.rsp $1/distrib/msw/cw.rsp $1/distrib/msw/cw_mac.rsp $1/distrib/msw/gtk.rsp $1/distrib/msw/x11.rsp $1/distrib/msw/motif.rsp $1/distrib/msw/mac.rsp $1/distrib/msw/os2.rsp $1/distrib/msw/x11.rsp $1/distrib/msw/univ.rsp $1/distrib/msw/mgl.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/deprecated.rsp $1/distrib/msw/utilmake.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/mmedia.rsp $1/distrib/msw/tex2rtf.rsp $1/distrib/msw/stc.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/dialoged.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp $1/distrib/msw/docsrc.rsp | uniq > /tmp/wxall_in.txt
+cat $1/distrib/msw/generic.rsp $1/distrib/msw/msw.rsp $1/distrib/msw/vc.rsp $1/distrib/msw/cw.rsp $1/distrib/msw/cw_mac.rsp $1/distrib/msw/gtk.rsp $1/distrib/msw/x11.rsp $1/distrib/msw/motif.rsp $1/distrib/msw/mac.rsp $1/distrib/msw/os2.rsp $1/distrib/msw/x11.rsp $1/distrib/msw/univ.rsp $1/distrib/msw/mgl.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/deprecated.rsp $1/distrib/msw/utilmake.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/mmedia.rsp $1/distrib/msw/tex2rtf.rsp $1/distrib/msw/stc.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp $1/distrib/msw/docsrc.rsp | uniq > /tmp/wxall_in.txt
expandlines /tmp/wxall_in.txt /tmp/wxall.txt
$TAR cf $2/wxAll-${WXVER}.tar -T /tmp/wxall.txt
echo Tarring...
### wxMac
-cat $1/distrib/msw/mac.rsp $1/distrib/msw/generic.rsp $1/distrib/msw/cw_mac.rsp $1/distrib/msw/tex2rtf.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/dialoged.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/stc.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/deprecated.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp > /tmp/wxmac_in.txt
+cat $1/distrib/msw/mac.rsp $1/distrib/msw/generic.rsp $1/distrib/msw/cw_mac.rsp $1/distrib/msw/tex2rtf.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/stc.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/deprecated.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp > /tmp/wxmac_in.txt
expandlines /tmp/wxmac_in.txt /tmp/wxmac.txt
$TAR cf $2/wxMac-${WXVER}.tar -T /tmp/wxmac.txt
echo Tarring...
### wxMotif
-ls `cat $1/distrib/msw/generic.rsp $1/distrib/msw/motif.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/utilmake.rsp $1/distrib/msw/jpeg.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/wx_html.rsp $1/distrib/msw/tex2rtf.rsp $1/distrib/msw/dialoged.rsp $1/distrib/msw/utils.rsp` > /tmp/wxmotif.txt
+ls `cat $1/distrib/msw/generic.rsp $1/distrib/msw/motif.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/utilmake.rsp $1/distrib/msw/jpeg.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/wx_html.rsp $1/distrib/msw/tex2rtf.rsp $1/distrib/msw/utils.rsp` > /tmp/wxmotif.txt
tar cvf $2/wxMotif-${WXVER}.tar -T /tmp/wxmotif.txt
gzip $2/wxMotif-${WXVER}.tar
mv $2/wxMotif-${WXVER}.tar.gz $2/wxMotif-${WXVER}.tgz
### wxX11: combined wxMotif and wxX11 distributions
cd $1
-cat $1/distrib/msw/generic.rsp $1/distrib/msw/motif.rsp $1/distrib/msw/x11.rsp $1/distrib/msw/univ.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/deprecated.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/dialoged.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp > /tmp/wxx11_in.txt
+cat $1/distrib/msw/generic.rsp $1/distrib/msw/motif.rsp $1/distrib/msw/x11.rsp $1/distrib/msw/univ.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/deprecated.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp > /tmp/wxx11_in.txt
expandlines /tmp/wxx11_in.txt /tmp/wxx11.txt
$TAR cf $2/wxX11-${WXVER}.tar -T /tmp/wxx11.txt
demos/poem/poem.dsp
demos/poem/poem.dsw
-utils/dialoged/src/DialogEdVC.dsp
-utils/dialoged/src/DialogEdVC.dsw
-
utils/tex2rtf/src/Tex2RTFVC.dsp
utils/tex2rtf/src/Tex2RTFVC.dsw
demos/poem/poemCE.vcp
demos/poem/poemCE.vcw
-utils/dialoged/src/DialogEdCE.vcp
-utils/dialoged/src/DialogEdCE.vcw
-
utils/tex2rtf/src/Tex2RTFCE.vcp
utils/tex2rtf/src/Tex2RTFCE.vcw
docs/html/wx/*.htm
docs/html/wx/*.gif
-docs/html/dialoged/*.htm
-docs/html/dialoged/*.gif
-
docs/html/tex2rtf/*.htm
docs/html/tex2rtf/*.gif
# Now copy some binary files to 'bin'
mkdir bin
- cp $SRC/bin/dialoged.exe bin
cp $SRC/bin/tex2rtf.exe bin
cp $SRC/bin/dbgview.* bin
cp $SRC/bin/life.exe bin
- cp $SRC/docs/winhelp/dialoged.hlp $SRC/docs/winhelp/dialoged.cnt bin
cp $SRC/docs/winhelp/tex2rtf.hlp $SRC/docs/winhelp/tex2rtf.cnt bin
# Make wxMSW-xxx.zip
rm -f $DEST/tex2rtf2.zip
rm -f $DEST/jpeg.zip
rm -f $DEST/tiff.zip
-rm -f $DEST/dialoged.zip
rm -f $DEST/utils.zip
rm -f $DEST/extradoc.zip
rm -f $DEST/*-win32.zip
expandlines $SRC/distrib/msw/tiff.rsp temp.txt
zip -@ `$CYGPATHPROG -w $DEST/tiff.zip` < temp.txt
-# Dialog Editor source and binary
-rm -f $DEST/dialoged_source.zip
-expandlines $SRC/distrib/msw/dialoged.rsp temp.txt
-zip -@ `$CYGPATHPROG -w $DEST/dialoged_source.zip` < temp.txt
-zip -j `$CYGPATHPROG -w $DEST/dialoged.zip` $DEST/dialoged_source.zip $SRC/bin/dialoged.exe $SRC/docs/winhelp/dialoged.hlp $SRC/docs/winhelp/dialoged.cnt
-rm -f $DEST/dialoged_source.zip
-
# Misc. utils not in the main distribution
expandlines $SRC/distrib/msw/utils.rsp temp.txt
zip -@ `$CYGPATHPROG -w $DEST/utils.zip` < temp.txt
rm -f temp.txt
-# Make dialoged-win32.zip and tex2rtf-win32.zip
-
cd $SRC/bin
-zip `$CYGPATHPROG -w $DEST/dialoged-win32.zip` dialoged.*
zip `$CYGPATHPROG -w $DEST/tex2rtf-win32.zip` tex2rtf.*
cp $SRC/docs/changes.txt $DEST
expandlines $SRC/distrib/msw/tex2rtf.rsp temp.txt
zip -u -@ `$CYGPATHPROGW $DEST/wxMac-$VERSION.zip` < temp.txt
-expandlines $SRC/distrib/msw/dialoged.rsp temp.txt
-zip -u -@ `$CYGPATHPROGW $DEST/wxMac-$VERSION.zip` < temp.txt
-
expandlines $SRC/distrib/msw/ogl.rsp temp.txt
zip -u -@ `$CYGPATHPROGW $DEST/wxMac-$VERSION.zip` < temp.txt
erase /XY include\wx\generic\mdig.h src\generic\mdig.cpp
erase /XY include\wx\*cw*.h
-erase /SXY docs\html\dialoged docs\html\tex2rtf
-
cd %dest%
erase wxMSW-%version%-Minimal.zip
</td>
</tr>
-<tr>
-<td align=center>
-<a href="dialoged/dlged.htm">Dialog Editor</a>
-</td>
-
-<td align=center>
-<a href="../winhelp/dialoged.hlp">Dialog Editor</a>
-</td>
-
-<td align=center>
-<a href="../htmlhelp/dialoged.chm">Dialog Editor</a>
-</td>
-
-<td align=center>
-<a href="../htb/dialoged.htb">Dialog Editor</a>
-</td>
-
-<td align=center>
-<a href="../pdf/dialoged.pdf">Dialog Editor</a>
-</td>
-</tr>
-
<tr>
<td align=center>
<a href="tex2rtf/t2rtf.htm">Tex2RTF</a>
As well as the core source, the wxMSW distribution contains:
- Windows HTML Help versions of the documentation (docs/htmlhelp);
-- a Dialog Editor binary;
- a Tex2RTF binary;
- Life! sample binary.
+++ /dev/null
-
-USE_RESOURCES=@USE_RESOURCES@
-
-all:
- if test "$(USE_RESOURCES)" = "yes"; then cd src; $(MAKE); fi
-
-clean:
- cd src; $(MAKE) clean
-
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: alignb.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 298 389 314 404
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-298 389 translate
-
-% size of image (on paper, in 1/72inch coords)
-16 15 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 9 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 ffff00
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-16 15 8 % dimensions of data
-[16 0 0 -15 0 15] % mapping matrix
-rlecmapimage
-
-0f01
-07010700
-070181000204020000
-070181000204020000
-070181000204020000
-070181000204020000
-070181000204020000
-8101000300010181000204020000
-8201000201028100018201000204020000
-8201000201028100018201000204020000
-8201000201028100018201000204020000
-8201000201028100018201000204020000
-810100030001010700
-0f01
-0f01
-
-%
-% Compression made this file 3.12% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: alignl.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 389 270 404
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 389 translate
-
-% size of image (on paper, in 1/72inch coords)
-16 15 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 9 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 ffff00
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-16 15 8 % dimensions of data
-[16 0 0 -15 0 15] % mapping matrix
-rlecmapimage
-
-0f01
-020105000601
-020181000202028100010501
-020181000202028100010501
-020181000202028100010501
-020105000601
-0f01
-0f01
-02010a000101
-020181000207028100010001
-020181000207028100010001
-020181000207028100010001
-020181000207028100010001
-02010a000101
-0f01
-
-%
-% Compression made this file 16.11% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: alignr.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 389 270 404
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 389 translate
-
-% size of image (on paper, in 1/72inch coords)
-16 15 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 9 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 ffff00
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-16 15 8 % dimensions of data
-[16 0 0 -15 0 15] % mapping matrix
-rlecmapimage
-
-0f01
-070105000101
-070181000202028100010001
-070181000202028100010001
-070181000202028100010001
-070105000101
-0f01
-0f01
-02010a000101
-020181000207028100010001
-020181000207028100010001
-020181000207028100010001
-020181000207028100010001
-02010a000101
-0f01
-
-%
-% Compression made this file 16.11% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: alignt.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 389 270 404
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 389 translate
-
-% size of image (on paper, in 1/72inch coords)
-16 15 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 9 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 ffff00
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-16 15 8 % dimensions of data
-[16 0 0 -15 0 15] % mapping matrix
-rlecmapimage
-
-0f01
-810100030001010700
-8201000201028100018201000204020000
-8201000201028100018201000204020000
-8201000201028100018201000204020000
-8201000201028100018201000204020000
-8101000300010181000204020000
-070181000204020000
-070181000204020000
-070181000204020000
-070181000204020000
-070181000204020000
-07010700
-0f01
-0f01
-
-%
-% Compression made this file 20.28% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: arrow.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 375 282 403
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 375 translate
-
-% size of image (on paper, in 1/72inch coords)
-28 28 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 12 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 808080 ffffff
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-28 28 8 % dimensions of data
-[28 0 0 -28 0 28] % mapping matrix
-rlecmapimage
-
-8102001900
-8100031703810200
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-8200030106018100010c0101020000
-82000301060101000c0101020000
-82000301060102000b0101020000
-82000301060103000a0101020000
-8200030106010400090101020000
-8200030106010500080101020000
-8200030106010600070101020000
-8200030106010700060101020000
-8200030106010400090101020000
-8200030106010100810100810001080101020000
-82000301060181000101010100080101020000
-820003010a010100080101020000
-820003010b010100070101020000
-820003010b010100070101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-8200030217020000
-81000218020000
-1b00
-
-%
-% Compression made this file 13.95% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: bmpbuttn.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 375 282 403
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 375 translate
-
-% size of image (on paper, in 1/72inch coords)
-28 28 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 12 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 808080 ffffff
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-28 28 8 % dimensions of data
-[28 0 0 -28 0 28] % mapping matrix
-rlecmapimage
-
-81020018000002
-8100031703810200
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-8200030103010c00040101020000
-8200030102018100010b01810001020101020000
-82000301020181000101018100010201010002010100020101020000
-8200030102018100010101810001010181000182010001810100810001010101020000
-82000301020185000100010001010181000182010001810100810001010101020000
-8200030102018400010001008100010101010002010100020101020000
-82000301020183000100018201000106010100020101020000
-82000301020182000100820001000900020101020000
-820003010201810001010181000107010100020101020000
-82000301020181000101018100010101010003010100020101020000
-8200030103010e00020101020000
-8200030104010c00030101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-8200030217020000
-81000218020000
-81020018000002
-
-%
-% Compression made this file 18.45% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-\chapter{Introduction}\label{introduction}
-\pagenumbering{arabic}%
-\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
-\setfooter{\thepage}{}{}{}{}{\thepage}%
-
-The wxWindows Dialog Editor is a tool for creating dialog resource files, in {\tt .wxr} format.
-It differs from wxBuilder in the following respectes:
-
-\begin{enumerate}\itemsep=0pt
-\item Scope. It is written for dialog editing only, and is therefore more convenient than wxBuilder for this purpose.
-\item File format. Dialog editor reads and writes wxWindows resource files (extension {\tt .wxr}) and has
-no independent file format.
-\item Robustness. It is written in a more principled way than wxBuilder, and is less ambitious.
-\item Ease of use. Windows are edited using the mouse or via consistent {\it property editors}, which
-provide immediate visual feedback of changed properties.
-\end{enumerate}
-
-Dialog Editor 2.0 should be compiled and used with wxWindows 2.0.
-
-\section{Current status}
-
-Dialog Editor currently runs under wxMSW and wxGTK. It has yet to
-be tested under wxMotif.
-
-\section{Future developments}
-
-\begin{itemize}\itemsep=0pt
-\item Motif compilation.
-\item It would be nice to have a dialog browser, showing thumbnails of
-all dialogs in a particular directory.
-\item Maybe add a menubar editor (from wxBuilder).
-\item Maybe convert Windows .rc files.
-\end{itemize}
-
-\chapter{Commands}\label{commands}
-\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
-\setfooter{\thepage}{}{}{}{}{\thepage}%
-
-\section{Dialog editor menu bar}
-
-\subsection{File menu}
-
-\begin{twocollist}\itemsep=0pt
-\twocolitem{New Dialog}{Creates a new dialog resource.}
-\twocolitem{New Project}{Creates a new project (clears index and resets project name).}
-\twocolitem{Open...}{Opens an existing resource file.}
-\twocolitem{Save}{Saves the current resources.}
-\twocolitem{Save As...}{Saves the current resources in a named file.}
-\twocolitem{Clear}{Clears the current resources.}
-\twocolitem{Convert Old Resources...}{Takes a directory of wxWindows 1.68 dialog resources,
-and converts them to wxWindows 2 resources, in a separate directory. See
-\helpref{Converting old files}{convertingoldfiles}.}
-\twocolitem{Exit}{Exits the program.}
-\end{twocollist}
-
-\subsection{Edit menu}
-
-\begin{twocollist}\itemsep=0pt
-\twocolitem{Test Dialog}{Creates the current dialog for test purposes.}
-\twocolitem{Recreate}{Recreates the currently selected control from the underlying resource. This may be necessary
-to regenerate items that cannot be changed dynamically, and which have got out of sync with the displayed
-item.}
-\twocolitem{Delete}{Deletes the currently selected resource.}
-\end{twocollist}
-
-\subsection{Help menu}
-
-\begin{twocollist}\itemsep=0pt
-\twocolitem{Help Topics}{Displays on-line help at the contents page.}
-\twocolitem{About}{Displays an dialog showing the Dialog Editor version and author.}
-\end{twocollist}
-
-\latexonly{\newpage}
-\section{Command toolbar}
-
-The command toolbar consists of the following tools:
-
-\begin{twocollist}%\itemsep=0pt
-\twocolitem{\icon{new.eps}{New}}{Clears the project.}
-\twocolitem{\icon{open.eps}{Open}}{Opens an existing resource file.}
-\twocolitem{\icon{save.eps}{Save}}{Saves the current resources.}
-\twocolitem{\icon{vert.eps}{Horizontal align}}{Aligns the centre of the selected controls horizontally.}
-\twocolitem{\icon{alignt.eps}{Horizontal top-align}}{Aligns the top sides of the selected controls horizontally.}
-\twocolitem{\icon{alignb.eps}{Horizontal bottom-align}}{Aligns the bottom sides of the selected controls horizontally.}
-\twocolitem{\icon{horiz.eps}{Vertical align}}{Aligns the centre of the selected controls vertically.}
-\twocolitem{\icon{alignl.eps}{Vertical left-align}}{Aligns the left sides of the selected controls vertically.}
-\twocolitem{\icon{alignr.eps}{Vertical right-align}}{Aligns the right sides of the selected controls vertically.}
-\twocolitem{\icon{copysize.eps}{Copy size}}{Copies the size of the first selected control to the subsequently selected control(s).}
-\twocolitem{\icon{copywdth.eps}{Copy width}}{Copies the width of the first selected control to the subsequently selected control(s).}
-\twocolitem{\icon{copyhght.eps}{Copy height}}{Copies the height of the first selected control to the subsequently selected control(s).}
-\twocolitem{\icon{disthor.eps}{Distribute horizontally}}{Evenly distributes the space between the selected controls, horizontally. Note that the controls
-should be selected in order from left to right.}
-\twocolitem{\icon{distvert.eps}{Distribute vertically}}{Evenly distributes the space between the selected controls, vertically. Note that the controls
-should be selected in order from top to bottom.}
-\twocolitem{\icon{tofront.eps}{To front}}{Puts the selected control(s) to the front of the display list.}
-\twocolitem{\icon{toback.eps}{To back}}{Puts the selected control(s) to the back of the display list.}
-\twocolitem{\icon{help.eps}{Help}}{Invokes Dialog Editor help.}
-\end{twocollist}
-
-\latexonly{\newpage}
-\section{Tool palette}
-
-The tool palette is used to select a type of control to create on the dialog.
-To create a new control, select a tool with left-click, then left-click on the dialog.
-Select the pointer tool to use left-click for selecting and deselecting
-items.
-
-\section{Resource tree}
-
-The resource tree shows a list of the dialogs, controls and bitmaps currently loaded
-in Dialog Editor. Double-clicking on an item shows the associated resource.
-
-\chapter{Procedures}\label{procedures}
-\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
-\setfooter{\thepage}{}{}{}{}{\thepage}%
-
-\section{Running Dialog Editor}
-
-To run Dialog Editor under Windows, click on the Program Manager or Explorer icon.
-Under UNIX, run from the command line.
-
-The main window shows a menu bar, command toolbar, tool palette, resource list, and
-status line.
-
-\section{Creating a dialog}
-
-To create a new dialog, click on the {\bf File: New} menu item, or equivalent
-toolbar button. A dialog will appear. To put a control on the dialog, left-click
-on the appropriate palette icon and then left-click on the dialog. A new item
-will appear at the place you clicked.
-
-You can edit any control or dialog by control-left clicking. A property editor
-will appear, allowing any property to be selected and edited (see \helpref{Using property editors}{propeditors}).
-You can also edit items by right-clicking to show a menu, and then selecting {\it Edit properties}.
-
-To move a control, drag the item with the left mouse button, or edit
-the position values in the property editor. To resize a control, you
-can either select it by left-clicking and then dragging on a selection
-handle, or edit the size values in the property editor.
-
-You can delete items from the right-click menu, or by selecting the item and
-choosing {\bf Edit: Delete} from the menu bar.
-
-\section{Using property editors}\label{propeditors}
-
-Property editors consist of a list of properties and current values, plus controls at the top of
-the editor. If the property is of an appropriate type, you can edit the value directly in the
-text field, and confirm or cancel the value using the two buttons to the left of it.
-If the property has a predefined range of values, such as labelFontFamily, you can
-see a list of permissable values by clicking on the button labelled with an ellipsis symbol ({\bf ...}).
-This will show a listbox with possible values and current selection. You may also be able
-to cycle through values by double-clicking the value in the listbox.
-
-Properties may have special editors appropriate to the type. Filename properties invoke
-the file selector, and properties containing list of user-definable strings use a
-string editor.
-
-When you change a property value, this value is immediately reflected in
-the dialog or control. If the item allows this value to be changed
-dynamically, the relevant wxWindows function will be called internally
-to effect the change. If the value cannot be changed dynamically, the
-item will be destroyed and re-created, which means that there will be
-more flickering associated with some kinds of property changes than
-others.
-
-\section{Saving and loading files}
-
-Use {\it File: Save} and {\it File: Save as} or the equivalent toolbar button
-to save the current dialog(s) in a wxWindows resource file (extension {\tt .wxr}).
-
-The {\tt .wxr} file can be used directly in a wxWindows program, if
-wxWindows resources have been enabled when building the wxWindows library.
-These files can be loaded dynamically, or included directly into program source
-with a \verb$#include$ directive. See the wxWindows user manual for further details.
-
-\section{Working with identifiers}
-
-Dialog Editor keeps track of identifiers in your resources, and reads and writes an include file of the
-form {\tt name.h} where 'name' is the root name of your {\tt .wxr} file. Dialog Editor
-knows about the predefined identifiers such as wxID\_OK.
-
-When you create a dialog or control, the identifier is initially generated. When you
-edit the identifier via a property editor, you can choose a new name, such as a predefined
-symbol and optionally change the integer assigned to the name (assuming it's not a
-predefined symbol).
-
-When you save the project, the identifier include file is saved as well. Include this file
-in your project so that you can refer to controls and dialogs by identifier rather than
-obscure integers. Note that the {\tt .wxr} file itself can only contain integer ids and not the symbols,
-due to way in which the resource file is loaded.
-
-\section{Multi-platform development}
-
-{\tt .wxr} files generated on one environment (e.g. Windows) can be used in another (e.g. GTK).
-If you use default fonts and colouring (set {\bf useSystemDefaults} to True in the dialog properties)
-then the dialog fonts and colours will take on the native values, rather than ones specified in the
-resource. Without this, colours in the dialog resource may not match system colours.
-
-Also, set {\bf useDialogUnits} to True whenever possible since this will cause the dialog
-to be created using a scale based on the current system font size, and will result in dialogs that are
-portable between screen resolutions as well as platforms.
-
-Because the same control can have different sizes on different GUIs,
-the user should be cautious in assuming that one resource file will work for all
-platforms. It may be better to plan to conditionally include or load different
-resource files for different platforms, with spacing modified to suit each
-environment. The best thing is to try your dialog resource on several platforms
-and see whether tweaking is required for some platforms.
-
-\section{Converting old files}\label{convertingoldfiles}
-
-Dialog Editor can make an attempt at converting dialog resources created with Dialog Editor for wxWindows 1.68.
-The command is {\bf Convert Old Resources...} on the {\bf File} menu.
-
-You need to specify two directories, an input and an output directory. Dialog Editor will
-do the following conversions:
-
-\begin{enumerate}\itemsep=0pt
-\item wxMultiText becomes a wxTextCtrl with wxTE\_MULTILINE style.
-\item wxText becomes a wxTextCtrl.
-\item wxMessage becomes either a wxStaticText or wxStaticBitmap.
-\item wxButton becomes a wxBitmapButton if necessary.
-\item wxGroupBox becomes wxStaticBox.
-\item Controls that no longer have labels, such as wxTextCtrl and wxListBox,
-have a separate wxStaticText control created for them at approximately the correct
-position. The label's window name becomes ControlName_Label where ControlName is
-the name of the control that formerly had the label.
-\item Identifiers are allocated.
-\item Font sizes are reduced to counter the decreased font size now created by wxWindows
-for a given point size.
-\item The dialog height is reduced slightly to compensate for the fact that the dialog caption
-is no longer included in the size.
-\end{enumerate}
-
+++ /dev/null
-\chapter{Bugs}\label{bugs}
-\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
-\setfooter{\thepage}{}{}{}{}{\thepage}%
-
-Version 2.0
-
-\begin{itemize}\itemsep=0pt
-\item No Motif version yet.
-\item Some control properties missing.
-\item When dragging a selected item, other selected items should follow (to be
-consistent with convention), but don't.
-\item No grid.
-\item No keyboard shortcuts.
-\item No tab ordering.
-\item In dialog unit mode, controls will sometimes move slightly when properties are edited,
-because translating between units isn't always reversible (rounding errors?).
-\end{itemize}
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: button.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 375 282 403
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 375 translate
-
-% size of image (on paper, in 1/72inch coords)
-28 28 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 12 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 808080 ffffff
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-28 28 8 % dimensions of data
-[28 0 0 -28 0 28] % mapping matrix
-rlecmapimage
-
-81020018000002
-8100031703810200
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-8200030103010c00040101020000
-8200030102018100010b01810001020101020000
-8200030102018100010b010100020101020000
-8200030102018100010b010100020101020000
-8200030102018100010b010100020101020000
-8200030102018100010b010100020101020000
-8200030102018100010b010100020101020000
-8200030102018100010b010100020101020000
-8200030102018100010b010100020101020000
-8200030102018100010b010100020101020000
-8200030103010e00020101020000
-8200030104010c00030101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-8200030217020000
-81000218020000
-81020018000002
-
-%
-% Compression made this file 15.35% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-\chapter{Change log}\label{changes}
-\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
-\setfooter{\thepage}{}{}{}{}{\thepage}%
-
-April 22nd, 2000 Version 2.1
-
-\begin{itemize}\itemsep=0pt
-\item Various bug fixes.
-\item Added buttons for distributing space horizontally and vertically, and
-for copying width and height independently.
-\item Added 'Convert old resources' facility.
-\end{itemize}
-
-December 31st 1998, Version 2.0
-
-\begin{itemize}\itemsep=0pt
-\item wxWindows 2.0 port.
-\item Major user interface changes.
-\item Allows identifiers to be edited and reads/writes an id header file.
-\end{itemize}
-
-March 15th 1997, Version 1.7
-
-\begin{itemize}\itemsep=0pt
-\item Added fix to wx\_rprop.cpp to avoid Fafa bitmap buttons growing every time the
-button edited.
-\item Added fix to wx\_resed.cpp, case wxID\_EXIT, to clean up properly on exit, avoiding double deletion of wxBitmap.
-\end{itemize}
-
-May 6th 1996, Version 1.6
-
-\begin{itemize}\itemsep=0pt
-\item Added panel editing in addition to dialog box editing.
-\item Cured some bugs with changing window styles such as wxUSER\_COLOURS and label position.
-\item Now preserves syntax of bitmap resources in wxr files.
-\end{itemize}
-
-March 1996, Version 1.5
-
-\begin{itemize}\itemsep=0pt
-\item Changed behaviour of New tool, and changed File menu to include New project and New dialog items.
-Behaviour should be more standard now.
-\end{itemize}
-
-March 1st 1996, Version 1.4
-
-\begin{itemize}\itemsep=0pt
-\item Items (but not dialogs) can now have duplicate names.
-\item Can pass a filename to the program from the command line.
-\item Cured bizarre error caused by a Windows combobox sending
-a fake left-mouse-up error when losing the focus (switching to another
-window). This fix will be in wxWindows 1.66.
-\item Rewritten code to use only the new type system, and to take account of
-of new window style partitioning (flags for different items may have the same value).
-Again, wxWindows 1.66 will have the new style values, to make room for more window
-styles.
-\end{itemize}
-
-January 28th 1996, Version 1.2
-
-\begin{itemize}\itemsep=0pt
-\item Now starts off in non-user-colour mode under Windows
-\item Dragging item drags other selected items
-\item wxMessage saves size correctly, if used in conjunction with wxWin 1.66
-\end{itemize}
-
-January 19th 1996, Version 1.1
-
-\begin{itemize}\itemsep=0pt
-\item Cured crash bug when quitting dialog window
-\item Added Clear menu item
-\item Added window type name to property window
-\end{itemize}
-
-December 19th 1995, Version 1.0
-
-\begin{itemize}\itemsep=0pt
-\item First release.
-\end{itemize}
-
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: check.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 375 282 403
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 375 translate
-
-% size of image (on paper, in 1/72inch coords)
-28 28 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 12 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 808080 ffffff
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-28 28 8 % dimensions of data
-[28 0 0 -28 0 28] % mapping matrix
-rlecmapimage
-
-81020018000002
-8100031703810200
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-8200030103010c00040101020000
-820003010301010008010100040101020000
-820003010301830001000105018300010001030101020000
-82000301030181000182010001030181000182010001030101020000
-820003010301810001010181000101018100010101810001030101020000
-820003010301810001020183000100010201810001030101020000
-82000301030181000103018100010301810001030101020000
-820003010301810001020183000100010201810001030101020000
-820003010301810001010181000101018100010101810001030101020000
-82000301030181000182010001030181000182010001030101020000
-820003010301830001000105018300010001030101020000
-820003010301010008010100040101020000
-8200030103010c00040101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-8200030217020000
-81000218020000
-81020018000002
-
-%
-% Compression made this file 18.88% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: choice.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 375 282 403
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 375 translate
-
-% size of image (on paper, in 1/72inch coords)
-28 28 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 12 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 808080 ffffff
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-28 28 8 % dimensions of data
-[28 0 0 -28 0 28] % mapping matrix
-rlecmapimage
-
-81020018000002
-8100031703810200
-82000301150101020000
-82000301150101020000
-82000301150101020000
-820003018101001200810102810200
-82000301820100010a01010002010100810102810200
-82000301820100010a0102008101000100810102810200
-82000301820100010a010600810102810200
-820003018101001200810102810200
-8200030101018100010901810001030182000102810200
-8200030101018100010901810001820100018301000102810200
-82000301010182000100050002018200010001008301000102810200
-8200030101018100010901810001030182000102810200
-8200030101018100010901810001030182000102810200
-8200030101018200010007008101000500810102810200
-8200030101018100010901810001030182000102810200
-8200030101018100010901810001030182000102810200
-82000301010182000100060001018200010001008301000102810200
-8200030101018100010901810001820100018301000102810200
-8200030101018100010901810001030182000102810200
-8200030101011200810102810200
-82000301150101020000
-82000301150101020000
-82000301150101020000
-8200030217020000
-81000218020000
-81020018000002
-
-%
-% Compression made this file 20.11% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-\chapter{Alphabetical class reference}\label{classref}
-\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
-\setfooter{\thepage}{}{}{}{}{\thepage}%
-
-To be written.
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: copysize.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 389 270 404
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 389 translate
-
-% size of image (on paper, in 1/72inch coords)
-16 15 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 9 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 ffff00
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-16 15 8 % dimensions of data
-[16 0 0 -15 0 15] % mapping matrix
-rlecmapimage
-
-0f01
-090081010001000101
-810002060281000101018100010001
-810002060281000101018100010001
-8100020602820001000300
-810002060281000181010001000001
-090002018100010001
-0f01
-03018b000100010001000100010001
-0f01
-0301810001810100040082010001
-060181000202028100010101
-0301810001810100040082010001
-0f01
-03018b000100010001000100010001
-
-%
-% Compression made this file 21.11% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: dialog.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 375 282 403
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 375 translate
-
-% size of image (on paper, in 1/72inch coords)
-28 28 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 15 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 bf0000 c0c0c0 808080 ffffff
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-28 28 8 % dimensions of data
-[28 0 0 -28 0 28] % mapping matrix
-rlecmapimage
-
-81030018000003
-8100041704810300
-82000402150201030000
-820004028102011101010201030000
-8200040294020100010001000100010001000100010001000102810203810300
-820004028102011001810002810203810300
-82000402820200020f02810002810203810300
-82000402820200020f02810002810203810300
-82000402820200028102000b000102810002810203810300
-820004028202000282020004090481000282020002810203810300
-820004028202000282020004090481000282020002810203810300
-820004028202000282020004090481000282020002810203810300
-82000402820200028102000b000102810002810203810300
-82000402820200020f02810002810203810300
-82000402820200020f02810002810203810300
-82000402820200020f02810002810203810300
-8200040283020002000500810200050082020002810203810300
-820004028402000200030303830002000303038300020002810203810300
-820004028402000200030303830002000303038300020002810203810300
-8200040283020002000500810200050082020002810203810300
-82000402820200020f02810002810203810300
-820004028102001100010201030000
-82000402150201030000
-82000402150201030000
-82000402150201030000
-8200040317030000
-81000318030000
-81030018000003
-
-%
-% Compression made this file 21.77% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-[OPTIONS]
-BMROOT=. ; Assume that bitmaps are where the source is
-TITLE=Dialog Editor Manual
-CONTENTS=Contents
-COMPRESS=HIGH
-
-[FILES]
-dialoged.rtf
-
-[CONFIG]
-CreateButton("Up", "&Up", "JumpId(`dialoged.hlp', `Contents')")
-BrowseButtons()
-
-[MAP]
-
-[BITMAPS]
-
+++ /dev/null
-\documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report}
-\input psbox.tex
-% Remove this for processing with dvi2ps instead of dvips
-%\special{!/@scaleunit 1 def}
-\parskip=10pt
-\parindent=0pt
-\title{User Manual for Dialog Editor Version 2.1}
-\winhelpignore{\author{Julian Smart, Anthemion Software}
-\date{April 2000}
-}
-\makeindex
-\begin{document}
-\maketitle
-\pagestyle{fancyplain}
-\bibliographystyle{plain}
-\setheader{{\it CONTENTS}}{}{}{}{}{{\it CONTENTS}}
-\setfooter{\thepage}{}{}{}{}{\thepage}%
-\pagenumbering{roman}
-\tableofcontents
-
-\chapter*{Copyright notice}
-\setheader{{\it COPYRIGHT}}{}{}{}{}{{\it COPYRIGHT}}%
-\setfooter{\thepage}{}{}{}{}{\thepage}%
-
-\begin{center}
-Copyright (c) 2000 Julian Smart, Anthemion Software
-\end{center}
-
-Please see the wxWindows licence for conditions of use.
-
-\input{body.tex}
-\input{changes.tex}
-\input{bugs.tex}
-\input{tech.tex}
-
-%\newpage
-%
-% Note: In RTF, the \printindex must come before the
-% change of header/footer, since the \printindex inserts
-% the RTF \sect command which divides one chapter from
-% the next.
-\rtfonly{\printindex
-\addcontentsline{toc}{chapter}{Index}
-\setheader{{\it INDEX}}{}{}{}{}{{\it INDEX}}%
-\setfooter{\thepage}{}{}{}{}{\thepage}%
-}
-\end{document}
-
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: gauge.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 375 282 403
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 375 translate
-
-% size of image (on paper, in 1/72inch coords)
-28 28 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 15 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 bf0000 c0c0c0 808080 ffffff
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-28 28 8 % dimensions of data
-[28 0 0 -28 0 28] % mapping matrix
-rlecmapimage
-
-81030018000003
-8100041704810300
-82000402150201030000
-82000402150201030000
-8200040204020a00050201030000
-8200040204028100020702810002040201030000
-8200040204028100020702810002040201030000
-8200040204028100020702810002040201030000
-8200040204028100020702810002040201030000
-8200040204028100020702810002040201030000
-8200040204028100020702810002040201030000
-8200040204028100010701810002040201030000
-8200040204028100010701810002040201030000
-8200040204028100010701810002040201030000
-8200040204028100010701810002040201030000
-8200040204028100010701810002040201030000
-8200040204028100010701810002040201030000
-8200040204028100010701810002040201030000
-8200040204028100010701810002040201030000
-8200040204028100010701810002040201030000
-8200040204028100010701810002040201030000
-8200040204028100010701810002040201030000
-8200040204020a00050201030000
-82000402150201030000
-82000402150201030000
-8200040317030000
-81000318030000
-81030018000003
-
-%
-% Compression made this file 18.92% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: group.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 292 382 320 410
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-292 382 translate
-
-% size of image (on paper, in 1/72inch coords)
-28 28 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 12 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 808080 ffffff
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-28 28 8 % dimensions of data
-[28 0 0 -28 0 28] % mapping matrix
-rlecmapimage
-
-81020018000002
-8100031703810200
-82000301150101020000
-82000301150101020000
-820003010301880001000100010001000100060101020000
-82000301040181000184010001000182010001060101020000
-820003018101008100018201000101018100018201000101010300010101020000
-82000301820100018401000100018201000181010001000301810001810102810200
-82000301820100010f01810001810102810200
-82000301820100010f01810001810102810200
-82000301820100010f01810001810102810200
-82000301820100010f01810001810102810200
-82000301820100010f01810001810102810200
-82000301820100010f01810001810102810200
-82000301820100010f01810001810102810200
-82000301820100010f01810001810102810200
-82000301820100010f01810001810102810200
-82000301820100010f01810001810102810200
-82000301820100010f01810001810102810200
-82000301820100010f01810001810102810200
-82000301820100010f01810001810102810200
-82000301820100010f01810001810102810200
-820003018101001100010101020000
-82000301150101020000
-82000301150101020000
-8200030217020000
-81000218020000
-81020018000002
-
-%
-% Compression made this file 20.15% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: help.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 389 270 404
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 389 translate
-
-% size of image (on paper, in 1/72inch coords)
-16 15 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 9 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 008080 c0c0c0
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-16 15 8 % dimensions of data
-[16 0 0 -15 0 15] % mapping matrix
-rlecmapimage
-
-0f02
-040205000402
-0302810001030101000302
-02028100018101000100010101000202
-02028200010081000283020001008100020102
-02028200010083000200018101008100020102
-03020100820200018101008100020202
-05028100018101008100020302
-0502820001008100020402
-0502820001008100020402
-0502820001008100020402
-060201000602
-05028100018101008100020302
-05028100018101008100020302
-060202000502
-
-%
-% Compression made this file 24.03% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: horiz.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 389 270 404
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 389 translate
-
-% size of image (on paper, in 1/72inch coords)
-16 15 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 9 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 ffff00
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-16 15 8 % dimensions of data
-[16 0 0 -15 0 15] % mapping matrix
-rlecmapimage
-
-0f01
-050104000401
-050181000201028100010301
-050181000201028100010301
-050181000201028100010301
-050104000401
-0f01
-0f01
-02010a000101
-020181000207028100010001
-020181000207028100010001
-020181000207028100010001
-020181000207028100010001
-02010a000101
-0f01
-
-%
-% Compression made this file 16.11% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: listbox.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 292 382 320 410
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-292 382 translate
-
-% size of image (on paper, in 1/72inch coords)
-28 28 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 12 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 808080 ffffff
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-28 28 8 % dimensions of data
-[28 0 0 -28 0 28] % mapping matrix
-rlecmapimage
-
-81020018000002
-8100031703810200
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-820003018101001100010101020000
-820003018201000109018100010301810001810102810200
-820003018201000109018100018201000182010001810102810200
-8200030183010001000500020182000100010082010001810102810200
-820003018201000109018100010301810001810102810200
-820003018201000109018100010301810001810102810200
-82000301830100010007008101000500010101020000
-820003018201000109018100010301810001810102810200
-820003018201000109018100010301810001810102810200
-8200030183010001000600010182000100010082010001810102810200
-820003018201000109018100018201000182010001810102810200
-820003018201000109018100010301810001810102810200
-820003018101001100010101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-8200030217020000
-81000218020000
-81020018000002
-
-%
-% Compression made this file 5.09% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: load.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 389 270 404
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 389 translate
-
-% size of image (on paper, in 1/72inch coords)
-16 15 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 15 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 808000 c0c0c0 ffff00 ffffff
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-16 15 8 % dimensions of data
-[16 0 0 -15 0 15] % mapping matrix
-rlecmapimage
-
-0f02
-090202000202
-0802810002010282000200
-0d020100
-0102020007020200
-8502000304030005000302
-8c020004030403040304030400020202
-8c020003040304030403040300020202
-86020004030403000800
-860200030403000107010000
-82020004820400010701810002
-84020003000107018100020002
-81020081000107018100020102
-81020009000302
-0f02
-
-%
-% Compression made this file 20.00% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: message.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 375 282 403
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 375 translate
-
-% size of image (on paper, in 1/72inch coords)
-28 28 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 12 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 808080 ffffff
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-28 28 8 % dimensions of data
-[28 0 0 -28 0 28] % mapping matrix
-rlecmapimage
-
-81020018000002
-8100031703810200
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-820003010901810001090101020000
-8200030108010200090101020000
-8200030108010200090101020000
-820003010701820001000100080101020000
-820003010701820001000100080101020000
-82000301060181000101010200070101020000
-82000301060181000101010200070101020000
-82000301050181000103010200060101020000
-8200030105010800060101020000
-82000301040181000105010200050101020000
-82000301040181000105010200050101020000
-82000301030181000107010200040101020000
-820003010201010008010300030101020000
-820003010101030006010500020101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-8200030217020000
-81000218020000
-81020018000002
-
-%
-% Compression made this file 15.73% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: mtext.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 375 282 403
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 375 translate
-
-% size of image (on paper, in 1/72inch coords)
-28 28 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 12 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 808080 ffffff
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-28 28 8 % dimensions of data
-[28 0 0 -28 0 28] % mapping matrix
-rlecmapimage
-
-81020018000002
-8100031703810200
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-820003018101001200810102810200
-820003018201000105018100010601010382000102810200
-82000301820100010101010001018100010601010382000102810200
-8200030182010001020181000181010002000401010282000102810200
-820003018201000181010001000101810001820100010301010282000102810200
-820003018201000184010001000182010001820100010301010282000102810200
-8200030182010001810100010081010003000401010282000102810200
-82000301820100010e01010282000102810200
-820003018201000108018100010301010282000102810200
-820003018201000108018100010301010282000102810200
-82000301820100018101000100010103000401010282000102810200
-8200030182010001820100010201810001820100010301010282000102810200
-8200030182010001820100010201810001820100010301010282000102810200
-82000301820100018101000100010104000301010382000102810200
-82000301820100010e01010382000102810200
-820003018101001200810102810200
-82000301150101020000
-82000301150101020000
-82000301150101020000
-8200030217020000
-81000218020000
-81020018000002
-
-%
-% Compression made this file 22.07% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: new.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 389 270 404
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 389 translate
-
-% size of image (on paper, in 1/72inch coords)
-16 15 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 9 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 ffffff
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-16 15 8 % dimensions of data
-[16 0 0 -15 0 15] % mapping matrix
-rlecmapimage
-
-0f01
-020107000401
-0201810002040201000301
-0201810002040283000200010101
-0201810002040203000101
-020181000207028100010001
-020181000207028100010001
-020181000207028100010001
-020181000207028100010001
-020181000207028100010001
-020181000207028100010001
-020181000207028100010001
-020181000207028100010001
-02010a000101
-0f01
-
-%
-% Compression made this file 20.56% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-
-To do
------
-
-Nov 26th 1995
-
- - Add wxPropertyView::OnPropertyChange(wxProperty *property) member
- so that when a property is changed, this can be immediately
- reflected in the object. Derive a new wxPropertyListView
- in dialoged.
-
- - Make the property list a modeless dialog or (preferably) resizeable
- frame. Allow many property lists to be up at once. Associate
- real window, resource and property list. When window is deleted,
- delete property list.
-
\ No newline at end of file
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: open.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 389 270 404
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 389 translate
-
-% size of image (on paper, in 1/72inch coords)
-16 15 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 12 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 808080 ffffff
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-16 15 8 % dimensions of data
-[16 0 0 -15 0 15] % mapping matrix
-rlecmapimage
-
-0f01
-090102000201
-0801810001010182000100
-0d010100
-0101020007010200
-82010003010306000301
-8201000307038100010201
-8201000307038100010201
-8201000302030900
-82010003010381000207020000
-82010003820300020702810001
-84010003000281020081000203028100010001
-81010081000207028100010101
-81010009000301
-0f01
-
-%
-% Compression made this file 19.17% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: picture.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 375 282 403
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 375 translate
-
-% size of image (on paper, in 1/72inch coords)
-28 28 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 12 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 808080 ffffff
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-28 28 8 % dimensions of data
-[28 0 0 -28 0 28] % mapping matrix
-rlecmapimage
-
-81020018000002
-8100031703810200
-82000301150101020000
-82000301150101020000
-82000301150101020000
-820003018101001100010101020000
-82000301820100010f01810001810102810200
-82000301820100010201810001040102000201810001810102810200
-8200030182010001010183000100010201810001010181000182010001810102810200
-820003018201000181010083000100010201810001010181000182010001810102810200
-
-82000301880100010001000100010201810001010181000182010001810102810200
-82000301870100010001000100810001020102000201810001810102810200
-820003018a01000100010001000100010701810001810102810200
-8200030182010001820100018401000100010701810001810102810200
-8200030181010002000101820001000900010101020000
-82000301820100010101810001820100010801810001810102810200
-820003018201000101018300010001810100810001810100810001010181000181010281
-0200
-8200030182010001010185000100010001820100010401810001810102810200
-8200030182010001810100020081010003000101010082010001810102810200
-82000301830100010001000c01810001810102810200
-820003018101001100010101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-8200030217020000
-81000218020000
-81020018000002
-
-%
-% Compression made this file 23.43% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: radio.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 375 282 403
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 375 translate
-
-% size of image (on paper, in 1/72inch coords)
-28 28 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 12 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 808080 ffffff
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-28 28 8 % dimensions of data
-[28 0 0 -28 0 28] % mapping matrix
-rlecmapimage
-
-81020018000002
-8100031703810200
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-8200030107010400080101020000
-820003010501010004010100060101020000
-8200030104018100010701810001040101020000
-8200030103018100010901810001030101020000
-820003010301810001020102000301810001030101020000
-820003010201810001020104000301810001020101020000
-820003010201810001010106000201810001020101020000
-820003010201810001010106000201810001020101020000
-820003010201810001010106000201810001020101020000
-820003010201810001020104000301810001020101020000
-820003010301810001020102000301810001030101020000
-8200030103018100010901810001030101020000
-8200030104018100010701810001040101020000
-820003010501010004010100060101020000
-8200030107010400080101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-8200030217020000
-81000218020000
-81020018000002
-
-%
-% Compression made this file 18.24% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-
-Prototype dialog editor and property sheet classes
---------------------------------------------------
-
-Julian Smart, October 4th 1995
-------------------------------
-
-Here's what I've done so far on a lightweight dialog editor. The 16-bit
-Windows binaries in the bin directory are dialoged.exe (the dialog
-editor) and test.exe (a small property sheet demo).
-
-Main points:
-
- - You can create a new dialog box and add items to it.
- - You can move items around, and right-click
- to edit a few properties (very incomplete).
- - Can't write out .wxr files yet. Loading code is in
- wxWindows, but writing code is absent: should be put
- into wxWindows.
- - No attempt at resources other than dialogs yet.
- Should have menu editor too.
- - Should *somehow* have a protocol to allow
- existing resources e.g. in wxCLIPS/wxPython
- to be edited in situ.
- This should be made simpler by the existance of
- the plug-in event handler mechanism, which means you
- can temporarily handle all the events yourself.
- - See dialoged.cc: the main program is tiny because
- it's meant to be embeddable.
- - The wxPropertySheet (set of) classes are very
- general and should be put into wxWin and documented.
-
-Comments, chivvying and help all appreciated. Maybe if
-I documented what I had, it would be easier for others
-to do some work on it.
-
-Regards,
-
-Julian
\ No newline at end of file
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: save.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 389 270 404
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 389 translate
-
-% size of image (on paper, in 1/72inch coords)
-16 15 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 9 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 808080
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-16 15 8 % dimensions of data
-[16 0 0 -15 0 15] % mapping matrix
-rlecmapimage
-
-0f01
-8101000c000001
-84010002000106018300010001
-840100020001060102000001
-84010002000106018300020001
-84010002000106018300020001
-84010002000106018300020001
-84010002000106018300020001
-8201000281020006000102810001
-820100020a02810001
-82010002810200070082020001
-82010002810200040001018300020001
-82010002810200040001018300020001
-82010002810200040001018300020001
-01010c000001
-
-%
-% Compression made this file 24.44% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: scroll.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 375 282 403
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 375 translate
-
-% size of image (on paper, in 1/72inch coords)
-28 28 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 12 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 808080 ffffff
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-28 28 8 % dimensions of data
-[28 0 0 -28 0 28] % mapping matrix
-rlecmapimage
-
-81020018000002
-8100031703810200
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-83000301001300810102810200
-8400030100010701810001070182000102810200
-8400030100010701810001070182000102810200
-840003010001020181000102018100010201810001020182000102810200
-8400030100010101030001018100018101000200020182000102810200
-840003010001810100030001018100018101000300010182000102810200
-8400030100010101030001018100018101000200020182000102810200
-840003010001020181000102018100010201810001020182000102810200
-8400030100010701810001070182000102810200
-8400030100010701810001070182000102810200
-83000301001300810102810200
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-8200030217020000
-81000218020000
-81020018000002
-
-%
-% Compression made this file 17.47% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: slider.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 375 282 403
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 375 translate
-
-% size of image (on paper, in 1/72inch coords)
-28 28 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 12 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 808080 ffffff
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-28 28 8 % dimensions of data
-[28 0 0 -28 0 28] % mapping matrix
-rlecmapimage
-
-81020018000002
-8100031703810200
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-83000301008100010b0101008101000100810102810200
-82000301820100010c018600010001000102810200
-82000301820100010c018600010001000102810200
-830003010001000b010500810102810200
-82000301150101020000
-83000301001300810102810200
-840003010001020101020c0181000201020000
-840003010001020101000c0181000201020000
-840003010001020101000c0181000201020000
-840003010001020101020c0181000201020000
-8300030100130002020000
-8200030181010215020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-8200030217020000
-81000218020000
-81020018000002
-
-%
-% Compression made this file 14.88% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-\chapter{Technical notes}\label{technotes}
-\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
-\setfooter{\thepage}{}{}{}{}{\thepage}%
-
-\section{Overview}
-
-The dialog editor is written as a library, to be invoked by other programs. As you can see,
-dialoged.cc is a very small program which invokes the main window via a wxResourceManager
-object. The wxResourceManager object controls the user interface and other aspects
-of the dialog editor.
-
-There is wxResourceTable object in wxResourceManager: this contains a list of
-all the wxItemResources currently being edited. wxResourceTable and wxItemResource
-are classes already in wxWindows, defined in wx\_res.h. In order to edit a new
-dialog box, the dialog is created, and the existing event handler is temporarily replaced
-with a new one which defines editing functionality. This allows existing dialogs - even
-instances of subclasses of wxDialogBox - to be edited, the application-specific functionality
-being temporarily taken over by the dialog editor.
-
-In order to edit the properties of a dialog box or item, a property list editor is invoked.
-This uses the property classes from utils/wxprop. In order to map between properties and the
-actual window API, such as SetSize and GetSize, a `proxy' class called wxPropertyInfo
-has been defined, with a subclass for each class of wxWindows window to be edited.
-This class defines the main members SetProperty, GetProperty, GetPropertyNames,
-which transform the normal API into `property' terms.
-
-Properties are mostly extracted directly from the window being edited. This is
-in contrast with wxBuilder, where everything is stored in a set of parallel
-data structures, and windows `properties' only only set. However, there
-are exceptions to this rule in the dialog editor. There {\it is} in fact a set of
-parallel objects, the wxItemResource objects which can be seen listed in
-the main Dialog Editor window as a dialog is built up. These usually parallel
-the properties in the windows, but occasionally this is not possible. For example,
-all dialog boxes being edited must be modeless: or the user would not be
-able to access other windows. However, the user must be able to specify that
-when used in an application, that dialog box will be modal. In this case,
-the value in the wxItemResource will not match that in the actual dialog box.
-
-There is a major problem with taking values directly from the windows: this
-information sometimes does not match what went in. In Motif and XView,
-size values returned are not the same as those given. This causes speedy
-`degeneration' of window properties. Under Windows, properties are almost
-always consistent. The other platforms will need to be catered for by
-relying more on the wxItemResource objects, and not taking size
-information directly from windows.
-
-\subsection{Dynamic setting versus recreation}
-
-The property editor scheme relies on being able to set window properties
-dynamically: the user changes a value, and the window changes immediately
-to reflect the new value. Unfortunately, not all properties can be
-changed dynamically in wxWindows; for example, in Motif, the label position
-must be given at panel item creation time, because the way the widgets
-are laid out depend on the label position. The label position cannot then
-be changed without deleting and recreating the item.
-
-Hence the dialog editor takes two approaches: where values are dynamically
-settable, this is done. Where they are not, the item is deleted and recreated,
-after all existing values have been transferred into the parallel wxItemResource
-object. Therefore in wx\_rprop.cc, some of the SetProperty implementations have one or
-more call to RecreateWindowFromResource.
-
-\section{Resource associations}
-
-wxItemResource objects (containing information about panel items and dialogs) are not visual
-objects. However, they need to be associated with the visual objects when the latter
-are created for editing purposes. Therefore there is a hash table called resourceAssociations
-in wxResourceManager. When a window is created, the resource pointer and window pointer
-are associated via the hash table. When the window is deleted, the association is removed.
-Children of a dialog are associated with child wxItemResource objects by calling
-wxFindWindowByName with the wxItemResource name.
-
-\section{What needs to be done for XView and Motif}
-
-The following areas need attention before Dialog Editor will run properly on these platforms.
-
-\begin{enumerate}\itemsep=0pt
-\item For XView, the property editor needs to be made a modeless, not modal dialog, which has
-implications for flow of control in wxPropertyInfo::Edit.
-\item Properties which do not return the same value they are set to, such as width and height,
-need to be stored directly in wxItemResource and {\it not} transferred from window to wxItemResource
-in wxWindowPropertyInfo::InstantiateResource.
-\item Properties which cannot be dynamically set in XView or Motif need to have the item recreated (e.g. labelOrientation).
-\end{enumerate}
-
-\section{Files}
-
-The Dialog Editor source files are as follows:
-
-\begin{itemize}\itemsep=0pt
-\item wx\_rprop.h, wx\_rprop.cc: handle property setting and getting through the `proxy' wxPropertyInfo
-classes and using the property list editor from utils/wxprop.
-\item wx\_resed.h, wx\_resed.cc: the main implementation, in particular the wxResourceManager class.
-\item wx\_reswr.cc: resource writing code.
-\item wx\_repal.cc: the dialog editor palette implementation.
-\item dialoged.h, dialoged.cc: small `stub' for invoking the user interface via a wxResourceManager object.
-\end{itemize}
+++ /dev/null
-runTwice = yes
-titleFontSize = 12
-authorFontSize = 10
-chapterFontSize = 12
-sectionFontSize = 12
-subsectionFontSize = 12
-headerRule = yes
-footerRule = yes
-useHeadingStyles = yes
-contentsDepth = 2
-listItemIndent=40
-generateHPJ = no
-htmlBrowseButtons = bitmap
-winHelpVersion = 3
-winHelpContents = yes
-winHelpTitle = "Dialog Editor Manual"
-;;
-;; These two are for generating MS HTML Help project, contents and index files.
-;;
-htmlWorkshopFiles = true
-htmlIndex = true
-truncateFilenames = yes
-\overview [2] { \sethotspotcolour{off}\sethotspotunderline{on}\winhelponly{\image{}{books.bmp}}
-\htmlonly{\image{}{books.gif}}\helpref{#1}{#2}
-\sethotspotcolour{on}\sethotspotunderline{on}}
-\icon [2] {\xlpignore{\image{2cm;0cm}{#1}}\xlponly{#2}}
-
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: text.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 375 282 403
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 375 translate
-
-% size of image (on paper, in 1/72inch coords)
-28 28 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 12 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 808080 ffffff
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-28 28 8 % dimensions of data
-[28 0 0 -28 0 28] % mapping matrix
-rlecmapimage
-
-81020018000002
-8100031703810200
-82000301150101020000
-82000301150101020000
-82000301150101020000
-82000301150101020000
-820003018101001200810102810200
-8200030182010001100182000102810200
-82000301820100010e01840001000102810200
-8200030182010001060101000501840001000102810200
-8200030182010001060101000501840001000102810200
-8200030182010001060101000501840001000102810200
-82000301820100018101000200010104000201840001000102810200
-820003018301000100810001810100820001008100018101008100018501000100010281
-0200
-82000301820100010101030081010081000181010081000185010001000102810200
-820003018201000181010082000100820001008100018101008100018501000100010281
-0200
-820003018301000100810001810100820001008100018101008100018501000100010281
-0200
-820003018301000100810001810100820001008100018101008100018501000100010281
-0200
-8200030182010001810100030081010003000201840001000102810200
-82000301820100010e01840001000102810200
-8200030182010001100182000102810200
-820003018101001200810102810200
-82000301150101020000
-82000301150101020000
-82000301150101020000
-8200030217020000
-81000218020000
-81020018000002
-
-%
-% Compression made this file 22.15% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: toback.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 389 270 404
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 389 translate
-
-% size of image (on paper, in 1/72inch coords)
-16 15 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 12 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 808080 ffff00
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-16 15 8 % dimensions of data
-[16 0 0 -15 0 15] % mapping matrix
-rlecmapimage
-
-81010005000701
-8201000203028100010601
-82010002030205000201
-82010002030281000302038100010101
-82010002030281000302038100010101
-82010002030281000302038100010101
-810100050003038100010101
-030181000302030600
-0301810003020381000203020000
-0301810003020381000203020000
-0301050004020000
-080181000203020000
-080181000203020000
-08010600
-0f01
-
-%
-% Compression made this file 21.81% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: tofront.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 389 270 404
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 389 translate
-
-% size of image (on paper, in 1/72inch coords)
-16 15 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 12 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 808080 ffff00
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-16 15 8 % dimensions of data
-[16 0 0 -15 0 15] % mapping matrix
-rlecmapimage
-
-81010005000701
-8201000203028100010601
-8201000281020007000201
-820100028202000305038100010101
-820100028202000305038100010101
-820100028202000305038100010101
-810100020006038100010101
-030181000305030300
-03018100030503810002810200
-03018100030503810002810200
-0301080001020000
-080181000203020000
-080181000203020000
-08010600
-0f01
-
-%
-% Compression made this file 21.25% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: vert.eps
-%%Creator: XV Version 2.20 Rev: 4/24/92 - by John Bradley
-%%BoundingBox: 254 389 270 404
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% lower left corner
-254 389 translate
-
-% size of image (on paper, in 1/72inch coords)
-16 15 scale
-
-% define 'colorimage' if it isn't defined
-% ('colortogray' and 'mergeprocs' come from xwd2ps
-% via xgrab)
-/colorimage where % do we know about 'colorimage'?
- { pop } % yes: pop off the 'dict' returned
- { % no: define one
- /colortogray { % define an RGB->I function
- /rgbdata exch store % call input 'rgbdata'
- rgbdata length 3 idiv
- /npixls exch store
- /rgbindx 0 store
- /grays npixls string store % str to hold the result
- 0 1 npixls 1 sub {
- grays exch
- rgbdata rgbindx get 20 mul % Red
- rgbdata rgbindx 1 add get 32 mul % Green
- rgbdata rgbindx 2 add get 12 mul % Blue
- add add 64 idiv % I = .5G + .31R + .18B
- put
- /rgbindx rgbindx 3 add store
- } for
- grays
- } bind def
-
- % Utility procedure for colorimage operator.
- % This procedure takes two procedures off the
- % stack and merges them into a single procedure.
-
- /mergeprocs { % def
- dup length
- 3 -1 roll
- dup
- length
- dup
- 5 1 roll
- 3 -1 roll
- add
- array cvx
- dup
- 3 -1 roll
- 0 exch
- putinterval
- dup
- 4 2 roll
- putinterval
- } bind def
-
- /colorimage { % def
- pop pop % remove 'false 3' operands
- {colortogray} mergeprocs
- image
- } bind def
- } ifelse % end of 'false' case
-
-
-
-% define the colormap
-/cmap 9 string def
-
-
-% load up the colormap
-currentfile cmap readhexstring
-000000 c0c0c0 ffff00
-pop pop % lose return values from readhexstring
-
-
-% rlecmapimage expects to have 'w h bits matrix' on stack
-/rlecmapimage {
- /buffer 1 string def
- /rgbval 3 string def
- /block 384 string def
-
- % proc to read a block from file, and return RGB data
- { currentfile buffer readhexstring pop
- /bcount exch 0 get store
- bcount 128 ge
- { % it's a non-run block
- 0 1 bcount 128 sub
- { currentfile buffer readhexstring pop pop
-
- % look up value in color map
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- % and put it in position i*3 in block
- block exch 3 mul rgbval putinterval
- } for
- block 0 bcount 127 sub 3 mul getinterval
- }
-
- { % else it's a run block
- currentfile buffer readhexstring pop pop
-
- % look up value in colormap
- /rgbval cmap buffer 0 get 3 mul 3 getinterval store
-
- 0 1 bcount { block exch 3 mul rgbval putinterval } for
-
- block 0 bcount 1 add 3 mul getinterval
- } ifelse
- } % end of proc
- false 3 colorimage
-} bind def
-
-
-16 15 8 % dimensions of data
-[16 0 0 -15 0 15] % mapping matrix
-rlecmapimage
-
-0f01
-07010700
-070181000204020000
-070181000204020000
-8101000300010181000204020000
-8201000201028100018201000204020000
-8201000201028100018201000204020000
-8201000201028100018201000204020000
-8201000201028100018201000204020000
-8101000300010181000204020000
-070181000204020000
-070181000204020000
-07010700
-0f01
-0f01
-
-%
-% Compression made this file 20.28% of the uncompressed size.
-%
-
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
+++ /dev/null
-# Microsoft Developer Studio Project File - Name="DialogEdVC" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Application" 0x0101
-
-CFG=DialogEdVC - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "DialogEdVC.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "DialogEdVC.mak" CFG="DialogEdVC - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "DialogEdVC - Win32 Release" (based on "Win32 (x86) Application")
-!MESSAGE "DialogEdVC - Win32 Debug" (based on "Win32 (x86) Application")
-!MESSAGE "DialogEdVC - Win32 Debug DLL" (based on "Win32 (x86) Application")
-!MESSAGE "DialogEdVC - Win32 Release DLL" (based on "Win32 (x86) Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "DialogEdVC - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /I "../../../lib/msw" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD BASE RSC /l 0x809 /d "NDEBUG"
-# ADD RSC /l 0x809 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw.lib png.lib zlib.lib jpeg.lib tiff.lib wxdeprecated.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/dialoged.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib"
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /I "../../../lib/mswd" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD BASE RSC /l 0x809 /d "_DEBUG"
-# ADD RSC /l 0x809 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmswd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib wxdeprecatedd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/dialoged.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib"
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug DLL"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "DebugDLL"
-# PROP BASE Intermediate_Dir "DebugDLL"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "DebugDLL"
-# PROP Intermediate_Dir "DebugDLL"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /I "../../../lib/mswdlld" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD BASE RSC /l 0x809 /d "_DEBUG"
-# ADD RSC /l 0x809 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw250d.lib wxdeprecatedd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/dialoged.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib"
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Release DLL"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "ReleaseDLL"
-# PROP BASE Intermediate_Dir "ReleaseDLL"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "ReleaseDLL"
-# PROP Intermediate_Dir "ReleaseDLL"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /I "../../../lib/mswdll" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD BASE RSC /l 0x809 /d "NDEBUG"
-# ADD RSC /l 0x809 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw250.lib wxdeprecated.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/dialoged.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib"
-
-!ENDIF
-
-# Begin Target
-
-# Name "DialogEdVC - Win32 Release"
-# Name "DialogEdVC - Win32 Debug"
-# Name "DialogEdVC - Win32 Debug DLL"
-# Name "DialogEdVC - Win32 Release DLL"
-# Begin Source File
-
-SOURCE=.\dialoged.cpp
-
-!IF "$(CFG)" == "DialogEdVC - Win32 Release"
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug"
-
-# SUBTRACT CPP /YX /Yc /Yu
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug DLL"
-
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# SUBTRACT CPP /YX /Yc /Yu
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Release DLL"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\dialoged.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\dialoged.rc
-# ADD BASE RSC /l 0x809
-# ADD RSC /l 0x809 /i "../../../include" /i "../../../contrib/include"
-# End Source File
-# Begin Source File
-
-SOURCE=.\dlghndlr.cpp
-
-!IF "$(CFG)" == "DialogEdVC - Win32 Release"
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug"
-
-# SUBTRACT CPP /YX /Yc /Yu
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug DLL"
-
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# SUBTRACT CPP /YX /Yc /Yu
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Release DLL"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\dlghndlr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\edlist.cpp
-
-!IF "$(CFG)" == "DialogEdVC - Win32 Release"
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug"
-
-# SUBTRACT CPP /YX /Yc /Yu
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug DLL"
-
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# SUBTRACT CPP /YX /Yc /Yu
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Release DLL"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\edlist.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\edtree.cpp
-
-!IF "$(CFG)" == "DialogEdVC - Win32 Release"
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug"
-
-# SUBTRACT CPP /YX /Yc /Yu
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug DLL"
-
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# SUBTRACT CPP /YX /Yc /Yu
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Release DLL"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\edtree.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\reseditr.cpp
-
-!IF "$(CFG)" == "DialogEdVC - Win32 Release"
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug"
-
-# SUBTRACT CPP /YX /Yc /Yu
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug DLL"
-
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# SUBTRACT CPP /YX /Yc /Yu
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Release DLL"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\reseditr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\reswrite.cpp
-
-!IF "$(CFG)" == "DialogEdVC - Win32 Release"
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug"
-
-# SUBTRACT CPP /YX /Yc /Yu
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug DLL"
-
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# SUBTRACT CPP /YX /Yc /Yu
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Release DLL"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\symbtabl.cpp
-
-!IF "$(CFG)" == "DialogEdVC - Win32 Release"
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug"
-
-# SUBTRACT CPP /YX /Yc /Yu
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug DLL"
-
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# SUBTRACT CPP /YX /Yc /Yu
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Release DLL"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\symbtabl.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\winprop.cpp
-
-!IF "$(CFG)" == "DialogEdVC - Win32 Release"
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug"
-
-# SUBTRACT CPP /YX /Yc /Yu
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug DLL"
-
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# SUBTRACT CPP /YX /Yc /Yu
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Release DLL"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\winprop.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\winstyle.cpp
-
-!IF "$(CFG)" == "DialogEdVC - Win32 Release"
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug"
-
-# SUBTRACT CPP /YX /Yc /Yu
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug DLL"
-
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# SUBTRACT CPP /YX /Yc /Yu
-
-!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Release DLL"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\winstyle.h
-# End Source File
-# End Target
-# End Project
+++ /dev/null
-#
-# File: makefile.unx
-# Author: Julian Smart
-# Created: 1998
-# Updated:
-# Copyright: (c) 1998 Julian Smart
-#
-# "%W% %G%"
-#
-# Makefile for Tex2RTF (Unix)
-
-top_srcdir = @top_srcdir@/..
-top_builddir = ../../..
-program_dir = utils/dialoged/src
-APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_wxdeprecated-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@
-APPEXTRADEFS=-I$(top_srcdir)/contrib/include
-
-PROGRAM=DialogEd
-
-OBJECTS = dialoged.o dlghndlr.o edlist.o edtree.o reseditr.o reswrite.o symbtabl.o winprop.o winstyle.o
-DEPFILES= dialoged.d dlghndlr.d edlist.d edtree.d reseditr.d reswrite.d symbtabl.d winprop.d winstyle.d
-
-include ../../../src/makeprog.env
-
--include $(DEPFILES)
+++ /dev/null
-#define alignb_width 24
-#define alignb_height 24
-static char alignb_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0xf8, 0x07, 0x00, 0x08, 0x04, 0x00, 0x08, 0x04, 0x00, 0x08, 0x04,
- 0x00, 0x08, 0x04, 0x00, 0x08, 0x04, 0xf0, 0x09, 0x04, 0x10, 0x09, 0x04,
- 0x10, 0x09, 0x04, 0x10, 0x09, 0x04, 0x10, 0x09, 0x04, 0xf0, 0xf9, 0x07,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+++ /dev/null
-/* XPM */
-static char *alignb_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"16 15 3 1",
-" c None",
-". c Black",
-"X c Yellow",
-/* pixels */
-" ",
-" ........",
-" .XXXXXX.",
-" .XXXXXX.",
-" .XXXXXX.",
-" .XXXXXX.",
-" .XXXXXX.",
-" ..... .XXXXXX.",
-" .XXX. .XXXXXX.",
-" .XXX. .XXXXXX.",
-" .XXX. .XXXXXX.",
-" .XXX. .XXXXXX.",
-" ..... ........",
-" ",
-" "
-};
+++ /dev/null
-#define alignl_width 24
-#define alignl_height 24
-static char alignl_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xc0, 0x0f, 0x00, 0x40, 0x08, 0x00, 0x40, 0x08, 0x00, 0x40, 0x08, 0x00,
- 0xc0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x01,
- 0x40, 0x00, 0x01, 0x40, 0x00, 0x01, 0x40, 0x00, 0x01, 0x40, 0x00, 0x01,
- 0xc0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+++ /dev/null
-/* XPM */
-static char *alignl_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"16 15 3 1",
-" c None",
-". c Black",
-"X c Yellow",
-/* pixels */
-" ",
-" ...... ",
-" .XXXX. ",
-" .XXXX. ",
-" .XXXX. ",
-" ...... ",
-" ",
-" ",
-" ........... ",
-" .XXXXXXXXX. ",
-" .XXXXXXXXX. ",
-" .XXXXXXXXX. ",
-" .XXXXXXXXX. ",
-" ........... ",
-" "
-};
+++ /dev/null
-#define alignr_width 24
-#define alignr_height 24
-static char alignr_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0xf8, 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01,
- 0x00, 0xf8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x01,
- 0x40, 0x00, 0x01, 0x40, 0x00, 0x01, 0x40, 0x00, 0x01, 0x40, 0x00, 0x01,
- 0xc0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+++ /dev/null
-/* XPM */
-static char *alignr_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"16 15 3 1",
-" c None",
-". c Black",
-"X c Yellow",
-/* pixels */
-" ",
-" ...... ",
-" .XXXX. ",
-" .XXXX. ",
-" .XXXX. ",
-" ...... ",
-" ",
-" ",
-" ........... ",
-" .XXXXXXXXX. ",
-" .XXXXXXXXX. ",
-" .XXXXXXXXX. ",
-" .XXXXXXXXX. ",
-" ........... ",
-" "
-};
+++ /dev/null
-#define alignt_width 24
-#define alignt_height 24
-static char alignt_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xf0, 0xf9, 0x07, 0x10, 0x09, 0x04, 0x10, 0x09, 0x04, 0x10, 0x09, 0x04,
- 0x10, 0x09, 0x04, 0xf0, 0x09, 0x04, 0x00, 0x08, 0x04, 0x00, 0x08, 0x04,
- 0x00, 0x08, 0x04, 0x00, 0x08, 0x04, 0x00, 0x08, 0x04, 0x00, 0xf8, 0x07,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+++ /dev/null
-/* XPM */
-static char *alignt_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"16 15 3 1",
-" c None",
-". c Black",
-"X c Yellow",
-/* pixels */
-" ",
-" ..... ........",
-" .XXX. .XXXXXX.",
-" .XXX. .XXXXXX.",
-" .XXX. .XXXXXX.",
-" .XXX. .XXXXXX.",
-" ..... .XXXXXX.",
-" .XXXXXX.",
-" .XXXXXX.",
-" .XXXXXX.",
-" .XXXXXX.",
-" .XXXXXX.",
-" ........",
-" ",
-" "
-};
+++ /dev/null
-#define arrow_width 28
-#define arrow_height 28
-static char arrow_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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
- 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00,
- 0x00, 0x7c, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00,
- 0x00, 0xfc, 0x03, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00,
- 0x00, 0xc4, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00,
- 0x00, 0x80, 0x01, 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};
+++ /dev/null
-/* XPM */
-static char * arrow_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"16 16 2 1",
-/* colors */
-" s None c None",
-". c #000000",
-/* pixels */
-" ",
-" . ",
-" .. ",
-" ... ",
-" .... ",
-" ..... ",
-" ...... ",
-" ....... ",
-" ........ ",
-" ..... ",
-" .. .. ",
-" . .. ",
-" .. ",
-" .. ",
-" .. ",
-" "};
+++ /dev/null
-#define bmpbuttn_width 28
-#define bmpbuttn_height 28
-static char bmpbuttn_bits[] = {
- 0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,
- 0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,
- 0x00,0xf0,0x80,0xff,0x0f,0xf0,0x40,0x00,0x10,0xf0,0x40,0x84,0x31,0xf0,0x40,
- 0x44,0x32,0xf0,0x40,0x45,0x32,0xf0,0x40,0x8d,0x31,0xf0,0x40,0x09,0x30,0xf0,
- 0x40,0xfb,0x3f,0xf0,0x40,0x04,0x30,0xf0,0x40,0xc4,0x30,0xf0,0x80,0xff,0x3f,
- 0xf0,0x00,0xff,0x1f,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,
- 0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,
- 0x00,0x00,0xf0,0x00,0x00,0x00,0xf0};
+++ /dev/null
-/* XPM */
-static char * bmpbuttn_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"16 16 8 1",
-/* colors */
-" s None c None",
-". c #000000",
-"+ c #c0c0c0",
-"@ c #ff0000",
-"# c #00ff00",
-"$ c #ffff00",
-"% c #0000ff",
-"& c #ffffff",
-/* pixels */
-" ",
-" ",
-" ",
-"+++++++++++++++.",
-"+@@.&&&&&&&&&&&.",
-"+@@.&&&&&&&&&&&.",
-"+@@.&&&&&&&&&&&.",
-"+...............",
-"+&&.&&&&&&&.%%%.",
-"+&&.&&&&&&&.%%%.",
-"+&&.........%%%.",
-"+&&.$$$$.##.%%%.",
-"+&&.$$$$.##.%%%.",
-"+...............",
-" ",
-" "};
+++ /dev/null
-#define button_width 28
-#define button_height 28
-static char button_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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x0f, 0x00,
- 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x30, 0x00, 0x40, 0x00, 0x30, 0x00,
- 0x40, 0x00, 0x30, 0x00, 0x40, 0x00, 0x30, 0x00, 0x40, 0x00, 0x30, 0x00,
- 0x40, 0x00, 0x30, 0x00, 0x40, 0x00, 0x30, 0x00, 0x40, 0x00, 0x30, 0x00,
- 0x80, 0xff, 0x3f, 0x00, 0x00, 0xff, 0x1f, 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, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00};
+++ /dev/null
-/* XPM */
-static char * button_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"16 16 4 1",
-/* colors */
-" s None c None",
-". c #000000",
-"+ c #c0c0c0",
-"@ c #808080",
-/* pixels */
-" ",
-" ",
-" ",
-"+++++++++++++++.",
-"+@@@@@@@@@@@@@@.",
-"+@@@@@@@@@@@@@@.",
-"+@@@@@@@@@@@@@@.",
-"+@@@@@@@@@@@@@@.",
-"+@@@@@@@@@@@@@@.",
-"+@@@@@@@@@@@@@@.",
-"+@@@@@@@@@@@@@@.",
-"+@@@@@@@@@@@@@@.",
-"+@@@@@@@@@@@@@@.",
-"+...............",
-" ",
-" "};
+++ /dev/null
-/* XPM */
-static char * buttonsm_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"16 16 4 1",
-/* colors */
-" s None c None",
-". c #000000",
-"+ c #c0c0c0",
-"@ c #808080",
-/* pixels */
-" ",
-" ",
-" ",
-" ",
-" ",
-" ++++++++++++ ",
-" +@@@@@@@@@@. ",
-" +@@@@@@@@@@. ",
-" +@@@@@@@@@@. ",
-" +........... ",
-" ",
-" ",
-" ",
-" ",
-" ",
-" "};
+++ /dev/null
-#define canvas_width 28
-#define canvas_height 28
-static char canvas_bits[] = {
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xc0, 0xff, 0x1f, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00,
- 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00,
- 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00,
- 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00,
- 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0xc0, 0xff, 0x1f, 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, 0x00, 0x00, 0x00};
+++ /dev/null
-#define check_width 28
-#define check_height 28
-static char check_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, 0x00, 0x00, 0x80, 0xff, 0x0f, 0x00, 0x80, 0x01, 0x0c, 0x00,
- 0x80, 0x02, 0x0a, 0x00, 0x80, 0x04, 0x09, 0x00, 0x80, 0x88, 0x08, 0x00,
- 0x80, 0x50, 0x08, 0x00, 0x80, 0x20, 0x08, 0x00, 0x80, 0x50, 0x08, 0x00,
- 0x80, 0x88, 0x08, 0x00, 0x80, 0x04, 0x09, 0x00, 0x80, 0x02, 0x0a, 0x00,
- 0x80, 0x01, 0x0c, 0x00, 0x80, 0xff, 0x0f, 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, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00};
+++ /dev/null
-/* XPM */
-static char * checkbox_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"16 16 5 1",
-/* colors */
-" s None c None",
-". c #000000",
-"+ c #c0c0c0",
-"@ c #808080",
-"# c #ffffff",
-/* pixels */
-" ",
-" @@@@@@@@@@@@@@ ",
-" @............@ ",
-" @.##########+@ ",
-" @.#..####..#+@ ",
-" @.#...##...#+@ ",
-" @.##......##+@ ",
-" @.###....###+@ ",
-" @.###....###+@ ",
-" @.##......##+@ ",
-" @.#...##...#+@ ",
-" @.#..####..#+@ ",
-" @.##########+@ ",
-" @.+++++++++++@ ",
-" @@@@@@@@@@@@@@ ",
-" "};
+++ /dev/null
-#define choice_width 28
-#define choice_height 28
-static char choice_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x00,
- 0x10, 0x00, 0xc6, 0x00, 0x10, 0x00, 0xee, 0x00, 0x10, 0x00, 0xfe, 0x00,
- 0xf0, 0xff, 0xff, 0x00, 0x20, 0x00, 0x82, 0x00, 0x20, 0x00, 0x92, 0x00,
- 0xa0, 0x3f, 0xba, 0x00, 0x20, 0x00, 0x82, 0x00, 0x20, 0x00, 0x82, 0x00,
- 0xa0, 0xff, 0xfe, 0x00, 0x20, 0x00, 0x82, 0x00, 0x20, 0x00, 0x82, 0x00,
- 0xa0, 0x7f, 0xba, 0x00, 0x20, 0x00, 0x92, 0x00, 0x20, 0x00, 0x82, 0x00,
- 0xe0, 0xff, 0xff, 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};
+++ /dev/null
-/* XPM */
-static char * choice_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"16 16 5 1",
-/* colors */
-" s None c None",
-". c #000000",
-"+ c #c0c0c0",
-"@ c #808080",
-"# c #ffffff",
-/* pixels */
-"@@@@@@@@@@@@@@@@",
-"@..............@",
-"@.########+++++@",
-"@.########.....@",
-"@.########+...+@",
-"@.########++.++@",
-"@.+++++++++++++@",
-"@@@@@@@@@@@@@@@@",
-" ##############",
-" ..............",
-" .#########+.+.",
-" .#########....",
-" .#########+++.",
-" .#########....",
-" .#########+.+.",
-" .............."};
+++ /dev/null
-/* XPM */
-static char * combobox_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"16 16 5 1",
-/* colors */
-" s None c None",
-". c #000000",
-"+ c #c0c0c0",
-"@ c #808080",
-"# c #ffffff",
-/* pixels */
-"@@@@@@@@@@@@@@@@",
-"@..............@",
-"@....#####+++++@",
-"@.#.######.....@",
-"@.#.######+...+@",
-"@....#####++.++@",
-"@.+++++++++++++@",
-"@@@@@@@@@@@@@@@@",
-" ##############",
-" ..............",
-" .#########+.+.",
-" .#########....",
-" .#########+++.",
-" .#########....",
-" .#########+.+.",
-" .............."};
+++ /dev/null
-/* XPM */\r
-static char * copyhght_xpm[] = {\r
-"16 15 3 1",\r
-" c #c0c0c0",\r
-". c Black",\r
-"X c Yellow",\r
-" . ",\r
-" ............. ",\r
-" ",\r
-" ...... ...... ",\r
-" .XXXX. .XXXX. ",\r
-" .XXXX. .XXXX. ",\r
-" .XXXX. .XXXX. ",\r
-" .XXXX. .XXXX. ",\r
-" .XXXX. .XXXX. ",\r
-" .XXXX. .XXXX. ",\r
-" .XXXX. .XXXX. ",\r
-" ...... ...... ",\r
-" ",\r
-" ............. ",\r
-" . "};\r
+++ /dev/null
-#define copysize_width 24
-#define copysize_height 24
-static char copysize_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xf0,0xbf,0x03,0x10,0x20,0x02,0x10,0x20,0x02,0x10,0xa0,0x0f,0x10,0x20,0x07,
- 0xf0,0x3f,0x02,0x00,0x00,0x00,0x00,0x55,0x05,0x00,0x00,0x00,0x00,0xf9,0x05,
- 0x00,0x08,0x01,0x00,0xf9,0x05,0x00,0x00,0x00,0x00,0x55,0x05,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
+++ /dev/null
-/* XPM */
-static char *copysize_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"16 15 3 1",
-" c None",
-". c Black",
-"X c Yellow",
-/* pixels */
-" ",
-".......... ... ",
-".XXXXXXXX. . ",
-".XXXXXXXX. . ",
-".XXXXXXXX. .....",
-".XXXXXXXX. ... ",
-".......... . ",
-" ",
-" . . . . . . ",
-" ",
-" . ...... . ",
-" .XXXX. ",
-" . ...... . ",
-" ",
-" . . . . . . "
-};
+++ /dev/null
-/* XPM */\r
-static char * copywdth_xpm[] = {\r
-"16 15 3 1",\r
-" c #c0c0c0",\r
-". c Black",\r
-"X c Yellow",\r
-" ",\r
-" . ........ . ",\r
-" . .XXXXXX. . ",\r
-" . .XXXXXX. . ",\r
-" . .XXXXXX. . ",\r
-" . .XXXXXX. . ",\r
-" . ........ . ",\r
-" .. .. ",\r
-" . ........ . ",\r
-" . .XXXXXX. . ",\r
-" . .XXXXXX. . ",\r
-" . .XXXXXX. . ",\r
-" . .XXXXXX. . ",\r
-" . ........ . ",\r
-" "};\r
+++ /dev/null
-#define cpp_width 24
-#define cpp_height 24
-static char cpp_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x30, 0x34, 0x06,
- 0x18, 0x30, 0x06, 0x18, 0x78, 0x0f, 0x18, 0x78, 0x0f, 0x18, 0x30, 0x06,
- 0x30, 0x34, 0x06, 0xe0, 0x03, 0x00, 0x00, 0x40, 0x00, 0x00, 0xc0, 0x00,
- 0x00, 0xff, 0x01, 0x00, 0xc0, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+++ /dev/null
-#define dialog_width 28
-#define dialog_height 28
-static char dialog_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xf0, 0xff, 0x7f, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0xf0, 0xff, 0x7f, 0x00,
- 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x90, 0xff, 0x4f, 0x00,
- 0x90, 0x00, 0x48, 0x00, 0x90, 0x00, 0x48, 0x00, 0x90, 0x00, 0x48, 0x00,
- 0x90, 0xff, 0x4f, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00,
- 0x10, 0x00, 0x40, 0x00, 0xd0, 0xdf, 0x5f, 0x00, 0x50, 0x50, 0x50, 0x00,
- 0x50, 0x50, 0x50, 0x00, 0xd0, 0xdf, 0x5f, 0x00, 0x10, 0x00, 0x40, 0x00,
- 0xf0, 0xff, 0x7f, 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};
+++ /dev/null
-/* XPM */
-static char * dialog_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"16 16 6 1",
-/* colors */
-" s None c None",
-". c #000000",
-"+ c #c0c0c0",
-"@ c #808080",
-"# c #0000ff",
-"$ c #ffffff",
-/* pixels */
-" ",
-" $$$$$$$$$$$$$. ",
-" $############. ",
-" $############. ",
-" $############. ",
-" $++++++++++++. ",
-" $+$$$$$+@@@@+. ",
-" $+$$$$$+@@@@+. ",
-" $+$$$$$++++++. ",
-" $+$$$$$+@@@@+. ",
-" $+++++++@@@@+. ",
-" $++++++++++++. ",
-" $++++++++++++. ",
-" $++++++++++++. ",
-" .............. ",
-" "};
+++ /dev/null
-/* XPM */
-static char * dialoged_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"32 32 6 1",
-/* colors */
-" s None c None",
-". c #000000",
-"+ c #800000",
-"@ c #c0c0c0",
-"# c #808080",
-"$ c #ffffff",
-/* pixels */
-" .. ",
-" .. ",
-" @@@@@@@@@@@@@@@@@@@@@@@@@@@. ",
-" @++++++++++++++++++++++++++. ",
-" @++++++++++++++++++++++++++. ",
-" @++++++++++++++++++++++++++. ",
-" @##########################. ",
-" @##########################. ",
-" @#.............##@@@@@@@@.#. ",
-" @#.$$$$$$$$$$$.##@@@@@@@@.#. ",
-" @#.$$$$$$$$$$$.##@@@@@@@@.#. ",
-" @#.............##.........#. ",
-" @##########################. ",
-" @##########################. ",
-" @#.............##@@@@@@@@.#. ",
-" @#.$$$$$$$$$$$.##@@@@@@@@.#. ",
-" @#.............##@@@@@@@@.#. ",
-" @#.$$$$$$$$$$$.##.........#. ",
-" @#.............############. ",
-" @#.$$$$$$$$$$$.############. ",
-" @#.............############. ",
-" @#.$$$$$$$$$$$.############. ",
-" @#.............############. ",
-" @##########################. ",
-" @##########################. ",
-" ............................ ",
-" .. .. ",
-" .. .. ",
-" .. .. ",
-" .. .. ",
-" .. .. ",
-" .. .. "};
+++ /dev/null
-/* XPM */\r
-static char * disthor_xpm[] = {\r
-"16 15 3 1",\r
-" c #c0c0c0",\r
-". c Black",\r
-"X c Yellow",\r
-" ",\r
-" ... ... ... ",\r
-" .X. .X. .X. ",\r
-" .X. .X. .X. ",\r
-" .X. .X. .X. ",\r
-" .X. .X. .X. ",\r
-" .X. .X. .X. ",\r
-" .X. .X. .X. ",\r
-" .X. .X. .X. ",\r
-" .X. .X. .X. ",\r
-" .X. .X. .X. ",\r
-" .X. .X. .X. ",\r
-" .X. .X. .X. ",\r
-" ... ... ... ",\r
-" "};\r
+++ /dev/null
-/* XPM */\r
-static char * distvert_xpm[] = {\r
-"16 15 3 1",\r
-" c #c0c0c0",\r
-". c Black",\r
-"X c Yellow",\r
-" ",\r
-" .............. ",\r
-" .XXXXXXXXXXXX. ",\r
-" .............. ",\r
-" ",\r
-" ",\r
-" .............. ",\r
-" .XXXXXXXXXXXX. ",\r
-" .............. ",\r
-" ",\r
-" ",\r
-" .............. ",\r
-" .XXXXXXXXXXXX. ",\r
-" .............. ",\r
-" "};\r
+++ /dev/null
-/* XPM */
-static char * folder1_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"16 16 6 1",
-/* colors */
-" s None c None",
-". c #000000",
-"+ c #c0c0c0",
-"@ c #808080",
-"# c #ffff00",
-"$ c #ffffff",
-/* pixels */
-" ",
-" @@@@@ ",
-" @#+#+#@ ",
-" @#+#+#+#@@@@@@ ",
-" @$$$$$$$$$$$$@.",
-" @$#+#+#+#+#+#@.",
-" @$+#+#+#+#+#+@.",
-" @$#+#+#+#+#+#@.",
-" @$+#+#+#+#+#+@.",
-" @$#+#+#+#+#+#@.",
-" @$+#+#+#+#+#+@.",
-" @$#+#+#+#+#+#@.",
-" @@@@@@@@@@@@@@.",
-" ..............",
-" ",
-" "};
+++ /dev/null
-/* XPM */
-static char * folder2_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"16 16 6 1",
-/* colors */
-" s None c None",
-". c #000000",
-"+ c #c0c0c0",
-"@ c #808080",
-"# c #ffff00",
-"$ c #ffffff",
-/* pixels */
-" ",
-" @@@@@ ",
-" @$$$$$@ ",
-" @$#+#+#$@@@@@@ ",
-" @$+#+#+$$$$$$@.",
-" @$#+#+#+#+#+#@.",
-"@@@@@@@@@@@@@#@.",
-"@$$$$$$$$$$@@+@.",
-"@$#+#+#+#+##.@@.",
-" @$#+#+#+#+#+.@.",
-" @$+#+#+#+#+#.@.",
-" @$+#+#+#+##@..",
-" @@@@@@@@@@@@@.",
-" .............",
-" ",
-" "};
+++ /dev/null
-#define frame_width 28
-#define frame_height 28
-static char frame_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xf0, 0xff, 0x7f, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0x10, 0x00, 0x40, 0x00,
- 0xd0, 0x36, 0x40, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0x10, 0x00, 0x40, 0x00,
- 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00,
- 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00,
- 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00,
- 0x10, 0x00, 0x40, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0x10, 0x00, 0x40, 0x00,
- 0x10, 0x00, 0x40, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00};
+++ /dev/null
-#define gauge_width 28
-#define gauge_height 28
-static char gauge_bits[] = {
- 0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,
- 0xf0,0x00,0xff,0x07,0xf0,0x00,0x01,0x04,0xf0,0x00,0x01,0x04,0xf0,0x00,0x01,
- 0x04,0xf0,0x00,0x01,0x04,0xf0,0x00,0x01,0x04,0xf0,0x00,0x01,0x04,0xf0,0x00,
- 0xff,0x07,0xf0,0x00,0xff,0x07,0xf0,0x00,0xff,0x07,0xf0,0x00,0xff,0x07,0xf0,
- 0x00,0xff,0x07,0xf0,0x00,0xff,0x07,0xf0,0x00,0xff,0x07,0xf0,0x00,0xff,0x07,
- 0xf0,0x00,0xff,0x07,0xf0,0x00,0xff,0x07,0xf0,0x00,0xff,0x07,0xf0,0x00,0xff,
- 0x07,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,
- 0x00,0x00,0xf0,0x00,0x00,0x00,0xf0};
+++ /dev/null
-/* XPM */
-static char * gauge_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"16 16 5 1",
-/* colors */
-" s None c None",
-". c #000000",
-"+ c #000080",
-"@ c #c0c0c0",
-"# c #808080",
-/* pixels */
-" ",
-" ",
-" ",
-"################",
-"#..............#",
-"#.++++++++@@@@@#",
-"#.++++++++@@@@@#",
-"#.++++++++@@@@@#",
-"#.++++++++@@@@@#",
-"#.++++++++@@@@@#",
-"#.++++++++@@@@@#",
-"#.++++++++@@@@@#",
-"################",
-" ",
-" ",
-" "};
+++ /dev/null
-#define group_width 28
-#define group_height 28
-static char group_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x80, 0xaa, 0x03, 0x00, 0x00, 0x29, 0x01, 0x00,
- 0x30, 0x91, 0x78, 0x00, 0x90, 0x92, 0x43, 0x00, 0x10, 0x00, 0x40, 0x00,
- 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00,
- 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00,
- 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00,
- 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00,
- 0x10, 0x00, 0x40, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00};
+++ /dev/null
-#define help_width 24
-#define help_height 24
-static char help_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x10, 0xe0, 0x07, 0x30, 0x30, 0x0f, 0x70, 0x38, 0x0e, 0xf0, 0x38, 0x0e,
- 0xf0, 0x39, 0x0f, 0xf0, 0x03, 0x07, 0xf0, 0x87, 0x01, 0xf0, 0xcf, 0x01,
- 0xf0, 0xc1, 0x01, 0xb0, 0x01, 0x00, 0x10, 0xc3, 0x01, 0x00, 0xc3, 0x01,
- 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+++ /dev/null
-/* XPM */
-static char *help_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"16 15 3 1",
-" c None",
-". c Black",
-"X c #008080",
-/* pixels */
-" ",
-" ...... ",
-" .XXXXX.. ",
-" .XX...XX.. ",
-" .X.. .X.. ",
-" .X.. .XX.. ",
-" .. .XX.. ",
-" .XX.. ",
-" .X.. ",
-" .X.. ",
-" .X.. ",
-" .. ",
-" .XX.. ",
-" .XX.. ",
-" ... "
-};
+++ /dev/null
-#define horiz_width 24
-#define horiz_height 24
-static char horiz_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x3e, 0x00, 0x00, 0x22, 0x00, 0x00, 0x22, 0x00, 0x00, 0x22, 0x00,
- 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x01,
- 0x40, 0x00, 0x01, 0x40, 0x00, 0x01, 0x40, 0x00, 0x01, 0x40, 0x00, 0x01,
- 0xc0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+++ /dev/null
-/* XPM */
-static char *horiz_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"16 15 3 1",
-" c None",
-". c Black",
-"X c Yellow",
-/* pixels */
-" ",
-" ..... ",
-" .XXX. ",
-" .XXX. ",
-" .XXX. ",
-" ..... ",
-" ",
-" ",
-" ........... ",
-" .XXXXXXXXX. ",
-" .XXXXXXXXX. ",
-" .XXXXXXXXX. ",
-" .XXXXXXXXX. ",
-" ........... ",
-" "
-};
+++ /dev/null
-#define listbox_width 28
-#define listbox_height 28
-static char listbox_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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x7f, 0x00,
- 0x10, 0x00, 0x41, 0x00, 0x10, 0x00, 0x49, 0x00, 0xd0, 0x1f, 0x5d, 0x00,
- 0x10, 0x00, 0x41, 0x00, 0x10, 0x00, 0x41, 0x00, 0xd0, 0x7f, 0x7f, 0x00,
- 0x10, 0x00, 0x41, 0x00, 0x10, 0x00, 0x41, 0x00, 0xd0, 0x3f, 0x5d, 0x00,
- 0x10, 0x00, 0x49, 0x00, 0x10, 0x00, 0x41, 0x00, 0xf0, 0xff, 0x7f, 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, 0x00, 0x00, 0x00};
+++ /dev/null
-/* XPM */
-static char * listbox_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"16 16 5 1",
-/* colors */
-" s None c None",
-". c #000000",
-"+ c #c0c0c0",
-"@ c #808080",
-"# c #ffffff",
-/* pixels */
-"@@@@@@@@@@@@@@@@",
-"@..............@",
-"@.##########+++@",
-"@.##########+.+@",
-"@.++++++++++...@",
-"@.##########+++@",
-"@.##########+++@",
-"@.+++++++++++++@",
-"@.##########+++@",
-"@.##########+++@",
-"@.+++++++++++++@",
-"@.##########+++@",
-"@.##########...@",
-"@.##########+.+@",
-"@.+++++++++++++@",
-"@@@@@@@@@@@@@@@@"};
+++ /dev/null
-#define load_width 24
-#define load_height 24
-static char load_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0xe0, 0x00, 0x00, 0x10, 0x05, 0x00, 0x00, 0x06, 0xe0, 0x00, 0x07,
- 0x10, 0x7f, 0x00, 0x10, 0x40, 0x00, 0x10, 0x40, 0x00, 0x10, 0xfe, 0x0f,
- 0x10, 0x01, 0x04, 0x90, 0x00, 0x02, 0x50, 0x00, 0x01, 0x30, 0x80, 0x00,
- 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+++ /dev/null
-/* XPM */
-static char *load_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"16 15 5 1",
-" c None",
-". c Black",
-"X c Yellow",
-"o c Gray100",
-"O c #808000",
-/* pixels */
-" ",
-" ... ",
-" . . .",
-" ..",
-" ... ...",
-" .XoX....... ",
-" .oXoXoXoXo. ",
-" .XoXoXoXoX. ",
-" .oXoX..........",
-" .XoX.OOOOOOOOO.",
-" .oo.OOOOOOOOO. ",
-" .X.OOOOOOOOO. ",
-" ..OOOOOOOOO. ",
-" ........... ",
-" "
-};
+++ /dev/null
-#define message_width 28
-#define message_height 28
-static char message_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, 0x20, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00,
- 0x00, 0xe8, 0x00, 0x00, 0x00, 0xe8, 0x00, 0x00, 0x00, 0xc4, 0x01, 0x00,
- 0x00, 0xc4, 0x01, 0x00, 0x00, 0x82, 0x03, 0x00, 0x00, 0xfe, 0x03, 0x00,
- 0x00, 0x01, 0x07, 0x00, 0x00, 0x01, 0x07, 0x00, 0x80, 0x00, 0x0e, 0x00,
- 0xc0, 0x00, 0x1e, 0x00, 0xe0, 0x01, 0x3f, 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, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00};
+++ /dev/null
-#define mtext_width 28
-#define mtext_height 28
-static char mtext_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,
- 0xf0, 0xff, 0xff, 0x00, 0x10, 0x10, 0x90, 0x00, 0x10, 0x13, 0x90, 0x00,
- 0x10, 0xf2, 0xf0, 0x00, 0x90, 0x93, 0xf0, 0x00, 0x90, 0x92, 0xf0, 0x00,
- 0x90, 0xfb, 0xf0, 0x00, 0x10, 0x00, 0xf0, 0x00, 0x10, 0x80, 0xf0, 0x00,
- 0x10, 0x80, 0xf0, 0x00, 0x90, 0xf3, 0xf0, 0x00, 0x90, 0x90, 0xf0, 0x00,
- 0x90, 0x90, 0xf0, 0x00, 0x90, 0xf3, 0x91, 0x00, 0x10, 0x00, 0x90, 0x00,
- 0xf0, 0xff, 0xff, 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};
+++ /dev/null
-#define new_width 24
-#define new_height 24
-static char new_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x80,0x7f,0x00,0x80,0xc0,0x00,0x80,0x40,0x01,0x80,0xc0,0x03,0x80,0x00,0x02,
- 0x80,0x00,0x02,0x80,0x00,0x02,0x80,0x00,0x02,0x80,0x00,0x02,0x80,0x00,0x02,
- 0x80,0x00,0x02,0x80,0x00,0x02,0x80,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
+++ /dev/null
-/* XPM */
-static char *new_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"16 15 3 1",
-" c None",
-". c Black",
-"X c Gray100",
-/* pixels */
-" ",
-" ........ ",
-" .XXXXXX.. ",
-" .XXXXXX.X. ",
-" .XXXXXX.... ",
-" .XXXXXXXXX. ",
-" .XXXXXXXXX. ",
-" .XXXXXXXXX. ",
-" .XXXXXXXXX. ",
-" .XXXXXXXXX. ",
-" .XXXXXXXXX. ",
-" .XXXXXXXXX. ",
-" .XXXXXXXXX. ",
-" ........... ",
-" "
-};
+++ /dev/null
-#define panel_width 28
-#define panel_height 28
-static char panel_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,
- 0xc0, 0xff, 0x1f, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00,
- 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00,
- 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00,
- 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00,
- 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0xc0, 0xff, 0x1f, 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, 0x00, 0x00, 0x00};
+++ /dev/null
-#define picture_width 28
-#define picture_height 28
-static char picture_bits[] = {
- 0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,
- 0xf0,0x00,0x00,0x00,0xf0,0xf0,0xff,0x7f,0xf0,0x10,0x00,0x40,0xf0,0x10,0x02,
- 0x47,0xf0,0x10,0x85,0x48,0xf0,0x90,0x85,0x48,0xf0,0x50,0x85,0x48,0xf0,0x50,
- 0x0d,0x47,0xf0,0x50,0x15,0x40,0xf0,0x90,0x14,0x40,0xf0,0xf0,0xf4,0x7f,0xf0,
- 0x10,0x09,0x40,0xf0,0x10,0x65,0x46,0xf0,0x10,0x95,0x40,0xf0,0x90,0xf7,0x59,
- 0xf0,0xd0,0x01,0x40,0xf0,0xf0,0xff,0x7f,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,
- 0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,
- 0x00,0x00,0xf0,0x00,0x00,0x00,0xf0};
+++ /dev/null
-#define radio_width 28
-#define radio_height 28
-static char radio_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, 0xf8, 0x00, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x01, 0x04, 0x00,
- 0x80, 0x00, 0x08, 0x00, 0x80, 0x70, 0x08, 0x00, 0x40, 0xf8, 0x10, 0x00,
- 0x40, 0xfc, 0x11, 0x00, 0x40, 0xfc, 0x11, 0x00, 0x40, 0xfc, 0x11, 0x00,
- 0x40, 0xf8, 0x10, 0x00, 0x80, 0x70, 0x08, 0x00, 0x80, 0x00, 0x08, 0x00,
- 0x00, 0x01, 0x04, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0xf8, 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,
- 0x00, 0x00, 0x00, 0x00};
+++ /dev/null
-/* XPM */
-static char * radiobox_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"16 16 5 1",
-/* colors */
-" s None c None",
-". c #000000",
-"+ c #c0c0c0",
-"@ c #808080",
-"# c #ffffff",
-/* pixels */
-" . ",
-" .. .. ",
-"+++.+.++...++++.",
-"+@.@...@@..@@@@.",
-"+@.+++.+....++@.",
-"+@++++++++++++@.",
-"+@++++++++++++@.",
-"+@++++...+++++@.",
-"+@+++.###@++++@.",
-"+@+++.#.#@++++@.",
-"+@+++.###@++++@.",
-"+@++++@@@+++++@.",
-"+@++++++++++++@.",
-"+@++++++++++++@.",
-"+@@@@@@@@@@@@@@.",
-"................"};
+++ /dev/null
-/* XPM */
-static char * radiobtn_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"16 16 4 1",
-/* colors */
-" s None c None",
-". c #000000",
-"+ c #c0c0c0",
-"@ c #ffffff",
-/* pixels */
-" ",
-" ",
-" ",
-" ",
-" .... ",
-" .@@@@+ ",
-" .@@@@@@+ ",
-" .@@@..@@@+ ",
-" .@@....@@+ ",
-" .@@@..@@@+ ",
-" .@@@@@@+ ",
-" .@@@@+ ",
-" ++++ ",
-" ",
-" ",
-" "};
+++ /dev/null
-#define report_width 24
-#define report_height 24
-static char report_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x03,
- 0x10, 0x00, 0x02, 0x90, 0x77, 0x02, 0x90, 0x7d, 0x02, 0x10, 0x00, 0x02,
- 0x10, 0x37, 0x02, 0x10, 0x00, 0x02, 0x10, 0x00, 0x02, 0xd0, 0x03, 0x02,
- 0x10, 0x00, 0x02, 0xd0, 0xbc, 0x02, 0x10, 0x00, 0x02, 0xd0, 0xbb, 0x02,
- 0x10, 0x00, 0x02, 0xf0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+++ /dev/null
-#define save_width 24
-#define save_height 24
-static char save_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xe0, 0xff, 0x07, 0xa0, 0x00, 0x05, 0xa0, 0x00, 0x07, 0xa0, 0x00, 0x05,
- 0xa0, 0x00, 0x05, 0xa0, 0x00, 0x05, 0xa0, 0x00, 0x05, 0x20, 0xff, 0x04,
- 0x20, 0x00, 0x04, 0x20, 0xff, 0x05, 0x20, 0x3f, 0x05, 0x20, 0x3f, 0x05,
- 0x20, 0x3f, 0x05, 0xc0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+++ /dev/null
-/* XPM */
-static char *save_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"16 15 4 1",
-" c None",
-". c Black",
-"X c #808000",
-"o c #808080",
-/* pixels */
-" ",
-" .............. ",
-" .X. . . ",
-" .X. ... ",
-" .X. .X. ",
-" .X. .X. ",
-" .X. .X. ",
-" .X. .X. ",
-" .XX........oX. ",
-" .XXXXXXXXXXXX. ",
-" .XX.........X. ",
-" .XX...... .X. ",
-" .XX...... .X. ",
-" .XX...... .X. ",
-" ............. "
-};
+++ /dev/null
-/* XPM */
-static char * scrolbar_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"16 16 4 1",
-/* colors */
-" s None c None",
-". c #000000",
-"+ c #c0c0c0",
-"@ c #808080",
-/* pixels */
-" ",
-" ",
-" ",
-" ",
-" ",
-" ",
-"++++.@@@@@@++++.",
-"+@@@.@@@@@@+@@@.",
-"+@@@.@@@@@@+@@@.",
-"+....@@@@@@+....",
-" ",
-" ",
-" ",
-" ",
-" ",
-" "};
+++ /dev/null
-#define scroll_width 28
-#define scroll_height 28
-static char scroll_bits[] = {
- 0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,
- 0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,
- 0x00,0xf0,0xf8,0xff,0xff,0xf0,0x08,0x20,0x80,0xf0,0x08,0x20,0x80,0xf0,0x08,
- 0x21,0x84,0xf0,0x88,0x27,0x8f,0xf0,0xc8,0x27,0x9f,0xf0,0x88,0x27,0x8f,0xf0,
- 0x08,0x21,0x84,0xf0,0x08,0x20,0x80,0xf0,0x08,0x20,0x80,0xf0,0xf8,0xff,0xff,
- 0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,
- 0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,
- 0x00,0x00,0xf0,0x00,0x00,0x00,0xf0};
+++ /dev/null
-#define slider_width 28
-#define slider_height 28
-static char slider_bits[] = {
- 0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,
- 0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,
- 0x00,0xf0,0x18,0x00,0xec,0xf0,0x10,0x00,0xa8,0xf0,0x10,0x00,0xa8,0xf0,0x38,
- 0x00,0xfc,0xf0,0x00,0x00,0x00,0xf0,0xf8,0xff,0xff,0xf0,0x08,0x00,0x80,0xf0,
- 0x08,0x03,0x80,0xf0,0x08,0x03,0x80,0xf0,0x08,0x00,0x80,0xf0,0xf8,0xff,0xff,
- 0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,
- 0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0x00,
- 0x00,0x00,0xf0,0x00,0x00,0x00,0xf0};
+++ /dev/null
-/* XPM */
-static char * slider_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"16 16 4 1",
-/* colors */
-" s None c None",
-". c #000000",
-"+ c #c0c0c0",
-"@ c #808080",
-/* pixels */
-" ",
-" ",
-" ",
-"++++. ",
-"+@@@. ",
-"+@@@.@@@@@@@@@@@",
-"+@@@............",
-"+@@@.+++++++++++",
-"+@@@. ",
-"+@@@. ",
-" +@. ",
-" + ",
-" ",
-" ",
-" ",
-" "};
+++ /dev/null
-/* XPM */
-static char * statbmp_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"16 16 8 1",
-/* colors */
-" s None c None",
-". c #000000",
-"+ c #c0c0c0",
-"@ c #ff0000",
-"# c #00ff00",
-"$ c #ffff00",
-"% c #0000ff",
-"& c #ffffff",
-/* pixels */
-" ",
-" ",
-" ",
-"+++++++++++++++.",
-"+@@.&&&&&&&&&&&.",
-"+@@.&&&&&&&&&&&.",
-"+@@.&&&&&&&&&&&.",
-"+...............",
-"+&&.&&&&&&&.%%%.",
-"+&&.&&&&&&&.%%%.",
-"+&&.........%%%.",
-"+&&.$$$$.##.%%%.",
-"+&&.$$$$.##.%%%.",
-"+...............",
-" ",
-" "};
+++ /dev/null
-/* XPM */
-static char * statbox_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"16 16 4 1",
-/* colors */
-" s None c None",
-". c #000000",
-"+ c #c0c0c0",
-"@ c #808080",
-/* pixels */
-" . ",
-" .. .. ",
-"+++.+.++...++++.",
-"+@.@...@@..@@@@.",
-"+@. . .... @.",
-"+@ @.",
-"+@ @.",
-"+@ @.",
-"+@ @.",
-"+@ @.",
-"+@ @.",
-"+@ @.",
-"+@ @.",
-"+@ @.",
-"+@@@@@@@@@@@@@@.",
-"................"};
+++ /dev/null
-/* XPM */
-static char * stattext_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"16 16 2 1",
-/* colors */
-" s None c None",
-". c #000000",
-/* pixels */
-" ",
-" ",
-" ",
-" .. ",
-" .. ",
-" .... ",
-" .... .... ",
-" . . .. .. ",
-" .. .. .... ",
-" .. .. .. .. ",
-" ...... .. .. ",
-".. .. .. .. ",
-".. .. ..... ",
-" ",
-" ",
-" "};
+++ /dev/null
-#define text_width 28
-#define text_height 28
-static char text_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,
- 0xf0, 0xff, 0xff, 0x00, 0x10, 0x00, 0x80, 0x00, 0x10, 0x00, 0xa0, 0x00,
- 0x10, 0x60, 0xa0, 0x00, 0x10, 0x60, 0xa0, 0x00, 0x10, 0x60, 0xa0, 0x00,
- 0x90, 0xe7, 0xa3, 0x00, 0xd0, 0x6c, 0xa6, 0x00, 0x10, 0x6f, 0xa6, 0x00,
- 0x90, 0x6d, 0xa6, 0x00, 0xd0, 0x6c, 0xa6, 0x00, 0xd0, 0x6c, 0xa6, 0x00,
- 0x90, 0xef, 0xa3, 0x00, 0x10, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x80, 0x00,
- 0xf0, 0xff, 0xff, 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};
+++ /dev/null
-/* XPM */
-static char * textmult_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"16 16 5 1",
-/* colors */
-" s None c None",
-". c #000000",
-"+ c #c0c0c0",
-"@ c #808080",
-"# c #ffffff",
-/* pixels */
-"@@@@@@@@@@@@@@@@",
-"@..............@",
-"@.##########+++@",
-"@.#.#####.##+.+@",
-"@.#.###.#.##...@",
-"@.#.#.#.#.##+++@",
-"@.##########+++@",
-"@.##########+++@",
-"@.#.#.######+++@",
-"@.###.#.####+++@",
-"@.#.#.#.####+++@",
-"@.##########+++@",
-"@.##########...@",
-"@.##########+.+@",
-"@.+++++++++++++@",
-"@@@@@@@@@@@@@@@@"};
+++ /dev/null
-/* XPM */
-static char * textsing_xpm[] = {
-/* width height ncolors chars_per_pixel */
-"16 16 5 1",
-/* colors */
-" s None c None",
-". c #000000",
-"+ c #c0c0c0",
-"@ c #808080",
-"# c #ffffff",
-/* pixels */
-" ",
-" ",
-" ",
-"@@@@@@@@@@@@@@@@",
-"@..............@",
-"@.############+@",
-"@.#...########+@",
-"@.##.#########+@",
-"@.##.#########+@",
-"@.#...########+@",
-"@.############+@",
-"@.+++++++++++++@",
-"@@@@@@@@@@@@@@@@",
-" ",
-" ",
-" "};
+++ /dev/null
-#define textsw_width 28
-#define textsw_height 28
-static char textsw_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,
- 0xc0, 0xff, 0x1f, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00,
- 0x40, 0x9f, 0x11, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00,
- 0x40, 0x7f, 0x13, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00,
- 0x40, 0xeb, 0x13, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00,
- 0x40, 0xdf, 0x11, 0x00, 0x40, 0x00, 0x10, 0x00, 0xc0, 0xff, 0x1f, 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, 0x00, 0x00, 0x00};
+++ /dev/null
-#define toback_width 24
-#define toback_height 24
-static char toback_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x0f,0x00,
- 0x20,0x08,0x00,0x20,0xf8,0x01,0x20,0xf8,0x01,0x20,0xf8,0x01,0x20,0xf8,0x01,
- 0xe0,0xff,0x01,0x00,0xff,0x0f,0x00,0x3f,0x08,0x00,0x3f,0x08,0x00,0x3f,0x08,
- 0x00,0x20,0x08,0x00,0x20,0x08,0x00,0xe0,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
+++ /dev/null
-/* XPM */
-static char *toback_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"16 15 4 1",
-" c None",
-". c Black",
-"X c #808080",
-"o c Yellow",
-/* pixels */
-" ....... ",
-" .XXXXX. ",
-" .XXXXX...... ",
-" .XXXXX.oooo. ",
-" .XXXXX.oooo. ",
-" .XXXXX.oooo. ",
-" .......oooo. ",
-" .oooo.......",
-" .oooo.XXXXX.",
-" .oooo.XXXXX.",
-" ......XXXXX.",
-" .XXXXX.",
-" .XXXXX.",
-" .......",
-" "
-};
+++ /dev/null
-#define tofront_width 24
-#define tofront_height 24
-static char tofront_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x0f,0x00,
- 0x20,0x08,0x00,0x20,0xff,0x01,0x20,0xff,0x01,0x20,0xff,0x01,0x20,0xff,0x01,
- 0xe0,0xff,0x01,0x00,0xff,0x0f,0x00,0xff,0x09,0x00,0xff,0x09,0x00,0xff,0x09,
- 0x00,0x20,0x08,0x00,0x20,0x08,0x00,0xe0,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
+++ /dev/null
-/* XPM */
-static char *tofront_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"16 15 4 1",
-" c None",
-". c Black",
-"X c #808080",
-"o c Yellow",
-/* pixels */
-" ....... ",
-" .XXXXX. ",
-" .XX......... ",
-" .XX.ooooooo. ",
-" .XX.ooooooo. ",
-" .XX.ooooooo. ",
-" ....ooooooo. ",
-" .ooooooo....",
-" .ooooooo.XX.",
-" .ooooooo.XX.",
-" .........XX.",
-" .XXXXX.",
-" .XXXXX.",
-" .......",
-" "
-};
+++ /dev/null
-#define tree_width 24
-#define tree_height 24
-static char tree_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x07,
- 0xc0, 0xff, 0x00, 0x20, 0x01, 0x07, 0x10, 0x02, 0x00, 0x08, 0x3c, 0x00,
- 0x04, 0x00, 0x00, 0x18, 0x00, 0x00, 0x60, 0x1c, 0x00, 0x80, 0x83, 0x03,
- 0x00, 0x7c, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+++ /dev/null
-#define treeicn_width 64
-#define treeicn_height 64
-static char treeicn_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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
- 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70,
- 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x70, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x1c, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f,
- 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x80, 0x7f, 0x00, 0x00,
- 0x00, 0x00, 0xf0, 0x07, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x0f,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x1c, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0xc0, 0x0f, 0x38, 0x00, 0xff, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x70,
- 0x80, 0xff, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xe0, 0xc0, 0x00, 0x00, 0x00,
- 0x00, 0x3f, 0x00, 0xc0, 0xe1, 0x00, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x80,
- 0xf3, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0xbf, 0xff, 0x00, 0x00,
- 0xfc, 0x01, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00,
- 0x1c, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xfc, 0xff, 0x00, 0x00,
- 0x00, 0x07, 0x00, 0x00, 0xfc, 0xff, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00,
- 0x38, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,
- 0x00, 0x1c, 0xff, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x9c, 0xff, 0x03,
- 0xc0, 0x01, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00,
- 0x00, 0xf8, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0xe0, 0xff, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x80,
- 0xff, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00,
- 0x00, 0xc0, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x70,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0xfe, 0x1f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c,
- 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x07, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0xfc, 0x03, 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, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+++ /dev/null
-#define vert_width 24
-#define vert_height 24
-static char vert_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0xf8, 0x07, 0x00, 0x08, 0x04, 0x00, 0x08, 0x04, 0xf0, 0x09, 0x04,
- 0x10, 0x09, 0x04, 0x10, 0x09, 0x04, 0x10, 0x09, 0x04, 0x10, 0x09, 0x04,
- 0xf0, 0x09, 0x04, 0x00, 0x08, 0x04, 0x00, 0x08, 0x04, 0x00, 0xf8, 0x07,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+++ /dev/null
-/* XPM */
-static char *vert_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"16 15 3 1",
-" c None",
-". c Black",
-"X c Yellow",
-/* pixels */
-" ",
-" ........",
-" .XXXXXX.",
-" .XXXXXX.",
-" ..... .XXXXXX.",
-" .XXX. .XXXXXX.",
-" .XXX. .XXXXXX.",
-" .XXX. .XXXXXX.",
-" .XXX. .XXXXXX.",
-" ..... .XXXXXX.",
-" .XXXXXX.",
-" .XXXXXX.",
-" ........",
-" ",
-" "
-};
+++ /dev/null
-#define wxbuild_width 64
-#define wxbuild_height 64
-static char wxbuild_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x03, 0x33, 0x0c, 0xf0, 0xff, 0xff, 0xff, 0x3f,
- 0x03, 0x33, 0x0c, 0xf0, 0xff, 0xff, 0xff, 0x3f, 0x33, 0xc3, 0x03, 0x30,
- 0x00, 0x00, 0x00, 0x30, 0x33, 0xc3, 0x03, 0x30, 0x00, 0x00, 0x00, 0x30,
- 0x33, 0xc3, 0x03, 0x30, 0x3f, 0xcf, 0xcc, 0x33, 0x33, 0xc3, 0x03, 0x30,
- 0x3f, 0xcf, 0xcc, 0x33, 0xcc, 0x30, 0x0c, 0x30, 0x00, 0x00, 0x00, 0x30,
- 0xcc, 0x30, 0x0c, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30,
- 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30,
- 0x00, 0xc0, 0xff, 0xff, 0xff, 0xf3, 0x33, 0x33, 0x00, 0xc0, 0xff, 0xff,
- 0xff, 0xf3, 0x33, 0x33, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30,
- 0x00, 0xc0, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00,
- 0x00, 0x03, 0x00, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30,
- 0x00, 0xc0, 0xfc, 0xf3, 0x0f, 0x33, 0xfc, 0x30, 0x00, 0xc0, 0xfc, 0xf3,
- 0x0f, 0x33, 0xfc, 0x30, 0x00, 0xc0, 0x0c, 0x33, 0x0c, 0xf3, 0x00, 0x30,
- 0x00, 0xc0, 0x0c, 0x33, 0x0c, 0xf3, 0x00, 0x30, 0x00, 0xc0, 0xfc, 0xf3,
- 0x0f, 0xf3, 0x03, 0x30, 0x00, 0xc0, 0xfc, 0xf3, 0x0f, 0xf3, 0x03, 0x30,
- 0x00, 0xc0, 0x00, 0x00, 0x00, 0xf3, 0x0f, 0x30, 0x00, 0xc0, 0x00, 0x00,
- 0x00, 0xf3, 0x0f, 0x30, 0x00, 0xc0, 0x00, 0x00, 0x00, 0xf3, 0x3f, 0x30,
- 0x00, 0xc0, 0x00, 0x00, 0x00, 0xf3, 0x3f, 0x30, 0xff, 0xff, 0x00, 0x00,
- 0x00, 0xf3, 0xff, 0x30, 0xff, 0xff, 0x00, 0x00, 0x00, 0xf3, 0xff, 0x30,
- 0xff, 0xff, 0x00, 0x00, 0x00, 0xf3, 0xff, 0x33, 0xff, 0xff, 0x00, 0x00,
- 0x00, 0xf3, 0xff, 0x33, 0x03, 0xc3, 0x00, 0x00, 0x00, 0xf3, 0xff, 0x3f,
- 0x03, 0xc3, 0x00, 0x00, 0x00, 0xf3, 0xff, 0x3f, 0x03, 0xc3, 0x00, 0x00,
- 0x00, 0xf3, 0x3f, 0x30, 0x03, 0xc3, 0x00, 0x00, 0x00, 0xf3, 0x3f, 0x30,
- 0xff, 0xff, 0x00, 0x00, 0x00, 0xf3, 0x3c, 0x30, 0xff, 0xff, 0x00, 0x00,
- 0x00, 0xf3, 0x3c, 0x30, 0x03, 0xc0, 0xff, 0xff, 0xff, 0x33, 0xf0, 0x30,
- 0x03, 0xc0, 0xff, 0xff, 0xff, 0x33, 0xf0, 0x30, 0x03, 0x00, 0x00, 0x33,
- 0x00, 0x00, 0xf0, 0x30, 0x03, 0x00, 0x00, 0x33, 0x00, 0x00, 0xf0, 0x30,
- 0x03, 0x00, 0x00, 0xf3, 0xfc, 0x00, 0xc0, 0x33, 0x03, 0x00, 0x00, 0xf3,
- 0xfc, 0x00, 0xc0, 0x33, 0x03, 0xc0, 0x0c, 0x33, 0x00, 0x00, 0xc0, 0x33,
- 0x03, 0xc0, 0x0c, 0x33, 0x00, 0x00, 0xc0, 0x33, 0xf3, 0xf3, 0x3f, 0x33,
- 0xfc, 0xcc, 0x0f, 0x30, 0xf3, 0xf3, 0x3f, 0x33, 0xfc, 0xcc, 0x0f, 0x30,
- 0x33, 0xc0, 0x0c, 0x33, 0x00, 0x00, 0x00, 0x30, 0x33, 0xc0, 0x0c, 0x33,
- 0x00, 0x00, 0x00, 0x30, 0x33, 0x00, 0x00, 0xf3, 0xff, 0xff, 0xff, 0x3f,
- 0x33, 0x00, 0x00, 0xf3, 0xff, 0xff, 0xff, 0x3f, 0x33, 0x00, 0x00, 0x03,
- 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
- 0xf3, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf3, 0x03, 0x00, 0x03,
- 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
- 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x03,
- 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x03, 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, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+++ /dev/null
-#define wxwin_width 32
-#define wxwin_height 32
-static char wxwin_bits[] = {
- 0x00,0x80,0x01,0x00,0x81,0x8f,0x1d,0xc0,0xc5,0x9a,0x25,0xa0,0x54,0x92,0x49,
- 0x50,0x51,0x92,0x91,0x28,0xc5,0x9f,0x21,0x15,0xd4,0x9a,0x41,0x0a,0xd1,0x92,
- 0x81,0x04,0x45,0x92,0x41,0x09,0x54,0x93,0xa1,0x12,0x51,0x9f,0x51,0x24,0xc5,
- 0x99,0x29,0x48,0x54,0x80,0x15,0x90,0x10,0x80,0x0d,0xe0,0x00,0x80,0x01,0x00,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x80,0x01,0x00,0x00,0x83,0x01,
- 0x00,0x80,0x81,0x01,0x08,0x80,0x80,0x01,0x18,0x38,0x87,0x31,0x30,0xfc,0x8f,
- 0x31,0x20,0xfc,0x83,0x01,0x20,0xfc,0x83,0x81,0x23,0xfc,0x83,0x01,0x20,0xfc,
- 0x8f,0x01,0x20,0xfc,0x8f,0x31,0x30,0xf8,0x8f,0x31,0x18,0x70,0x87,0x01,0x08,
- 0x00,0x80,0x01,0x00,0x00,0x80,0x01,0x00};
+++ /dev/null
-/* XPM */
-static char *wxwin_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 8 1",
-" c Gray100",
-". c Black",
-"X c Green",
-"o c Blue",
-"O c Red",
-"+ c #c0c0c0",
-"@ c Yellow",
-"# c Cyan",
-/* pixels */
-" ..XXXXXXXXXXXXXXX",
-"o ..... ..X...XXXXXXXXX..",
-"o o ..O.X.. ..X.++.XXXXXXX.+.",
-" o o .OO.XX. ..XX.++.XXXXX.+.X",
-"O o .OO.XX. ..XXX.++.XXX.+.XX",
-"O O ....... ..XXXX.++.X.+.XXX",
-" O O ..o.@.. ..XXXXX.++.+.XXXX",
-"o O ..o.@@. ..XXXXXX.++.XXXXX",
-"o o .oo.@@. ..XXXXX.+.++.XXXX",
-" o o .o..@@. ..XXXX.+.X.++.XXX",
-". o .o..... ..XXX.+.XXX.++.XX",
-". . ... .. ..XX.+.XXXXX.++.X",
-" . . . ..X.+.XXXXXXX.++.",
-" . ..X..XXXXXXXXX...",
-" ..XXXXXXXXXXXXXXX",
-"................................",
-"................................",
-"###############..@@@@@@@@@@@@@@@",
-"########OO#####..@@@@@@@@@@@@@@@",
-"#######OO######..@@@@@@@@@@.@@@@",
-"#######O#######..@@@@@@@@@@..@@@",
-"###OOO##OOO####..@@@..@@@@@@..@@",
-"##OOOOOOOOOO###..@@@..@@@@@@@.@@",
-"##OOOOOOOO#####..@@@@@@@@@@@@.@@",
-"##OOOOOOOO#####..@@@@@@...@@@.@@",
-"##OOOOOOOO#####..@@@@@@@@@@@@.@@",
-"##OOOOOOOOOO###..@@@@@@@@@@@@.@@",
-"##OOOOOOOOOO###..@@@..@@@@@@..@@",
-"###OOOOOOOOO###..@@@..@@@@@..@@@",
-"####OOO#OOO####..@@@@@@@@@@.@@@@",
-"###############..@@@@@@@@@@@@@@@",
-"###############..@@@@@@@@@@@@@@@"
-};
+++ /dev/null
-#*****************************************************************************
-# *
-# Make file for VMS *
-# Author : J.Jansen (joukj@hrem.stm.tudelft.nl) *
-# Date : 10 November 1999 *
-# *
-#*****************************************************************************
-.first
- define wx [---.include.wx]
-
-.ifdef __WXMOTIF__
-CXX_DEFINE = /define=(__WXMOTIF__=1)/name=(as_is,short)\
- /assume=(nostdnew,noglobal_array_new)
-.else
-.ifdef __WXGTK__
-CXX_DEFINE = /define=(__WXGTK__=1)/float=ieee/name=(as_is,short)/ieee=denorm\
- /assume=(nostdnew,noglobal_array_new)
-.else
-CXX_DEFINE =
-.endif
-.endif
-
-.suffixes : .cpp
-
-.cpp.obj :
- cxx $(CXXFLAGS)$(CXX_DEFINE) $(MMS$TARGET_NAME).cpp
-
-all :
-.ifdef __WXMOTIF__
- $(MMS)$(MMSQUALIFIERS) dialoged.exe
-.else
-.ifdef __WXGTK__
- $(MMS)$(MMSQUALIFIERS) dialoged_gtk.exe
-.endif
-.endif
-
-OBJECTS=dialoged.obj,reseditr.obj,dlghndlr.obj,reswrite.obj,winprop.obj,\
- edtree.obj,edlist.obj,symbtabl.obj,winstyle.obj
-
-.ifdef __WXMOTIF__
-dialoged.exe : $(OBJECTS)
- cxxlink $(OBJECTS),[---.lib]libwx_motif_deprecated/lib,vms/opt
-.else
-.ifdef __WXGTK__
-dialoged_gtk.exe : $(OBJECTS)
- cxxlink/exec=dialoged_gtk.exe $(OBJECTS),[---.lib]libwx_gtk_deprecated/lib,vms_gtk/opt
-.endif
-.endif
-
-dialoged.obj : dialoged.cpp
-reseditr.obj : reseditr.cpp
-dlghndlr.obj : dlghndlr.cpp
-reswrite.obj : reswrite.cpp
-winprop.obj : winprop.cpp
-edtree.obj : edtree.cpp
-edlist.obj : edlist.cpp
-symbtabl.obj : symbtabl.cpp
-winstyle.obj : winstyle.cpp
+++ /dev/null
-// Name: dialoged.cpp
-// Purpose: Main Dialog Editor implementation file
-// Author: Julian Smart
-// Modified by:
-// Created: 04/01/98
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows license
-/////////////////////////////////////////////////////////////////////////////
-
-#ifdef __GNUG__
-#pragma implementation "dialoged.h"
-#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/deprecated/setup.h"
-
-#include "dialoged.h"
-
-#if !wxUSE_PROPSHEET
-#error Please set wxUSE_PROPSHEET to 1 in setup.h.
-#endif
-#if !wxUSE_RESOURCES
-#error Please set wxUSE_RESOURCES to 1 in setup.h.
-#endif
-
-IMPLEMENT_APP(MyApp)
-
-BEGIN_EVENT_TABLE(MyApp, wxApp)
-END_EVENT_TABLE()
-
-MyApp::MyApp(void)
-{
-}
-
-wxResourceManager *theResourceManager = NULL;
-
-#include "symbtabl.h"
-
-bool MyApp::OnInit(void)
-{
- theResourceManager = new wxResourceManager;
- theResourceManager->Initialize();
-
- theResourceManager->ShowResourceEditor(TRUE);
-
- if (argc > 1)
- theResourceManager->Load(argv[1]);
-
- SetTopWindow(theResourceManager->GetEditorFrame());
-
- return TRUE;
-}
-
-int MyApp::OnExit(void)
-{
- delete theResourceManager;
- theResourceManager = NULL;
- return 0;
-}
+++ /dev/null
-NAME DialogEd
-DESCRIPTION 'wxWindows Dialog Editor'
-EXETYPE WINDOWS
-STUB 'WINSTUB.EXE'
-CODE PRELOAD MOVEABLE DISCARDABLE
-DATA PRELOAD MOVEABLE MULTIPLE
-HEAPSIZE 1024
-STACKSIZE 8192
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: dialoged.h
-// Purpose: Dialog Editor application header file
-// Author: Julian Smart
-// Modified by:
-// Created: 04/01/98
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows license
-/////////////////////////////////////////////////////////////////////////////
-
-#if defined(__GNUG__) && !defined(__APPLE__)
-#pragma interface "dialoged.h"
-#endif
-
-#ifndef dialogedh
-#define dialogedh
-
-#include "wx/deprecated/proplist.h"
-#include "reseditr.h"
-
-class MyChild;
-
-// Define a new application
-class MyApp: public wxApp
-{
-public:
- MyApp(void);
- bool OnInit(void);
- int OnExit(void);
-
-private:
- DECLARE_EVENT_TABLE()
-};
-
-DECLARE_APP(MyApp)
-
-extern wxFrame *GetMainFrame(void);
-
-#endif
+++ /dev/null
-aaa ICON "bitmaps/dialoged.ico"
-DIALOGEDICON ICON "bitmaps/dialoged.ico"
-
-DIALOG_ICON ICON "bitmaps/dialog.ico"
-FOLDER1_ICON ICON "bitmaps/folder1.ico"
-FOLDER2_ICON ICON "bitmaps/folder2.ico"
-BUTTONSM_ICON ICON "bitmaps/buttonsm.ico"
-
-/* For control list */
-ARROW_ICON ICON "bitmaps/arrow.ico"
-BUTTON_ICON ICON "bitmaps/button.ico"
-BMPBUTTON_ICON ICON "bitmaps/bmpbuttn.ico"
-STATICTEXT_ICON ICON "bitmaps/stattext.ico"
-STATICBMP_ICON ICON "bitmaps/statbmp.ico"
-STATICBOX_ICON ICON "bitmaps/statbox.ico"
-TEXTSING_ICON ICON "bitmaps/textsing.ico"
-TEXTMULT_ICON ICON "bitmaps/textmult.ico"
-LISTBOX_ICON ICON "bitmaps/listbox.ico"
-CHOICE_ICON ICON "bitmaps/choice.ico"
-COMBOBOX_ICON ICON "bitmaps/combobox.ico"
-CHECKBOX_ICON ICON "bitmaps/checkbox.ico"
-SLIDER_ICON ICON "bitmaps/slider.ico"
-GAUGE_ICON ICON "bitmaps/gauge.ico"
-RADIOBOX_ICON ICON "bitmaps/radiobox.ico"
-RADIOBTN_ICON ICON "bitmaps/radiobtn.ico"
-SCROLBAR_ICON ICON "bitmaps/scrolbar.ico"
-
-#include "wx/msw/wx.rc"
-
-DIALOGBOXTOOL BITMAP "bitmaps/dialog.bmp"
-MESSAGETOOL BITMAP "bitmaps/message.bmp"
-BUTTONTOOL BITMAP "bitmaps/button.bmp"
-CHECKBOXTOOL BITMAP "bitmaps/check.bmp"
-RADIOBOXTOOL BITMAP "bitmaps/radio.bmp"
-LISTBOXTOOL BITMAP "bitmaps/listbox.bmp"
-CHOICETOOL BITMAP "bitmaps/choice.bmp"
-TEXTTOOL BITMAP "bitmaps/text.bmp"
-MULTITEXTTOOL BITMAP "bitmaps/mtext.bmp"
-SLIDERTOOL BITMAP "bitmaps/slider.bmp"
-ARROWTOOL BITMAP "bitmaps/arrow.bmp"
-GROUPTOOL BITMAP "bitmaps/group.bmp"
-GAUGETOOL BITMAP "bitmaps/gauge.bmp"
-PICTURETOOL BITMAP "bitmaps/picture.bmp"
-BMPBUTTONTOOL BITMAP "bitmaps/bmpbuttn.bmp"
-SCROLLBARTOOL BITMAP "bitmaps/scroll.bmp"
-
-NEWTOOL BITMAP "bitmaps/new.bmp"
-LOADTOOL BITMAP "bitmaps/load.bmp"
-SAVETOOL BITMAP "bitmaps/save.bmp"
-VERTTOOL BITMAP "bitmaps/vert.bmp"
-ALIGNTTOOL BITMAP "bitmaps/alignt.bmp"
-ALIGNBTOOL BITMAP "bitmaps/alignb.bmp"
-ALIGNLTOOL BITMAP "bitmaps/alignl.bmp"
-ALIGNRTOOL BITMAP "bitmaps/alignr.bmp"
-HORIZTOOL BITMAP "bitmaps/horiz.bmp"
-HELPTOOL BITMAP "bitmaps/help.bmp"
-COPYSIZETOOL BITMAP "bitmaps/copysize.bmp"
-TOFRONTTOOL BITMAP "bitmaps/tofront.bmp"
-TOBACKTOOL BITMAP "bitmaps/toback.bmp"
-COPYWIDTHTOOL BITMAP "bitmaps/copywdth.bmp"
-COPYHEIGHTTOOL BITMAP "bitmaps/copyhght.bmp"
-DISTHORIZTOOL BITMAP "bitmaps/disthor.bmp"
-DISTVERTTOOL BITMAP "bitmaps/distvert.bmp"
-
-WXWINBMP BITMAP "bitmaps/wxwin.bmp"
-
-/*
-These files are both invalid and it doesn't appear anyone uses them
-tick_bmp BITMAP "bitmaps/tick.bmp"
-cross_bmp BITMAP "bitmaps/cross.bmp"
-*/
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: dlghndlr.cpp
-// Purpose: Dialog handler
-// Author: Julian Smart
-// Modified by:
-// Created: 04/01/98
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// 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
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-
-#include "reseditr.h"
-#include "winprop.h"
-#include "dlghndlr.h"
-#include "edlist.h"
-
-
-IMPLEMENT_CLASS(wxResourceEditorDialogHandler, wxEvtHandler)
-IMPLEMENT_CLASS(wxResourceEditorControlHandler, wxEvtHandler)
-
-BEGIN_EVENT_TABLE(wxResourceEditorDialogHandler, wxEvtHandler)
-EVT_PAINT(wxResourceEditorDialogHandler::OnPaint)
-EVT_MOUSE_EVENTS(wxResourceEditorDialogHandler::OnMouseEvent)
-EVT_SIZE(wxResourceEditorDialogHandler::OnSize)
-EVT_MENU(OBJECT_MENU_EDIT, wxResourceEditorDialogHandler::OnObjectEdit)
-EVT_MENU(OBJECT_MENU_DELETE, wxResourceEditorDialogHandler::OnObjectDelete)
-END_EVENT_TABLE()
-
-BEGIN_EVENT_TABLE(wxResourceEditorControlHandler, wxEvtHandler)
-EVT_MOUSE_EVENTS(wxResourceEditorControlHandler::OnMouseEvent)
-END_EVENT_TABLE()
-
-/*
-* Dialog box event handler
-*/
-
-wxResourceEditorDialogHandler::wxResourceEditorDialogHandler(wxPanel *dialog, wxItemResource *resource,
- wxEvtHandler *oldHandler, wxResourceManager *manager)
-{
- handlerDialog = dialog;
- handlerResource = resource;
- handlerOldHandler = oldHandler;
- resourceManager = manager;
-
- dragMode = wxDRAG_MODE_NONE;
- dragType = wxDRAG_TYPE_NONE;
- dragItem = NULL;
- firstDragX = 0;
- firstDragY = 0;
- oldDragX = 0;
- oldDragY = 0;
- dragTolerance = 3;
- checkTolerance = TRUE;
- m_mouseCaptured = FALSE;
- // m_treeItem = 0;
-}
-
-wxResourceEditorDialogHandler::~wxResourceEditorDialogHandler(void)
-{
-}
-
-void wxResourceEditorDialogHandler::OnItemSelect(wxControl *item, bool select)
-{
- if (select)
- resourceManager->AddSelection(item);
- else
- resourceManager->RemoveSelection(item);
-}
-
-void wxResourceEditorDialogHandler::OnPaint(wxPaintEvent& WXUNUSED(event))
-{
- wxPaintDC dc(handlerDialog);
-
- PaintSelectionHandles(dc);
-}
-
-// Add event handlers for all children
-void wxResourceEditorDialogHandler::AddChildHandlers(void)
-{
- wxNode *node = handlerDialog->GetChildren().First();
- while ( node )
- {
- wxControl *child = (wxControl *)node->Data();
- wxEvtHandler *childHandler = child->GetEventHandler();
- if ( child->IsKindOf(CLASSINFO(wxControl)) && childHandler == child )
- child->PushEventHandler(new wxResourceEditorControlHandler(child, childHandler));
- node = node->Next();
- }
-}
-
-void wxResourceEditorDialogHandler::OnLeftClick(int x, int y, int keys)
-{
- if (keys & wxKEY_CTRL)
- {
- wxResourceManager::GetCurrentResourceManager()->EditWindow(handlerDialog);
- return;
- }
-
- // Deselect all items if click on panel
- if (wxResourceManager::GetCurrentResourceManager()->GetEditorControlList()->GetSelection() == RESED_POINTER)
- {
- int needsRefresh = 0;
- wxNode *node = handlerDialog->GetChildren().First();
- while (node)
- {
- wxControl *item = (wxControl *)node->Data();
- wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler();
- if (item->IsKindOf(CLASSINFO(wxControl)) && childHandler->IsSelected())
- {
- needsRefresh ++;
- OnItemSelect(item, FALSE);
- childHandler->SelectItem(FALSE);
- }
- node = node->Next();
- }
- if (needsRefresh > 0)
- {
- wxClientDC dc(handlerDialog);
- dc.Clear();
- handlerDialog->Refresh();
- }
- return;
- }
-
- // Round down to take account of dialog units
- wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(handlerDialog);
- if (resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS)
- {
- wxPoint pt = handlerDialog->ConvertPixelsToDialog(wxPoint(x, y));
-
- // Convert back so we've rounded down
- pt = handlerDialog->ConvertDialogToPixels(pt);
- pt = handlerDialog->ConvertPixelsToDialog(pt);
- pt = handlerDialog->ConvertDialogToPixels(pt);
- x = pt.x;
- y = pt.y;
- }
-
- switch (wxResourceManager::GetCurrentResourceManager()->GetEditorControlList()->GetSelection())
- {
- case RESED_BUTTON:
- resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxButton", x, y);
- break;
- case RESED_BMPBUTTON:
- resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxBitmapButton", x, y, TRUE);
- break;
- case RESED_STATICTEXT:
- resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxStaticText", x, y);
- break;
- case RESED_STATICBMP:
- resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxStaticBitmap", x, y, TRUE);
- break;
- case RESED_TEXTCTRL_SINGLE:
- resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxTextCtrl (single-line)", x, y);
- break;
- case RESED_TEXTCTRL_MULTIPLE:
- resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxTextCtrl (multi-line)", x, y);
- break;
- case RESED_CHOICE:
- resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxChoice", x, y);
- break;
- case RESED_COMBOBOX:
- resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxComboBox", x, y);
- break;
- case RESED_CHECKBOX:
- resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxCheckBox", x, y);
- break;
- case RESED_RADIOBOX:
- resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxRadioBox", x, y);
- break;
- case RESED_RADIOBUTTON:
- resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxRadioButton", x, y);
- break;
- case RESED_LISTBOX:
- resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxListBox", x, y);
- break;
- case RESED_SLIDER:
- resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxSlider", x, y);
- break;
- case RESED_GAUGE:
- resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxGauge", x, y);
- break;
- case RESED_STATICBOX:
- resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxStaticBox", x, y);
- break;
- case RESED_SCROLLBAR:
- resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxScrollBar", x, y);
- break;
- default:
- break;
- }
-
- // Now switch pointer on.
- if (wxResourceManager::GetCurrentResourceManager()->GetEditorControlList()->GetSelection() != RESED_POINTER)
- {
- wxResourceManager::GetCurrentResourceManager()->GetEditorControlList()->SetItemState(RESED_POINTER, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
- }
-}
-
-void wxResourceEditorDialogHandler::OnRightClick(int x, int y, int WXUNUSED(keys))
-{
- wxMenu *menu = resourceManager->GetPopupMenu();
- menu->SetClientData((char *)handlerDialog);
-
- wxString str("wxDialog : ");
- str += handlerDialog->GetName();
-
- menu->SetLabel(OBJECT_MENU_TITLE,str);
-
- handlerDialog->PopupMenu(menu, x, y);
-}
-
-void wxResourceEditorDialogHandler::OnItemLeftClick(wxControl *item, int WXUNUSED(x), int WXUNUSED(y), int keys)
-{
- if (keys & wxKEY_CTRL)
- {
- wxResourceManager::GetCurrentResourceManager()->EditWindow(item);
- return;
- }
-
- /*
- // If this is a wxStaticBox and the pointer isn't an arrow, chances
- // are that we really meant to place an item on the panel.
- // Fake this event.
- if ((item->GetClassInfo() == CLASSINFO(wxStaticBox)) && resourceManager->GetEditorPalette()->currentlySelected != PALETTE_ARROW)
- {
- OnLeftClick(x, y, keys);
- return;
- }
- */
-
- wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler();
-
- if (childHandler->IsSelected())
- {
- childHandler->SelectItem(FALSE);
- OnItemSelect(item, FALSE);
-
- wxClientDC dc(handlerDialog);
- dc.Clear();
- handlerDialog->Refresh();
- }
- else
- {
- childHandler->SelectItem(TRUE);
- OnItemSelect(item, TRUE);
-
- // Deselect other items if shift is not pressed
- int needsRefresh = 0;
- if (!(keys & wxKEY_SHIFT))
- {
- wxNode *node = item->GetParent()->GetChildren().First();
- while (node)
- {
- wxControl *child = (wxControl *)node->Data();
- wxResourceEditorControlHandler *childHandler2 = (wxResourceEditorControlHandler *)child->GetEventHandler();
- if (child->IsKindOf(CLASSINFO(wxControl)) && childHandler2->IsSelected() && child != item)
- {
- childHandler2->SelectItem(FALSE);
- OnItemSelect(child, FALSE);
- needsRefresh ++;
- }
- node = node->Next();
- }
- }
-
- wxClientDC dc(handlerDialog);
- childHandler->DrawSelectionHandles(dc);
-
- if (needsRefresh > 0)
- {
- dc.Clear();
- handlerDialog->Refresh();
- }
- }
-}
-
-void wxResourceEditorDialogHandler::OnItemRightClick(wxControl *item, int x, int y, int WXUNUSED(keys))
-{
-/*
-if (keys & wxKEY_CTRL)
-{
-wxDebugMsg("Item %s, selected = %d\n", item->GetName(), item->IsSelected());
-return;
-}
- */
-
- wxMenu *menu = resourceManager->GetPopupMenu();
- menu->SetClientData((char *)item);
-
- wxWindow *win = (wxWindow *)item;
-
- wxWindowPropertyInfo *info = resourceManager->CreatePropertyInfoForWindow(win);
- if (info)
- {
- info->SetResource(resourceManager->FindResourceForWindow(win));
- wxString str;
- str = win->GetClassInfo()->GetClassName();
- str += " : ";
- if (win->GetName() != "")
- str += win->GetName();
-
- menu->SetLabel(OBJECT_MENU_TITLE,str);
- }
-
- handlerDialog->PopupMenu(menu, x, y);
-}
-
-// Under Windows 95, you can resize a panel interactively depending on
-// window styles.
-void wxResourceEditorDialogHandler::OnSize(wxSizeEvent& event)
-{
- // Update the associated resource
- int w, h;
- handlerDialog->GetClientSize(& w, & h);
-
- wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(handlerDialog);
- if (resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS)
- {
- wxSize sz = handlerDialog->ConvertPixelsToDialog(wxSize(w, h));
- w = sz.x; h = sz.y;
- }
- resource->SetSize(resource->GetX(), resource->GetY(), w, h);
-}
-
-// An event outside any items: may be a drag event.
-void wxResourceEditorDialogHandler::OnMouseEvent(wxMouseEvent& event)
-{
- if (GetEvtHandlerEnabled())
- {
- // If we're dragging an item or selection handle,
- // continue dragging.
- if (dragMode != wxDRAG_MODE_NONE)
- {
- if (dragType != wxDRAG_TYPE_BOUNDING_BOX &&
- dragItem != NULL)
- {
- ProcessItemEvent(dragItem, event, dragType);
- return;
- }
- }
-
- wxCoord x, y;
- event.GetPosition(&x, &y);
-
- // Find which selection handle we're on, if any
- wxNode *node = handlerDialog->GetChildren().First();
- while (node)
- {
- wxWindow *win = (wxWindow *)node->Data();
- if (win->IsKindOf(CLASSINFO(wxControl)))
- {
- wxControl *item = (wxControl *)win;
- wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler();
- int selHandle = childHandler->SelectionHandleHitTest(x, y);
- if (selHandle > 0)
- {
- ProcessItemEvent(item, event, selHandle);
- return;
- }
- }
- node = node->Next();
- }
-
- // We're not on an item or selection handle.
- // so... check for a left or right click event
- // to send to the application.
- int keys = 0;
- if (event.ShiftDown()) keys = keys | wxKEY_SHIFT;
- if (event.ControlDown()) keys = keys | wxKEY_CTRL;
-
- if (node == NULL)
- {
- if (event.Dragging() &&
- (dragType == wxDRAG_TYPE_BOUNDING_BOX))
-
- {
- if (dragMode == wxDRAG_MODE_CONTINUE_LEFT)
- {
- wxClientDC dc(handlerDialog);
- OnDragContinue(FALSE, oldDragX, oldDragY, keys, dc, NULL);
- OnDragContinue(TRUE, x, y, keys, dc, NULL);
- oldDragX = x; oldDragY = y;
- }
-/*
- else if (event.LeftUp() && dragMode == wxDRAG_MODE_CONTINUE_LEFT)
- {
-
- wxClientDC dc(handlerDialog);
- OnDragContinue(FALSE, oldDragX, oldDragY, keys, dc, NULL);
- OnDragContinue(TRUE, x, y, keys, dc, NULL);
- oldDragX = x; oldDragY = y;
- }
-*/
- }
- }
-
- if (event.LeftDown())
- {
- if (!m_mouseCaptured)
- {
- handlerDialog->CaptureMouse();
- m_mouseCaptured = TRUE;
- }
-
- // Starting to draw a bounding box around
- // some numbe of controls on the dialog
- if (node == NULL &&
- wxResourceManager::GetCurrentResourceManager()->GetEditorControlList()->GetSelection() == RESED_POINTER)
- {
- dragItem = NULL;
- dragMode = wxDRAG_MODE_START_LEFT;
- firstDragX = x;
- firstDragY = y;
- dragType = wxDRAG_TYPE_BOUNDING_BOX;
- wxClientDC dc(handlerDialog);
- OnDragBegin(x, y, keys, dc, 0);
- dragMode = wxDRAG_MODE_CONTINUE_LEFT;
- oldDragX = x; oldDragY = y;
- }
-
- event.Skip();
- }
- else if (event.LeftUp())
- {
- if (m_mouseCaptured)
- {
- handlerDialog->ReleaseMouse();
- m_mouseCaptured = FALSE;
- }
-
- if (dragType == wxDRAG_TYPE_BOUNDING_BOX)
- {
- // Determine the bounds of the surrounding box
- int upperLeftX = (x < firstDragX) ? x : firstDragX;
- int upperLeftY = (y < firstDragY) ? y : firstDragY;
- int lowerRightX = (x > firstDragX) ? x : firstDragX;
- int lowerRightY = (y > firstDragY) ? y : firstDragY;
-
- int xpos,ypos;
- int width,height;
-
- bool widgetWithinBounds = FALSE;
-
- int needsRefresh = 0;
-
- wxClientDC dc(handlerDialog);
-
- // Determine what widgets which fall within the bounding box
- // and select them
- wxNode *node = handlerDialog->GetChildren().First();
- while (node)
- {
- widgetWithinBounds = FALSE;
- wxWindow *win = (wxWindow *)node->Data();
- if (win->IsKindOf(CLASSINFO(wxControl)))
- {
- wxControl *item = (wxControl *)win;
- wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler();
-
- // Unselect all widgets that are currently selected
- if (!(keys & wxKEY_SHIFT) && childHandler->IsSelected())
- {
- needsRefresh ++;
- OnItemSelect(item, FALSE);
- childHandler->SelectItem(FALSE);
- }
-
- // Get X,Y and WIDTH,HEIGHT of the widget to be able
- // to determine if any portion of it is within the bounded
- // area
- childHandler->handlerControl->GetPosition(&xpos, &ypos);
- childHandler->handlerControl->GetSize(&width, &height);
-
- // Check if the current widget is inside the rectangle
- // that was just bounded
- if (xpos >= upperLeftX && xpos <= lowerRightX)
- {
- if (ypos >= upperLeftY && ypos <= lowerRightY)
- widgetWithinBounds = TRUE;
- else if (ypos+height >= upperLeftY && ypos+height <= lowerRightY)
- widgetWithinBounds = TRUE;
- }
- else if (xpos+width >= upperLeftX && xpos <= lowerRightX)
- {
- if (ypos >= upperLeftY && ypos <= lowerRightY)
- widgetWithinBounds = TRUE;
- else if (ypos+height >= upperLeftY && ypos+height <= lowerRightY)
- widgetWithinBounds = TRUE;
- }
-
- if (widgetWithinBounds)
- {
- childHandler->SelectItem(TRUE);
- OnItemSelect(item, TRUE);
-
-// childHandler->DrawSelectionHandles(dc);
- }
-
- }
- node = node->Next();
- }
-
- OnDragContinue(FALSE, oldDragX, oldDragY, keys, dc, NULL);
- OnDragEnd(x, y, keys, dc, NULL);
-
- if (needsRefresh > 0)
- {
- dc.Clear();
- handlerDialog->Refresh();
- }
-
- // Always paint, in case the bounding box overlapped with
- // the handles of any selected widgets, that way when the
- // bounding box is cleared, the handles don't get partially
- // erased where the overlap occured
- PaintSelectionHandles(dc);
-
- dragMode = wxDRAG_MODE_NONE;
- checkTolerance = TRUE;
- dragItem = NULL;
- dragType = wxDRAG_TYPE_NONE;
- }
- else
- OnLeftClick(x, y, keys);
- }
- else if (event.RightDown())
- {
- if (m_mouseCaptured)
- {
- handlerDialog->ReleaseMouse();
- m_mouseCaptured = FALSE;
- }
-
- OnRightClick(x, y, keys);
- }
- else if (event.LeftDClick())
- {
- if (m_mouseCaptured)
- {
- handlerDialog->ReleaseMouse();
- m_mouseCaptured = FALSE;
- }
- wxResourceManager::GetCurrentResourceManager()->EditWindow(handlerDialog);
- }
- }
- else
- event.Skip();
-}
-
-void wxResourceEditorDialogHandler::OnItemEvent(wxControl *item, wxMouseEvent& event)
-{
- if (!GetEvtHandlerEnabled())
- return;
-
- // Not a selection handle event: just a normal item event.
- // Transform to panel coordinates.
- wxCoord x, y;
- item->GetPosition(&x, &y);
-
- event.m_x = event.m_x + x;
- event.m_y = event.m_y + y;
-
- ProcessItemEvent(item, event, dragType);
-}
-
-void wxResourceEditorDialogHandler::ProcessItemEvent(wxControl *item, wxMouseEvent& event, int selectionHandle)
-{
- wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler();
-
- wxCoord x, y;
- event.GetPosition(&x, &y);
- int keys = 0;
- if (event.ShiftDown()) keys = keys | wxKEY_SHIFT;
- if (event.ControlDown()) keys = keys | wxKEY_CTRL;
- bool dragging = event.Dragging();
-
- if (dragging)
- {
- int dx = (int)abs((x - firstDragX));
- int dy = (int)abs((y - firstDragY));
- if (checkTolerance && (dx <= dragTolerance) && (dy <= dragTolerance))
- {
- return;
- }
- else
- // If we've ignored the tolerance once, then ALWAYS ignore
- // tolerance in this drag, even if we come back within
- // the tolerance range.
- {
- checkTolerance = FALSE;
- }
- }
- if (event.LeftDClick())
- {
- if (m_mouseCaptured)
- {
- handlerDialog->ReleaseMouse();
- m_mouseCaptured = FALSE;
- }
-
- wxResourceManager::GetCurrentResourceManager()->EditWindow(item);
- }
- else if (dragging && dragItem && dragMode == wxDRAG_MODE_START_LEFT)
- {
- dragMode = wxDRAG_MODE_CONTINUE_LEFT;
- wxClientDC dc(handlerDialog);
- childHandler->OnDragBegin(x, y, keys, dc, selectionHandle);
- oldDragX = x; oldDragY = y;
- if (!m_mouseCaptured)
- {
- handlerDialog->CaptureMouse();
- m_mouseCaptured = TRUE;
- }
- }
- else if (dragging && dragItem && dragMode == wxDRAG_MODE_CONTINUE_LEFT)
- {
- wxClientDC dc(handlerDialog);
- childHandler->OnDragContinue(FALSE, oldDragX, oldDragY, keys, dc, selectionHandle);
- childHandler->OnDragContinue(TRUE, x, y, keys, dc, selectionHandle);
- oldDragX = x; oldDragY = y;
- }
- else if (event.LeftUp() && dragItem && dragMode == wxDRAG_MODE_CONTINUE_LEFT)
- {
- wxClientDC dc(handlerDialog);
- dragMode = wxDRAG_MODE_NONE;
- checkTolerance = TRUE;
-
- childHandler->OnDragContinue(FALSE, oldDragX, oldDragY, keys, dc, selectionHandle);
- childHandler->OnDragEnd(x, y, keys, dc, selectionHandle);
-
- dragItem = NULL;
- dragType = wxDRAG_TYPE_NONE;
-
- if (m_mouseCaptured)
- {
- handlerDialog->ReleaseMouse();
- m_mouseCaptured = FALSE;
- }
- }
- else if (dragging && dragItem && dragMode == wxDRAG_MODE_START_RIGHT)
- {
- wxClientDC dc(handlerDialog);
- dragMode = wxDRAG_MODE_CONTINUE_RIGHT;
- childHandler->OnDragBegin(x, y, keys, dc, selectionHandle);
- oldDragX = x; oldDragY = y;
-
- if (!m_mouseCaptured)
- {
- handlerDialog->CaptureMouse();
- m_mouseCaptured = TRUE;
- }
- }
- else if (dragging && dragItem && dragMode == wxDRAG_MODE_CONTINUE_RIGHT)
- {
- oldDragX = x; oldDragY = y;
- }
- // Obsolete; no longer try to right-drag
- else if (event.RightUp() && dragItem && dragMode == wxDRAG_MODE_CONTINUE_RIGHT)
- {
- dragMode = wxDRAG_MODE_NONE;
- checkTolerance = TRUE;
- dragItem = NULL;
- dragType = wxDRAG_TYPE_NONE;
-
- if (m_mouseCaptured)
- {
- handlerDialog->ReleaseMouse();
- m_mouseCaptured = FALSE;
- }
- }
- else if (event.IsButton())
- {
- checkTolerance = TRUE;
-
- if (event.LeftDown())
- {
- dragItem = item;
- dragMode = wxDRAG_MODE_START_LEFT;
- firstDragX = x;
- firstDragY = y;
- dragType = selectionHandle;
-
- if (!m_mouseCaptured)
- {
- handlerDialog->CaptureMouse();
- m_mouseCaptured = TRUE;
- }
- }
- else if (event.RightDown())
- {
- if (m_mouseCaptured)
- {
- handlerDialog->ReleaseMouse();
- m_mouseCaptured = FALSE;
- }
-
- if (item)
- childHandler->OnRightClick(x, y, keys);
- else
- OnRightClick(x, y, keys);
-
- dragItem = NULL; dragMode = wxDRAG_MODE_NONE; dragType = wxDRAG_TYPE_NONE;
-
- /*
- dragItem = item;
- dragMode = wxDRAG_MODE_START_RIGHT;
- firstDragX = x;
- firstDragY = y;
- dragType = selectionHandle;
-
- if (!m_mouseCaptured)
- {
- handlerDialog->CaptureMouse();
- m_mouseCaptured = TRUE;
- }
- */
- }
- else if (event.LeftUp())
- {
- if (dragItem)
- childHandler->OnLeftClick(x, y, keys);
- else
- OnLeftClick(x, y, keys);
-
- dragItem = NULL; dragMode = wxDRAG_MODE_NONE; dragType = wxDRAG_TYPE_NONE;
-
- if (m_mouseCaptured)
- {
- handlerDialog->ReleaseMouse();
- m_mouseCaptured = FALSE;
- }
- }
- else if (event.RightUp())
- {
- /*
- if (dragItem)
- childHandler->OnRightClick(x, y, keys);
- else
- OnRightClick(x, y, keys);
-
- dragItem = NULL; dragMode = wxDRAG_MODE_NONE; dragType = wxDRAG_TYPE_NONE;
-
- if (m_mouseCaptured)
- {
- handlerDialog->ReleaseMouse();
- m_mouseCaptured = FALSE;
- }
- */
- }
- }
-}
-
-// Calls DrawSelectionHandles for all items if
-// edit mode is on.
-void wxResourceEditorDialogHandler::PaintSelectionHandles(wxDC& dc)
-{
- if (!GetEvtHandlerEnabled())
- return;
-
- dc.BeginDrawing();
-
- wxNode *node = handlerDialog->GetChildren().First();
- while (node)
- {
- wxWindow *win = (wxWindow *)node->Data();
- if (win->IsKindOf(CLASSINFO(wxControl)))
- {
- wxControl *item = (wxControl *)win;
- wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler();
-
- // Don't draw handles for an item that's being moved: it'll
- // smear.
- if (childHandler->IsSelected() && (item != dragItem))
- childHandler->DrawSelectionHandles(dc);
- }
- node = node->Next();
- }
- dc.EndDrawing();
-}
-
-
-
-void wxResourceEditorDialogHandler::DrawBoundingBox(wxDC& dc, int x, int y, int w, int h)
-{
- dc.DrawRectangle(x, y, w, h);
-}
-
-
-void wxResourceEditorDialogHandler::OnDragBegin(int x, int y, int WXUNUSED(keys), wxDC& dc, int selectionHandle)
-{
-/*
- dc.BeginDrawing();
-
- dc.SetOptimization(FALSE);
-
- dc.SetLogicalFunction(wxINVERT);
-
- wxPen pen(wxColour(0, 0, 0), 1, wxDOT);
- dc.SetPen(pen);
- dc.SetBrush(* wxTRANSPARENT_BRUSH);
-
- dc.SetOptimization(TRUE);
-
-// Refresh();
-// DrawBoundingBox(dc, xpos, ypos, width, height);
-
- dc.EndDrawing();
-*/
-} //wxResourceEditorDialogHandler::OnDragBegin()
-
-
-void wxResourceEditorDialogHandler::OnDragContinue(bool WXUNUSED(paintIt), int x, int y, int WXUNUSED(keys), wxDC& dc, int selectionHandle)
-{
- int upperLeftX = (x < firstDragX) ? x : firstDragX;
- int upperLeftY = (y < firstDragY) ? y : firstDragY;
- int lowerRightX = (x > firstDragX) ? x : firstDragX;
- int lowerRightY = (y > firstDragY) ? y : firstDragY;
-
- dc.BeginDrawing();
- dc.SetLogicalFunction(wxINVERT);
- wxPen pen(wxColour(0, 0, 0), 1, wxDOT);
- dc.SetPen(pen);
- dc.SetBrush(* wxTRANSPARENT_BRUSH);
-
- DrawBoundingBox(dc, (int)upperLeftX, upperLeftY,
- lowerRightX-upperLeftX, lowerRightY-upperLeftY);
-
- dc.EndDrawing();
-
-} // wxResourceEditorDialogHandler::OnDragContinue()
-
-
-void wxResourceEditorDialogHandler::OnDragEnd(int x, int y, int WXUNUSED(keys), wxDC& dc, int selectionHandle)
-{
-/*
- dc.BeginDrawing();
-
- dc.SetOptimization(FALSE);
-
- dc.SetLogicalFunction(wxCOPY);
- dc.SetPen(* wxBLACK_PEN);
- dc.SetBrush(* wxBLACK_BRUSH);
-
- dc.SetOptimization(TRUE);
-
- dc.EndDrawing();
-*/
-
-} // wxResourceEditorDialogHandler::OnDragEnd()
-
-void wxResourceEditorDialogHandler::OnObjectEdit(wxCommandEvent& event)
-{
- wxMenu* menu = (wxMenu*) event.GetEventObject();
-
- wxWindow *data = (wxWindow *)menu->GetClientData();
- if (!data)
- return;
-
- wxResourceManager::GetCurrentResourceManager()->EditWindow(data);
-}
-
-void wxResourceEditorDialogHandler::OnObjectDelete(wxCommandEvent& event)
-{
- wxMenu* menu = (wxMenu*) event.GetEventObject();
-
- wxWindow *data = (wxWindow *)menu->GetClientData();
- if (!data)
- return;
-
- // Before deleting a dialog, give the user a last chance
- // change their mind, in case they accidentally right
- // clicked the dialog rather than the widget they were
- // aiming for.
- if (data->IsKindOf(CLASSINFO(wxPanel)))
- {
- wxString str(wxT("Deleting dialog : "));
- str += data->GetName();
- if (wxMessageBox(wxT("Are you sure?"), str, wxYES_NO | wxCENTRE) == wxNO)
- return;
- }
-
- wxResourceManager::GetCurrentResourceManager()->DeselectItemIfNecessary(data);
-
- wxResourceManager::GetCurrentResourceManager()->SaveInfoAndDeleteHandler(data);
- wxResourceManager::GetCurrentResourceManager()->DeleteResource(data);
- wxResourceManager::GetCurrentResourceManager()->DeleteWindow(data);
-}
-
-
-
-/*
-* Event handler for controls
-*/
-
-int wxResourceEditorControlHandler::dragOffsetX = 0;
-int wxResourceEditorControlHandler::dragOffsetY = 0;
-
-wxResourceEditorControlHandler::wxResourceEditorControlHandler(wxControl *control,
- wxEvtHandler *oldHandler)
-{
- handlerControl = control;
- handlerOldHandler = oldHandler;
-
- handleSize = 6;
- handleMargin = 1;
- isSelected = FALSE;
- dragOffsetX = 0;
- dragOffsetY = 0;
- // m_treeItem = 0;
-}
-
-wxResourceEditorControlHandler::~wxResourceEditorControlHandler(void)
-{
-}
-
-/*
-* Manipulation and drawing of items in Edit Mode
-*/
-
-void wxResourceEditorControlHandler::SelectItem(bool select)
-{
- isSelected = select;
-}
-
-// Returns TRUE or FALSE
-bool wxResourceEditorControlHandler::HitTest(int x, int y)
-{
- int xpos, ypos, width, height;
- handlerControl->GetPosition(&xpos, &ypos);
- handlerControl->GetSize(&width, &height);
-
- return ((x >= xpos) && (x <= (xpos + width)) && (y >= ypos) && (y <= (ypos + height)));
-}
-
-// Calculate position of the 8 handles
-void wxResourceEditorControlHandler::CalcSelectionHandles(int *hx, int *hy)
-{
- int xpos, ypos, width, height;
- handlerControl->GetPosition(&xpos, &ypos);
- handlerControl->GetSize(&width, &height);
- int middleX = (xpos + (width/2));
- int middleY = (ypos + (height/2));
-
- // Start from top middle, clockwise.
- /*
- 7 0 1
-
- 6 2
-
- 5 4 3
- */
-
- hx[0] = (int)(middleX - (handleSize/2));
- hy[0] = ypos - handleSize - handleMargin;
-
- hx[1] = xpos + width + handleMargin;
- hy[1] = ypos - handleSize - handleMargin;
-
- hx[2] = xpos + width + handleMargin;
- hy[2] = (int)(middleY - (handleSize/2));
-
- hx[3] = xpos + width + handleMargin;
- hy[3] = ypos + height + handleMargin;
-
- hx[4] = (int)(middleX - (handleSize/2));
- hy[4] = ypos + height + handleMargin;
-
- hx[5] = xpos - handleSize - handleMargin;
- hy[5] = ypos + height + handleMargin;
-
- hx[6] = xpos - handleSize - handleMargin;
- hy[6] = (int)(middleY - (handleSize/2));
-
- hx[7] = xpos - handleSize - handleMargin;
- hy[7] = ypos - handleSize - handleMargin;
-}
-
-// Returns 0 (no hit), 1 - 8 for which selection handle
-// (clockwise from top middle)
-int wxResourceEditorControlHandler::SelectionHandleHitTest(int x, int y)
-{
- // Handle positions
- int hx[8];
- int hy[8];
- CalcSelectionHandles(hx, hy);
-
- int i;
- for (i = 0; i < 8; i++)
- {
- if ((x >= hx[i]) && (x <= (hx[i] + handleSize)) && (y >= hy[i]) && (y <= (hy[i] + handleSize)))
- return (i + 1);
- }
- return 0;
-}
-
-void wxResourceEditorControlHandler::DrawSelectionHandles(wxDC& dc, bool WXUNUSED(erase))
-{
- dc.SetOptimization(FALSE);
-
- dc.SetLogicalFunction(wxCOPY);
- dc.SetPen(* wxBLACK_PEN);
- dc.SetBrush(* wxBLACK_BRUSH);
-
- dc.SetOptimization(TRUE);
-
- // Handle positions
- int hx[8];
- int hy[8];
- CalcSelectionHandles(hx, hy);
-
- int i;
- for (i = 0; i < 8; i++)
- {
- dc.DrawRectangle(hx[i], hy[i], handleSize, handleSize);
- }
-}
-
-void wxResourceEditorControlHandler::DrawBoundingBox(wxDC& dc, int x, int y, int w, int h)
-{
- dc.DrawRectangle(x, y, w, h);
-}
-
-// If selectionHandle is zero, not dragging the selection handle.
-void wxResourceEditorControlHandler::OnDragBegin(int x, int y, int WXUNUSED(keys), wxDC& dc, int selectionHandle)
-{
- int xpos, ypos, width, height;
- handlerControl->GetPosition(&xpos, &ypos);
- handlerControl->GetSize(&width, &height);
-
- dc.BeginDrawing();
-
- // dc.DestroyClippingRegion();
-
- wxPanel *panel = (wxPanel *)handlerControl->GetParent();
-
- // Erase selection handles
- // DrawSelectionHandles(dc, TRUE);
-
- dc.SetOptimization(FALSE);
-
- dc.SetLogicalFunction(wxINVERT);
-
- wxPen pen(wxColour(0, 0, 0), 1, wxDOT);
- dc.SetPen(pen);
- dc.SetBrush(* wxTRANSPARENT_BRUSH);
-
- dc.SetOptimization(TRUE);
-
- if (selectionHandle > 0)
- {
- panel->Refresh();
-
- DrawBoundingBox(dc, xpos, ypos, width, height);
- }
- else
- {
- panel->Refresh();
-
- dragOffsetX = (x - xpos);
- dragOffsetY = (y - ypos);
-
- DrawBoundingBox(dc, xpos, ypos, width, height);
-
- // Also draw bounding boxes for other selected items
- wxNode *node = panel->GetChildren().First();
- while (node)
- {
- wxWindow *win = (wxWindow *)node->Data();
- if (win->IsKindOf(CLASSINFO(wxControl)))
- {
- wxControl *item = (wxControl *)win;
- wxResourceEditorControlHandler *handler = (wxResourceEditorControlHandler *)item->GetEventHandler();
- if ((item != handlerControl) && handler->IsSelected())
- {
- int x1, y1, w1, h1;
- item->GetPosition(&x1, &y1);
- item->GetSize(&w1, &h1);
- handler->DrawBoundingBox(dc, x1, y1, w1, h1);
- }
- }
- node = node->Next();
- }
- }
- dc.EndDrawing();
-}
-
-void wxResourceEditorControlHandler::OnDragContinue(bool WXUNUSED(paintIt), int x, int y, int WXUNUSED(keys), wxDC& dc, int selectionHandle)
-{
- wxPanel *panel = (wxPanel *)handlerControl->GetParent();
- int xpos, ypos, width, height;
- handlerControl->GetPosition(&xpos, &ypos);
- handlerControl->GetSize(&width, &height);
-
- if (selectionHandle > 0)
- {
- /*
- 8 1 2
-
- 7 3
-
- 6 5 4
- */
-
- int x1, y1, width1, height1;
-
- switch (selectionHandle)
- {
- case 1:
- x1 = xpos;
- y1 = y;
- width1 = width;
- height1 = (ypos + height) - y;
- break;
- case 5:
- x1 = xpos;
- y1 = ypos;
- width1 = width;
- height1 = (y - ypos);
- break;
- case 3:
- x1 = xpos;
- y1 = ypos;
- width1 = (x - xpos);
- height1 = height;
- break;
- case 7:
- x1 = x;
- y1 = ypos;
- width1 = (xpos + width) - x;
- height1 = height;
- break;
- case 2:
- x1 = xpos;
- y1 = y;
- width1 = (x - xpos);
- height1 = (ypos + height) - y;
- break;
- case 4:
- x1 = xpos;
- y1 = ypos;
- width1 = (x - xpos);
- height1 = (y - ypos);
- break;
- case 6:
- x1 = x;
- y1 = ypos;
- width1 = (xpos + width) - x;
- height1 = y - ypos;
- break;
- case 8:
- x1 = x;
- y1 = y;
- width1 = (xpos + width) - x;
- height1 = (ypos + height) - y;
- break;
- }
- dc.BeginDrawing();
-
- dc.SetLogicalFunction(wxINVERT);
- wxPen pen(wxColour(0, 0, 0), 1, wxDOT);
- dc.SetPen(pen);
- dc.SetBrush(* wxTRANSPARENT_BRUSH);
-
- DrawBoundingBox(dc, x1, y1, width1, height1);
-
- dc.EndDrawing();
- }
- else
- {
- dc.BeginDrawing();
- dc.SetLogicalFunction(wxINVERT);
- wxPen pen(wxColour(0, 0, 0), 1, wxDOT);
- dc.SetPen(pen);
- dc.SetBrush(* wxTRANSPARENT_BRUSH);
-
- DrawBoundingBox(dc, (int)(x - dragOffsetX), (int)(y - dragOffsetY), width, height);
-
- // Also draw bounding boxes for other selected items
- wxNode *node = panel->GetChildren().First();
- while (node)
- {
- wxWindow *win = (wxWindow *)node->Data();
- if (win->IsKindOf(CLASSINFO(wxControl)))
- {
- wxControl *item = (wxControl *)win;
- wxResourceEditorControlHandler *handler = (wxResourceEditorControlHandler *)item->GetEventHandler();
- if ((item != handlerControl) && handler->IsSelected())
- {
- int x1, y1, w1, h1;
- item->GetPosition(&x1, &y1);
- item->GetSize(&w1, &h1);
- int x2 = (int)(x1 + (x - dragOffsetX) - xpos);
- int y2 = (int)(y1 + (y - dragOffsetY) - ypos);
- handler->DrawBoundingBox(dc, x2, y2, w1, h1);
- }
- }
- node = node->Next();
- }
- dc.EndDrawing();
- }
-}
-
-void wxResourceEditorControlHandler::OnDragEnd(int x, int y, int WXUNUSED(keys), wxDC& dc, int selectionHandle)
-{
- wxPanel *panel = (wxPanel *)handlerControl->GetParent();
-
- dc.BeginDrawing();
-
- int xpos, ypos, width, height;
- handlerControl->GetPosition(&xpos, &ypos);
- handlerControl->GetSize(&width, &height);
-
- wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(handlerControl);
- wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(handlerControl->GetParent());
-
- if (selectionHandle > 0)
- {
- int x1, y1, width1, height1;
-
- switch (selectionHandle)
- {
- case 1:
- x1 = xpos;
- y1 = y;
- width1 = width;
- height1 = (ypos + height) - y;
- break;
- case 5:
- x1 = xpos;
- y1 = ypos;
- width1 = width;
- height1 = (y - ypos);
- break;
- case 3:
- x1 = xpos;
- y1 = ypos;
- width1 = (x - xpos);
- height1 = height;
- break;
- case 7:
- x1 = x;
- y1 = ypos;
- width1 = (xpos + width) - x;
- height1 = height;
- break;
- case 2:
- x1 = xpos;
- y1 = y;
- width1 = (x - xpos);
- height1 = (ypos + height) - y;
- break;
- case 4:
- x1 = xpos;
- y1 = ypos;
- width1 = (x - xpos);
- height1 = (y - ypos);
- break;
- case 6:
- x1 = x;
- y1 = ypos;
- width1 = (xpos + width) - x;
- height1 = y - ypos;
- break;
- case 8:
- x1 = x;
- y1 = y;
- width1 = (xpos + width) - x;
- height1 = (ypos + height) - y;
- break;
- }
- // Update the associated resource
- // We need to convert to dialog units if this is not a dialog or panel, but
- // the parent resource specifies dialog units.
- int resourceX = x1;
- int resourceY = y1;
- int resourceWidth = width1;
- int resourceHeight = height1;
-
- if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS)
- {
- wxPoint pt = handlerControl->GetParent()->ConvertPixelsToDialog(wxPoint(x1, y1));
- wxSize sz = handlerControl->GetParent()->ConvertPixelsToDialog(wxSize(width1, height1));
-
- // Convert back so we've rounded down
- sz = handlerControl->GetParent()->ConvertDialogToPixels(sz);
- sz = handlerControl->GetParent()->ConvertPixelsToDialog(sz);
- resourceWidth = sz.x; resourceHeight = sz.y;
-
- sz = handlerControl->GetParent()->ConvertDialogToPixels(sz);
- width1 = sz.x;
- height1 = sz.y;
-
- pt = handlerControl->GetParent()->ConvertDialogToPixels(pt);
- pt = handlerControl->GetParent()->ConvertPixelsToDialog(pt);
- resourceX = pt.x; resourceY = pt.y;
-
- pt = handlerControl->GetParent()->ConvertDialogToPixels(pt);
- x1 = pt.x;
- y1 = pt.y;
- }
- handlerControl->SetSize(x1, y1, width1, height1);
- resource->SetSize(resourceX, resourceY, resourceWidth, resourceHeight);
- }
- else
- {
- // Correction 31/12/98. We need to round down the values to take into account
- // the fact that several pixels map to the same dialog unit.
-
- int newX = (int)(x - dragOffsetX);
- int newY = (int)(y - dragOffsetY);
- int resourceX = newX;
- int resourceY = newY;
-
- // Update the associated resource
- if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS)
- {
- wxPoint pt = handlerControl->GetParent()->ConvertPixelsToDialog(wxPoint(newX, newY));
- pt = handlerControl->GetParent()->ConvertDialogToPixels(pt);
- pt = handlerControl->GetParent()->ConvertPixelsToDialog(pt);
- resourceX = pt.x; resourceY = pt.y;
- pt = handlerControl->GetParent()->ConvertDialogToPixels(pt);
-
- // Having converted it several times, we know it'll map to dialog units exactly.
- newX = pt.x;
- newY = pt.y;
- }
- handlerControl->Move(newX, newY);
- OldOnMove(newX, newY);
-
- resource->SetSize(resourceX, resourceY, resource->GetWidth(), resource->GetHeight());
-
- // Also move other selected items
- wxNode *node = panel->GetChildren().First();
- while (node)
- {
- wxWindow *win = (wxWindow *)node->Data();
- if (win->IsKindOf(CLASSINFO(wxControl)))
- {
- wxControl *item = (wxControl *)win;
- wxResourceEditorControlHandler *handler = (wxResourceEditorControlHandler *)item->GetEventHandler();
- if ((item != handlerControl) && handler->IsSelected())
- {
- int x1, y1;
- item->GetPosition(&x1, &y1);
- int x2 = (int)(x1 + (x - dragOffsetX) - xpos);
- int y2 = (int)(y1 + (y - dragOffsetY) - ypos);
-
- resourceX = x2;
- resourceY = y2;
-
- // Update the associated resource
- resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(item);
- if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS)
- {
- wxPoint pt = item->GetParent()->ConvertPixelsToDialog(wxPoint(x2, y2));
- pt = item->GetParent()->ConvertDialogToPixels(pt);
- pt = item->GetParent()->ConvertPixelsToDialog(pt);
-
- resourceX = pt.x; resourceY = pt.y;
- pt = handlerControl->GetParent()->ConvertDialogToPixels(pt);
-
- // Having converted it several times, we know it'll map to dialog units exactly
- x2 = pt.x;
- y2 = pt.y;
- }
-
- item->Move(x2, y2);
- ((wxResourceEditorControlHandler *)item->GetEventHandler())->OldOnMove(x2, y2);
- ((wxResourceEditorControlHandler *)item->GetEventHandler())->DrawSelectionHandles(dc);
-
- resource->SetSize(resourceX, resourceY, resource->GetWidth(), resource->GetHeight());
-
- }
- }
- node = node->Next();
- }
- }
- dc.SetOptimization(FALSE);
-
- dc.SetLogicalFunction(wxCOPY);
- dc.SetPen(* wxBLACK_PEN);
- dc.SetBrush(* wxBLACK_BRUSH);
-
- dc.SetOptimization(TRUE);
-
- // Force it to repaint the selection handles (if any)
- // since the panel thinks we're still within a drag and
- // won't paint the handles.
- if (IsSelected())
- DrawSelectionHandles(dc);
-
- dc.EndDrawing();
-
- panel->Refresh();
-}
-
-// These functions call OnItemEvent, OnItemMove and OnItemSize
-// by default.
-void wxResourceEditorControlHandler::OnMouseEvent(wxMouseEvent& event)
-{
-/*
-if ((event.m_eventType == wxEVENT_TYPE_LEFT_DCLICK) ||
-(event.m_eventType == wxEVENT_TYPE_RIGHT_DCLICK))
-return;
- */
- wxWindow *panel = handlerControl->GetParent();
- if ( !panel->GetEventHandler()->IsKindOf(CLASSINFO(wxResourceEditorDialogHandler)) )
- return;
- wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler();
- if ( !panelHandler->GetEvtHandlerEnabled() )
- {
- event.Skip();
- return;
- }
-
- panelHandler->OnItemEvent(handlerControl, event);
-}
-
-void wxResourceEditorControlHandler::OldOnMove(int x, int y)
-{
- wxWindow *panel = handlerControl->GetParent();
- if ( !panel->GetEventHandler()->IsKindOf(CLASSINFO(wxResourceEditorDialogHandler)) )
- return;
-
- wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler();
- panelHandler->OnItemMove(handlerControl, x, y);
-}
-
-void wxResourceEditorControlHandler::OldOnSize(int w, int h)
-{
- wxWindow *panel = handlerControl->GetParent();
- if ( !panel->GetEventHandler()->IsKindOf(CLASSINFO(wxResourceEditorDialogHandler)) )
- return;
-
- wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler();
- panelHandler->OnItemSize(handlerControl, w, h);
-}
-
-void wxResourceEditorControlHandler::OnSelect(bool select)
-{
- wxWindow *panel = handlerControl->GetParent();
- if ( !panel->GetEventHandler()->IsKindOf(CLASSINFO(wxResourceEditorDialogHandler)) )
- return;
-
- wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler();
- panelHandler->OnItemSelect(handlerControl, select);
-}
-
-void wxResourceEditorControlHandler::OnLeftClick(int x, int y, int keys)
-{
- wxWindow *panel = handlerControl->GetParent();
- if ( !panel->GetEventHandler()->IsKindOf(CLASSINFO(wxResourceEditorDialogHandler)) )
- return;
-
- wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler();
- panelHandler->OnItemLeftClick(handlerControl, x, y, keys);
-}
-
-void wxResourceEditorControlHandler::OnRightClick(int x, int y, int keys)
-{
- wxWindow *panel = handlerControl->GetParent();
- if ( !panel->GetEventHandler()->IsKindOf(CLASSINFO(wxResourceEditorDialogHandler)) )
- return;
-
- wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler();
- panelHandler->OnItemRightClick(handlerControl, x, y, keys);
-}
-
-
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: dlghndlr.h
-// Purpose: Dialog handler
-// Author: Julian Smart
-// Modified by:
-// Created: 04/01/98
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows license
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _DLGHNDLR_H_
-#define _DLGHNDLR_H_
-
-#define wxDRAG_MODE_NONE 0
-#define wxDRAG_MODE_START_LEFT 1
-#define wxDRAG_MODE_CONTINUE_LEFT 2
-#define wxDRAG_MODE_START_RIGHT 3
-#define wxDRAG_MODE_CONTINUE_RIGHT 4
-#define wxDRAG_TYPE_NONE 0
-#define wxDRAG_TYPE_ITEM 100
-#define wxDRAG_TYPE_BOUNDING_BOX 200
-
-#define wxKEY_SHIFT 1
-#define wxKEY_CTRL 2
-
-class wxResourceEditorDialogHandler: public wxEvtHandler
-{
- DECLARE_CLASS(wxResourceEditorDialogHandler)
-public:
- wxResourceManager *resourceManager;
- wxPanel *handlerDialog;
- wxItemResource *handlerResource;
- wxEvtHandler *handlerOldHandler;
-
- wxControl *dragItem;
- int dragMode;
- int dragType;
- int dragTolerance;
- bool checkTolerance;
- int firstDragX;
- int firstDragY;
- int oldDragX;
- int oldDragY;
- bool m_mouseCaptured;
- // long m_treeItem;
-
- wxResourceEditorDialogHandler(wxPanel *dialog, wxItemResource *resource, wxEvtHandler *oldHandler,
- wxResourceManager *manager);
- ~wxResourceEditorDialogHandler(void);
-
- void OnPaint(wxPaintEvent& event);
- void OnMouseEvent(wxMouseEvent& event);
- void OnSize(wxSizeEvent& event);
- void OnObjectEdit(wxCommandEvent& event);
- void OnObjectDelete(wxCommandEvent& event);
-
- virtual void OnItemEvent(wxControl *win, wxMouseEvent& event);
- virtual void OnLeftClick(int x, int y, int keys);
- virtual void OnRightClick(int x, int y, int keys);
- virtual void OnItemLeftClick(wxControl *item, int x, int y, int keys);
- virtual void OnItemRightClick(wxControl *item, int x, int y, int keys);
- virtual void OnItemSelect(wxControl *item, bool select);
- virtual void OnItemMove(
- wxControl *WXUNUSED(item), int WXUNUSED(x), int WXUNUSED(y) ) {};
- virtual void OnItemSize(
- wxControl *WXUNUSED(item), int WXUNUSED(w), int WXUNUSED(h) ) {};
-
- void AddChildHandlers(void);
- void PaintSelectionHandles(wxDC& dc);
- void ProcessItemEvent(wxControl *item, wxMouseEvent& event, int selectionHandle);
-
- virtual void DrawBoundingBox(wxDC& dc, int x, int y, int w, int h);
- virtual void OnDragBegin(int x, int y, int keys, wxDC& dc, int selectionHandle);
- virtual void OnDragContinue(bool paintIt, int x, int y, int keys, wxDC& dc, int selectionHandle);
- virtual void OnDragEnd(int x, int y, int keys, wxDC& dc, int selectionHandle);
-
- // Accessors
- /*
- inline long GetTreeItem() const { return m_treeItem; }
- inline void SetTreeItem(long item) { m_treeItem = item; }
- */
-
- DECLARE_EVENT_TABLE()
-};
-
-class wxResourceEditorControlHandler: public wxEvtHandler
-{
- DECLARE_CLASS(wxResourceEditorControlHandler)
-public:
- // wxResourceManager *resourceManager;
- wxControl *handlerControl;
- // wxItemResource *handlerResource;
- wxEvtHandler *handlerOldHandler;
-
- bool isSelected;
- int handleSize; // selection handle size
- int handleMargin; // Distance between item edge and handle edge
- long m_treeItem;
- static int dragOffsetX; // Distance between pointer at start of drag and
- static int dragOffsetY; // top-left of item
-
- wxResourceEditorControlHandler(wxControl *control, wxEvtHandler *oldHandler);
- ~wxResourceEditorControlHandler(void);
-
- void OnMouseEvent(wxMouseEvent& event);
-
- // Manipulation and drawing of items in Edit Mode
-
- // Calculate position of the 8 handles
- virtual void CalcSelectionHandles(int *hx, int *hy);
- virtual void DrawSelectionHandles(wxDC& dc, bool erase = FALSE);
- virtual void DrawBoundingBox(wxDC& dc, int x, int y, int w, int h);
- virtual void SelectItem(bool select);
- virtual inline bool IsSelected(void) { return isSelected; }
-
- // Returns TRUE or FALSE
- virtual bool HitTest(int x, int y);
-
- // Returns 0 (no hit), 1 - 8 for which selection handle
- // (clockwise from top middle)
- virtual int SelectionHandleHitTest(int x, int y);
-
- // If selectionHandle is zero, not dragging the selection handle.
- virtual void OnDragBegin(int x, int y, int keys, wxDC& dc, int selectionHandle);
- virtual void OnDragContinue(bool paintIt, int x, int y, int keys, wxDC& dc, int selectionHandle);
- virtual void OnDragEnd(int x, int y, int keys, wxDC& dc, int selectionHandle);
-
- // These functions call panel functions
- // by default.
- virtual void OldOnMove(int x, int y);
- virtual void OldOnSize(int w, int h);
- virtual void OnLeftClick(int x, int y, int keys);
- virtual void OnRightClick(int x, int y, int keys);
- virtual void OnSelect(bool select);
-
- // Accessors
- /*
- inline long GetTreeItem() const { return m_treeItem; }
- inline void SetTreeItem(long item) { m_treeItem = item; }
- */
-
- DECLARE_EVENT_TABLE()
-};
-
-// This dialog, for testing dialogs, has to intercept commands before
-// they go up the hierarchy and accidentally set off arbitrary
-// Dialog Editor functionality
-class ResourceEditorDialogTester: public wxDialog
-{
-public:
- ResourceEditorDialogTester() {}
-
- bool ProcessEvent(wxEvent& event);
-};
-
-#endif
-
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: edlist.cpp
-// Purpose: Resource editor project management tree
-// Author: Julian Smart
-// Modified by:
-// Created: 04/01/98
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows license
-/////////////////////////////////////////////////////////////////////////////
-
-#ifdef __GNUG__
-#pragma implementation "edlist.h"
-#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"
-
-#include "wx/checkbox.h"
-#include "wx/button.h"
-#include "wx/choice.h"
-#include "wx/listbox.h"
-#include "wx/radiobox.h"
-#include "wx/statbox.h"
-#include "wx/gauge.h"
-#include "wx/slider.h"
-#include "wx/textctrl.h"
-#endif
-
-#include "edlist.h"
-#include "reseditr.h"
-
-BEGIN_EVENT_TABLE(wxResourceEditorControlList, wxListCtrl)
-END_EVENT_TABLE()
-
-wxResourceEditorControlList::wxResourceEditorControlList(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
- long style):
-wxListCtrl(parent, id, pos, size, style), m_imageList(16, 16, TRUE)
-{
- Initialize();
-}
-
-wxResourceEditorControlList::~wxResourceEditorControlList()
-{
- SetImageList(NULL, wxIMAGE_LIST_SMALL);
-}
-
-// Load icons and add to the list
-void wxResourceEditorControlList::Initialize()
-{
-#ifdef __WXMSW__
- wxIcon icon1("ARROW_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16);
- wxIcon icon2("BUTTON_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16);
- wxIcon icon3("BMPBUTTON_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16);
- wxIcon icon4("STATICTEXT_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16);
- wxIcon icon5("STATICBMP_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16);
- wxIcon icon6("STATICBOX_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16);
- wxIcon icon7("TEXTSING_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16);
- wxIcon icon8("TEXTMULT_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16);
- wxIcon icon9("LISTBOX_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16);
- wxIcon icon10("CHOICE_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16);
- wxIcon icon11("COMBOBOX_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16);
- wxIcon icon12("CHECKBOX_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16);
- wxIcon icon13("SLIDER_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16);
- wxIcon icon14("GAUGE_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16);
- wxIcon icon15("RADIOBOX_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16);
- wxIcon icon16("RADIOBTN_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16);
- wxIcon icon17("SCROLBAR_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16);
-#else
-
-#include "bitmaps/arrow.xpm"
- wxIcon icon1( arrow_xpm );
-#include "bitmaps/button.xpm"
- wxIcon icon2( button_xpm );
-#include "bitmaps/bmpbuttn.xpm"
- wxIcon icon3( bmpbuttn_xpm );
-#include "bitmaps/stattext.xpm"
- wxIcon icon4( stattext_xpm );
-#include "bitmaps/statbmp.xpm"
- wxIcon icon5( statbmp_xpm );
-#include "bitmaps/statbox.xpm"
- wxIcon icon6( statbox_xpm );
-#include "bitmaps/textsing.xpm"
- wxIcon icon7( textsing_xpm );
-#include "bitmaps/textmult.xpm"
- wxIcon icon8( textmult_xpm );
-#include "bitmaps/listbox.xpm"
- wxIcon icon9( listbox_xpm );
-#include "bitmaps/choice.xpm"
- wxIcon icon10( choice_xpm );
-#include "bitmaps/combobox.xpm"
- wxIcon icon11( combobox_xpm );
-#include "bitmaps/checkbox.xpm"
- wxIcon icon12( checkbox_xpm );
-#include "bitmaps/slider.xpm"
- wxIcon icon13( slider_xpm );
-#include "bitmaps/gauge.xpm"
- wxIcon icon14( gauge_xpm );
-#include "bitmaps/radiobox.xpm"
- wxIcon icon15( radiobox_xpm );
-#include "bitmaps/radiobtn.xpm"
- wxIcon icon16( radiobtn_xpm );
-#include "bitmaps/scrolbar.xpm"
- wxIcon icon17( scrolbar_xpm );
-#endif
-
- m_imageList.Add(icon1);
- m_imageList.Add(icon2);
- m_imageList.Add(icon3);
- m_imageList.Add(icon4);
- m_imageList.Add(icon5);
- m_imageList.Add(icon6);
- m_imageList.Add(icon7);
- m_imageList.Add(icon8);
- m_imageList.Add(icon9);
- m_imageList.Add(icon10);
- m_imageList.Add(icon11);
- m_imageList.Add(icon12);
- m_imageList.Add(icon13);
- m_imageList.Add(icon14);
- m_imageList.Add(icon15);
- m_imageList.Add(icon16);
- m_imageList.Add(icon17);
-
- SetImageList(& m_imageList, wxIMAGE_LIST_SMALL);
-
- long id = InsertItem(0, "Pointer", 0);
- id = InsertItem(1, "wxButton", 1);
- id = InsertItem(2, "wxBitmapButton", 2);
- id = InsertItem(3, "wxStaticText", 3);
- id = InsertItem(4, "wxStaticBitmap", 4);
- id = InsertItem(5, "wxStaticBox", 5);
- id = InsertItem(6, "wxTextCtrl", 6);
- id = InsertItem(7, "wxTextCtrl", 7);
- id = InsertItem(8, "wxListBox", 8);
- id = InsertItem(9, "wxChoice", 9);
- id = InsertItem(10, "wxComboBox", 10);
- id = InsertItem(11, "wxCheckBox", 11);
- id = InsertItem(12, "wxSlider", 12);
- id = InsertItem(13, "wxGauge", 13);
- id = InsertItem(14, "wxRadioBox", 14);
- id = InsertItem(15, "wxRadioButton", 15);
- id = InsertItem(16, "wxScrollBar", 16);
-
- /*
- InsertItem(RESED_TREECTRL, "wxTreeCtrl", 16);
- InsertItem(RESED_LISTCTRL, "wxListCtrl", 17);
- InsertItem(RESED_SPINBUTTON, "wxSpinButton", 18);
- */
-
- // SetColumnWidth(-1, 80);
-}
-
-// Get selection, or -1
-long wxResourceEditorControlList::GetSelection() const
-{
- return GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
-}
-
-
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: edlist.h
-// Purpose: Resource editor list of controls
-// Author: Julian Smart
-// Modified by:
-// Created: 04/01/98
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows license
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _EDLIST_H_
-#define _EDLIST_H_
-
-#include "wx/listctrl.h"
-#include "wx/imaglist.h"
-
-class wxResourceEditorControlList: public wxListCtrl
-{
-public:
- wxResourceEditorControlList(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
- long style = wxLC_SMALL_ICON|wxLC_AUTOARRANGE|wxLC_SINGLE_SEL);
- ~wxResourceEditorControlList();
-
- // Load icons and add to the list
- void Initialize();
-
- // Get selection, or -1
- long GetSelection() const;
-
- DECLARE_EVENT_TABLE()
-
-protected:
- wxImageList m_imageList;
-};
-
-#endif
-
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: edtree.cpp
-// Purpose: Resource editor project management tree
-// Author: Julian Smart
-// Modified by:
-// Created: 04/01/98
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows license
-/////////////////////////////////////////////////////////////////////////////
-
-#ifdef __GNUG__
-#pragma implementation "edtree.h"
-#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"
-
-#include "wx/checkbox.h"
-#include "wx/button.h"
-#include "wx/choice.h"
-#include "wx/listbox.h"
-#include "wx/radiobox.h"
-#include "wx/statbox.h"
-#include "wx/gauge.h"
-#include "wx/slider.h"
-#include "wx/textctrl.h"
-#endif
-
-#include "edtree.h"
-#include "reseditr.h"
-
-BEGIN_EVENT_TABLE(wxResourceEditorProjectTree, wxTreeCtrl)
-EVT_LEFT_DCLICK(wxResourceEditorProjectTree::LeftDClick)
-//EVT_LEFT_DOWN(wxResourceEditorProjectTree::LeftClick)
-EVT_TREE_SEL_CHANGED(IDC_TREECTRL, wxResourceEditorProjectTree::OnSelChanged)
-END_EVENT_TABLE()
-
-wxResourceEditorProjectTree::wxResourceEditorProjectTree(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
- long style):
-wxTreeCtrl(parent, id, pos, size, style)
-{
-}
-
-/*
-void wxResourceEditorProjectTree::LeftClick(wxMouseEvent &event)
-{
- long sel = GetSelection();
- if (sel == -1)
- return;
-
- if (GetItemData(sel) == 0)
- {
- event.Skip();
- return;
- }
-
- wxItemResource* res = ((wxResourceTreeData *)GetItemData(sel))->GetResource();
-
- wxString resType(res->GetType());
-
- wxResourceEditorFrame *frame = (wxResourceEditorFrame *)wxWindow::GetParent();
- wxResourceManager *manager = frame->manager;
-
- long selParent = wxTreeCtrl::GetParent(sel);
-
- if (resType != "wxDialog" && resType != "wxDialogBox" && resType != "wxPanel")
- {
- wxWindow *win = manager->FindWindowForResource(res);
-
- // Check to see if the item selected in on the current dialog being
- // displayed. If not, then we will have to find the items parent dialog
- if (!win)
- {
- // The item is on a dialog other than the one currently being
- // shown/worked on, so find the parent dialog, switch to use
- // its resource manager, and then find the window in the dialog
- wxItemResource* resParent = ((wxResourceTreeData *)GetItemData(selParent))->GetResource();
- wxResourceManager::GetCurrentResourceManager()->Edit(resParent);
- win = manager->FindWindowForResource(res);
- }
-/ *
- if (win)
- manager->GetCurrentResourceManager()->EditWindow(win);
-* /
- }
-// else
-// manager->EditSelectedResource();
-
- event.Skip();
-
-} // wxResourceEditorProjectTree::LeftClick()
-*/
-
-void wxResourceEditorProjectTree::LeftDClick(wxMouseEvent& WXUNUSED(event))
-{
- long sel = GetSelection();
- if (sel == -1)
- return;
-
- if (GetItemData(sel) == 0)
- return;
-
- wxItemResource* res = ((wxResourceTreeData *)GetItemData(sel))->GetResource();
-
- wxString resType(res->GetType());
-
- wxResourceEditorFrame *frame = (wxResourceEditorFrame *)wxWindow::GetParent();
- wxResourceManager *manager = frame->manager;
-
- long selParent = wxTreeCtrl::GetParent(sel);
-
- wxWindow *win = NULL;
- if (resType != "wxDialog" && resType != "wxDialogBox" && resType != "wxPanel")
- {
- win = manager->FindWindowForResource(res);
-
- // Check to see if the item selected in on the current dialog being
- // displayed. If not, then we will have to find the items parent dialog
- if (!win)
- {
- // The item is on a dialog other than the one currently being
- // shown/worked on, so find the parent dialog, switch to use
- // its resource manager, and then find the window in the dialog
- wxItemResource* resParent = ((wxResourceTreeData *)GetItemData(selParent))->GetResource();
- wxResourceManager::GetCurrentResourceManager()->Edit(resParent);
- win = manager->FindWindowForResource(res);
- }
-
- if (win)
- manager->GetCurrentResourceManager()->EditWindow(win);
- }
- else
- {
-// manager->EditSelectedResource();
- win = manager->FindWindowForResource(res);
- wxResourceManager::GetCurrentResourceManager()->EditWindow(win);
- }
-
-
-} // wxResourceEditorProjectTree::LeftDClick()
-
-
-void wxResourceEditorProjectTree::OnSelChanged(wxTreeEvent& WXUNUSED(event))
-{
- long sel = GetSelection();
- if (sel == -1)
- return;
-
- if (GetItemData(sel) == 0)
- return;
-
- if (m_invalid)
- return;
-
- wxItemResource* res = ((wxResourceTreeData *)GetItemData(sel))->GetResource();
- wxString resType(res->GetType());
-
- wxResourceEditorFrame *frame = (wxResourceEditorFrame *)wxWindow::GetParent();
- wxResourceManager *manager = frame->manager;
-
- long selParent = wxTreeCtrl::GetParent(sel);
-
- if (resType != "wxDialog" && resType != "wxDialogBox" && resType != "wxPanel")
- {
- wxWindow *win = manager->FindWindowForResource(res);
-
- // Check to see if the item selected in on the current dialog being
- // displayed. If not, then we will have to find the items parent dialog
- if (!win)
- {
- // The item is on a dialog other than the one currently being
- // shown/worked on, so find the parent dialog, switch to use
- // its resource manager, and then find the window in the dialog
- wxItemResource* resParent = ((wxResourceTreeData *)GetItemData(selParent))->GetResource();
- wxResourceManager::GetCurrentResourceManager()->Edit(resParent);
- win = manager->FindWindowForResource(res);
- }
-
-// if (win)
-// manager->GetCurrentResourceManager()->EditWindow(win);
- }
- else
- wxResourceManager::GetCurrentResourceManager()->Edit(res);
-
-} // wxResourceEditorProjectTree::OnSelChanged()
-
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: edtree.h
-// Purpose: Resource editor project management tree control
-// Author: Julian Smart
-// Modified by:
-// Created: 04/01/98
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows license
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _EDTREE_H_
-#define _EDTREE_H_
-
-#include "wx/treectrl.h"
-
-class wxResourceEditorProjectTree: public wxTreeCtrl
-{
-public:
- wxResourceEditorProjectTree(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
- long style = wxTR_HAS_BUTTONS);
-
- void LeftDClick(wxMouseEvent& event);
- void OnSelChanged(wxTreeEvent& event);
-
- inline void SetInvalid(bool invalid) { m_invalid = invalid; }
-
-protected:
- bool m_invalid; // While TRUE, don't respond to selections etc.
-
- DECLARE_EVENT_TABLE()
-
-};
-
-#endif
-
+++ /dev/null
-#
-# File: makefile.dos
-# Author: Julian Smart
-# Created: 1995
-# Updated:
-# Copyright:
-#
-# "%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)\utils\dialoged\src
-WXLIB = $(WXDIR)\lib\wx.lib
-
-DOCDIR = $(WXDIR)\utils\dialoged\docs
-
-
-LIBS=$(WXLIB) oldnames libw llibcew commdlg shell ddeml
-INC=/I$(WXDIR)\include\base /I$(WXDIR)\include\msw /I$(PROPINC)
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-# Default is to output RTF for WinHelp
-!ifndef RTFSTYLE
-RTFSTYLE=-winhelp
-!endif
-
-# Set this to nothing if using MS C++ 7
-ZOPTION=/Z7
-
-!if "$(FINAL)" == "0"
-CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od /DDEBUG=$(DEBUG) /YuWX_PREC.H $(INC) /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch
-LINKFLAGS=/NOD /CO /SEG:512 /ONERROR:NOEXE
-!else
-CPPFLAGS=/AL /W3 /G2sw /Ox /YuWX_PREC.H $(INC) /DDEBUG=$(DEBUG) /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch
-LINKFLAGS=/NOD /SEG:512 /ONERROR:NOEXE
-!endif
-
-OBJECTS = dialoged.obj wx_resed.obj wx_rdlg.obj wx_reswr.obj wx_repal.obj wx_rprop.obj
-
-all: prop dialoged.exe
-
-wx:
- cd $(WXDIR)\src\msw
- nmake -f makefile.dos
- cd $(THISDIR)
-
-wxclean:
- cd $(WXDIR)\src\msw
- nmake -f makefile.dos clean
- cd $(THISDIR)
-
-
-dialoged.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) $(OBJECTS) $(PROPLIB) dialoged.def dialoged.res
- link $(LINKFLAGS) @<<
-$(WXDIR)\src\msw\dummy.obj $(OBJECTS),
-dialoged,
-NUL,
-$(LIBS),
-dialoged.def
-;
-<<
- rc -30 -K dialoged.res
-
-dialoged.obj: dialoged.h $(PROPINC)\wx_prop.h wx_resed.h wx_rprop.h dialoged.$(SRCSUFF)
- cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
-
-wx_resed.obj: wx_resed.h $(PROPINC)\wx_prop.h wx_resed.$(SRCSUFF)
- cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
-
-wx_rdlg.obj: wx_resed.h $(PROPINC)\wx_prop.h wx_rdlg.$(SRCSUFF)
- cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
-
-wx_reswr.obj: wx_resed.h wx_reswr.$(SRCSUFF)
- cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
-
-wx_rprop.obj: wx_resed.h $(PROPINC)\wx_prop.h wx_rprop.$(SRCSUFF)
- cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
-
-wx_repal.obj: wx_resed.h $(PROPINC)\wx_prop.h wx_repal.h wx_repal.$(SRCSUFF)
- cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
-
-dialoged.res : dialoged.rc $(WXDIR)\include\msw\wx.rc
- rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw dialoged
-
-wxtree:
- cd $(TREEDIR)\src
- nmake -f makefile.dos FINAL="$(FINAL)" OPT="$(OPT)"
- cd $(THISDIR)
-
-dib:
- cd $(DIBDIR)
- nmake -f makefile.dos FINAL="$(FINAL)" OPT="$(OPT)"
- cd $(THISDIR)
-
-prop:
- cd $(PROPDIR)\src
- nmake -f makefile.dos FINAL="$(FINAL)" OPT="$(OPT)"
- cd $(THISDIR)
-
-# Making documents
-docs: hlp
-hlp: $(DOCDIR)/dialoged.hlp
-hlp32: $(DOCDIR)/hlp32/dialoged.hlp
-rtf: $(DOCDIR)/dialoged.rtf
-
-$(DOCDIR)/dialoged.hlp: $(DOCDIR)/dialoged.rtf $(DOCDIR)/dialoged.hpj
- cd $(DOCDIR)
- -erase dialoged.ph
- hc dialoged
- cd $(THISDIR)
-
-$(DOCDIR)/hlp32/dialoged.hlp: $(DOCDIR)/hlp32/dialoged.rtf $(DOCDIR)/hlp32/dialoged.hpj
- cd $(DOCDIR)/hlp32
- -erase dialoged.ph
- -wx /W hcw /c /e clockwrk.hpj
- cd $(THISDIR)
-
-$(DOCDIR)/dialoged.rtf: $(DOCDIR)/body.tex $(DOCDIR)/classes.tex $(DOCDIR)/tech.tex $(DOCDIR)/dialoged.tex
- cd $(DOCDIR)
- -wx /W tex2rtf $(DOCDIR)/dialoged.tex $(DOCDIR)/dialoged.rtf -twice $(RTFSTYLE)
- cd $(THISDIR)
-
-$(DOCDIR)/hlp32/dialoged.rtf: $(DOCDIR)/body.tex $(DOCDIR)/classes.tex $(DOCDIR)/body.tex $(DOCDIR)/dialoged.tex
- cd $(DOCDIR)
- -wx /W tex2rtf $(DOCDIR)/dialoged.tex $(DOCDIR)/hlp32/dialoged.rtf -twice $(RTFSTYLE) -macros $(DOCDIR)/t2rtf32.ini
- cd $(THISDIR)
-
-wordrtf:
- cd $(DOCDIR)
- -wx /W tex2rtf $(DOCDIR)/dialoged.tex $(DOCDIR)/dialoged.rtf -twice -rtf
- cd $(THISDIR)
-
-cleanprop:
- cd $(PROPDIR)\src
- nmake -f makefile.dos clean
- cd $(THISDIR)
-
-rcparser:
- cd $(RCDIR)\src
- nmake -f makefile.dos FINAL=$(FINAL) OPT=$(OPT)
- cd $(THISDIR)
-
-cleanrtf:
- cd $(DOCDIR)
- -erase *.rtf
- cd $(THISDIR)
-
-cleanutils: cleanprop
- -erase *.obj
- -erase *.sbr
- -erase *.exe
- -erase *.res
- -erase *.map
- -erase *.pdb
-
-clean:
- -erase *.obj *.exe *.res *.map *.rws
+++ /dev/null
-# Symantec C++ makefile for Dialog Editor
-
-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)
-OBJECTS = wx_resed.obj wx_rdlg.obj wx_reswr.obj wx_repal.obj wx_rprop.obj dialoged.obj
-
-LIBS=$(WXLIB) libw.lib commdlg.lib shell.lib
-
-.$(SRCSUFF).obj:
- *$(CC) -c $(CFLAGS) -I$(INCLUDE) $<
-
-.rc.res:
- *$(RC) -r -I$(INCLUDE) $<
-
-dialoged.exe: $(OBJECTS) dialoged.def dialoged.res
- *$(CC) $(LDFLAGS) -o$@ $(OBJECTS) dialoged.def $(LIBS)
- *$(RC) -k dialoged.res
-
-clean:
- -del *.obj
- -del *.exe
- -del *.res
- -del *.map
- -del *.rws
+++ /dev/null
-#
-# File: makefile.unx
-# Author: Julian Smart
-# Created: 1998
-# Updated:
-# Copyright: (c) 1998 Julian Smart
-#
-# "%W% %G%"
-#
-# Makefile for Dialog Editor (Unix)
-
-PROGRAM=dialoged
-
-OBJECTS = dialoged.o reseditr.o dlghndlr.o reswrite.o\
- winprop.o edtree.o edlist.o symbtabl.o winstyle.o
-
-include ../../../src/makeprog.env
-
+++ /dev/null
-#
-# File: makefile.vc
-# Author: Julian Smart
-# Created: 1993
-# Updated:
-# Copyright: (c) 1993-1999 Julian Smart
-#
-# "%W% %G%"
-#
-# Makefile : Builds Dialog Editor (MS VC++).
-# Use FINAL=1 argument to nmake to build final version with no debugging
-# info
-
-
-# N.B. This makefiles uses CPPFLAGS2 to disable precompiled headers so we
-# can override optimization, which is necessary for correct behaviour under
-# VC++ 5 (otherwise deleting an object causes a crash).
-
-# Set WXDIR for your system
-WXDIR = $(WXWIN)
-THISDIR = $(WXDIR)\utils\dialoged\src
-DOCDIR=$(WXDIR)\docs
-LOCALDOCDIR=$(WXDIR)\utils\dialoged\docs
-
-FINAL=0
-!if "$(FINAL)" == "0"
-EXTRALIBS=$(WXDIR)\lib\wxdeprecatedd.lib
-!else
-EXTRALIBS=$(WXDIR)\lib\wxdeprecated.lib
-!endif
-
-OVERRIDEFLAGS=/Od
-
-PROGRAM=dialoged
-
-OBJECTS = dialoged.obj reseditr.obj dlghndlr.obj reswrite.obj\
- winprop.obj edtree.obj edlist.obj symbtabl.obj winstyle.obj
-
-!include $(WXDIR)\src\makeprog.vc
-
-
-all: dialoged.exe
-
-dialoged.obj: winprop.h reseditr.h dialoged.$(SRCSUFF) $(DUMMYOBJ)
- $(cc) @<<
-$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF)
-<<
-
-winprop.obj: winprop.h reseditr.h winprop.$(SRCSUFF) $(DUMMYOBJ)
- $(cc) @<<
-$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF)
-<<
-
-reswrite.obj: winprop.h reseditr.h reswrite.$(SRCSUFF) $(DUMMYOBJ)
- $(cc) @<<
-$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF)
-<<
-
-reseditr.obj: winprop.h reseditr.h reseditr.$(SRCSUFF) $(DUMMYOBJ)
- $(cc) @<<
-$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF)
-<<
-
-edtree.obj: winprop.h reseditr.h edtree.h edtree.$(SRCSUFF) $(DUMMYOBJ)
- $(cc) @<<
-$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF)
-<<
-
-edlist.obj: winprop.h reseditr.h edlist.h edlist.$(SRCSUFF) $(DUMMYOBJ)
- $(cc) @<<
-$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF)
-<<
-
-dlghndlr.obj: winprop.h reseditr.h dlghndlr.$(SRCSUFF) $(DUMMYOBJ)
- $(cc) @<<
-$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF)
-<<
-
-symbtabl.obj: symbtabl.h symbtabl.$(SRCSUFF) $(DUMMYOBJ)
- $(cc) @<<
-$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF)
-<<
-
-winstyle.obj: winstyle.h winstyle.$(SRCSUFF) $(DUMMYOBJ)
- $(cc) @<<
-$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF)
-<<
-
-DOCSOURCES=$(LOCALDOCDIR)\dialoged.tex $(LOCALDOCDIR)\body.tex\
- $(LOCALDOCDIR)\bugs.tex $(LOCALDOCDIR)\changes.tex\
- $(LOCALDOCDIR)\classes.tex $(LOCALDOCDIR)\tech.tex
-
-html: $(DOCDIR)\html\dialoged\dlged.htm
-htmlhelp: $(DOCDIR)\htmlhelp\dialoged.chm
-htb: $(DOCDIR)\htb\dialoged.htb
-hlp: $(DOCDIR)\winhelp\dialoged.hlp
-pdfrtf: $(DOCDIR)\pdf\dialoged.rtf
-ps: $(DOCDIR)\ps\dialoged.ps
-
-$(DOCDIR)\winhelp\dialoged.hlp: $(LOCALDOCDIR)\dialoged.rtf $(LOCALDOCDIR)\dialoged.hpj
- cd $(LOCALDOCDIR)
- -erase dialoged.ph
- hc dialoged
- move dialoged.hlp $(DOCDIR)\winhelp\dialoged.hlp
- move dialoged.cnt $(DOCDIR)\winhelp\dialoged.cnt
- cd $(THISDIR)
-
-$(LOCALDOCDIR)\dialoged.rtf: $(DOCSOURCES)
- cd $(LOCALDOCDIR)
- -start /w tex2rtf $(LOCALDOCDIR)\dialoged.tex $(LOCALDOCDIR)\dialoged.rtf -twice -winhelp
- cd $(THISDIR)
-
-$(DOCDIR)\pdf\dialoged.rtf: $(DOCSOURCES)
- cd $(LOCALDOCDIR)
- -copy *.bmp *.wmf $(DOCDIR)\pdf
- -start /w tex2rtf $(LOCALDOCDIR)\dialoged.tex $(DOCDIR)\pdf\dialoged.rtf -twice -rtf
- cd $(THISDIR)
-
-$(DOCDIR)\html\dialoged\dlged.htm: $(DOCSOURCES)
- cd $(LOCALDOCDIR)
- -mkdir $(DOCDIR)\html\dialoged
- -copy *.gif $(DOCDIR)\html\dialoged
- -start /w tex2rtf $(LOCALDOCDIR)\dialoged.tex $(DOCDIR)\html\dialoged\dlged.htm -twice -html
- -erase $(DOCDIR)\html\dialoged\*.con
- -erase $(DOCDIR)\html\dialoged\*.ref
- cd $(THISDIR)
-
-$(DOCDIR)\htmlhelp\dialoged.chm : $(DOCDIR)\html\dialoged\dlged.htm $(DOCDIR)\html\dialoged\dlged.hhp
- cd $(DOCDIR)\html\dialoged
- -hhc dlged.hhp
- move $(DOCDIR)\html\dialoged\dlged.chm $(DOCDIR)\htmlhelp\dialoged.chm
- cd $(THISDIR)
-
-# An htb file is a zip file containing the .htm, .gif, .hhp, .hhc and .hhk
-# files, renamed to htb.
-# This can then be used with e.g. helpview.
-# Optionally, a cached version of the .hhp file can be generated with hhp2cached.
-$(DOCDIR)\htb\dialoged.htb: $(DOCDIR)\html\dialoged\dlged.htm
- cd $(DOCDIR)\html\dialoged
- -erase dialoged.zip dialoged.htb
- zip dialoged.zip *.htm *.gif *.hhp *.hhc *.hhk
- -mkdir $(DOCDIR)\htb
- move dialoged.zip $(DOCDIR)\htb\dialoged.htb
- cd $(THISDIR)
-
-$(LOCALDOCDIR)\dialoged.dvi: $(DOCSOURCES)
- cd $(LOCALDOCDIR)
- -latex dialoged
- -latex dialoged
- -makeindx dialoged
- -bibtex dialoged
- -latex dialoged
- -latex dialoged
- cd $(THISDIR)
-
-$(WXDIR)\docs\ps\dialoged.ps: $(LOCALDOCDIR)\dialoged.dvi
- cd $(LOCALDOCDIR)
- -dvips32 -o dialoged.ps dialoged
- move dialoged.ps $(WXDIR)\docs\ps\dialoged.ps
- cd $(THISDIR)
-
-
+++ /dev/null
-#
-# Makefile for WATCOM
-#
-# Created by D.Chubraev, chubraev@iem.ee.ethz.ch
-# 8 Nov 1994
-#
-
-WXDIR = $(%WXWIN)
-
-PROGRAM = dialoged
-OBJECTS = dialoged.obj reseditr.obj dlghndlr.obj reswrite.obj winprop.obj edtree.obj edlist.obj symbtabl.obj winstyle.obj
-
-!include $(WXDIR)\src\makeprog.wat
-
-
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: reseditr.cpp
-// Purpose: Resource editor class
-// Author: Julian Smart
-// Modified by:
-// Created: 04/01/98
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows license
-/////////////////////////////////////////////////////////////////////////////
-
-#ifdef __GNUG__
-#pragma implementation "reseditr.h"
-#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"
-
-#include "wx/checkbox.h"
-#include "wx/button.h"
-#include "wx/choice.h"
-#include "wx/listbox.h"
-#include "wx/radiobox.h"
-#include "wx/statbox.h"
-#include "wx/gauge.h"
-#include "wx/slider.h"
-#include "wx/textctrl.h"
-#include "wx/menu.h"
-#include "wx/toolbar.h"
-#endif
-
-#include "wx/scrolbar.h"
-#include "wx/config.h"
-#include "wx/dir.h"
-#include "wx/progdlg.h"
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-
-#ifdef __WXMSW__
-#include "wx/help.h"
-#endif
-
-#include "reseditr.h"
-#include "winprop.h"
-#include "dlghndlr.h"
-#include "edtree.h"
-#include "edlist.h"
-
-wxResourceManager *wxResourceManager::sm_currentResourceManager = NULL;
-
-#if !defined(__WXMSW__)
-#include "bitmaps/load.xpm"
-#include "bitmaps/save.xpm"
-#include "bitmaps/new.xpm"
-#include "bitmaps/vert.xpm"
-#include "bitmaps/alignt.xpm"
-#include "bitmaps/alignb.xpm"
-#include "bitmaps/horiz.xpm"
-#include "bitmaps/alignl.xpm"
-#include "bitmaps/alignr.xpm"
-#include "bitmaps/copysize.xpm"
-#include "bitmaps/tofront.xpm"
-#include "bitmaps/toback.xpm"
-#include "bitmaps/help.xpm"
-#include "bitmaps/wxwin.xpm"
-#include "bitmaps/distvert.xpm"
-#include "bitmaps/disthor.xpm"
-#include "bitmaps/copywdth.xpm"
-#include "bitmaps/copyhght.xpm"
-
-#include "bitmaps/dialog.xpm"
-#include "bitmaps/folder1.xpm"
-#include "bitmaps/folder2.xpm"
-#include "bitmaps/buttonsm.xpm"
-#endif
-
-/*
-* Resource manager
-*/
-
-wxResourceManager::wxResourceManager():
-m_imageList(16, 16, TRUE)
-{
- sm_currentResourceManager = this;
- m_editorFrame = NULL;
- m_editorPanel = NULL;
- m_popupMenu = NULL;
- m_editorResourceTree = NULL;
- m_editorControlList = NULL;
- m_nameCounter = 1;
- m_symbolIdCounter = 99;
- m_modified = FALSE;
- m_currentFilename = "";
- m_symbolFilename = "";
- m_editorToolBar = NULL;
-
- // Default window positions
- m_resourceEditorWindowSize.width = 500;
- m_resourceEditorWindowSize.height = 450;
-
- m_resourceEditorWindowSize.x = 0;
- m_resourceEditorWindowSize.y = 0;
-
- m_propertyWindowSize.width = 300;
- m_propertyWindowSize.height = 300;
-
-#ifdef __WXMSW__
- m_helpController = NULL;
-#endif
-
- m_bitmapImage = NULL;
- m_rootDialogItem = 0;
-}
-
-wxResourceManager::~wxResourceManager()
-{
- sm_currentResourceManager = NULL;
- SaveOptions();
-
-#ifdef __WXMSW__
- if (m_helpController)
- {
- m_helpController->Quit();
- delete m_helpController;
- m_helpController = NULL;
- }
-#endif
-
- delete m_bitmapImage;
- delete m_popupMenu;
-}
-
-bool wxResourceManager::Initialize()
-{
- // Set up the resource filename for each platform.
- // TODO: This shold be replaced by wxConfig usage.
-#ifdef __WXMSW__
- // dialoged.ini in the Windows directory
- wxString windowsDir = wxGetOSDirectory();
- windowsDir += "\\dialoged.ini" ;
-
- m_optionsResourceFilename = windowsDir;
-#else
- wxGetHomeDir( &m_optionsResourceFilename );
- m_optionsResourceFilename += "/.dialogedrc";
-#endif
-
- LoadOptions();
-
-#ifdef __WXMSW__
- m_helpController = new wxHelpController;
- m_helpController->Initialize("dialoged");
-#endif
-
- m_popupMenu = new wxMenu;
- m_popupMenu->Append(OBJECT_MENU_TITLE, "WIDGET TYPE");
- m_popupMenu->AppendSeparator();
- m_popupMenu->Append(OBJECT_MENU_EDIT, "Edit properties");
- m_popupMenu->Append(OBJECT_MENU_DELETE, "Delete object");
-
- if (!m_bitmapImage)
- {
-#ifdef __WXMSW__
- m_bitmapImage = new wxBitmap("WXWINBMP", wxBITMAP_TYPE_BMP_RESOURCE);
-#else
- m_bitmapImage = new wxBitmap( wxwin_xpm );
-#endif
- }
-
- // Initialize the image list icons
-#ifdef __WXMSW__
- wxIcon icon1("DIALOG_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16);
- wxIcon icon2("FOLDER1_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16);
- wxIcon icon3("FOLDER2_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16);
- wxIcon icon4("BUTTONSM_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16);
-#else
- wxIcon icon1( dialog_xpm );
- wxIcon icon2( folder1_xpm );
- wxIcon icon3( folder2_xpm );
- wxIcon icon4( buttonsm_xpm );
-#endif
- m_imageList.Add(icon1);
- m_imageList.Add(icon2);
- m_imageList.Add(icon3);
- m_imageList.Add(icon4);
-
- m_symbolTable.AddStandardSymbols();
-
- return TRUE;
-}
-
-bool wxResourceManager::LoadOptions()
-{
- wxConfig config("DialogEd", "wxWindows");
-
- config.Read("editorWindowX", &m_resourceEditorWindowSize.x);
- config.Read("editorWindowY", &m_resourceEditorWindowSize.y);
- config.Read("editorWindowWidth", &m_resourceEditorWindowSize.width);
- config.Read("editorWindowHeight", &m_resourceEditorWindowSize.height);
- config.Read("propertyWindowX", &m_propertyWindowSize.x);
- config.Read("propertyWindowY", &m_propertyWindowSize.y);
- config.Read("propertyWindowWidth", &m_propertyWindowSize.width);
- config.Read("propertyWindowHeight", &m_propertyWindowSize.height);
-
- return TRUE;
-}
-
-bool wxResourceManager::SaveOptions()
-{
- wxConfig config("DialogEd", "wxWindows");
-
- config.Write("editorWindowX", (long) m_resourceEditorWindowSize.x);
- config.Write("editorWindowY", (long) m_resourceEditorWindowSize.y);
- config.Write("editorWindowWidth", (long) m_resourceEditorWindowSize.width);
- config.Write("editorWindowHeight", (long) m_resourceEditorWindowSize.height);
- config.Write("propertyWindowX", (long) m_propertyWindowSize.x);
- config.Write("propertyWindowY", (long) m_propertyWindowSize.y);
- config.Write("propertyWindowWidth", (long) m_propertyWindowSize.width);
- config.Write("propertyWindowHeight", (long) m_propertyWindowSize.height);
-
- return TRUE;
-}
-
-// Show or hide the resource editor frame, which displays a list
-// of resources with ability to edit them.
-bool wxResourceManager::ShowResourceEditor(bool show, wxWindow *WXUNUSED(parent), const char *title)
-{
- if (show)
- {
- if (m_editorFrame)
- {
- m_editorFrame->Iconize(FALSE);
- m_editorFrame->Show(TRUE);
- return TRUE;
- }
- m_editorFrame = OnCreateEditorFrame(title);
- SetFrameTitle("");
- wxMenuBar *menuBar = OnCreateEditorMenuBar(m_editorFrame);
- m_editorFrame->SetMenuBar(menuBar);
-
- m_editorToolBar = (EditorToolBar *)OnCreateToolBar(m_editorFrame);
- m_editorControlList = new wxResourceEditorControlList(m_editorFrame, IDC_LISTCTRL, wxPoint(0, 0), wxSize(-1, -1));
- m_editorResourceTree = new wxResourceEditorProjectTree(m_editorFrame, IDC_TREECTRL, wxPoint(0, 0), wxSize(-1, -1),
- wxTR_HAS_BUTTONS);
- m_editorPanel = OnCreateEditorPanel(m_editorFrame);
-
- m_editorResourceTree->SetImageList(& m_imageList);
-
- // Constraints for toolbar
- wxLayoutConstraints *c = new wxLayoutConstraints;
- c->left.SameAs (m_editorFrame, wxLeft, 0);
- c->top.SameAs (m_editorFrame, wxTop, 0);
- c->right.SameAs (m_editorFrame, wxRight, 0);
- c->bottom.Unconstrained();
- c->width.Unconstrained();
- c->height.Absolute(28);
- m_editorToolBar->SetConstraints(c);
-
- // Constraints for listbox
- c = new wxLayoutConstraints;
- c->left.SameAs (m_editorFrame, wxLeft, 0);
- c->top.SameAs (m_editorToolBar, wxBottom, 0);
- c->right.Absolute (150);
- c->bottom.SameAs (m_editorControlList, wxTop, 0);
- c->width.Unconstrained();
- c->height.Unconstrained();
- m_editorResourceTree->SetConstraints(c);
-
- // Constraints for panel
- c = new wxLayoutConstraints;
- c->left.SameAs (m_editorResourceTree, wxRight, 0);
- c->top.SameAs (m_editorToolBar, wxBottom, 0);
- c->right.SameAs (m_editorFrame, wxRight, 0);
- c->bottom.SameAs (m_editorControlList, wxTop, 0);
- c->width.Unconstrained();
- c->height.Unconstrained();
- m_editorPanel->SetConstraints(c);
-
- // Constraints for control list (bottom window)
- c = new wxLayoutConstraints;
- c->left.SameAs (m_editorFrame, wxLeft, 0);
- c->right.SameAs (m_editorFrame, wxRight, 0);
- c->bottom.SameAs (m_editorFrame, wxBottom, 0);
- c->width.Unconstrained();
-#if defined(__WXGTK__) || defined(__WXMOTIF__)
- c->height.Absolute(120);
-#else
- c->height.Absolute(60);
-#endif
-
- m_editorControlList->SetConstraints(c);
-
- m_editorFrame->SetAutoLayout(TRUE);
-
- UpdateResourceList();
-
- m_editorFrame->Show(TRUE);
- return TRUE;
- }
- else
- {
- if (m_editorFrame->Close())
- {
- m_editorFrame = NULL;
- m_editorPanel = NULL;
- }
- }
- return TRUE;
-}
-
-void wxResourceManager::SetFrameTitle(const wxString& filename)
-{
- if (m_editorFrame)
- {
- if (filename == wxString(""))
- m_editorFrame->SetTitle("wxWindows Dialog Editor - untitled");
- else
- {
- wxString str("wxWindows Dialog Editor - ");
- wxString str2(wxFileNameFromPath(WXSTRINGCAST filename));
- str += str2;
- m_editorFrame->SetTitle(str);
- }
- }
-}
-
-bool wxResourceManager::Save()
-{
- if (m_currentFilename == wxString(""))
- return SaveAs();
- else
- return Save(m_currentFilename);
-}
-
-bool wxResourceManager::Save(const wxString& filename)
-{
- // Ensure all visible windows are saved to their resources
- m_currentFilename = filename;
- SetFrameTitle(m_currentFilename);
- InstantiateAllResourcesFromWindows();
- if (m_resourceTable.Save(filename))
- {
- m_symbolTable.WriteIncludeFile(m_symbolFilename);
- Modify(FALSE);
- return TRUE;
- }
- else
- return FALSE;
-}
-
-bool wxResourceManager::SaveAs()
-{
- wxString s(wxFileSelector("Save resource file", wxPathOnly(WXSTRINGCAST m_currentFilename), wxFileNameFromPath(WXSTRINGCAST m_currentFilename),
- "wxr", "*.wxr", wxSAVE | wxOVERWRITE_PROMPT, wxTheApp->GetTopWindow()));
-
- if (s.IsNull() || s == "")
- return FALSE;
-
- m_currentFilename = s;
- wxStripExtension(m_currentFilename);
- m_currentFilename += ".wxr";
-
- // Construct include filename from this file
- m_symbolFilename = m_currentFilename;
-
- wxStripExtension(m_symbolFilename);
- m_symbolFilename += ".h";
-
- Save(m_currentFilename);
- return TRUE;
-}
-
-bool wxResourceManager::SaveIfModified()
-{
- if (Modified())
- return Save();
- else return TRUE;
-}
-
-bool wxResourceManager::Load(const wxString& filename)
-{
- return New(TRUE, filename);
-}
-
-bool wxResourceManager::New(bool loadFromFile, const wxString& filename)
-{
- if (!Clear(TRUE, FALSE))
- return FALSE;
-
- m_symbolTable.AddStandardSymbols();
-
- if (loadFromFile)
- {
- wxString str = filename;
- if (str == wxString(""))
- {
- wxString f(wxFileSelector("Open resource file", wxGetCwd(), wxEmptyString, "wxr", "*.wxr", 0, wxTheApp->GetTopWindow()));
- if (!f.IsNull() && f != "")
- str = f;
- else
- return FALSE;
- }
-
- if (!m_resourceTable.ParseResourceFile(str))
- {
- wxMessageBox("Could not read file.", "Resource file load error", wxOK | wxICON_EXCLAMATION);
- return FALSE;
- }
- m_currentFilename = str;
-
- SetFrameTitle(m_currentFilename);
-
- UpdateResourceList();
-
- // Construct include filename from this file
- m_symbolFilename = m_currentFilename;
-
- wxStripExtension(m_symbolFilename);
- m_symbolFilename += ".h";
-
- if (!m_symbolTable.ReadIncludeFile(m_symbolFilename))
- {
- wxString str("Could not find include file ");
- str += m_symbolFilename;
- str += ".\nDialog Editor maintains a header file containing id symbols to be used in the application.\n";
- str += "The next time this .wxr file is saved, a header file will be saved also.";
- wxMessageBox(str, "Dialog Editor Warning", wxOK );
-
- m_symbolIdCounter = 99;
- }
- else
- {
- // Set the id counter to the last known id
- m_symbolIdCounter = m_symbolTable.FindHighestId();
- }
-
- // Now check in case some (or all) resources don't have resource ids, or they
- // don't match the .h file, or something of that nature.
- bool altered = RepairResourceIds();
- if (altered)
- {
- wxMessageBox("Some resources have had new identifiers associated with them, since they were missing.",
- "Dialog Editor Warning", wxOK );
- Modify(TRUE);
- }
- else
- Modify(FALSE);
-
- return TRUE;
- }
- else
- {
- SetFrameTitle("");
- m_currentFilename = "";
- }
- Modify(FALSE);
-
- return TRUE;
-}
-
-bool wxResourceManager::Clear(bool WXUNUSED(deleteWindows), bool force)
-{
- wxPropertyInfo::CloseWindow();
-
- if (!force && Modified())
- {
- int ans = wxMessageBox("Save modified resource file?", "Dialog Editor", wxYES_NO | wxCANCEL);
- if (ans == wxCANCEL)
- return FALSE;
- if (ans == wxYES)
- if (!SaveIfModified())
- return FALSE;
- if (ans == wxNO)
- Modify(FALSE);
- }
-
- ClearCurrentDialog();
- DisassociateWindows();
-
- m_symbolTable.Clear();
- m_resourceTable.ClearTable();
- UpdateResourceList();
-
- return TRUE;
-}
-
-bool wxResourceManager::DisassociateWindows()
-{
- m_resourceTable.BeginFind();
- wxNode *node;
- while ((node = m_resourceTable.Next()))
- {
- wxItemResource *res = (wxItemResource *)node->Data();
- DisassociateResource(res);
- }
-
- return TRUE;
-}
-
-void wxResourceManager::AssociateResource(wxItemResource *resource, wxWindow *win)
-{
- if (!m_resourceAssociations.Get((long)resource))
- m_resourceAssociations.Put((long)resource, win);
-
- wxNode *node = resource->GetChildren().First();
- wxNode* node2 = win->GetChildren().First();
- while (node && node2)
- {
- wxItemResource *child = (wxItemResource *)node->Data();
- wxWindow* childWindow = (wxWindow*) node2->Data();
-
- if (child->GetId() != childWindow->GetId())
- {
- wxString msg;
- msg.Printf("AssociateResource: error when associating child window %ld with resource %ld", child->GetId(), childWindow->GetId());
- wxMessageBox(msg, "Dialog Editor problem", wxOK);
- }
- else if (childWindow->GetName() != child->GetName())
- {
- wxString msg;
- msg.Printf("AssociateResource: error when associating child window with resource %s", child->GetName() ? (const char*) child->GetName() : "(unnamed)");
- wxMessageBox(msg, "Dialog Editor problem", wxOK);
- }
- else
- {
- AssociateResource(child, childWindow);
- }
-
- // New code to avoid the problem of duplicate ids and names. We simply
- // traverse the child windows and child resources in parallel,
- // checking for any mismatch.
-#if 0
- wxWindow *childWindow = (wxWindow *)m_resourceAssociations.Get((long)child);
- if (!childWindow)
- // childWindow = win->FindWindow(child->GetName());
- childWindow = win->FindWindow(child->GetId());
- if (childWindow)
- AssociateResource(child, childWindow);
- else
- {
- wxString msg;
- msg.Printf("AssociateResource: cannot find child window %s", child->GetName() ? (const char*) child->GetName() : "(unnamed)");
- wxMessageBox(msg, "Dialog Editor problem", wxOK);
- }
-#endif
- node = node->Next();
- node2 = node2->Next();
- }
-}
-
-bool wxResourceManager::DisassociateResource(wxItemResource *resource)
-{
- wxWindow *win = FindWindowForResource(resource);
- if (!win)
- return FALSE;
-
- // Disassociate children of window
- wxNode *node = win->GetChildren().First();
- while (node)
- {
- wxWindow *child = (wxWindow *)node->Data();
- if (child->IsKindOf(CLASSINFO(wxControl)))
- DisassociateResource(child);
- node = node->Next();
- }
-
- RemoveSelection(win);
- m_resourceAssociations.Delete((long)resource);
- return TRUE;
-}
-
-bool wxResourceManager::DisassociateResource(wxWindow *win)
-{
- wxItemResource *res = FindResourceForWindow(win);
- if (res)
- return DisassociateResource(res);
- else
- return FALSE;
-}
-
-// Saves the window info into the resource, and deletes the
-// handler. Doesn't actually disassociate the window from
-// the resources. Replaces OnClose.
-bool wxResourceManager::SaveInfoAndDeleteHandler(wxWindow* win)
-{
- wxItemResource *res = FindResourceForWindow(win);
-
- if (win->IsKindOf(CLASSINFO(wxPanel)))
- {
- wxResourceEditorDialogHandler* handler = (wxResourceEditorDialogHandler*) win->GetEventHandler();
- win->PopEventHandler();
-
- // Now reset all child event handlers
- wxNode *node = win->GetChildren().First();
- while ( node )
- {
- wxWindow *child = (wxWindow *)node->Data();
- wxEvtHandler *childHandler = child->GetEventHandler();
- if ( child->IsKindOf(CLASSINFO(wxControl)) && childHandler != child )
- {
- child->PopEventHandler(TRUE);
- }
- node = node->Next();
- }
- delete handler;
- }
- else
- {
- win->PopEventHandler(TRUE);
- }
-
- // Save the information
- InstantiateResourceFromWindow(res, win, TRUE);
-
- // DisassociateResource(win);
-
- return TRUE;
-}
-
-// Destroys the window. If this is the 'current' panel, NULLs the
-// variable.
-bool wxResourceManager::DeleteWindow(wxWindow* win)
-{
- bool clearDisplay = FALSE;
- if (m_editorPanel->m_childWindow == win)
- {
- m_editorPanel->m_childWindow = NULL;
- clearDisplay = TRUE;
- }
-
- win->Destroy();
-
- //if (clearDisplay)
- // m_editorPanel->Clear();
-
- return TRUE;
-}
-
-wxItemResource *wxResourceManager::FindResourceForWindow(wxWindow *win)
-{
- m_resourceAssociations.BeginFind();
- wxNode *node;
- while ((node = m_resourceAssociations.Next()))
- {
- wxWindow *w = (wxWindow *)node->Data();
- if (w == win)
- {
- return (wxItemResource *)node->GetKeyInteger();
- }
- }
- return NULL;
-}
-
-wxWindow *wxResourceManager::FindWindowForResource(wxItemResource *resource)
-{
- return (wxWindow *)m_resourceAssociations.Get((long)resource);
-}
-
-
-void wxResourceManager::MakeUniqueName(char *prefix, char *buf)
-{
- while (TRUE)
- {
- sprintf(buf, "%s%d", prefix, m_nameCounter);
- m_nameCounter ++;
-
- if (!m_resourceTable.FindResource(buf))
- return;
- }
-}
-
-wxFrame *wxResourceManager::OnCreateEditorFrame(const char *title)
-{
- wxResourceEditorFrame *frame = new wxResourceEditorFrame(this, NULL, title,
- wxPoint(m_resourceEditorWindowSize.x, m_resourceEditorWindowSize.y),
- wxSize(m_resourceEditorWindowSize.width, m_resourceEditorWindowSize.height),
- wxDEFAULT_FRAME_STYLE);
-
- frame->CreateStatusBar(1);
-
- frame->SetAutoLayout(TRUE);
-#ifdef __WXMSW__
- frame->SetIcon(wxIcon("DIALOGEDICON"));
-#endif
- return frame;
-}
-
-wxMenuBar *wxResourceManager::OnCreateEditorMenuBar(wxFrame *WXUNUSED(parent))
-{
- wxMenuBar *menuBar = new wxMenuBar;
-
- wxMenu *fileMenu = new wxMenu;
- fileMenu->Append(RESED_NEW_DIALOG, "New &Dialog", "Create a new dialog");
- fileMenu->AppendSeparator();
- fileMenu->Append(wxID_NEW, "&New Project", "Clear the current project");
- fileMenu->Append(wxID_OPEN, "&Open...", "Load a resource file");
- fileMenu->Append(wxID_SAVE, "&Save", "Save a resource file");
- fileMenu->Append(wxID_SAVEAS, "Save &As...", "Save a resource file as...");
- fileMenu->Append(RESED_CLEAR, "&Clear", "Clear current resources");
- fileMenu->AppendSeparator();
- fileMenu->Append(RESED_CONVERT_WXRS, "Convert Old &Resources...", "Convert old resources to new");
- fileMenu->AppendSeparator();
- fileMenu->Append(wxID_EXIT, "E&xit", "Exit resource editor");
-
- wxMenu *editMenu = new wxMenu;
- editMenu->Append(RESED_TEST, "&Test Dialog", "Test dialog");
- editMenu->Append(RESED_RECREATE, "&Recreate", "Recreate the selected resource(s)");
- editMenu->Append(RESED_DELETE, "&Delete", "Delete the selected resource(s)");
-
- wxMenu *helpMenu = new wxMenu;
- helpMenu->Append(RESED_CONTENTS, "&Help Topics", "Invokes the on-line help");
- helpMenu->AppendSeparator();
- helpMenu->Append(wxID_ABOUT, "&About", "About wxWindows Dialog Editor");
-
- menuBar->Append(fileMenu, "&File");
- menuBar->Append(editMenu, "&Edit");
- menuBar->Append(helpMenu, "&Help");
-
- return menuBar;
-}
-
-wxResourceEditorScrolledWindow *wxResourceManager::OnCreateEditorPanel(wxFrame *parent)
-{
- wxResourceEditorScrolledWindow *panel = new wxResourceEditorScrolledWindow(parent, wxDefaultPosition, wxDefaultSize,
- // wxSUNKEN_BORDER|wxCLIP_CHILDREN);
-#ifdef __WXMOTIF__
- wxBORDER);
-#else
- wxSUNKEN_BORDER);
-#endif
-
- panel->SetScrollbars(10, 10, 100, 100);
-
- return panel;
-}
-
-wxToolBar *wxResourceManager::OnCreateToolBar(wxFrame *parent)
-{
- // Load palette bitmaps
-#ifdef __WXMSW__
- wxBitmap ToolbarLoadBitmap("LOADTOOL");
- wxBitmap ToolbarSaveBitmap("SAVETOOL");
- wxBitmap ToolbarNewBitmap("NEWTOOL");
- wxBitmap ToolbarVertBitmap("VERTTOOL");
- wxBitmap ToolbarAlignTBitmap("ALIGNTTOOL");
- wxBitmap ToolbarAlignBBitmap("ALIGNBTOOL");
- wxBitmap ToolbarHorizBitmap("HORIZTOOL");
- wxBitmap ToolbarAlignLBitmap("ALIGNLTOOL");
- wxBitmap ToolbarAlignRBitmap("ALIGNRTOOL");
- wxBitmap ToolbarCopySizeBitmap("COPYSIZETOOL");
- wxBitmap ToolbarToBackBitmap("TOBACKTOOL");
- wxBitmap ToolbarToFrontBitmap("TOFRONTTOOL");
- wxBitmap ToolbarHelpBitmap("HELPTOOL");
- wxBitmap ToolbarCopyWidthBitmap("COPYWIDTHTOOL");
- wxBitmap ToolbarCopyHeightBitmap("COPYHEIGHTTOOL");
- wxBitmap ToolbarDistributeHorizBitmap("DISTHORIZTOOL");
- wxBitmap ToolbarDistributeVertBitmap("DISTVERTTOOL");
-#else
- wxBitmap ToolbarLoadBitmap( load_xpm );
- wxBitmap ToolbarSaveBitmap( save_xpm);
- wxBitmap ToolbarNewBitmap( new_xpm );
- wxBitmap ToolbarVertBitmap( vert_xpm );
- wxBitmap ToolbarAlignTBitmap( alignt_xpm );
- wxBitmap ToolbarAlignBBitmap( alignb_xpm );
- wxBitmap ToolbarHorizBitmap( horiz_xpm );
- wxBitmap ToolbarAlignLBitmap( alignl_xpm );
- wxBitmap ToolbarAlignRBitmap( alignr_xpm );
- wxBitmap ToolbarCopySizeBitmap( copysize_xpm );
- wxBitmap ToolbarToBackBitmap( toback_xpm );
- wxBitmap ToolbarToFrontBitmap( tofront_xpm );
- wxBitmap ToolbarHelpBitmap( help_xpm );
- wxBitmap ToolbarCopyWidthBitmap(copywdth_xpm);
- wxBitmap ToolbarCopyHeightBitmap(copyhght_xpm);
- wxBitmap ToolbarDistributeHorizBitmap(disthor_xpm);
- wxBitmap ToolbarDistributeVertBitmap(distvert_xpm);
-#endif
-
- // Create the toolbar
- EditorToolBar *toolbar = new EditorToolBar(parent, wxPoint(0, 0), wxSize(-1, -1), wxNO_BORDER|wxTB_HORIZONTAL|wxTB_FLAT);
- toolbar->SetMargins(2, 2);
-
-#ifdef __WXMSW__
- int width = 24;
- int dx = 2;
- int gap = 6;
-#else
- int width = 24; // ToolbarLoadBitmap->GetWidth(); ???
- int dx = 2;
- int gap = 6;
-#endif
- int currentX = gap;
- //toolbar->AddSeparator();
- toolbar->AddTool(TOOLBAR_NEW, ToolbarNewBitmap, wxNullBitmap,
- FALSE, currentX, -1, NULL, "New dialog");
- currentX += width + dx;
- toolbar->AddTool(TOOLBAR_LOAD_FILE, ToolbarLoadBitmap, wxNullBitmap,
- FALSE, currentX, -1, NULL, "Load");
- currentX += width + dx;
- toolbar->AddTool(TOOLBAR_SAVE_FILE, ToolbarSaveBitmap, wxNullBitmap,
- FALSE, currentX, -1, NULL, "Save");
- currentX += width + dx + gap;
- toolbar->AddSeparator();
- toolbar->AddTool(TOOLBAR_FORMAT_HORIZ, ToolbarVertBitmap, wxNullBitmap,
- FALSE, currentX, -1, NULL, "Horizontal align");
- currentX += width + dx;
- toolbar->AddTool(TOOLBAR_FORMAT_VERT_TOP_ALIGN, ToolbarAlignTBitmap, wxNullBitmap,
- FALSE, currentX, -1, NULL, "Top align");
- currentX += width + dx;
- toolbar->AddTool(TOOLBAR_FORMAT_VERT_BOT_ALIGN, ToolbarAlignBBitmap, wxNullBitmap,
- FALSE, currentX, -1, NULL, "Bottom align");
- currentX += width + dx;
- toolbar->AddTool(TOOLBAR_FORMAT_VERT, ToolbarHorizBitmap, wxNullBitmap,
- FALSE, currentX, -1, NULL, "Vertical align");
- currentX += width + dx;
- toolbar->AddTool(TOOLBAR_FORMAT_HORIZ_LEFT_ALIGN, ToolbarAlignLBitmap, wxNullBitmap,
- FALSE, currentX, -1, NULL, "Left align");
- currentX += width + dx;
- toolbar->AddTool(TOOLBAR_FORMAT_HORIZ_RIGHT_ALIGN, ToolbarAlignRBitmap, wxNullBitmap,
- FALSE, currentX, -1, NULL, "Right align");
- currentX += width + dx + gap;
- toolbar->AddSeparator();
- toolbar->AddTool(TOOLBAR_COPY_SIZE, ToolbarCopySizeBitmap, wxNullBitmap,
- FALSE, currentX, -1, NULL, "Copy size");
- currentX += width + dx;
- toolbar->AddTool(TOOLBAR_COPY_WIDTH, ToolbarCopyWidthBitmap, wxNullBitmap,
- FALSE, currentX, -1, NULL, "Copy width");
- currentX += width + dx;
- toolbar->AddTool(TOOLBAR_COPY_HEIGHT, ToolbarCopyHeightBitmap, wxNullBitmap,
- FALSE, currentX, -1, NULL, "Copy height");
- currentX += width + dx;
- toolbar->AddTool(TOOLBAR_DISTRIBUTE_HORIZ, ToolbarDistributeHorizBitmap, wxNullBitmap,
- FALSE, currentX, -1, NULL, "Distribute horizontally");
- currentX += width + dx;
- toolbar->AddTool(TOOLBAR_DISTRIBUTE_VERT, ToolbarDistributeVertBitmap, wxNullBitmap,
- FALSE, currentX, -1, NULL, "Distribute vertically");
- currentX += width + dx + gap;
- toolbar->AddSeparator();
- toolbar->AddTool(TOOLBAR_TO_FRONT, ToolbarToFrontBitmap, wxNullBitmap,
- FALSE, currentX, -1, NULL, "To front");
- currentX += width + dx;
- toolbar->AddTool(TOOLBAR_TO_BACK, ToolbarToBackBitmap, wxNullBitmap,
- FALSE, currentX, -1, NULL, "To back");
- currentX += width + dx + gap;
-
- toolbar->AddSeparator();
- toolbar->AddTool(TOOLBAR_HELP, ToolbarHelpBitmap, wxNullBitmap,
- FALSE, currentX, -1, NULL, "Help");
- currentX += width + dx;
-
- toolbar->Realize();
-
- return toolbar;
-}
-
-void wxResourceManager::UpdateResourceList()
-{
- if (!m_editorResourceTree)
- return;
-
- m_editorResourceTree->SetInvalid(TRUE);
- m_editorResourceTree->DeleteAllItems();
-
- long id = m_editorResourceTree->AddRoot("Dialogs", 1, 2);
-
- m_resourceTable.BeginFind();
- wxNode *node;
- while ((node = m_resourceTable.Next()))
- {
- wxItemResource *res = (wxItemResource *)node->Data();
- wxString resType(res->GetType());
- if (resType == "wxDialog" || resType == "wxDialogBox" || resType == "wxPanel" || resType == "wxBitmap")
- {
- AddItemsRecursively(id, res);
- }
- }
- m_editorResourceTree->Expand(id);
- m_editorResourceTree->SetInvalid(FALSE);
-}
-
-void wxResourceManager::AddItemsRecursively(long parent, wxItemResource *resource)
-{
- wxString theString("");
- theString = resource->GetName();
-
- int imageId = 0;
- wxString resType(resource->GetType());
- if (resType == "wxDialog" || resType == "wxDialogBox" || resType == "wxPanel")
- imageId = 0;
- else
- imageId = 3;
-
- long id = m_editorResourceTree->AppendItem(parent, theString, imageId );
-
- m_editorResourceTree->SetItemData(id, new wxResourceTreeData(resource));
-
- if (strcmp(resource->GetType(), "wxBitmap") != 0)
- {
- wxNode *node = resource->GetChildren().First();
- while (node)
- {
- wxItemResource *res = (wxItemResource *)node->Data();
- AddItemsRecursively(id, res);
- node = node->Next();
- }
- }
- // m_editorResourceTree->ExpandItem(id, wxTREE_EXPAND_EXPAND);
-}
-
-bool wxResourceManager::EditSelectedResource()
-{
- int sel = m_editorResourceTree->GetSelection();
- if (sel != 0)
- {
- wxResourceTreeData *data = (wxResourceTreeData *)m_editorResourceTree->GetItemData(sel);
- wxItemResource *res = data->GetResource();
- return Edit(res);
- }
- return FALSE;
-}
-
-bool wxResourceManager::Edit(wxItemResource *res)
-{
- wxPropertyInfo::CloseWindow();
-
- ClearCurrentDialog();
-
- wxString resType(res->GetType());
- wxPanel *panel = (wxPanel *)FindWindowForResource(res);
-
- if (panel)
- {
- wxMessageBox("Should not find panel in wxResourceManager::Edit");
- return FALSE;
- }
- else
- {
- // long style = res->GetStyle();
- // res->SetStyle(style|wxRAISED_BORDER);
- panel = new wxPanel;
- wxResourceEditorDialogHandler *handler = new wxResourceEditorDialogHandler(panel, res, panel->GetEventHandler(),
- this);
-
- wxLoadFromResource(panel, m_editorPanel, res->GetName(), &m_resourceTable);
-
- panel->PushEventHandler(handler);
-
- // res->SetStyle(style);
- handler->AddChildHandlers(); // Add event handlers for all controls
- AssociateResource(res, panel);
-
- m_editorPanel->m_childWindow = panel;
- panel->Move(m_editorPanel->GetMarginX(), m_editorPanel->GetMarginY());
- panel->Show(TRUE);
- panel->Refresh();
-
- wxClientDC dc(m_editorPanel);
- m_editorPanel->DrawTitle(dc);
- }
- return FALSE;
-}
-
-bool wxResourceManager::CreateNewPanel()
-{
- wxPropertyInfo::CloseWindow();
-
- ClearCurrentDialog();
-
- char buf[256];
- MakeUniqueName("dialog", buf);
-
- wxItemResource *resource = new wxItemResource;
- resource->SetType("wxDialog");
- resource->SetName(buf);
- resource->SetTitle(buf);
- resource->SetResourceStyle(wxRESOURCE_USE_DEFAULTS);
- resource->SetResourceStyle(wxRESOURCE_DIALOG_UNITS);
-
- wxString newIdName;
- int id = GenerateWindowId("ID_DIALOG", newIdName);
- resource->SetId(id);
-
- // This is now guaranteed to be unique, so just add to symbol table
- m_symbolTable.AddSymbol(newIdName, id);
-
- m_resourceTable.AddResource(resource);
-
- wxSize size(400, 300);
-
- wxPanel *panel = new wxPanel(m_editorPanel, -1,
- wxPoint(m_editorPanel->GetMarginX(), m_editorPanel->GetMarginY()),
- size, wxRAISED_BORDER|wxDEFAULT_DIALOG_STYLE, buf);
- m_editorPanel->m_childWindow = panel;
-
- resource->SetStyle(panel->GetWindowStyleFlag());
-
- // Store dialog units in resource
- size = panel->ConvertPixelsToDialog(size);
-
- resource->SetSize(10, 10, size.x, size.y);
-
- // For editing in situ we will need to use the hash table to ensure
- // we don't dereference invalid pointers.
- // resourceWindowTable.Put((long)resource, panel);
-
- wxResourceEditorDialogHandler *handler = new wxResourceEditorDialogHandler(panel, resource, panel->GetEventHandler(),
- this);
- panel->PushEventHandler(handler);
-
- AssociateResource(resource, panel);
- UpdateResourceList();
-
- Modify(TRUE);
- m_editorPanel->m_childWindow->Refresh();
-
- // panel->Refresh();
-
- wxClientDC dc(m_editorPanel);
- m_editorPanel->DrawTitle(dc);
-
- return TRUE;
-}
-
-bool wxResourceManager::CreatePanelItem(wxItemResource *panelResource, wxPanel *panel, char *iType, int x, int y, bool isBitmap)
-{
- char buf[256];
- if (!panel->IsKindOf(CLASSINFO(wxPanel)) && !panel->IsKindOf(CLASSINFO(wxDialog)))
- return FALSE;
-
- Modify(TRUE);
-
- wxItemResource *res = new wxItemResource;
- wxControl *newItem = NULL;
-
- if ((panelResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) != 0)
- {
- wxPoint pt = panel->ConvertPixelsToDialog(wxPoint(x, y));
- res->SetSize(pt.x, pt.y, -1, -1);
- }
- else res->SetSize(x, y, -1, -1);
-
- res->SetType(iType);
-
- wxString prefix;
-
- wxString itemType(iType);
-
- if (itemType == "wxButton")
- {
- prefix = "ID_BUTTON";
- MakeUniqueName("button", buf);
- res->SetName(buf);
- if (isBitmap)
- newItem = new wxBitmapButton(panel, -1, * m_bitmapImage, wxPoint(x, y), wxSize(-1, -1), wxBU_AUTODRAW, wxDefaultValidator, buf);
- else
- newItem = new wxButton(panel, -1, "Button", wxPoint(x, y), wxSize(-1, -1), 0, wxDefaultValidator, buf);
- }
- if (itemType == "wxBitmapButton")
- {
- prefix = "ID_BITMAPBUTTON";
- MakeUniqueName("button", buf);
- res->SetName(buf);
- newItem = new wxBitmapButton(panel, -1, * m_bitmapImage, wxPoint(x, y), wxSize(-1, -1), wxBU_AUTODRAW, wxDefaultValidator, buf);
- }
- else if (itemType == "wxMessage" || itemType == "wxStaticText")
- {
- prefix = "ID_STATIC";
- MakeUniqueName("statictext", buf);
- res->SetName(buf);
- if (isBitmap)
- newItem = new wxStaticBitmap(panel, -1, * m_bitmapImage, wxPoint(x, y), wxSize(0, 0), 0, buf);
- else
- newItem = new wxStaticText(panel, -1, "Static", wxPoint(x, y), wxSize(-1, -1), 0, buf);
- }
- else if (itemType == "wxStaticBitmap")
- {
- prefix = "ID_STATICBITMAP";
- MakeUniqueName("static", buf);
- res->SetName(buf);
- newItem = new wxStaticBitmap(panel, -1, * m_bitmapImage, wxPoint(x, y), wxSize(-1, -1), 0, buf);
- }
- else if (itemType == "wxCheckBox")
- {
- prefix = "ID_CHECKBOX";
- MakeUniqueName("checkbox", buf);
- res->SetName(buf);
- newItem = new wxCheckBox(panel, -1, "Checkbox", wxPoint(x, y), wxSize(-1, -1), 0, wxDefaultValidator, buf);
- }
- else if (itemType == "wxListBox")
- {
- prefix = "ID_LISTBOX";
- MakeUniqueName("listbox", buf);
- res->SetName(buf);
- newItem = new wxListBox(panel, -1, wxPoint(x, y), wxSize(-1, -1), 0, NULL, 0, wxDefaultValidator, buf);
- }
- else if (itemType == "wxRadioBox")
- {
- prefix = "ID_RADIOBOX";
- MakeUniqueName("radiobox", buf);
- res->SetName(buf);
- wxString names[] = { "One", "Two" };
- newItem = new wxRadioBox(panel, -1, "Radiobox", wxPoint(x, y), wxSize(-1, -1), 2, names, 2,
- wxHORIZONTAL, wxDefaultValidator, buf);
- res->SetStringValues(wxStringList("One", "Two", NULL));
- }
- else if (itemType == "wxRadioButton")
- {
- prefix = "ID_RADIOBUTTON";
- MakeUniqueName("radiobutton", buf);
- res->SetName(buf);
- wxString names[] = { "One", "Two" };
- newItem = new wxRadioButton(panel, -1, "Radiobutton", wxPoint(x, y), wxSize(-1, -1),
- 0, wxDefaultValidator, buf);
- }
- else if (itemType == "wxChoice")
- {
- prefix = "ID_CHOICE";
- MakeUniqueName("choice", buf);
- res->SetName(buf);
- newItem = new wxChoice(panel, -1, wxPoint(x, y), wxSize(-1, -1), 0, NULL, 0, wxDefaultValidator, buf);
- }
- else if (itemType == "wxComboBox")
- {
- prefix = "ID_COMBOBOX";
- MakeUniqueName("combobox", buf);
- res->SetName(buf);
- newItem = new wxComboBox(panel, -1, "", wxPoint(x, y), wxSize(-1, -1), 0, NULL, wxCB_DROPDOWN, wxDefaultValidator, buf);
- }
- else if (itemType == "wxGroupBox" || itemType == "wxStaticBox")
- {
- prefix = "ID_STATICBOX";
- MakeUniqueName("staticbox", buf);
- res->SetName(buf);
- newItem = new wxStaticBox(panel, -1, "Static", wxPoint(x, y), wxSize(200, 200), 0, buf);
- }
- else if (itemType == "wxGauge")
- {
- prefix = "ID_GAUGE";
- MakeUniqueName("gauge", buf);
- res->SetName(buf);
- newItem = new wxGauge(panel, -1, 10, wxPoint(x, y), wxSize(80, 30), wxHORIZONTAL, wxDefaultValidator, buf);
- }
- else if (itemType == "wxSlider")
- {
- prefix = "ID_SLIDER";
- MakeUniqueName("slider", buf);
- res->SetName(buf);
- newItem = new wxSlider(panel, -1, 1, 1, 10, wxPoint(x, y), wxSize(120, -1), wxHORIZONTAL, wxDefaultValidator, buf);
- }
- else if (itemType == "wxText" || itemType == "wxTextCtrl (single-line)")
- {
- prefix = "ID_TEXTCTRL";
- MakeUniqueName("textctrl", buf);
- res->SetName(buf);
- res->SetType("wxTextCtrl");
- newItem = new wxTextCtrl(panel, -1, "", wxPoint(x, y), wxSize(120, -1), 0, wxDefaultValidator, buf);
- }
- else if (itemType == "wxMultiText" || itemType == "wxTextCtrl (multi-line)")
- {
- prefix = "ID_TEXTCTRL";
- MakeUniqueName("textctrl", buf);
- res->SetName(buf);
- res->SetType("wxTextCtrl");
- newItem = new wxTextCtrl(panel, -1, "", wxPoint(x, y), wxSize(120, 100), wxTE_MULTILINE, wxDefaultValidator, buf);
- }
- else if (itemType == "wxScrollBar")
- {
- prefix = "ID_SCROLLBAR";
- MakeUniqueName("scrollbar", buf);
- res->SetName(buf);
- newItem = new wxScrollBar(panel, -1, wxPoint(x, y), wxSize(140, -1), wxHORIZONTAL, wxDefaultValidator, buf);
- }
- if (!newItem)
- return FALSE;
-
- int actualW, actualH;
- newItem->GetSize(&actualW, &actualH);
- wxSize actualSize(actualW, actualH);
-
- if ((panelResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) != 0)
- {
- actualSize = panel->ConvertPixelsToDialog(actualSize);
- }
- res->SetSize(res->GetX(), res->GetY(), actualSize.x, actualSize.y);
-
- wxString newIdName;
- int id = GenerateWindowId(prefix, newIdName);
- res->SetId(id);
-
- // This is now guaranteed to be unique, so just add to symbol table
- m_symbolTable.AddSymbol(newIdName, id);
-
- newItem->PushEventHandler(new wxResourceEditorControlHandler(newItem, newItem));
-
- res->SetStyle(newItem->GetWindowStyleFlag());
- AssociateResource(res, newItem);
- panelResource->GetChildren().Append(res);
-
- UpdateResourceList();
-
- return TRUE;
-}
-
-void wxResourceManager::ClearCurrentDialog()
-{
- if (m_editorPanel->m_childWindow)
- {
- SaveInfoAndDeleteHandler(m_editorPanel->m_childWindow);
- DisassociateResource(m_editorPanel->m_childWindow);
- DeleteWindow(m_editorPanel->m_childWindow);
- m_editorPanel->m_childWindow = NULL;
- //m_editorPanel->Clear();
- }
-}
-
-bool wxResourceManager::TestCurrentDialog(wxWindow* parent)
-{
- if (m_editorPanel->m_childWindow)
- {
- wxItemResource* item = FindResourceForWindow(m_editorPanel->m_childWindow);
- if (!item)
- return FALSE;
-
- // Make sure the resources are up-to-date w.r.t. the window
- InstantiateResourceFromWindow(item, m_editorPanel->m_childWindow, TRUE);
-
- ResourceEditorDialogTester* dialog = new ResourceEditorDialogTester;
- bool success = FALSE;
- if (wxLoadFromResource(dialog, parent, item->GetName(), & m_resourceTable))
- {
- dialog->Centre();
- dialog->ShowModal();
- success = TRUE;
- }
- return success;
- }
- return FALSE;
-}
-
-// Find the first dialog or panel for which
-// there is a selected panel item.
-wxWindow *wxResourceManager::FindParentOfSelection()
-{
- m_resourceTable.BeginFind();
- wxNode *node;
- while ((node = m_resourceTable.Next()))
- {
- wxItemResource *res = (wxItemResource *)node->Data();
- wxWindow *win = FindWindowForResource(res);
- if (win)
- {
- wxNode *node1 = win->GetChildren().First();
- while (node1)
- {
- wxControl *item = (wxControl *)node1->Data();
- wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler();
- if (item->IsKindOf(CLASSINFO(wxControl)) && childHandler->IsSelected())
- return win;
- node1 = node1->Next();
- }
- }
- }
- return NULL;
-}
-
-// Format the panel items according to 'flag'
-void wxResourceManager::AlignItems(int flag)
-{
- wxWindow *win = FindParentOfSelection();
- if (!win)
- return;
-
- wxNode *node = GetSelections().First();
- if (!node)
- return;
-
- wxControl *firstSelection = (wxControl *)node->Data();
- if (firstSelection->GetParent() != win)
- return;
-
- int firstX, firstY;
- int firstW, firstH;
- firstSelection->GetPosition(&firstX, &firstY);
- firstSelection->GetSize(&firstW, &firstH);
- int centreX = (int)(firstX + (firstW / 2));
- int centreY = (int)(firstY + (firstH / 2));
-
- while ((node = node->Next()))
- {
- wxControl *item = (wxControl *)node->Data();
- if (item->GetParent() == win)
- {
- int x, y, w, h;
- item->GetPosition(&x, &y);
- item->GetSize(&w, &h);
-
- int newX, newY;
-
- switch (flag)
- {
- case TOOLBAR_FORMAT_HORIZ:
- {
- newX = x;
- newY = (int)(centreY - (h/2.0));
- break;
- }
- case TOOLBAR_FORMAT_VERT:
- {
- newX = (int)(centreX - (w/2.0));
- newY = y;
- break;
- }
- case TOOLBAR_FORMAT_HORIZ_LEFT_ALIGN:
- {
- newX = firstX;
- newY = y;
- break;
- }
- case TOOLBAR_FORMAT_VERT_TOP_ALIGN:
- {
- newX = x;
- newY = firstY;
- break;
- }
- case TOOLBAR_FORMAT_HORIZ_RIGHT_ALIGN:
- {
- newX = firstX + firstW - w;
- newY = y;
- break;
- }
- case TOOLBAR_FORMAT_VERT_BOT_ALIGN:
- {
- newX = x;
- newY = firstY + firstH - h;
- break;
- }
- default:
- newX = x; newY = y;
- break;
- }
-
- wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(item);
- wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(item->GetParent());
-
- item->SetSize(newX, newY, w, h);
-
- // Also update the associated resource
- // We need to convert to dialog units if this is not a dialog or panel, but
- // the parent resource specifies dialog units.
- if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS)
- {
- wxPoint pt = item->GetParent()->ConvertPixelsToDialog(wxPoint(newX, newY));
- newX = pt.x; newY = pt.y;
- wxSize sz = item->GetParent()->ConvertPixelsToDialog(wxSize(w, h));
- w = sz.x; h = sz.y;
- }
- resource->SetSize(newX, newY, w, h);
- }
- }
- win->Refresh();
-}
-
-// Copy the first image's size to subsequent images
-void wxResourceManager::CopySize(int command)
-{
- bool copyWidth = (command == TOOLBAR_COPY_SIZE || command == TOOLBAR_COPY_WIDTH) ;
- bool copyHeight = (command == TOOLBAR_COPY_SIZE || command == TOOLBAR_COPY_HEIGHT) ;
-
- wxWindow *win = FindParentOfSelection();
- if (!win)
- return;
-
- wxNode *node = GetSelections().First();
- if (!node)
- return;
-
- wxControl *firstSelection = (wxControl *)node->Data();
- if (firstSelection->GetParent() != win)
- return;
-
- int firstX, firstY;
- int firstW, firstH;
- firstSelection->GetPosition(&firstX, &firstY);
- firstSelection->GetSize(&firstW, &firstH);
-
- while ((node = node->Next()))
- {
- wxControl *item = (wxControl *)node->Data();
- if (item->GetParent() == win)
- {
- wxSize sz = item->GetSize();
- int widthToSet = (copyWidth ? firstW : sz.x);
- int heightToSet = (copyHeight ? firstH : sz.y);
-
- item->SetSize(-1, -1, widthToSet, heightToSet);
-
- wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(item);
- wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(item->GetParent());
-
- widthToSet = resource->GetWidth();
- heightToSet = resource->GetHeight();
-
- // Also update the associated resource
- // We need to convert to dialog units if this is not a dialog or panel, but
- // the parent resource specifies dialog units.
- if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS)
- {
- wxSize convertedSize = item->GetParent()->ConvertPixelsToDialog(wxSize(firstW, firstH));
- if (copyWidth)
- widthToSet = convertedSize.x;
- if (copyHeight)
- heightToSet = convertedSize.y;
- }
- resource->SetSize(resource->GetX(), resource->GetY(), widthToSet, heightToSet);
- }
- }
- win->Refresh();
-}
-
-void wxResourceManager::ToBackOrFront(bool toBack)
-{
- wxWindow *win = FindParentOfSelection();
- if (!win)
- return;
- wxItemResource *winResource = FindResourceForWindow(win);
-
- wxNode *node = GetSelections().First();
- while (node)
- {
- wxControl *item = (wxControl *)node->Data();
- wxItemResource *itemResource = FindResourceForWindow(item);
- if (item->GetParent() == win)
- {
- win->GetChildren().DeleteObject(item);
- if (winResource)
- winResource->GetChildren().DeleteObject(itemResource);
- if (toBack)
- {
- win->GetChildren().Insert(item);
- if (winResource)
- winResource->GetChildren().Insert(itemResource);
- }
- else
- {
- win->GetChildren().Append(item);
- if (winResource)
- winResource->GetChildren().Append(itemResource);
- }
- }
- node = node->Next();
- }
- // win->Refresh();
-}
-
-// Distribute controls evenly between first and last
-void wxResourceManager::DistributePositions(int command)
-{
- bool horizontal = (command == TOOLBAR_DISTRIBUTE_HORIZ) ;
-
- wxWindow *win = FindParentOfSelection();
- if (!win)
- return;
-
- if (GetSelections().Number() < 3)
- {
- wxMessageBox(wxT("Sorry, distributing less than three controls does not make sense."));
- return;
- }
-
- wxControl *firstSelection = (wxControl*) GetSelections().First()->Data();
- wxControl *lastSelection = (wxControl*) GetSelections().Last()->Data();
-
- // For now, assume the ordering is correct (the user selected the controls in order).
- // TODO: explicitly order the selections in terms of increading x or y position.
-
- // Find the total amount of space between all controls
- int totalControlSpace = 0; // How much space the controls take up
-
- wxNode* node = GetSelections().First();
- while (node)
- {
- wxControl* control = (wxControl*) node->Data();
-
- int x, y;
- int w, h;
- control->GetPosition(&x, &y);
- control->GetSize(&w, &h);
-
- // Don't include the space taken up by the first and last controls.
- if (control != firstSelection && control != lastSelection)
- {
- if (horizontal)
- totalControlSpace += w;
- else
- totalControlSpace += h;
- }
-
- node = node->Next();
- }
-
-
- int firstX, firstY, lastX, lastY;
- int firstW, firstH, lastW, lastH;
- firstSelection->GetPosition(&firstX, &firstY);
- firstSelection->GetSize(&firstW, &firstH);
-
- lastSelection->GetPosition(&lastX, &lastY);
- lastSelection->GetSize(&lastW, &lastH);
-
- /*
-
- firstX lastX
- |===| |====| |======| |==|
-
- */
-
- int spacing, currentPos;
- if (horizontal)
- {
- spacing = ((lastX - (firstX + firstW)) - totalControlSpace) / (GetSelections().Number() - 1);
- currentPos = firstX + firstW + spacing;
- }
- else
- {
- spacing = ((lastY - (firstY + firstH)) - totalControlSpace) / (GetSelections().Number() - 1);
- currentPos = firstY + firstH + spacing;
- }
-
- node = GetSelections().First();
-
- while ((node = node->Next()))
- {
- wxControl *item = (wxControl *)node->Data();
- wxSize sz = item->GetSize();
- wxPoint pos = item->GetPosition();
- wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(item);
- wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(item->GetParent());
-
- int controlX = (horizontal ? currentPos : pos.x);
- int controlY = (horizontal ? pos.y : currentPos);
-
- item->Move(controlX, controlY);
-
- int resX = controlX;
- int resY = controlY;
-
- // Also update the associated resource
- // We need to convert to dialog units if this is not a dialog or panel, but
- // the parent resource specifies dialog units.
- if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS)
- {
- wxPoint convertedPos = item->GetParent()->ConvertPixelsToDialog(wxPoint(resX, resY));
- resX = convertedPos.x;
- resY = convertedPos.y;
- }
- resource->SetSize(resX, resY, resource->GetWidth(), resource->GetHeight());
-
- currentPos += (horizontal ? (sz.x + spacing) : (sz.y + spacing));
- }
- win->Refresh();
-}
-
-void wxResourceManager::AddSelection(wxWindow *win)
-{
- if (!m_selections.Member(win))
- m_selections.Append(win);
-}
-
-void wxResourceManager::RemoveSelection(wxWindow *win)
-{
- m_selections.DeleteObject(win);
-}
-
-void wxResourceManager::DeselectItemIfNecessary(wxWindow *win)
-{
- if (win->IsKindOf(CLASSINFO(wxControl)) && (win->GetEventHandler() != win))
- {
- // Deselect and refresh window in case we leave selection
- // handles behind
- wxControl *item = (wxControl *)win;
- wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler();
- if (childHandler->IsSelected())
- {
- wxResourceManager::GetCurrentResourceManager()->RemoveSelection(item);
- childHandler->SelectItem(FALSE);
-#ifndef __WXGTK__
- item->GetParent()->Refresh();
-#endif
- }
- }
-}
-
-// Need to search through resource table removing this from
-// any resource which has this as a parent.
-bool wxResourceManager::RemoveResourceFromParent(wxItemResource *res)
-{
- m_resourceTable.BeginFind();
- wxNode *node;
- while ((node = m_resourceTable.Next()))
- {
- wxItemResource *thisRes = (wxItemResource *)node->Data();
- if (thisRes->GetChildren().Member(res))
- {
- thisRes->GetChildren().DeleteObject(res);
- return TRUE;
- }
- }
- return FALSE;
-}
-
-bool wxResourceManager::DeleteResource(wxItemResource *res)
-{
- if (!res)
- return FALSE;
-
- RemoveResourceFromParent(res);
-
- wxNode *node = res->GetChildren().First();
- while (node)
- {
- wxNode *next = node->Next();
- wxItemResource *child = (wxItemResource *)node->Data();
- DeleteResource(child);
- node = next;
- }
-
- // If this is a button or message resource, delete the
- // associate bitmap resource if not being used.
- wxString resType(res->GetType());
-
- /* shouldn't have to do this now bitmaps are ref-counted
- if ((resType == "wxMessage" || resType == "wxStaticBitmap" || resType == "wxButton" || resType == "wxBitmapButton") && res->GetValue4())
- {
- PossiblyDeleteBitmapResource(res->GetValue4());
- }
- */
-
- // Remove symbol from table if appropriate
- if (!IsSymbolUsed(res, res->GetId()))
- {
- m_symbolTable.RemoveSymbol(res->GetId());
- }
-
- m_resourceTable.Delete(res->GetName());
- delete res;
- Modify(TRUE);
- return TRUE;
-}
-
-bool wxResourceManager::DeleteResource(wxWindow *win)
-{
- DeselectItemIfNecessary(win);
-
- wxItemResource *res = FindResourceForWindow(win);
-
- DisassociateResource(res);
- DeleteResource(res);
- UpdateResourceList();
-
- return TRUE;
-}
-
-// Will eventually have bitmap type information, for different
-// kinds of bitmap.
-wxString wxResourceManager::AddBitmapResource(const wxString& filename)
-{
- wxItemResource *resource = FindBitmapResourceByFilename(filename);
- if (!resource)
- {
- char buf[256];
- MakeUniqueName("bitmap", buf);
- resource = new wxItemResource;
- resource->SetType("wxBitmap");
- resource->SetName(buf);
-
- // A bitmap resource has one or more children, specifying
- // alternative bitmaps.
- wxItemResource *child = new wxItemResource;
- child->SetType("wxBitmap");
- child->SetName(filename);
- child->SetValue1(wxBITMAP_TYPE_BMP);
- child->SetValue2(RESOURCE_PLATFORM_ANY);
- child->SetValue3(0); // Depth
- child->SetSize(0,0,0,0);
- resource->GetChildren().Append(child);
-
- m_resourceTable.AddResource(resource);
-
- UpdateResourceList();
- }
- if (resource)
- return resource->GetName();
- else
- return wxEmptyString;
-}
-
-// Delete the bitmap resource if it isn't being used by another resource.
-void wxResourceManager::PossiblyDeleteBitmapResource(const wxString& resourceName)
-{
- if (!IsBitmapResourceUsed(resourceName))
- {
- wxItemResource *res = m_resourceTable.FindResource(resourceName);
- DeleteResource(res);
- UpdateResourceList();
- }
-}
-
-bool wxResourceManager::IsBitmapResourceUsed(const wxString& resourceName)
-{
- m_resourceTable.BeginFind();
- wxNode *node;
- while ((node = m_resourceTable.Next()))
- {
- wxItemResource *res = (wxItemResource *)node->Data();
- wxString resType(res->GetType());
- if (resType == "wxDialog")
- {
- wxNode *node1 = res->GetChildren().First();
- while (node1)
- {
- wxItemResource *child = (wxItemResource *)node1->Data();
- wxString childResType(child->GetType());
-
- if ((childResType == "wxMessage" || childResType == "wxButton") &&
- child->GetValue4() &&
- (strcmp(child->GetValue4(), resourceName) == 0))
- return TRUE;
- node1 = node1->Next();
- }
- }
- }
- return FALSE;
-}
-
-// Given a wxButton or wxMessage, find the corresponding bitmap filename.
-wxString wxResourceManager::FindBitmapFilenameForResource(wxItemResource *resource)
-{
- if (!resource || (resource->GetValue4() == ""))
- return wxEmptyString;
- wxItemResource *bitmapResource = m_resourceTable.FindResource(resource->GetValue4());
- if (!bitmapResource)
- return wxEmptyString;
-
- wxNode *node = bitmapResource->GetChildren().First();
- while (node)
- {
- // Eventually augment this to return a bitmap of the right kind or something...
- // Maybe the root of the filename remains the same, so it doesn't matter which we
- // pick up. Otherwise how do we specify multiple filenames... too boring...
- wxItemResource *child = (wxItemResource *)node->Data();
- return child->GetName();
-
- //node = node->Next();
- }
- return wxEmptyString;
-}
-
-wxItemResource *wxResourceManager::FindBitmapResourceByFilename(const wxString& filename)
-{
- m_resourceTable.BeginFind();
- wxNode *node;
- while ((node = m_resourceTable.Next()))
- {
- wxItemResource *res = (wxItemResource *)node->Data();
- wxString resType(res->GetType());
- if (resType == "wxBitmap")
- {
- wxNode *node1 = res->GetChildren().First();
- while (node1)
- {
- wxItemResource *child = (wxItemResource *)node1->Data();
- if (child->GetName() && (strcmp(child->GetName(), filename) == 0))
- return res;
- node1 = node1->Next();
- }
- }
- }
- return NULL;
-}
-
-// Is this window identifier symbol in use?
-// Let's assume that we can't have 2 names for the same integer id.
-// Therefore we can tell by the integer id whether the symbol is
-// in use.
-bool wxResourceManager::IsSymbolUsed(wxItemResource* thisResource, wxWindowID id)
-{
- m_resourceTable.BeginFind();
- wxNode *node;
- while ((node = m_resourceTable.Next()))
- {
- wxItemResource *res = (wxItemResource *)node->Data();
-
- wxString resType(res->GetType());
- if (resType == "wxDialog" || resType == "wxDialogBox" || resType == "wxPanel")
- {
- if ((res != thisResource) && (res->GetId() == id))
- return TRUE;
-
- wxNode *node1 = res->GetChildren().First();
- while (node1)
- {
- wxItemResource *child = (wxItemResource *)node1->Data();
- if ((child != thisResource) && (child->GetId() == id))
- return TRUE;
- node1 = node1->Next();
- }
- }
- }
- return FALSE;
-}
-
-// Is this window identifier compatible with the given name? (i.e.
-// does it already exist under a different name)
-bool wxResourceManager::IsIdentifierOK(const wxString& name, wxWindowID id)
-{
- if (m_symbolTable.SymbolExists(name))
- {
- int foundId = m_symbolTable.GetIdForSymbol(name);
- if (foundId != id)
- return FALSE;
- }
- return TRUE;
-}
-
-// Change all integer ids that match oldId, to newId.
-// This is necessary if an id is changed for one resource - all resources
-// must be changed.
-void wxResourceManager::ChangeIds(int oldId, int newId)
-{
- m_resourceTable.BeginFind();
- wxNode *node;
- while ((node = m_resourceTable.Next()))
- {
- wxItemResource *res = (wxItemResource *)node->Data();
-
- wxString resType(res->GetType());
- if (resType == "wxDialog" || resType == "wxDialogBox" || resType == "wxPanel")
- {
- if (res->GetId() == oldId)
- res->SetId(newId);
-
- wxNode *node1 = res->GetChildren().First();
- while (node1)
- {
- wxItemResource *child = (wxItemResource *)node1->Data();
- if (child->GetId() == oldId)
- child->SetId(newId);
-
- node1 = node1->Next();
- }
- }
- }
-}
-
-// If any resource ids were missing (or their symbol was missing),
-// repair them i.e. give them new ids. Returns TRUE if any resource
-// needed repairing.
-bool wxResourceManager::RepairResourceIds()
-{
- bool repaired = FALSE;
-
- m_resourceTable.BeginFind();
- wxNode *node;
- while ((node = m_resourceTable.Next()))
- {
- wxItemResource *res = (wxItemResource *)node->Data();
- wxString resType(res->GetType());
- if (resType == "wxDialog" || resType == "wxDialogBox" || resType == "wxPanel")
- {
-
- if ( (res->GetId() == 0) || ((res->GetId() > 0) && !m_symbolTable.IdExists(res->GetId())) )
- {
- wxString newSymbolName;
- int newId = GenerateWindowId("ID_DIALOG", newSymbolName) ;
-
- if (res->GetId() == 0)
- {
- res->SetId(newId);
- m_symbolTable.AddSymbol(newSymbolName, newId);
- }
- else
- {
- m_symbolTable.AddSymbol(newSymbolName, res->GetId());
- }
-
- repaired = TRUE;
- }
-
- wxNode *node1 = res->GetChildren().First();
- while (node1)
- {
- wxItemResource *child = (wxItemResource *)node1->Data();
-
- if ( (child->GetId() == 0) || ((child->GetId() > 0) && !m_symbolTable.IdExists(child->GetId())) )
- {
- wxString newSymbolName;
- int newId = GenerateWindowId("ID_CONTROL", newSymbolName) ;
-
- if (child->GetId() == 0)
- {
- child->SetId(newId);
- m_symbolTable.AddSymbol(newSymbolName, newId);
- }
- else
- {
- m_symbolTable.AddSymbol(newSymbolName, child->GetId());
- }
-
- repaired = TRUE;
- }
-
- node1 = node1->Next();
- }
- }
- }
- return repaired;
-}
-
-
-// Deletes 'win' and creates a new window from the resource that
-// was associated with it. E.g. if you can't change properties on the
-// fly, you'll need to delete the window and create it again.
-wxWindow *wxResourceManager::RecreateWindowFromResource(wxWindow *win, wxWindowPropertyInfo *info, bool instantiateFirst)
-{
- wxItemResource *resource = FindResourceForWindow(win);
-
- // Put the current window properties into the wxItemResource object
-
- wxWindowPropertyInfo *newInfo = NULL;
- if (!info)
- {
- newInfo = CreatePropertyInfoForWindow(win);
- info = newInfo;
- }
-
- // May not always want to copy values back from the resource
- if (instantiateFirst)
- info->InstantiateResource(resource);
-
- wxWindow *newWin = NULL;
- wxWindow *parent = win->GetParent();
- wxItemResource* parentResource = NULL;
- if (parent)
- parentResource = FindResourceForWindow(parent);
-
- if (win->IsKindOf(CLASSINFO(wxPanel)))
- {
- Edit(resource);
- newWin = FindWindowForResource(resource);
- }
- else
- {
- DisassociateResource(resource);
- if (win->GetEventHandler() != win)
- win->PopEventHandler(TRUE);
-
- DeleteWindow(win);
- newWin = m_resourceTable.CreateItem((wxPanel *)parent, resource, parentResource);
- newWin->PushEventHandler(new wxResourceEditorControlHandler((wxControl*) newWin, (wxControl*) newWin));
- AssociateResource(resource, newWin);
- UpdateResourceList();
- }
-
- if (info)
- info->SetPropertyWindow(newWin);
-
- if (newInfo)
- delete newInfo;
-
- return newWin;
-}
-
-// Delete resource highlighted in the listbox
-bool wxResourceManager::DeleteSelection()
-{
- int sel = m_editorResourceTree->GetSelection();
- if (sel != 0)
- {
- wxResourceTreeData *data = (wxResourceTreeData *)m_editorResourceTree->GetItemData(sel);
- wxItemResource *res = data->GetResource();
- wxWindow *win = FindWindowForResource(res);
- if (win)
- {
- DeleteResource(win);
- DeleteWindow(win);
- UpdateResourceList();
- Modify(TRUE);
- }
- return TRUE;
- }
-
- return FALSE;
-}
-
-// Delete resource highlighted in the listbox
-bool wxResourceManager::RecreateSelection()
-{
- wxNode *node = GetSelections().First();
- while (node)
- {
- wxControl *item = (wxControl *)node->Data();
- wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler();
- wxNode *next = node->Next();
- childHandler->SelectItem(FALSE);
-
- RemoveSelection(item);
-
- RecreateWindowFromResource(item);
-
- node = next;
- }
- return TRUE;
-}
-
-bool wxResourceManager::EditDialog(wxDialog *WXUNUSED(dialog), wxWindow *WXUNUSED(parent))
-{
- return FALSE;
-}
-
-// Ensures that all currently shown windows are saved to resources,
-// e.g. just before writing to a .wxr file.
-bool wxResourceManager::InstantiateAllResourcesFromWindows()
-{
- m_resourceTable.BeginFind();
- wxNode *node;
- while ((node = m_resourceTable.Next()))
- {
- wxItemResource *res = (wxItemResource *)node->Data();
- wxString resType(res->GetType());
-
- if (resType == "wxDialog")
- {
- wxWindow *win = (wxWindow *)FindWindowForResource(res);
- if (win)
- InstantiateResourceFromWindow(res, win, TRUE);
- }
- else if (resType == "wxPanel")
- {
- wxWindow *win = (wxWindow *)FindWindowForResource(res);
- if (win)
- InstantiateResourceFromWindow(res, win, TRUE);
- }
- }
- return TRUE;
-}
-
-bool wxResourceManager::InstantiateResourceFromWindow(wxItemResource *resource, wxWindow *window, bool recurse)
-{
- wxWindowPropertyInfo *info = CreatePropertyInfoForWindow(window);
- info->SetResource(resource);
- info->InstantiateResource(resource);
- delete info;
-
- if (recurse)
- {
- wxNode *node = resource->GetChildren().First();
- while (node)
- {
- wxItemResource *child = (wxItemResource *)node->Data();
- wxWindow *childWindow = FindWindowForResource(child);
-
- if (!childWindow)
- {
- char buf[200];
- sprintf(buf, "Could not find window %s", (const char*) child->GetName());
- wxMessageBox(buf, "Dialog Editor problem", wxOK);
- }
- else
- InstantiateResourceFromWindow(child, childWindow, recurse);
- node = node->Next();
- }
- }
-
- return TRUE;
-}
-
-// Create a window information object for the give window
-wxWindowPropertyInfo *wxResourceManager::CreatePropertyInfoForWindow(wxWindow *win)
-{
- wxWindowPropertyInfo *info = NULL;
- if (win->IsKindOf(CLASSINFO(wxScrollBar)))
- {
- info = new wxScrollBarPropertyInfo(win);
- }
- else if (win->IsKindOf(CLASSINFO(wxStaticBox)))
- {
- info = new wxGroupBoxPropertyInfo(win);
- }
- else if (win->IsKindOf(CLASSINFO(wxCheckBox)))
- {
- info = new wxCheckBoxPropertyInfo(win);
- }
- else if (win->IsKindOf(CLASSINFO(wxSlider)))
- {
- info = new wxSliderPropertyInfo(win);
- }
- else if (win->IsKindOf(CLASSINFO(wxGauge)))
- {
- info = new wxGaugePropertyInfo(win);
- }
- else if (win->IsKindOf(CLASSINFO(wxListBox)))
- {
- info = new wxListBoxPropertyInfo(win);
- }
- else if (win->IsKindOf(CLASSINFO(wxRadioBox)))
- {
- info = new wxRadioBoxPropertyInfo(win);
- }
- else if (win->IsKindOf(CLASSINFO(wxRadioButton)))
- {
- info = new wxRadioButtonPropertyInfo(win);
- }
- else if (win->IsKindOf(CLASSINFO(wxComboBox)))
- {
- info = new wxComboBoxPropertyInfo(win);
- }
- else if (win->IsKindOf(CLASSINFO(wxChoice)))
- {
- info = new wxChoicePropertyInfo(win);
- }
- else if (win->IsKindOf(CLASSINFO(wxBitmapButton)))
- {
- info = new wxBitmapButtonPropertyInfo(win);
- }
- else if (win->IsKindOf(CLASSINFO(wxButton)))
- {
- info = new wxButtonPropertyInfo(win);
- }
- else if (win->IsKindOf(CLASSINFO(wxStaticBitmap)))
- {
- info = new wxStaticBitmapPropertyInfo(win);
- }
- else if (win->IsKindOf(CLASSINFO(wxStaticText)))
- {
- info = new wxStaticTextPropertyInfo(win);
- }
- else if (win->IsKindOf(CLASSINFO(wxTextCtrl)))
- {
- info = new wxTextPropertyInfo(win);
- }
- else if (win->IsKindOf(CLASSINFO(wxPanel)))
- {
- info = new wxPanelPropertyInfo(win);
- }
- else
- {
- info = new wxWindowPropertyInfo(win);
- }
- return info;
-}
-
-// Edit the given window
-void wxResourceManager::EditWindow(wxWindow *win)
-{
- wxWindowPropertyInfo *info = CreatePropertyInfoForWindow(win);
- if (info)
- {
- info->SetResource(FindResourceForWindow(win));
- wxString str("Editing ");
- str += win->GetClassInfo()->GetClassName();
- str += ": ";
- if (win->GetName() != "")
- str += win->GetName();
- else
- str += "properties";
- info->Edit(NULL, str);
- }
-}
-
-// Generate a window id and a first stab at a name
-int wxResourceManager::GenerateWindowId(const wxString& prefix, wxString& idName)
-{
- m_symbolIdCounter ++;
- while (m_symbolTable.IdExists(m_symbolIdCounter))
- m_symbolIdCounter ++;
-
- int nameId = m_symbolIdCounter;
-
- wxString str;
- str.Printf("%d", nameId);
- idName = prefix + str;
-
- while (m_symbolTable.SymbolExists(idName))
- {
- nameId ++;
- str.Printf("%d", nameId);
- idName = prefix + str;
- }
-
- return m_symbolIdCounter;
-}
-
-
-/*
-* Resource editor frame
-*/
-
-IMPLEMENT_CLASS(wxResourceEditorFrame, wxFrame)
-
-BEGIN_EVENT_TABLE(wxResourceEditorFrame, wxFrame)
-EVT_MENU(wxID_NEW, wxResourceEditorFrame::OnNew)
-EVT_MENU(RESED_NEW_DIALOG, wxResourceEditorFrame::OnNewDialog)
-EVT_MENU(wxID_OPEN, wxResourceEditorFrame::OnOpen)
-EVT_MENU(RESED_CLEAR, wxResourceEditorFrame::OnClear)
-EVT_MENU(wxID_SAVE, wxResourceEditorFrame::OnSave)
-EVT_MENU(wxID_SAVEAS, wxResourceEditorFrame::OnSaveAs)
-EVT_MENU(wxID_EXIT, wxResourceEditorFrame::OnExit)
-EVT_MENU(wxID_ABOUT, wxResourceEditorFrame::OnAbout)
-EVT_MENU(RESED_CONTENTS, wxResourceEditorFrame::OnContents)
-EVT_MENU(RESED_DELETE, wxResourceEditorFrame::OnDeleteSelection)
-EVT_MENU(RESED_RECREATE, wxResourceEditorFrame::OnRecreateSelection)
-EVT_MENU(RESED_TEST, wxResourceEditorFrame::OnTest)
-EVT_MENU(RESED_CONVERT_WXRS, wxResourceEditorFrame::OnConvertWXRs)
-EVT_CLOSE(wxResourceEditorFrame::OnCloseWindow)
-END_EVENT_TABLE()
-
-wxResourceEditorFrame::wxResourceEditorFrame(wxResourceManager *resMan, wxFrame *parent, const wxString& title,
- const wxPoint& pos, const wxSize& size, long style, const wxString& name):
-wxFrame(parent, -1, title, pos, size, style, name)
-{
- manager = resMan;
-}
-
-wxResourceEditorFrame::~wxResourceEditorFrame()
-{
-}
-
-void wxResourceEditorFrame::OnConvertWXRs(wxCommandEvent& WXUNUSED(event))
-{
- manager->ConvertWXRs();
-}
-
-void wxResourceEditorFrame::OnNew(wxCommandEvent& WXUNUSED(event))
-{
- manager->New(FALSE);
-}
-
-void wxResourceEditorFrame::OnNewDialog(wxCommandEvent& WXUNUSED(event))
-{
- manager->CreateNewPanel();
-}
-
-void wxResourceEditorFrame::OnOpen(wxCommandEvent& WXUNUSED(event))
-{
- manager->New(TRUE);
-}
-
-void wxResourceEditorFrame::OnClear(wxCommandEvent& WXUNUSED(event))
-{
- manager->Clear(TRUE, FALSE);
-}
-
-void wxResourceEditorFrame::OnSave(wxCommandEvent& WXUNUSED(event))
-{
- manager->Save();
-}
-
-void wxResourceEditorFrame::OnSaveAs(wxCommandEvent& WXUNUSED(event))
-{
- manager->SaveAs();
-}
-
-void wxResourceEditorFrame::OnExit(wxCommandEvent& WXUNUSED(event))
-{
- manager->Clear(TRUE, FALSE) ;
- this->Destroy();
-}
-
-void wxResourceEditorFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
-{
- char buf[300];
- sprintf(buf, "wxWindows Dialog Editor %.1f\n(c) Julian Smart 1996-1999", wxDIALOG_EDITOR_VERSION);
- wxMessageBox(buf, "About Dialog Editor", wxOK|wxCENTRE);
-}
-
-void wxResourceEditorFrame::OnTest(wxCommandEvent& WXUNUSED(event))
-{
- manager->TestCurrentDialog(this);
-}
-
-void wxResourceEditorFrame::OnContents(wxCommandEvent& WXUNUSED(event))
-{
-#ifdef __WXMSW__
- wxBeginBusyCursor();
- manager->GetHelpController()->LoadFile();
- manager->GetHelpController()->DisplayContents();
- wxEndBusyCursor();
-#endif
-}
-
-void wxResourceEditorFrame::OnDeleteSelection(wxCommandEvent& WXUNUSED(event))
-{
- manager->DeleteSelection();
-}
-
-void wxResourceEditorFrame::OnRecreateSelection(wxCommandEvent& WXUNUSED(event))
-{
- manager->RecreateSelection();
-}
-
-void wxResourceEditorFrame::OnCloseWindow(wxCloseEvent& event)
-{
- wxPropertyInfo::CloseWindow();
- manager->ClearCurrentDialog();
- if (manager->Modified())
- {
- if (!manager->Clear(TRUE, FALSE))
- {
- event.Veto();
- return;
- }
- }
-
- if (!IsIconized())
- {
- int w, h;
- GetSize(&w, &h);
- manager->m_resourceEditorWindowSize.width = w;
- manager->m_resourceEditorWindowSize.height = h;
-
- int x, y;
- GetPosition(&x, &y);
-
- manager->m_resourceEditorWindowSize.x = x;
- manager->m_resourceEditorWindowSize.y = y;
- }
- manager->SetEditorFrame(NULL);
- manager->SetEditorToolBar(NULL);
-
- this->Destroy();
-}
-
-/*
-* Resource editor window that contains the dialog/panel being edited
-*/
-
-BEGIN_EVENT_TABLE(wxResourceEditorScrolledWindow, wxScrolledWindow)
-EVT_PAINT(wxResourceEditorScrolledWindow::OnPaint)
-END_EVENT_TABLE()
-
-wxResourceEditorScrolledWindow::wxResourceEditorScrolledWindow(wxWindow *parent, const wxPoint& pos, const wxSize& size,
- long style):
-wxScrolledWindow(parent, -1, pos, size, style)
-{
- m_marginX = 10;
- m_marginY = 40;
- m_childWindow = NULL;
-
- SetBackgroundColour(* wxWHITE);
-}
-
-wxResourceEditorScrolledWindow::~wxResourceEditorScrolledWindow()
-{
-}
-
-void wxResourceEditorScrolledWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
-{
- wxPaintDC dc(this);
-
- DrawTitle(dc);
-}
-
-void wxResourceEditorScrolledWindow::DrawTitle(wxDC& dc)
-{
- if (m_childWindow)
- {
- wxItemResource* res = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_childWindow);
- if (res)
- {
- wxString str(res->GetTitle());
- int x, y;
- GetViewStart(& x, & y);
-
- wxFont font(10, wxSWISS, wxNORMAL, wxBOLD);
- dc.SetFont(font);
- dc.SetBackgroundMode(wxTRANSPARENT);
- dc.SetTextForeground(wxColour(0, 0, 0));
-
- long w, h;
- dc.GetTextExtent(str, & w, & h);
-
- dc.DrawText(str, m_marginX + (- x * 10), m_marginY + (- y * 10) - h - 5);
- }
- }
-}
-
-/*
-* Main toolbar
-*
-*/
-
-BEGIN_EVENT_TABLE(EditorToolBar, wxToolBar)
-// EVT_PAINT(EditorToolBar::OnPaint)
-END_EVENT_TABLE()
-
-EditorToolBar::EditorToolBar(wxFrame *frame, const wxPoint& pos, const wxSize& size,
- long style):
-wxToolBar(frame, -1, pos, size, style)
-{
-}
-
-bool EditorToolBar::OnLeftClick(int toolIndex, bool WXUNUSED(toggled))
-{
- wxResourceManager *manager = wxResourceManager::GetCurrentResourceManager();
-
- switch (toolIndex)
- {
- case TOOLBAR_LOAD_FILE:
- {
- manager->New(TRUE);
- break;
- }
- case TOOLBAR_NEW:
- {
- manager->CreateNewPanel();
- break;
- }
- case TOOLBAR_SAVE_FILE:
- {
- manager->Save();
- break;
- }
- case TOOLBAR_HELP:
- {
-#ifdef __WXMSW__
- wxBeginBusyCursor();
- manager->GetHelpController()->DisplayContents();
- wxEndBusyCursor();
-#endif
- break;
- }
- case TOOLBAR_FORMAT_HORIZ:
- {
- manager->AlignItems(TOOLBAR_FORMAT_HORIZ);
- break;
- }
- case TOOLBAR_FORMAT_HORIZ_LEFT_ALIGN:
- {
- manager->AlignItems(TOOLBAR_FORMAT_HORIZ_LEFT_ALIGN);
- break;
- }
- case TOOLBAR_FORMAT_HORIZ_RIGHT_ALIGN:
- {
- manager->AlignItems(TOOLBAR_FORMAT_HORIZ_RIGHT_ALIGN);
- break;
- }
- case TOOLBAR_FORMAT_VERT:
- {
- manager->AlignItems(TOOLBAR_FORMAT_VERT);
- break;
- }
- case TOOLBAR_FORMAT_VERT_TOP_ALIGN:
- {
- manager->AlignItems(TOOLBAR_FORMAT_VERT_TOP_ALIGN);
- break;
- }
- case TOOLBAR_FORMAT_VERT_BOT_ALIGN:
- {
- manager->AlignItems(TOOLBAR_FORMAT_VERT_BOT_ALIGN);
- break;
- }
- case TOOLBAR_COPY_SIZE:
- {
- manager->CopySize(TOOLBAR_COPY_SIZE);
- break;
- }
- case TOOLBAR_COPY_WIDTH:
- {
- manager->CopySize(TOOLBAR_COPY_WIDTH);
- break;
- }
- case TOOLBAR_COPY_HEIGHT:
- {
- manager->CopySize(TOOLBAR_COPY_HEIGHT);
- break;
- }
- case TOOLBAR_DISTRIBUTE_HORIZ:
- {
- manager->DistributePositions(TOOLBAR_DISTRIBUTE_HORIZ);
- break;
- }
- case TOOLBAR_DISTRIBUTE_VERT:
- {
- manager->DistributePositions(TOOLBAR_DISTRIBUTE_VERT);
- break;
- }
- case TOOLBAR_TO_BACK:
- {
- manager->ToBackOrFront(TRUE);
- break;
- }
- case TOOLBAR_TO_FRONT:
- {
- manager->ToBackOrFront(FALSE);
- break;
- }
- default:
- break;
- }
- return TRUE;
-}
-
-void EditorToolBar::OnMouseEnter(int toolIndex)
-{
- wxFrame *frame = (wxFrame *)GetParent();
-
- if (!frame) return;
-
- if (toolIndex > -1)
- {
- switch (toolIndex)
- {
- case TOOLBAR_LOAD_FILE:
- frame->SetStatusText("Load project file");
- break;
- case TOOLBAR_SAVE_FILE:
- frame->SetStatusText("Save project file");
- break;
- case TOOLBAR_NEW:
- frame->SetStatusText("Create a new resource");
- break;
- case TOOLBAR_FORMAT_HORIZ:
- frame->SetStatusText("Align items horizontally");
- break;
- case TOOLBAR_FORMAT_VERT:
- frame->SetStatusText("Align items vertically");
- break;
- case TOOLBAR_FORMAT_HORIZ_LEFT_ALIGN:
- frame->SetStatusText("Left-align items");
- break;
- case TOOLBAR_FORMAT_HORIZ_RIGHT_ALIGN:
- frame->SetStatusText("Right-align items");
- break;
- case TOOLBAR_FORMAT_VERT_TOP_ALIGN:
- frame->SetStatusText("Top-align items");
- break;
- case TOOLBAR_FORMAT_VERT_BOT_ALIGN:
- frame->SetStatusText("Bottom-align items");
- break;
- case TOOLBAR_COPY_SIZE:
- frame->SetStatusText("Copy size from first selection");
- break;
- case TOOLBAR_TO_FRONT:
- frame->SetStatusText("Put image to front");
- break;
- case TOOLBAR_TO_BACK:
- frame->SetStatusText("Put image to back");
- break;
- case TOOLBAR_HELP:
- frame->SetStatusText("Display help contents");
- break;
- default:
- break;
- }
- }
- else frame->SetStatusText("");
-}
-
-bool ResourceEditorDialogTester::ProcessEvent(wxEvent& event)
-{
- if (event.IsCommandEvent() && event.GetId() != wxID_OK && event.GetId() != wxID_CANCEL)
- {
- // Do nothing
- return TRUE;
- }
- else
- return wxDialog::ProcessEvent(event);
-}
-
-static int gs_LabelInsertionCount = 0;
-
-// Convert old WXRs to new
-bool wxResourceManager::ConvertWXRs()
-{
- gs_LabelInsertionCount = 0;
- m_symbolIdCounter = 20000;
-
- wxString currentPath = wxGetCwd();
- wxString oldWXRPath, newWXRPath;
-
- wxDirDialog dialog(NULL, wxT("Choose directory for old WXRs"), currentPath);
-
- if (dialog.ShowModal() == wxID_OK)
- {
- oldWXRPath = dialog.GetPath();
- }
- else
- return FALSE;
-
- wxDirDialog dialog2(NULL, wxT("Choose directory for new WXRs"), oldWXRPath);
-
- if (dialog2.ShowModal() == wxID_OK)
- {
- newWXRPath = dialog2.GetPath();
- }
- else
- return FALSE;
-
- if (newWXRPath == oldWXRPath)
- {
- wxMessageBox(wxT("Sorry, the directories must be different."));
- return FALSE;
- }
-
- wxDir dir(oldWXRPath);
- if (!dir.IsOpened())
- return FALSE;
-
- wxArrayString stringArray;
-
- wxString filename;
- bool ok = dir.GetFirst(& filename, wxT("*.wxr"));
- while (ok)
- {
- stringArray.Add(filename);
-
- ok = dir.GetNext(& filename);
- }
-
- // Pop up a progress dialog
- wxProgressDialog progressDialog(wxT("Converting WXR files"), wxT("Converting files..."));
-
- size_t i;
- for (i = 0; i < stringArray.Count(); i++)
- {
- progressDialog.Update((int) (100.0 * ((double) i / (double) stringArray.Count())));
-
- filename = stringArray[i];
- wxString oldPath = oldWXRPath + wxString(wxFILE_SEP_PATH) + filename;
- wxString newPath = newWXRPath + wxString(wxFILE_SEP_PATH) + filename;
-
- DoConvertWXR(oldPath, newPath);
- }
-
- wxString msg;
- msg.Printf(wxT("Dialog Editor inserted %d labels."), gs_LabelInsertionCount);
- wxMessageBox(msg);
-
- return TRUE;
-}
-
-bool wxResourceManager::DoConvertWXR(const wxString& oldPath, const wxString& newPath)
-{
-
- if (!Clear(TRUE, FALSE))
- return FALSE;
-
- m_symbolTable.AddStandardSymbols();
-
- if (!m_resourceTable.ParseResourceFile(oldPath))
- {
- wxString msg;
- msg.Printf(wxT("Could not read file %s"), (const char*) oldPath);
- wxMessageBox(msg, "Resource file load error", wxOK | wxICON_EXCLAMATION);
- return FALSE;
- }
- m_currentFilename = oldPath;
-
- //SetFrameTitle(m_currentFilename);
-
- //UpdateResourceList();
-
- // Construct include filename from this file
- m_symbolFilename = m_currentFilename;
-
- wxStripExtension(m_symbolFilename);
- m_symbolFilename += wxT(".h");
-
- if (!m_symbolTable.ReadIncludeFile(m_symbolFilename))
- {
- }
- else
- {
- // Set the id counter to the last known id
- m_symbolIdCounter = m_symbolTable.FindHighestId();
- }
-
- // Now check in case some (or all) resources don't have resource ids, or they
- // don't match the .h file, or something of that nature.
- bool altered = RepairResourceIds();
-
- // Do any necessary changes to the resources
- m_resourceTable.BeginFind();
- wxNode *node;
- while ((node = m_resourceTable.Next()))
- {
- wxItemResource *res = (wxItemResource *)node->Data();
- ChangeOldToNewResource(NULL, res);
- }
-
- // Change the filename before saving
-
- m_currentFilename = newPath;
- m_symbolFilename = m_currentFilename;
- wxStripExtension(m_symbolFilename);
- m_symbolFilename += wxT(".h");
-
- Modify(TRUE);
-
- Save();
-
- Clear(TRUE, TRUE);
-
- return TRUE;
-
-}
-
-bool wxResourceManager::ChangeOldToNewResource(wxItemResource* parent, wxItemResource* res)
-{
- // Change these according to your needs
-
- // Change all fonts to use system defaults for fonts, colours etc.
- static bool s_useSystemDefaultsAlways = FALSE; // TRUE;
-
- // Increase dialog height by this amount (wxWin 2 uses dialog client size now)
- static int s_increaseDialogSize = -18;
-
- // How many points to decrease the font sizes by, since
- // wxWin 2 fonts are larger in Windows
- static int s_decreaseFontSize = 3;
-
- wxString itemType(res->GetType());
-
- wxFont font = res->GetFont();
-
- if ((s_decreaseFontSize) > 0 && font.Ok())
- {
- wxFont newFont = wxFont(font.GetPointSize() - s_decreaseFontSize,
- font.GetFamily(), font.GetStyle(), font.GetWeight(),
- font.GetUnderlined(), font.GetFaceName());
- res->SetFont(newFont);
- }
-
- if (itemType == wxT("wxDialogBox") || itemType == wxT("wxDialog") || itemType == wxT("wxPanel"))
- {
- if (itemType == wxT("wxDialogBox"))
- res->SetType(wxT("wxDialog"));
-
- if (itemType == wxT("wxDialogBox") || itemType == wxT("wxDialog"))
- {
- // Only change the height if it has a caption, i.e. it's going to be
- // used as a proper dialog and not a panel
- if (res->GetStyle() & wxCAPTION)
- res->SetSize(res->GetX(), res->GetY(), res->GetWidth(), res->GetHeight() + s_increaseDialogSize );
- }
-
- if (s_useSystemDefaultsAlways)
- res->SetResourceStyle(res->GetResourceStyle() | wxRESOURCE_USE_DEFAULTS);
-
- if (res->GetValue1())
- res->SetStyle(res->GetStyle() | wxDIALOG_MODAL);
-
- wxNode *node = res->GetChildren().First();
- while (node)
- {
- wxItemResource *child = (wxItemResource *)node->Data();
-
- ChangeOldToNewResource(res, child);
- node = node->Next();
- }
- }
- else if (itemType == wxT("wxMessage"))
- {
- // Figure out if this is a bitmap or text message
- if (res->GetValue4().IsEmpty())
- res->SetType(wxT("wxStaticText"));
- else
- res->SetType(wxT("wxStaticBitmap"));
- }
- else if (itemType == wxT("wxButton"))
- {
- // Figure out if this is a bitmap or text message
- if (res->GetValue4().IsEmpty())
- {
- }
- else
- res->SetType(wxT("wxBitmapButton"));
- }
- else if (itemType == wxT("wxGroupBox"))
- {
- res->SetType(wxT("wxStaticBox"));
- }
- else if (itemType == wxT("wxText"))
- {
- res->SetType(wxT("wxTextCtrl"));
- }
- else if (itemType == wxT("wxMultiText"))
- {
- res->SetType(wxT("wxTextCtrl"));
- res->SetStyle(res->GetStyle() | wxTE_MULTILINE);
- }
-
- itemType = res->GetType();
-
- if (!res->GetTitle().IsEmpty() &&
- (itemType == wxT("wxTextCtrl") || itemType == wxT("wxChoice") ||
- itemType == wxT("wxComboBox") || itemType == wxT("wxGauge") ||
- itemType == wxT("wxListBox")))
- {
- // Insert a label control resource, adjusting the size of this
- // resource accordingly.
- InsertLabelResource(parent, res);
- }
-
- return TRUE;
-}
-
-// Insert a label control resource, adjusting the size of this
-// resource accordingly.
-bool wxResourceManager::InsertLabelResource(wxItemResource* parent, wxItemResource* res)
-{
- gs_LabelInsertionCount ++;
-
- bool isHorizontal = TRUE;
-
- // Determine panel orientation
- if (parent->GetResourceStyle() & wxRESOURCE_VERTICAL_LABEL)
- {
- isHorizontal = FALSE;
- }
- else if (parent->GetResourceStyle() & wxRESOURCE_HORIZONTAL_LABEL)
- {
- isHorizontal = TRUE;
- }
-
- // Now override
- if (res->GetResourceStyle() & wxRESOURCE_VERTICAL_LABEL)
- {
- isHorizontal = FALSE;
- }
- else if (res->GetResourceStyle() & wxRESOURCE_HORIZONTAL_LABEL)
- {
- isHorizontal = TRUE;
- }
-
- int x = res->GetX();
- int y = res->GetY();
- int width = res->GetWidth();
- int height = res->GetHeight();
-
- // Find the font specified
- wxFont font;
- if (res->GetFont().Ok())
- font = res->GetFont();
- else
- font = parent->GetFont();
-
- if (!font.Ok() || (parent->GetResourceStyle() & wxRESOURCE_USE_DEFAULTS))
- font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
-
- int labelX, labelY;
- wxCoord labelWidth, labelHeight;
- wxScreenDC dc;
- dc.SetFont(font);
- dc.GetTextExtent(res->GetTitle(), & labelWidth, & labelHeight);
-
- // Vert/horizontal margin between controls
- int margin = 3;
-
- labelX = x;
- labelY = y;
- //labelWidth += 1;
- //labelHeight += 1;
-
- if (isHorizontal)
- {
- x += labelWidth + margin;
- width -= (labelWidth + margin);
- }
- else
- {
- y += labelHeight + margin;
- height -= (labelHeight + margin);
-
- // Fudge factors
- if (res->GetType() == wxT("wxTextCtrl"))
- {
- height += 3;
- }
- else if (res->GetType() == wxT("wxChoice") || res->GetType() == wxT("wxComboBox"))
- {
- height -= 4;
- }
- }
-
- res->SetSize(x, y, width, height);
-
- wxItemResource* staticItem = new wxItemResource;
- staticItem->SetSize(labelX, labelY, labelWidth, labelHeight);
- staticItem->SetTitle(res->GetTitle());
- staticItem->SetFont(font);
- staticItem->SetStyle(0);
- staticItem->SetType(wxT("wxStaticText"));
-
- wxString newSymbolName;
- int newId = GenerateWindowId(wxT("ID_STATICTEXT"), newSymbolName) ;
- staticItem->SetId(newId);
-
- newSymbolName = res->GetName() + wxT("_Label");
- staticItem->SetName(newSymbolName);
- m_symbolTable.AddSymbol(newSymbolName, newId);
-
- wxNode* node = parent->GetChildren().Member(res);
-
- wxASSERT( (node != NULL) );
-
- parent->GetChildren().Insert(node, staticItem);
-
- // Remove the title from this resource since we've replaced it
- // with a static text control
- res->SetTitle(wxEmptyString);
-
- return TRUE;
-}
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: reseditr.h
-// Purpose: Resource editor class
-// Author: Julian Smart
-// Modified by:
-// Created: 04/01/98
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows license
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _RESEDITR_H_
-#define _RESEDITR_H_
-
-#define wxDIALOG_EDITOR_VERSION 2.1
-
-#if defined(__GNUG__) && !defined(__APPLE__)
-#pragma interface "reseditr.h"
-#endif
-
-#include "wx/deprecated/setup.h"
-
-#include "wx/wx.h"
-#include "wx/string.h"
-#include "wx/layout.h"
-#include "wx/toolbar.h"
-#include "wx/imaglist.h"
-#include "wx/treectrl.h"
-#include "wx/txtstrm.h"
-
-#include "wx/deprecated/resource.h"
-#include "wx/deprecated/proplist.h"
-
-#include "symbtabl.h"
-#include "winstyle.h"
-
-#define RESED_DELETE 301
-#define RESED_RECREATE 303
-#define RESED_CLEAR 304
-#define RESED_NEW_DIALOG 305
-#define RESED_NEW_PANEL 306
-#define RESED_TEST 310
-#define RESED_CONVERT_WXRS 311 // Convert old WXRs to new
-
-#define RESED_CONTENTS 320
-
-#define IDC_TREECTRL 500
-#define IDC_LISTCTRL 501
-
-// For control list ('palette')
-#define RESED_POINTER 0
-#define RESED_BUTTON 1
-#define RESED_BMPBUTTON 2
-#define RESED_STATICTEXT 3
-#define RESED_STATICBMP 4
-#define RESED_STATICBOX 5
-#define RESED_TEXTCTRL_SINGLE 6
-#define RESED_TEXTCTRL_MULTIPLE 7
-#define RESED_LISTBOX 8
-#define RESED_CHOICE 9
-#define RESED_COMBOBOX 10
-#define RESED_CHECKBOX 11
-#define RESED_SLIDER 12
-#define RESED_GAUGE 13
-#define RESED_RADIOBOX 14
-#define RESED_RADIOBUTTON 15
-#define RESED_SCROLLBAR 16
-#define RESED_TREECTRL 17
-#define RESED_LISTCTRL 18
-#define RESED_SPINBUTTON 19
-
-/*
-* Controls loading, saving, user interface of resource editor(s).
-*/
-
-class wxResourceEditorFrame;
-class EditorToolBar;
-class wxWindowPropertyInfo;
-class wxResourceEditorProjectTree;
-class wxResourceEditorControlList;
-
-#ifdef __WXMSW__
-#define wxHelpController wxWinHelpController
-#else
-#define wxHelpController wxHTMLHelpController;
-#endif
-
-class wxHelpController;
-
-/*
-* The resourceTable contains a list of wxItemResources (which each may
-* have further children, defining e.g. a dialog box with controls).
-*
-* We need to associate actual windows with each wxItemResource,
-* instead of the current 'one current window' scheme.
-*
-* - We create a new dialog, create a wxItemResource,
-* associate the dialog with wxItemResource via a hash table.
-* Must be a hash table in case dialog is deleted without
-* telling the resource manager.
-* - When we save the resource after editing/closing the dialog,
-* we check the wxItemResource/wxDialog and children for
-* consistency (throw away items no longer in the wxDialog,
-* create any new wxItemResources).
-* - We save the wxItemResources via the wxPropertyInfo classes,
-* so devolve the code to the appropriate class.
-* This involves creating a new temporary wxPropertyInfo for
-* the purpose.
-*
-* We currently assume we only create one instance of a window for
-* each wxItemResource. We will need to relax this when we're editing
-* in situ.
-*
-*
-*/
-
-class wxResourceTableWithSaving: public wxResourceTable
-{
-public:
- wxResourceTableWithSaving():wxResourceTable()
- {
- // Add all known window styles
- m_styleTable.Init();
- }
- virtual bool Save(const wxString& filename);
- virtual bool SaveResource(wxTextOutputStream& stream, wxItemResource* item, wxItemResource* parentItem);
-
- void GeneratePanelStyleString(long windowStyle, char *buf);
- void GenerateDialogStyleString(long windowStyle, char *buf);
-
- void GenerateControlStyleString(const wxString& windowClass, long windowStyle, char *buf);
-
- void OutputFont(wxTextOutputStream& stream, const wxFont& font);
- wxControl *CreateItem(wxPanel *panel, const wxItemResource *childResource, const wxItemResource* parentResource);
-
-protected:
- wxWindowStyleTable m_styleTable;
-};
-
-class wxResourceEditorScrolledWindow;
-
-class wxResourceManager: public wxObject
-{
- friend class wxResourceEditorFrame;
-
-public:
- wxResourceManager();
- ~wxResourceManager();
-
- // Operations
-
- // Initializes the resource manager
- bool Initialize();
-
- // Load/save window size etc.
- bool LoadOptions();
- bool SaveOptions();
-
- // Show or hide the resource editor frame, which displays a list
- // of resources with ability to edit them.
- virtual bool ShowResourceEditor(bool show, wxWindow *parent = NULL, const char *title = "wxWindows Dialog Editor");
-
- // Convert old WXRs to new
- virtual bool ConvertWXRs();
- bool DoConvertWXR(const wxString& oldPath, const wxString& newPath);
- bool ChangeOldToNewResource(wxItemResource* parent, wxItemResource* res);
- bool InsertLabelResource(wxItemResource* parent, wxItemResource* res);
-
- virtual bool Save();
- virtual bool SaveAs();
- virtual bool Save(const wxString& filename);
- virtual bool Load(const wxString& filename);
- virtual bool Clear(bool deleteWindows = TRUE, bool force = TRUE);
- virtual void SetFrameTitle(const wxString& filename);
- virtual void ClearCurrentDialog();
- virtual bool New(bool loadFromFile = TRUE, const wxString& filename = "");
- virtual bool SaveIfModified();
- virtual void AlignItems(int flag);
- virtual void CopySize(int command); // Copy width, height or both from first control
- virtual void ToBackOrFront(bool toBack);
- virtual void DistributePositions(int command); // Distribute controls evenly between first and last
- virtual wxWindow *FindParentOfSelection();
-
- virtual wxFrame *OnCreateEditorFrame(const char *title);
- virtual wxMenuBar *OnCreateEditorMenuBar(wxFrame *parent);
- virtual wxResourceEditorScrolledWindow *OnCreateEditorPanel(wxFrame *parent);
- virtual wxToolBar *OnCreateToolBar(wxFrame *parent);
-
- // Create a window information object for the given window
- wxWindowPropertyInfo* CreatePropertyInfoForWindow(wxWindow *win);
- // Edit the given window
- void EditWindow(wxWindow *win);
-
- virtual void UpdateResourceList();
- virtual void AddItemsRecursively(long parent, wxItemResource *resource);
- virtual bool EditSelectedResource();
- virtual bool Edit(wxItemResource *res);
- virtual bool CreateNewPanel();
- virtual bool CreatePanelItem(wxItemResource *panelResource, wxPanel *panel, char *itemType, int x = 10, int y = 10, bool isBitmap = FALSE);
- virtual bool DeleteSelection();
- virtual bool TestCurrentDialog(wxWindow* parent);
-
- // Saves the window info into the resource, and deletes the
- // handler. Doesn't actually disassociate the window from
- // the resources. Replaces OnClose.
- virtual bool SaveInfoAndDeleteHandler(wxWindow* win);
-
- // Destroys the window. If this is the 'current' panel, NULLs the
- // variable.
- virtual bool DeleteWindow(wxWindow* win);
- virtual bool DeleteResource(wxItemResource *res);
- virtual bool DeleteResource(wxWindow *win);
-
- // Add bitmap resource if there isn't already one with this filename.
- virtual wxString AddBitmapResource(const wxString& filename);
-
- // Delete the bitmap resource if it isn't being used by another resource.
- virtual void PossiblyDeleteBitmapResource(const wxString& resourceName);
-
- // Helper function for above
- virtual bool IsBitmapResourceUsed(const wxString& resourceName);
-
- wxItemResource *FindBitmapResourceByFilename(const wxString& filename);
-
- wxString FindBitmapFilenameForResource(wxItemResource *resource);
-
- // Is this window identifier in use?
- bool IsSymbolUsed(wxItemResource* thisResource, wxWindowID id) ;
-
- // Is this window identifier compatible with the given name? (i.e.
- // does it already exist under a different name)
- bool IsIdentifierOK(const wxString& name, wxWindowID id);
-
- // Change all integer ids that match oldId, to newId.
- // This is necessary if an id is changed for one resource - all resources
- // must be changed.
- void ChangeIds(int oldId, int newId);
-
- // If any resource ids were missing (or their symbol was missing),
- // repair them i.e. give them new ids. Returns TRUE if any resource
- // needed repairing.
- bool RepairResourceIds();
-
- // Deletes 'win' and creates a new window from the resource that
- // was associated with it. E.g. if you can't change properties on the
- // fly, you'll need to delete the window and create it again.
- virtual wxWindow *RecreateWindowFromResource(wxWindow *win, wxWindowPropertyInfo *info = NULL, bool instantiateFirst = TRUE);
-
- virtual bool RecreateSelection();
-
- // Remove selection handles if this control is selected
- void DeselectItemIfNecessary(wxWindow *win);
-
- // Need to search through resource table removing this from
- // any resource which has this as a parent.
- virtual bool RemoveResourceFromParent(wxItemResource *res);
-
- virtual bool EditDialog(wxDialog *dialog, wxWindow *parent);
-
- void AddSelection(wxWindow *win);
- void RemoveSelection(wxWindow *win);
-
- virtual void MakeUniqueName(char *prefix, char *buf);
-
- // (Dis)associate resource<->physical window
- // Doesn't delete any windows.
- virtual void AssociateResource(wxItemResource *resource, wxWindow *win);
- virtual bool DisassociateResource(wxItemResource *resource);
- virtual bool DisassociateResource(wxWindow *win);
- virtual bool DisassociateWindows();
- virtual wxItemResource *FindResourceForWindow(wxWindow *win);
- virtual wxWindow *FindWindowForResource(wxItemResource *resource);
-
- virtual bool InstantiateAllResourcesFromWindows();
- virtual bool InstantiateResourceFromWindow(wxItemResource *resource, wxWindow *window, bool recurse = FALSE);
-
- // Accessors
- inline void SetEditorFrame(wxFrame *fr) { m_editorFrame = fr; }
- inline void SetEditorToolBar(EditorToolBar *tb) { m_editorToolBar = tb; }
- inline wxFrame *GetEditorFrame() const { return m_editorFrame; }
- inline wxResourceEditorProjectTree *GetEditorResourceTree() const { return m_editorResourceTree; }
- inline wxResourceEditorControlList *GetEditorControlList() const { return m_editorControlList; }
- inline wxList& GetSelections() { return m_selections; }
- inline wxMenu *GetPopupMenu() const { return m_popupMenu; }
-#ifdef __WXMSW__
- inline wxHelpController *GetHelpController() const { return m_helpController; }
-#endif
-
- inline void Modify(bool mod = TRUE) { m_modified = mod; }
- inline bool Modified() const { return m_modified; }
-
- inline wxResourceTable& GetResourceTable() { return m_resourceTable; }
- inline wxHashTable& GetResourceAssociations() { return m_resourceAssociations; }
-
- inline wxString GetCurrentFilename() const { return m_currentFilename; }
- static wxResourceManager* GetCurrentResourceManager() { return sm_currentResourceManager; }
-
- inline void SetSymbolFilename(const wxString& s) { m_symbolFilename = s; }
- inline wxString GetSymbolFilename() const { return m_symbolFilename; }
-
- inline wxRect& GetPropertyWindowSize() { return m_propertyWindowSize; }
- inline wxRect& GetResourceEditorWindowSize() { return m_resourceEditorWindowSize; }
-
- wxResourceSymbolTable& GetSymbolTable() { return m_symbolTable; }
-
- // Generate a window id and a first stab at a name
- int GenerateWindowId(const wxString& prefix, wxString& idName) ;
-
- // Member variables
- protected:
-#ifdef __WXMSW__
- wxHelpController* m_helpController;
-#endif
- wxResourceTableWithSaving m_resourceTable;
- wxFrame* m_editorFrame;
- wxResourceEditorScrolledWindow* m_editorPanel;
- wxMenu* m_popupMenu;
- wxResourceEditorProjectTree* m_editorResourceTree;
- wxResourceEditorControlList* m_editorControlList;
- EditorToolBar* m_editorToolBar;
- int m_nameCounter;
- int m_symbolIdCounter; // For generating window ids
- bool m_modified;
- wxHashTable m_resourceAssociations;
- wxList m_selections;
- wxString m_currentFilename;
- wxBitmap* m_bitmapImage; // Default for static bitmaps/buttons
-
- wxImageList m_imageList;
- long m_rootDialogItem; // Root of dialog hierarchy in tree (unused)
-
- // Options to be saved/restored
- wxString m_optionsResourceFilename; // e.g. dialoged.ini, .dialogrc
- wxRect m_propertyWindowSize;
- wxRect m_resourceEditorWindowSize;
- static wxResourceManager* sm_currentResourceManager;
-
- // Symbol table with identifiers for controls
- wxResourceSymbolTable m_symbolTable;
- // Filename for include file, e.g. resource.h
- wxString m_symbolFilename;
-};
-
-
-class wxResourceEditorFrame: public wxFrame
-{
-public:
- DECLARE_CLASS(wxResourceEditorFrame)
-
- wxResourceManager *manager;
- wxResourceEditorFrame(wxResourceManager *resMan, wxFrame *parent, const wxString& title,
- const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(600, 400),
- long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame");
- ~wxResourceEditorFrame();
-
- void OnCloseWindow(wxCloseEvent& event);
-
- void OnNew(wxCommandEvent& event);
- void OnOpen(wxCommandEvent& event);
- void OnNewDialog(wxCommandEvent& event);
- void OnClear(wxCommandEvent& event);
- void OnSave(wxCommandEvent& event);
- void OnSaveAs(wxCommandEvent& event);
- void OnExit(wxCommandEvent& event);
- void OnAbout(wxCommandEvent& event);
- void OnContents(wxCommandEvent& event);
- void OnDeleteSelection(wxCommandEvent& event);
- void OnRecreateSelection(wxCommandEvent& event);
- void OnTest(wxCommandEvent& event);
- void OnConvertWXRs(wxCommandEvent& event);
-
- DECLARE_EVENT_TABLE()
-};
-
-class wxResourceEditorScrolledWindow: public wxScrolledWindow
-{
-public:
- wxResourceEditorScrolledWindow(wxWindow *parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
- long style = 0);
- ~wxResourceEditorScrolledWindow();
-
- void OnPaint(wxPaintEvent& event);
-
- void DrawTitle(wxDC& dc);
-
- // Accessors
- inline int GetMarginX() { return m_marginX; }
- inline int GetMarginY() { return m_marginY; }
-
-public:
- wxWindow* m_childWindow;
-private:
- int m_marginX, m_marginY;
-
- DECLARE_EVENT_TABLE()
-};
-
-#define OBJECT_MENU_TITLE 1
-#define OBJECT_MENU_EDIT 2
-#define OBJECT_MENU_DELETE 3
-
-/*
-* Main toolbar
-*
-*/
-
-class EditorToolBar: public wxToolBar
-{
-public:
- EditorToolBar(wxFrame *frame, const wxPoint& pos = wxPoint(0, 0), const wxSize& size = wxSize(0, 0),
- long style = wxTB_HORIZONTAL);
- bool OnLeftClick(int toolIndex, bool toggled);
- void OnMouseEnter(int toolIndex);
-
- DECLARE_EVENT_TABLE()
-};
-
-// Toolbar ids
-#define TOOLBAR_LOAD_FILE 101
-#define TOOLBAR_SAVE_FILE 102
-#define TOOLBAR_NEW 103
-#define TOOLBAR_TREE 105
-#define TOOLBAR_HELP 106
-
-// Formatting tools
-#define TOOLBAR_FORMAT_HORIZ 110
-#define TOOLBAR_FORMAT_HORIZ_LEFT_ALIGN 111
-#define TOOLBAR_FORMAT_HORIZ_RIGHT_ALIGN 112
-#define TOOLBAR_FORMAT_VERT 113
-#define TOOLBAR_FORMAT_VERT_TOP_ALIGN 114
-#define TOOLBAR_FORMAT_VERT_BOT_ALIGN 115
-
-#define TOOLBAR_TO_FRONT 116
-#define TOOLBAR_TO_BACK 117
-#define TOOLBAR_COPY_SIZE 118
-#define TOOLBAR_COPY_WIDTH 119
-#define TOOLBAR_COPY_HEIGHT 120
-#define TOOLBAR_DISTRIBUTE_HORIZ 121
-#define TOOLBAR_DISTRIBUTE_VERT 122
-
-/*
-* this class is used to store data associated with a tree item
-*/
-class wxResourceTreeData : public wxTreeItemData
-{
-public:
- wxResourceTreeData(wxItemResource *resource) { m_resource = resource; }
-
- wxItemResource *GetResource() const { return m_resource; }
-
-private:
- wxItemResource *m_resource;
-};
-
-#endif
-
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: reswrite.cpp
-// Purpose: Resource writing functionality
-// Author: Julian Smart
-// Modified by:
-// Created: 04/01/98
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// 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
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-
-#include "wx/scrolbar.h"
-#include "wx/string.h"
-#include "wx/wfstream.h"
-#include "wx/txtstrm.h"
-
-#include "reseditr.h"
-
-static char deBuffer[512];
-
-char *SafeString(char *s);
-char *SafeWord(const wxString& s);
-
-// Save an association between the child resource and the panel item, to allow
-// us not to require unique window names.
-wxControl *wxResourceTableWithSaving::CreateItem(wxPanel *panel, const wxItemResource *childResource, const wxItemResource* parentResource)
-{
- wxControl *item = wxResourceTable::CreateItem(panel, childResource, parentResource);
- if (item)
- wxResourceManager::GetCurrentResourceManager()->GetResourceAssociations().Put((long)childResource, item);
- return item;
-}
-
-void wxResourceTableWithSaving::OutputFont(wxTextOutputStream& stream, const wxFont& font)
-{
- stream << "[" << font.GetPointSize() << ", '";
- stream << font.GetFamilyString() << "', '";
- stream << font.GetStyleString() << "', '";
- stream << font.GetWeightString() << "', ";
- stream << (int)font.GetUnderlined();
- if (font.GetFaceName() != "")
- stream << ", '" << font.GetFaceName() << "'";
- stream << "]";
-}
-
-/*
-* Resource table with saving (basic one only has loading)
-*/
-
-bool wxResourceTableWithSaving::Save(const wxString& filename)
-{
- wxFileOutputStream file_output( filename );
- if (file_output.LastError())
- return FALSE;
-
- wxTextOutputStream stream( file_output );
-
- BeginFind();
- wxNode *node = NULL;
- while ((node = Next()))
- {
- wxItemResource *item = (wxItemResource *)node->Data();
- wxString resType(item->GetType());
-
- if (resType == "wxDialogBox" || resType == "wxDialog" || resType == "wxPanel" || resType == "wxBitmap")
- {
- if (!SaveResource(stream, item, (wxItemResource*) NULL))
- return FALSE;
- }
- }
- return TRUE;
-}
-
-bool wxResourceTableWithSaving::SaveResource(wxTextOutputStream& stream, wxItemResource* item, wxItemResource* parentItem)
-{
- char styleBuf[400];
- wxString itemType(item->GetType());
-
- if (itemType == "wxDialogBox" || itemType == "wxDialog" || itemType == "wxPanel")
- {
- if (itemType == "wxDialogBox" || itemType == "wxDialog")
- {
- stream << "static char *" << item->GetName() << " = \"dialog(name = '" << item->GetName() << "',\\\n";
- GenerateDialogStyleString(item->GetStyle(), styleBuf);
- }
- else
- {
- stream << "static char *" << item->GetName() << " = \"panel(name = '" << item->GetName() << "',\\\n";
- GenerateDialogStyleString(item->GetStyle(), styleBuf);
- }
-
- stream << " style = '" << styleBuf << "',\\\n";
- stream << " title = " << SafeWord(item->GetTitle()) << ",\\\n";
- stream << " id = " << item->GetId() << ",\\\n";
- stream << " x = " << item->GetX() << ", y = " << item->GetY();
- stream << ", width = " << item->GetWidth() << ", height = " << item->GetHeight();
-
- if (1) // item->GetStyle() & wxNO_3D)
- {
- if (item->GetBackgroundColour().Ok())
- {
- char buf[7];
- wxDecToHex(item->GetBackgroundColour().Red(), buf);
- wxDecToHex(item->GetBackgroundColour().Green(), buf+2);
- wxDecToHex(item->GetBackgroundColour().Blue(), buf+4);
- buf[6] = 0;
-
- stream << ",\\\n " << "background_colour = '" << buf << "'";
- }
- }
-
- int dialogUnits = 0;
- int useDefaults = 0;
- if ((item->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) != 0)
- dialogUnits = 1;
- if ((item->GetResourceStyle() & wxRESOURCE_USE_DEFAULTS) != 0)
- useDefaults = 1;
-
- stream << ",\\\n " << "use_dialog_units = " << dialogUnits;
- stream << ",\\\n " << "use_system_defaults = " << useDefaults;
-
- if (item->GetFont().Ok())
- {
- stream << ",\\\n font = ";
- OutputFont(stream, item->GetFont());
- }
-
- if (item->GetChildren().Number() > 0)
- stream << ",\\\n";
- else
- stream << "\\\n";
- wxNode *node = item->GetChildren().First();
- while (node)
- {
- wxItemResource *child = (wxItemResource *)node->Data();
-
- stream << " control = [";
-
- SaveResource(stream, child, item);
-
- stream << "]";
-
- if (node->Next())
- stream << ",\\\n";
- node = node->Next();
- }
- stream << ").\";\n\n";
- }
- else if (itemType == "wxButton" || itemType == "wxBitmapButton")
- {
- GenerateControlStyleString(itemType, item->GetStyle(), styleBuf);
- stream << item->GetId() << ", " << itemType << ", " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', ";
- stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", ";
- stream << item->GetWidth() << ", " << item->GetHeight();
- if (item->GetValue4())
- stream << ", '" << item->GetValue4() << "'";
- if (item->GetFont().Ok())
- {
- stream << ",\\\n ";
- OutputFont(stream, item->GetFont());
- }
- }
- else if (itemType == "wxStaticText" || itemType == "wxStaticBitmap")
- {
- GenerateControlStyleString(itemType, item->GetStyle(), styleBuf);
- stream << item->GetId() << ", " << itemType << ", " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', ";
- stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", ";
- stream << item->GetWidth() << ", " << item->GetHeight();
- if (item->GetValue4())
- stream << ", '" << item->GetValue4() << "'";
- if (item->GetFont().Ok())
- {
- stream << ",\\\n ";
- OutputFont(stream, item->GetFont());
- }
- }
- else if (itemType == "wxCheckBox")
- {
- GenerateControlStyleString(itemType, item->GetStyle(), styleBuf);
- stream << item->GetId() << ", " << "wxCheckBox, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', ";
- stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", ";
- stream << item->GetWidth() << ", " << item->GetHeight();
- stream << ", " << item->GetValue1();
- if (item->GetFont().Ok())
- {
- stream << ",\\\n ";
- OutputFont(stream, item->GetFont());
- }
- }
- else if (itemType == "wxRadioButton")
- {
- GenerateControlStyleString(itemType, item->GetStyle(), styleBuf);
- stream << item->GetId() << ", " << "wxRadioButton, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', ";
- stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", ";
- stream << item->GetWidth() << ", " << item->GetHeight();
- stream << ", " << item->GetValue1();
- if (item->GetFont().Ok())
- {
- stream << ",\\\n ";
- OutputFont(stream, item->GetFont());
- }
- }
- else if (itemType == "wxStaticBox")
- {
- GenerateControlStyleString(itemType, item->GetStyle(), styleBuf);
- stream << item->GetId() << ", " << "wxStaticBox, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', ";
- stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", ";
- stream << item->GetWidth() << ", " << item->GetHeight();
- if (item->GetFont().Ok())
- {
- stream << ",\\\n ";
- OutputFont(stream, item->GetFont());
- }
- }
- else if (itemType == "wxText" || itemType == "wxMultiText" || itemType == "wxTextCtrl")
- {
- GenerateControlStyleString(itemType, item->GetStyle(), styleBuf);
- stream << item->GetId() << ", " << "wxTextCtrl, ";
- stream << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', ";
- stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", ";
- stream << item->GetWidth() << ", " << item->GetHeight();
- stream << ", " << SafeWord(item->GetValue4());
- if (item->GetFont().Ok())
- {
- stream << ",\\\n ";
- OutputFont(stream, item->GetFont());
- }
- }
- else if (itemType == "wxGauge")
- {
- GenerateControlStyleString(itemType, item->GetStyle(), styleBuf);
- stream << item->GetId() << ", " << "wxGauge, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', ";
- stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", ";
- stream << item->GetWidth() << ", " << item->GetHeight();
- stream << ", " << item->GetValue1() << ", " << item->GetValue2();
- if (item->GetFont().Ok())
- {
- stream << ",\\\n ";
- OutputFont(stream, item->GetFont());
- }
- }
- else if (itemType == "wxSlider")
- {
- GenerateControlStyleString(itemType, item->GetStyle(), styleBuf);
- stream << item->GetId() << ", " << "wxSlider, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', ";
- stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", ";
- stream << item->GetWidth() << ", " << item->GetHeight();
- stream << ", " << item->GetValue1() << ", " << item->GetValue2() << ", " << item->GetValue3();
- if (item->GetFont().Ok())
- {
- stream << ",\\\n ";
- OutputFont(stream, item->GetFont());
- }
- }
- else if (itemType == "wxScrollBar")
- {
- GenerateControlStyleString(itemType, item->GetStyle(), styleBuf);
- stream << item->GetId() << ", " << "wxScrollBar, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', ";
- stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", ";
- stream << item->GetWidth() << ", " << item->GetHeight();
- stream << ", " << item->GetValue1() << ", " << item->GetValue2() << ", " << item->GetValue3() << ", ";
- stream << item->GetValue5();
- }
- else if (itemType == "wxListBox")
- {
- GenerateControlStyleString(itemType, item->GetStyle(), styleBuf);
- stream << item->GetId() << ", " << "wxListBox, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', ";
- stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", ";
- stream << item->GetWidth() << ", " << item->GetHeight();
-
- // Default list of values
-
- stream << ", [";
- if (item->GetStringValues().Number() > 0)
- {
- wxNode *node = item->GetStringValues().First();
- while (node)
- {
- char *s = (char *)node->Data();
- stream << SafeWord(s);
- if (node->Next())
- stream << ", ";
- node = node->Next();
- }
- }
- stream << "]";
- /* Styles are now in the window style, not in a separate arg
- stream << ", ";
- switch (item->GetValue1())
- {
- case wxLB_MULTIPLE:
- {
- stream << "'wxLB_MULTIPLE'";
- break;
- }
- case wxLB_EXTENDED:
- {
- stream << "'wxLB_EXTENDED'";
- break;
- }
- case wxLB_SINGLE:
- default:
- {
- stream << "'wxLB_SINGLE'";
- break;
- }
- }
- */
-
- if (item->GetFont().Ok())
- {
- stream << ",\\\n ";
- OutputFont(stream, item->GetFont());
- }
- }
- else if (itemType == "wxChoice" || itemType == "wxComboBox")
- {
- GenerateControlStyleString(itemType, item->GetStyle(), styleBuf);
-
- stream << item->GetId() << ", " << itemType << ", " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', ";
- stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", ";
- stream << item->GetWidth() << ", " << item->GetHeight();
-
- if (itemType == "wxComboBox")
- stream << ", " << SafeWord(item->GetValue4());
-
- // Default list of values
-
- stream << ", [";
- if (item->GetStringValues().Number() > 0)
- {
- wxNode *node = item->GetStringValues().First();
- while (node)
- {
- char *s = (char *)node->Data();
- stream << SafeWord(s);
- if (node->Next())
- stream << ", ";
- node = node->Next();
- }
- }
- stream << "]";
- if (item->GetFont().Ok())
- {
- stream << ",\\\n ";
- OutputFont(stream, item->GetFont());
- }
- }
- else if (itemType == "wxRadioBox")
- {
- // Must write out the orientation and number of rows/cols!!
- GenerateControlStyleString(itemType, item->GetStyle(), styleBuf);
- stream << item->GetId() << ", " << "wxRadioBox, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', ";
- stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", ";
- stream << item->GetWidth() << ", " << item->GetHeight();
-
- // Default list of values
-
- stream << ", [";
- if (item->GetStringValues().Number() > 0)
- {
- wxNode *node = item->GetStringValues().First();
- while (node)
- {
- char *s = (char *)node->Data();
- stream << SafeWord(s);
- if (node->Next())
- stream << ", ";
- node = node->Next();
- }
- }
- stream << "], " << item->GetValue1();
- if (item->GetFont().Ok())
- {
- stream << ",\\\n ";
- OutputFont(stream, item->GetFont());
- }
- }
- else if (itemType == "wxBitmap")
- {
- stream << "static char *" << item->GetName() << " = \"bitmap(name = '" << item->GetName() << "',\\\n";
-
- wxNode *node = item->GetChildren().First();
- while (node)
- {
- wxItemResource *child = (wxItemResource *)node->Data();
- stream << " bitmap = [";
-
- char buf[400];
- strcpy(buf, child->GetName());
-#ifdef __WXMSW__
- wxDos2UnixFilename(buf);
-#endif
-
- stream << "'" << buf << "', ";
-
- int bitmapType = (int)child->GetValue1();
- switch (bitmapType)
- {
- case wxBITMAP_TYPE_XBM_DATA:
- {
- stream << "wxBITMAP_TYPE_XBM_DATA";
- break;
- }
- case wxBITMAP_TYPE_XPM_DATA:
- {
- stream << "wxBITMAP_TYPE_XPM_DATA";
- break;
- }
- case wxBITMAP_TYPE_XBM:
- {
- stream << "wxBITMAP_TYPE_XBM";
- break;
- }
- case wxBITMAP_TYPE_XPM:
- {
- stream << "wxBITMAP_TYPE_XPM";
- break;
- }
- case wxBITMAP_TYPE_BMP:
- {
- stream << "wxBITMAP_TYPE_BMP";
- break;
- }
- case wxBITMAP_TYPE_BMP_RESOURCE:
- {
- stream << "wxBITMAP_TYPE_BMP_RESOURCE";
- break;
- }
- case wxBITMAP_TYPE_GIF:
- {
- stream << "wxBITMAP_TYPE_GIF";
- break;
- }
- case wxBITMAP_TYPE_TIF:
- {
- stream << "wxBITMAP_TYPE_TIF";
- break;
- }
- case wxBITMAP_TYPE_ICO:
- {
- stream << "wxBITMAP_TYPE_ICO";
- break;
- }
- case wxBITMAP_TYPE_ICO_RESOURCE:
- {
- stream << "wxBITMAP_TYPE_ICO_RESOURCE";
- break;
- }
- case wxBITMAP_TYPE_CUR:
- {
- stream << "wxBITMAP_TYPE_CUR";
- break;
- }
- case wxBITMAP_TYPE_CUR_RESOURCE:
- {
- stream << "wxBITMAP_TYPE_CUR_RESOURCE";
- break;
- }
- default:
- case wxBITMAP_TYPE_ANY:
- {
- stream << "wxBITMAP_TYPE_ANY";
- break;
- }
- }
- stream << ", ";
- int platform = child->GetValue2();
- switch (platform)
- {
- case RESOURCE_PLATFORM_WINDOWS:
- {
- stream << "'WINDOWS'";
- break;
- }
- case RESOURCE_PLATFORM_X:
- {
- stream << "'X'";
- break;
- }
- case RESOURCE_PLATFORM_MAC:
- {
- stream << "'MAC'";
- break;
- }
- case RESOURCE_PLATFORM_ANY:
- {
- stream << "'ANY'";
- break;
- }
- }
- int noColours = (int)child->GetValue3();
- if (noColours > 0)
- stream << ", " << noColours;
-
- stream << "]";
-
- if (node->Next())
- stream << ",\\\n";
-
- node = node->Next();
- }
- stream << ").\";\n\n";
- }
- else
- {
- wxString str("Unimplemented resource type: ");
- str += itemType;
- wxMessageBox(str);
- }
- return TRUE;
-}
-
-void wxResourceTableWithSaving::GenerateDialogStyleString(long windowStyle, char *buf)
-{
- buf[0] = 0;
- m_styleTable.GenerateStyleStrings("wxWindow", windowStyle, buf);
- m_styleTable.GenerateStyleStrings("wxPanel", windowStyle, buf);
- m_styleTable.GenerateStyleStrings("wxDialog", windowStyle, buf);
-
- if (strlen(buf) == 0)
- strcat(buf, "0");
-}
-
-void wxResourceTableWithSaving::GeneratePanelStyleString(long windowStyle, char *buf)
-{
- buf[0] = 0;
- m_styleTable.GenerateStyleStrings("wxWindow", windowStyle, buf);
- m_styleTable.GenerateStyleStrings("wxPanel", windowStyle, buf);
-
- if (strlen(buf) == 0)
- strcat(buf, "0");
-}
-
-
-void wxResourceTableWithSaving::GenerateControlStyleString(const wxString& windowClass, long windowStyle, char *buf)
-{
- buf[0] = 0;
- m_styleTable.GenerateStyleStrings("wxWindow", windowStyle, buf);
- m_styleTable.GenerateStyleStrings("wxControl", windowStyle, buf);
- m_styleTable.GenerateStyleStrings(windowClass, windowStyle, buf);
-
- if (strlen(buf) == 0)
- strcat(buf, "0");
-}
-
-// Returns quoted string or "NULL"
-char *SafeString(const wxString& s)
-{
- if (s == "")
- return "NULL";
- else
- {
- strcpy(deBuffer, "\"");
- strcat(deBuffer, s);
- strcat(deBuffer, "\"");
- return deBuffer;
- }
-}
-
-// Returns quoted string or '' : convert " to \"
-char *SafeWord(const wxString& s)
-{
- const char *cp;
- char *dp;
-
- if (s == "")
- return "''";
- else
- {
- dp = deBuffer;
- cp = s.c_str();
- *dp++ = '\'';
- while(*cp != 0) {
- if(*cp == '"') {
- *dp++ = '\\';
- *dp++ = '"';
- } else if(*cp == '\'') {
- *dp++ = '\\';
- *dp++ = '\'';
- } else
- *dp++ = *cp;
-
- cp++;
- }
- *dp++ = '\'';
- *dp++ = 0;
-
- return deBuffer;
- }
-}
-
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: symbtabl.cpp
-// Purpose: wxResourceSymbolTable
-// Author: Julian Smart
-// Modified by:
-// Created: 04/01/98
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows license
-/////////////////////////////////////////////////////////////////////////////
-
-#ifdef __GNUG__
-#pragma implementation "symbtabl.h"
-#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/file.h"
-
-#include <string.h>
-#include <stdlib.h>
-
-#include "symbtabl.h"
-
-wxResourceSymbolTable::wxResourceSymbolTable():
-m_hashTable(wxKEY_STRING)
-{
-}
-
-wxResourceSymbolTable::~wxResourceSymbolTable()
-{
- Clear();
-}
-
-// Operations
-
-bool wxResourceSymbolTable::ReadIncludeFile(const wxString& filename)
-{
- wxFile file;
- if (!wxFileExists(filename))
- return FALSE;
-
- if (!file.Open(filename, wxFile::read))
- return FALSE;
-
- off_t len = file.Length();
- if (len == -1)
- return FALSE;
-
- Clear();
- AddStandardSymbols();
-
- wxString str;
- char* p = str.GetWriteBuf(len + 1);
-
- if (file.Read(p, len) == wxFile::fd_invalid)
- {
- str.UngetWriteBuf();
- return FALSE;
- }
- str.UngetWriteBuf();
-
- // Look for #define occurrences
- int pos = str.Find("#define");
- while (pos != -1)
- {
- size_t len = str.Length();
-
- size_t i = pos + 8;
-
- // Eat whitespace until symbol
- while ((str[i] == ' ' || str[i] == '\t') && (i < len))
- i ++;
-
- size_t start = i;
-
- // Eat symbol
- while (str[i] != ' ' && str[i] != '\t' && (i < len))
- i ++;
- size_t end = i-1;
-
- wxString symbol(str.Mid(start, (end - start + 1)));
-
- // Eat whitespace until number
- while ((str[i] == ' ' || str[i] == '\t') && (i < len))
- i ++;
-
- size_t startNum = i;
-
- // Eat number
- while (str[i] != ' ' && str[i] != '\t' && str[i] != '\n' && (i < len))
- i ++;
-
- size_t endNum = i-1;
-
- wxString numStr(str.Mid(startNum, (endNum - startNum + 1)));
-
- int id = atol(numStr);
-
- AddSymbol(symbol, id);
-
- str = str.Right(len - i);
- pos = str.Find("#define");
- }
-
- return TRUE;
-}
-
-bool wxResourceSymbolTable::WriteIncludeFile(const wxString& filename)
-{
- wxFile file;
- if (!file.Open(filename, wxFile::write))
- return FALSE;
-
- wxString fileOnly(wxFileNameFromPath(filename));
- wxString line;
- line.Printf("/*\n * %s\n * Window identifiers file written by Dialog Editor\n */\n\n",
- (const char*) fileOnly);
-
- file.Write(line, line.Length());
-
- m_hashTable.BeginFind();
-
- wxNode* node = m_hashTable.Next();
- while (node)
- {
- const char* str = node->GetKeyString();
- int id = (int) node->Data() ;
-
- if (!IsStandardSymbol(str))
- {
- wxString line;
- line.Printf("#define %s %ld\n", str, id);
-
- file.Write(line, line.Length());
- }
-
- node = m_hashTable.Next();
- }
- return TRUE;
-}
-
-void wxResourceSymbolTable::Clear()
-{
- m_hashTable.Clear();
-}
-
-bool wxResourceSymbolTable::AddSymbol(const wxString& symbol, int id)
-{
- m_hashTable.Put(symbol, (wxObject*) id);
- return TRUE;
-}
-
-bool wxResourceSymbolTable::RemoveSymbol(const wxString& symbol)
-{
- m_hashTable.Delete(symbol);
- return TRUE;
-}
-
-bool wxResourceSymbolTable::RemoveSymbol(int id)
-{
- wxString symbol(GetSymbolForId(id));
- m_hashTable.Delete(symbol);
- return TRUE;
-}
-
-// Accessors
-wxString wxResourceSymbolTable::GetSymbolForId(int id)
-{
- m_hashTable.BeginFind();
-
- wxNode* node = m_hashTable.Next();
- while (node)
- {
- const char* str = node->GetKeyString();
- if (str && ( ((int) node->Data()) == id) )
- return wxString(str);
-
- node = m_hashTable.Next();
- }
- return wxString("");
-}
-
-int wxResourceSymbolTable::GetIdForSymbol(const wxString& symbol)
-{
- return (int) m_hashTable.Get(symbol);
-}
-
-bool wxResourceSymbolTable::SymbolExists(const wxString& symbol) const
-{
- return (m_hashTable.Get(symbol) != NULL);
-}
-
-bool wxResourceSymbolTable::IdExists(int id)
-{
- m_hashTable.BeginFind();
-
- wxNode* node = m_hashTable.Next();
- while (node)
- {
- if ( (((int) node->Data()) == id) )
- return TRUE;
-
- node = m_hashTable.Next();
- }
- return FALSE;
-}
-
-int wxResourceSymbolTable::FindHighestId()
-{
- int highest = 0;
-
- m_hashTable.BeginFind();
-
- wxNode* node = m_hashTable.Next();
- while (node)
- {
- int id = ((int) node->Data());
- if (id > highest)
- highest = id;
-
- node = m_hashTable.Next();
- }
-
- // Make sure we don't clash with future standard wxWindows ids
- if (highest <= wxID_HIGHEST)
- highest = wxID_HIGHEST + 1;
- return highest;
-}
-
-/*
-* A table of the standard identifiers
-*/
-
-struct wxStandardSymbolStruct
-{
- char* m_name;
- int m_id;
-};
-
-static wxStandardSymbolStruct sg_StandardSymbols[] =
-{
- { "wxID_OK", wxID_OK },
- { "wxID_CANCEL", wxID_CANCEL },
- { "wxID_APPLY", wxID_APPLY },
- { "wxID_HELP", wxID_HELP },
- { "wxID_STATIC", wxID_STATIC },
- { "wxID_YES", wxID_YES },
- { "wxID_NO", wxID_NO },
-
- { "wxID_OPEN", wxID_OPEN },
- { "wxID_CLOSE", wxID_CLOSE },
- { "wxID_NEW", wxID_NEW },
- { "wxID_SAVE", wxID_SAVE },
- { "wxID_SAVEAS", wxID_SAVEAS },
- { "wxID_REVERT", wxID_REVERT },
- { "wxID_EXIT", wxID_EXIT },
- { "wxID_UNDO", wxID_UNDO },
- { "wxID_REDO", wxID_REDO },
- { "wxID_PRINT", wxID_PRINT },
- { "wxID_PRINT_SETUP", wxID_PRINT_SETUP },
- { "wxID_PREVIEW", wxID_PREVIEW },
- { "wxID_ABOUT", wxID_ABOUT },
- { "wxID_HELP_CONTENTS", wxID_HELP_CONTENTS },
- { "wxID_HELP_COMMANDS", wxID_HELP_COMMANDS },
- { "wxID_HELP_PROCEDURES", wxID_HELP_PROCEDURES },
- { "wxID_HELP_CONTEXT", wxID_HELP_CONTEXT },
-
- { "wxID_CUT", wxID_CUT },
- { "wxID_COPY", wxID_COPY },
- { "wxID_PASTE", wxID_PASTE },
- { "wxID_CLEAR", wxID_CLEAR },
- { "wxID_FIND", wxID_FIND },
- { "wxID_DUPLICATE", wxID_DUPLICATE },
-
- { "wxID_FILE1", wxID_FILE1 },
- { "wxID_FILE2", wxID_FILE2 },
- { "wxID_FILE3", wxID_FILE3 },
- { "wxID_FILE4", wxID_FILE4 },
- { "wxID_FILE5", wxID_FILE5 },
- { "wxID_FILE6", wxID_FILE6 },
- { "wxID_FILE7", wxID_FILE7 },
- { "wxID_FILE8", wxID_FILE8 },
- { "wxID_FILE9", wxID_FILE9 }
-
-};
-
-static int sg_StandardSymbolSize = (sizeof(sg_StandardSymbols)/sizeof(wxStandardSymbolStruct));
-
-void wxResourceSymbolTable::AddStandardSymbols()
-{
- int i;
- for (i = 0; i < sg_StandardSymbolSize; i++)
- {
- AddSymbol(sg_StandardSymbols[i].m_name, sg_StandardSymbols[i].m_id);
- }
-}
-
-bool wxResourceSymbolTable::IsStandardSymbol(const wxString& symbol) const
-{
- int i;
- for (i = 0; i < sg_StandardSymbolSize; i++)
- {
- if (symbol == sg_StandardSymbols[i].m_name)
- return TRUE;
- }
- return FALSE;
-}
-
-bool wxResourceSymbolTable::FillComboBox(wxComboBox* comboBox)
-{
- m_hashTable.BeginFind();
-
- wxNode* node = m_hashTable.Next();
- while (node)
- {
- const char* str = node->GetKeyString();
-
- comboBox->Append(str);
- node = m_hashTable.Next();
- }
- return TRUE;
-}
-
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: symbtabl.h
-// Purpose: wxResourceSymbolTable class for storing/reading #defines
-// Author: Julian Smart
-// Modified by:
-// Created: 04/01/98
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows license
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _SYMBTABL_H_
-#define _SYMBTABL_H_
-
-#if defined(__GNUG__) && !defined(__APPLE__)
-#pragma interface "symbtabl.h"
-#endif
-
-class wxResourceSymbolTable: public wxObject
-{
-public:
- wxResourceSymbolTable();
- ~wxResourceSymbolTable();
-
- // Operations
- bool ReadIncludeFile(const wxString& filename);
- bool WriteIncludeFile(const wxString& filename);
- void Clear();
- bool AddSymbol(const wxString& symbol, int id);
- bool RemoveSymbol(const wxString& symbol);
- bool RemoveSymbol(int id);
- void AddStandardSymbols();
- bool FillComboBox(wxComboBox* comboBox);
-
- // Accessors
- wxString GetSymbolForId(int id);
- int GetIdForSymbol(const wxString& symbol);
- bool SymbolExists(const wxString& symbol) const;
- bool IdExists(int id) ;
- bool IsStandardSymbol(const wxString& symbol) const;
- int FindHighestId() ;
-
- // Implementation
-
- // Member variables
-protected:
- wxHashTable m_hashTable;
-};
-
-#endif
-// _SYMBTABL_H_
-
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: winprop.cpp
-// Purpose: Window properties
-// Author: Julian Smart
-// Modified by:
-// Created: 04/01/98
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows license
-/////////////////////////////////////////////////////////////////////////////
-
-#ifdef __GNUG__
-#pragma implementation "winprop.h"
-#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 <ctype.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-
-#ifdef __WXMSW__
-#include <windows.h>
-#endif
-
-#include "reseditr.h"
-#include "winprop.h"
-
-// Causes immediate feedback.
-void wxResourcePropertyListView::OnPropertyChanged(wxProperty *property)
-{
- // Sets the value of the property back into the actual object,
- // IF the property value was modified.
- if (property->GetValue().GetModified())
- {
- m_propertyInfo->SetProperty(property->GetName(), property);
- property->GetValue().SetModified(FALSE);
- wxResourceManager::GetCurrentResourceManager()->Modify(TRUE);
- }
-}
-
-bool wxResourcePropertyListView::OnClose(void)
-{
- int w, h, x, y;
- GetManagedWindow()->GetSize(& w, & h);
- GetManagedWindow()->GetPosition(& x, & y);
-
- wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().width = w;
- wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().height = h;
- wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().x = x;
- wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().y = y;
-
- return wxPropertyListView::OnClose();
-}
-
-wxWindow *wxPropertyInfo::sm_propertyWindow;
-
-/*
-* wxDialogEditorPropertyListDialog
-*/
-
-/*
-wxDialogEditorPropertyListDialog::wxDialogEditorPropertyListDialog(wxPropertyListView *v, wxWindow *parent, const wxString& title,
-const wxPoint& pos, const wxSize& size,
-long style, const wxString& name):
-wxPropertyListDialog(v, parent, title, pos, size, style, name)
-{
-m_propSheet = NULL;
-m_propInfo = NULL;
-}
-
- wxDialogEditorPropertyListDialog::~wxDialogEditorPropertyListDialog()
- {
- delete m_propSheet;
- delete m_propInfo;
- wxPropertyInfo::sm_propertyWindow = NULL;
- }
-*/
-
-wxDialogEditorPropertyListFrame::wxDialogEditorPropertyListFrame(wxPropertyListView *v, wxFrame *parent, const wxString& title,
- const wxPoint& pos, const wxSize& size,
- long style, const wxString& name):
-wxPropertyListFrame(v, parent, title, pos, size, style, name)
-{
- m_propSheet = NULL;
- m_propInfo = NULL;
-}
-
-wxDialogEditorPropertyListFrame::~wxDialogEditorPropertyListFrame()
-{
- delete m_propSheet;
- delete m_propInfo;
- if (wxPropertyInfo::sm_propertyWindow == this)
- wxPropertyInfo::sm_propertyWindow = NULL;
-}
-
-/*
-* wxPropertyInfo
-*/
-
-// Edit the information represented by this object, whatever that
-// might be.
-bool wxPropertyInfo::Edit(wxWindow *WXUNUSED(parent), const wxString& title)
-{
- if (sm_propertyWindow)
- {
- wxWindowPropertyInfo* thisProp = (wxWindowPropertyInfo*) this;
- wxWindowPropertyInfo* oldProp = (wxWindowPropertyInfo*) (((wxDialogEditorPropertyListFrame *) sm_propertyWindow)->GetInfo());
- if (oldProp->GetWindow() == thisProp->GetWindow())
- {
- sm_propertyWindow->Raise();
- return TRUE;
- }
- else
- {
- CloseWindow(); // Close the window so we can open a new one
- }
- }
-
- int width = wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().width;
- int height = wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().height;
- int x = wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().x;
- int y = wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().y;
-
- wxPropertySheet *propSheet = new wxPropertySheet;
-
- wxStringList propNames;
- GetPropertyNames(propNames);
-
- wxNode *node = propNames.First();
- while (node)
- {
- wxString name((char *)node->Data());
- wxProperty *prop = GetProperty(name);
- if (prop)
- {
- propSheet->AddProperty(prop);
- }
- node = node->Next();
- }
-
- // Reset 'modified' flags for all property values
- propSheet->SetAllModified(FALSE);
-
- wxResourcePropertyListView *view = new wxResourcePropertyListView(this, NULL,
- wxPROP_BUTTON_OK | // wxPROP_BUTTON_CANCEL |
- wxPROP_BUTTON_CHECK_CROSS|wxPROP_DYNAMIC_VALUE_FIELD|wxPROP_PULLDOWN|wxPROP_SHOWVALUES);
-
- wxDialogEditorPropertyListFrame *propWin = new wxDialogEditorPropertyListFrame(view,
- wxResourceManager::GetCurrentResourceManager()->GetEditorFrame(), title, wxPoint(x, y),
- wxSize(width, height), wxDEFAULT_FRAME_STYLE);
- sm_propertyWindow = propWin;
-
- propWin->m_registry.RegisterValidator(wxString("real"), new wxRealListValidator);
- propWin->m_registry.RegisterValidator(wxString("string"), new wxStringListValidator);
- propWin->m_registry.RegisterValidator(wxString("integer"), new wxIntegerListValidator);
- propWin->m_registry.RegisterValidator(wxString("bool"), new wxBoolListValidator);
- propWin->m_registry.RegisterValidator(wxString("filename"), new wxFilenameListValidator);
- propWin->m_registry.RegisterValidator(wxString("stringlist"), new wxListOfStringsListValidator);
- propWin->m_registry.RegisterValidator(wxString("window_id"), new wxResourceSymbolValidator);
-
- propWin->m_propInfo = this;
- propWin->m_propSheet = propSheet;
-
- // view->m_propertyWindow = propWin;
- view->AddRegistry(&(propWin->m_registry));
-
- propWin->Initialize();
- view->ShowView(propSheet, propWin->GetPropertyPanel());
-
- propWin->Show(TRUE);
-
- // Otherwise doesn't show itself
-#ifdef __WXMOTIF__
- wxNoOptimize noOptimize;
- propWin->SetSize(-1, -1, width, height);
-#endif
-
- return TRUE;
-}
-
-void wxPropertyInfo::CloseWindow()
-{
- if (sm_propertyWindow)
- {
- int w, h, x, y;
- sm_propertyWindow->GetSize(& w, & h);
- sm_propertyWindow->GetPosition(& x, & y);
-
- wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().width = w;
- wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().height = h;
- wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().x = x;
- wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().y = y;
-
- sm_propertyWindow->Destroy();
- sm_propertyWindow = (wxDialogEditorPropertyListFrame *) NULL;
- }
-}
-
-/*
-* wxWindowPropertyInfo
-*/
-
-wxWindowPropertyInfo::wxWindowPropertyInfo(wxWindow *win, wxItemResource *res)
-{
- m_propertyWindow = win;
- m_propertyResource = res;
-}
-
-wxWindowPropertyInfo::~wxWindowPropertyInfo(void)
-{
-}
-
-wxProperty *wxWindowPropertyInfo::GetFontProperty(wxString& name, wxFont *font)
-{
- if (!font)
- return NULL;
-
- if (name.Contains("Points"))
- return new wxProperty(name, (long)font->GetPointSize(), "integer", new wxIntegerListValidator(1, 100));
- else if (name.Contains("Family"))
- return new wxProperty(name, font->GetFamilyString(), "string",
- new wxStringListValidator(new wxStringList("wxDECORATIVE", "wxROMAN", "wxSCRIPT", "wxSWISS", "wxMODERN",
- NULL)));
- else if (name.Contains("Style"))
- return new wxProperty(name, font->GetStyleString(), "string",
- new wxStringListValidator(new wxStringList("wxNORMAL", "wxITALIC", "wxSLANT", NULL)));
- else if (name.Contains("Weight"))
- return new wxProperty(name, font->GetWeightString(), "string",
- new wxStringListValidator(new wxStringList("wxNORMAL", "wxBOLD", "wxLIGHT", NULL)));
- else if (name.Contains("Underlined"))
- return new wxProperty(name, (bool)font->GetUnderlined(), "bool");
- else
- return NULL;
-}
-
-wxFont *wxWindowPropertyInfo::SetFontProperty(wxString& name, wxProperty *property, wxFont *font)
-{
- int pointSize = 12;
- int fontFamily = wxMODERN;
- int fontStyle = wxNORMAL;
- int fontWeight = wxNORMAL;
- bool fontUnderlined = FALSE;
-
- if (name.Contains("Points"))
- {
- pointSize = (int)property->GetValue().IntegerValue();
- if (font && (pointSize == font->GetPointSize()))
- return NULL; // No change
- }
- else if (font) pointSize = font->GetPointSize();
-
- if (name.Contains("Family"))
- {
- wxString val = property->GetValue().StringValue();
- fontFamily = wxStringToFontFamily(val);
-
- if (font && (fontFamily == font->GetFamily()))
- return NULL; // No change
- }
- else if (font) fontFamily = font->GetFamily();
-
- if (name.Contains("Style"))
- {
- wxString val = property->GetValue().StringValue();
- fontStyle = wxStringToFontStyle(val);
-
- if (font && (fontStyle == font->GetStyle()))
- return NULL; // No change
- }
- else if (font) fontStyle = font->GetStyle();
- if (name.Contains("Weight"))
- {
- wxString val = property->GetValue().StringValue();
- fontWeight = wxStringToFontWeight(val);
-
- if (font && (fontWeight == font->GetWeight()))
- return NULL; // No change
- }
- else if (font) fontWeight = font->GetWeight();
-
- if (name.Contains("Underlined"))
- {
- fontUnderlined = property->GetValue().BoolValue();
-
- if (font && (fontUnderlined == font->GetUnderlined()))
- return NULL; // No change
- }
- else if (font) fontUnderlined = font->GetUnderlined();
-
- wxFont *newFont = wxTheFontList->FindOrCreateFont(pointSize, fontFamily, fontStyle, fontWeight, fontUnderlined);
- if (newFont)
- {
- return newFont;
- }
- else
- return NULL;
-}
-
-wxProperty *wxWindowPropertyInfo::GetProperty(wxString& name)
-{
- wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow);
-
- wxFont *font = & m_propertyWindow->GetFont();
- if (name == "fontPoints" || name == "fontFamily" || name == "fontStyle" || name == "fontWeight" ||
- name == "fontUnderlined")
- return GetFontProperty(name, font);
- else if (name == "name")
- return new wxProperty("name", m_propertyWindow->GetName(), "string");
- else if (name == "title")
- return new wxProperty("title", m_propertyWindow->GetTitle(), "string");
- else if (name == "x")
- {
- return new wxProperty("x", (long)resource->GetX(), "integer");
- }
- else if (name == "y")
- {
- return new wxProperty("y", (long)resource->GetY(), "integer");
- }
- else if (name == "width")
- {
- return new wxProperty("width", (long)resource->GetWidth(), "integer");
- }
- else if (name == "height")
- {
- return new wxProperty("height", (long)resource->GetHeight(), "integer");
- }
- else if (name == "id")
- {
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow);
- if (resource)
- {
- int id = resource->GetId();
- wxString idStr;
- idStr.Printf("%d", id);
- wxString symbolName = wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().GetSymbolForId(id);
- symbolName += "=";
- symbolName += idStr;
- // symbolName is now e.g. "ID_PANEL21=105"
- return new wxProperty("id", symbolName, "window_id");
- }
- else
- return NULL;
- }
- else if (name == "border")
- {
- wxString border("");
- if (m_propertyWindow->GetWindowStyleFlag() & wxSIMPLE_BORDER)
- border = "wxSIMPLE_BORDER";
- else if (m_propertyWindow->GetWindowStyleFlag() & wxRAISED_BORDER)
- border = "wxRAISED_BORDER";
- else if (m_propertyWindow->GetWindowStyleFlag() & wxSUNKEN_BORDER)
- border = "wxSUNKEN_BORDER";
- else if (m_propertyWindow->GetWindowStyleFlag() & wxDOUBLE_BORDER)
- border = "wxDOUBLE_BORDER";
- else if (m_propertyWindow->GetWindowStyleFlag() & wxSTATIC_BORDER)
- border = "wxSTATIC_BORDER";
- else if (m_propertyWindow->GetWindowStyleFlag() & wxNO_BORDER)
- border = "wxNO_BORDER";
- else
- border = "default border";
-
- return new wxProperty("border", border, "string",
- new wxStringListValidator(new wxStringList("wxSIMPLE_BORDER", "wxRAISED_BORDER",
- "wxSUNKEN_BORDER", "wxDOUBLE_BORDER", "wxSTATIC_BORDER", "wxNO_BORDER", "default border", NULL)));
- }
- else
- return NULL;
-}
-
-bool wxWindowPropertyInfo::SetProperty(wxString& name, wxProperty *property)
-{
- wxFont *font = & m_propertyWindow->GetFont();
- if (font && (name == "fontPoints" || name == "fontFamily" || name == "fontStyle" || name == "fontWeight" || name == "fontUnderlined" ))
- {
- wxFont *newFont = SetFontProperty(name, property, font);
- if (newFont)
- {
- m_propertyWindow->SetFont(* newFont);
- wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow);
- if (resource)
- {
- resource->SetFont(* newFont);
- }
- }
-
- return TRUE;
- }
- else if (name == "name")
- {
- // Remove old name from resource table, if it's there.
- wxItemResource *oldResource = (wxItemResource *)wxResourceManager::GetCurrentResourceManager()->GetResourceTable().Delete(m_propertyWindow->GetName());
- if (oldResource)
- {
- // It's a top-level resource
- m_propertyWindow->SetName(property->GetValue().StringValue());
- oldResource->SetName(property->GetValue().StringValue());
- wxResourceManager::GetCurrentResourceManager()->GetResourceTable().Put(m_propertyWindow->GetName(), oldResource);
- }
- else
- {
- // It's a child of something; just set the name of the resource and the window.
- m_propertyWindow->SetName(property->GetValue().StringValue());
- m_propertyResource->SetName(property->GetValue().StringValue());
- }
- // Refresh the resource manager list, because the name changed.
- wxResourceManager::GetCurrentResourceManager()->UpdateResourceList();
- return TRUE;
- }
- else if (name == "title")
- {
- m_propertyWindow->SetTitle(property->GetValue().StringValue());
- return TRUE;
- }
- else if (name == "x")
- {
- wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow);
- int x, y;
- m_propertyWindow->GetPosition(&x, &y);
- int newX = (int)property->GetValue().IntegerValue();
- int pixelX = newX;
-
- // We need to convert to pixels if this is not a dialog or panel, but
- // the parent resource specifies dialog units.
- if (m_propertyWindow->GetParent() && m_propertyWindow->IsKindOf(CLASSINFO(wxControl)))
- {
- wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow->GetParent());
- if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS)
- {
- wxPoint pt = m_propertyWindow->GetParent()->ConvertDialogToPixels(wxPoint(newX, y));
- pixelX = pt.x;
- }
- }
- else if (m_propertyWindow->IsKindOf(CLASSINFO(wxPanel)))
- {
- wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow);
- if (resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS)
- {
- wxPoint pt = m_propertyWindow->ConvertDialogToPixels(wxPoint(newX, y));
- pixelX = pt.x;
- }
- }
-
- if (x != pixelX)
- {
- m_propertyWindow->Move(pixelX, y);
- resource->SetSize(newX, resource->GetY(), resource->GetWidth(), resource->GetHeight());
- }
- return TRUE;
- }
- else if (name == "y")
- {
- wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow);
- int x, y;
- m_propertyWindow->GetPosition(&x, &y);
- int newY = (int)property->GetValue().IntegerValue();
- int pixelY = newY;
-
- // We need to convert to pixels if this is not a dialog or panel, but
- // the parent resource specifies dialog units.
- if (m_propertyWindow->GetParent() && m_propertyWindow->IsKindOf(CLASSINFO(wxControl)))
- {
- wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow->GetParent());
- if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS)
- {
- wxPoint pt = m_propertyWindow->GetParent()->ConvertDialogToPixels(wxPoint(x, newY));
- pixelY = pt.y;
- }
- }
- else if (m_propertyWindow->IsKindOf(CLASSINFO(wxPanel)))
- {
- wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow);
- if (resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS)
- {
- wxPoint pt = m_propertyWindow->ConvertDialogToPixels(wxPoint(x, newY));
- pixelY = pt.y;
- }
- }
-
- if (y != pixelY)
- {
- m_propertyWindow->Move(x, pixelY);
- resource->SetSize(resource->GetX(), newY, resource->GetWidth(), resource->GetHeight());
- }
- return TRUE;
- }
- else if (name == "width")
- {
- wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow);
- int width, height;
- m_propertyWindow->GetSize(&width, &height);
- int newWidth = (int)property->GetValue().IntegerValue();
- int pixelWidth = newWidth;
-
- // We need to convert to pixels if this is not a dialog or panel, but
- // the parent resource specifies dialog units.
- if (m_propertyWindow->GetParent() && m_propertyWindow->IsKindOf(CLASSINFO(wxControl)))
- {
- wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow->GetParent());
- if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS)
- {
- wxSize sz = m_propertyWindow->GetParent()->ConvertDialogToPixels(wxSize(newWidth, height));
- pixelWidth = sz.x;
- }
- }
- else if (m_propertyWindow->IsKindOf(CLASSINFO(wxPanel)))
- {
- wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow);
- if (resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS)
- {
- wxSize sz = m_propertyWindow->ConvertDialogToPixels(wxSize(newWidth, height));
- pixelWidth = sz.x;
- }
- }
-
- if (width != pixelWidth)
- {
- m_propertyWindow->SetSize(pixelWidth, height);
- resource->SetSize(resource->GetX(), resource->GetY(), newWidth, resource->GetHeight());
- }
- return TRUE;
- }
- else if (name == "height")
- {
- wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow);
- int width, height;
- m_propertyWindow->GetSize(&width, &height);
- int newHeight = (int)property->GetValue().IntegerValue();
- int pixelHeight = newHeight;
-
- // We need to convert to pixels if this is not a dialog or panel, but
- // the parent resource specifies dialog units.
- if (m_propertyWindow->GetParent() && m_propertyWindow->IsKindOf(CLASSINFO(wxControl)))
- {
- wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow->GetParent());
- if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS)
- {
- wxSize sz = m_propertyWindow->GetParent()->ConvertDialogToPixels(wxSize(width, newHeight));
- pixelHeight = sz.y;
- }
- }
- else if (m_propertyWindow->IsKindOf(CLASSINFO(wxPanel)))
- {
- wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow);
- if (resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS)
- {
- wxSize sz = m_propertyWindow->ConvertDialogToPixels(wxSize(width, newHeight));
- pixelHeight = sz.y;
- }
- }
-
- if (height != pixelHeight)
- {
- m_propertyWindow->SetSize(width, pixelHeight);
- resource->SetSize(resource->GetX(), resource->GetY(), resource->GetWidth(), newHeight);
- }
- return TRUE;
- }
- else if (name == "id")
- {
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow);
- if (resource)
- {
- wxString value = property->GetValue().StringValue();
-
- wxString strName = value.Before('=');
- wxString strId = value.After('=');
- int id = atoi(strId);
-
- wxString oldSymbolName = wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().GetSymbolForId(resource->GetId());
- int oldSymbolId = resource->GetId();
-
- if (strName != "")
- {
- // If we change the id for an existing symbol, we need to:
- // 1) Check if there are any other resources currently using the original id.
- // If so, will need to change their id to the new id.
- // 2) Remove the old symbol, add the new symbol.
- // In this check, we don't have to do this, but we need to do it in SetProperty.
-
- if (strName == oldSymbolName && id != oldSymbolId)
- {
- wxASSERT( (!wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().IsStandardSymbol(oldSymbolName)) );
-
- // It's OK to change just the id. But we'll need to change all matching ids in all resources,
- // because ids are unique and changing one resource's id must change all identical ones.
- wxResourceManager::GetCurrentResourceManager()->ChangeIds(oldSymbolId, id);
-
- wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().RemoveSymbol(oldSymbolName);
- wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().AddSymbol(strName, id);
- }
-
- // If we change the name but not the id, we'll just need to remove and
- // re-add the symbol/id pair.
- if (strName != oldSymbolName && id == oldSymbolId)
- {
- wxASSERT( (!wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().IsStandardSymbol(oldSymbolName)) );
-
- wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().RemoveSymbol(oldSymbolName);
-
- if (!wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().SymbolExists(strName))
- {
- wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().AddSymbol(strName, id);
- }
- }
-
- // What if we're changing both the name and the id?
- // - if there's no symbol of that name, just remove the old, add the new (in SetProperty)
- // - if there is a symbol of that name, if id matches, do nothing. If not, veto.
-
- if (strName != oldSymbolName && id != oldSymbolId)
- {
- // Remove old symbol if it's not being used
- if (!wxResourceManager::GetCurrentResourceManager()->IsSymbolUsed(resource, oldSymbolId) &&
- !wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().IsStandardSymbol(oldSymbolName))
- {
- wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().RemoveSymbol(oldSymbolName);
- }
-
- if (!wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().SymbolExists(strName))
- {
- wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().AddSymbol(strName, id);
- }
- }
- resource->SetId(id);
- }
-
- return TRUE;
- }
- else
- return FALSE;
- }
- else if (name == "border")
- {
- long borderStyle = 0;
- wxString val = property->GetValue().StringValue();
-
- if (val == "wxSIMPLE_BORDER")
- borderStyle = wxSIMPLE_BORDER;
- else if (val == "wxRAISED_BORDER")
- borderStyle = wxRAISED_BORDER;
- else if (val == "wxSUNKEN_BORDER")
- borderStyle = wxSUNKEN_BORDER;
- else if (val == "wxDOUBLE_BORDER")
- borderStyle = wxDOUBLE_BORDER;
- else if (val == "wxSTATIC_BORDER")
- borderStyle = wxSTATIC_BORDER;
- else if (val == "wxNO_BORDER")
- borderStyle = wxNO_BORDER;
-
- SetWindowStyle(m_propertyWindow, wxSIMPLE_BORDER, FALSE);
- SetWindowStyle(m_propertyWindow, wxRAISED_BORDER, FALSE);
- SetWindowStyle(m_propertyWindow, wxSUNKEN_BORDER, FALSE);
- SetWindowStyle(m_propertyWindow, wxDOUBLE_BORDER, FALSE);
- SetWindowStyle(m_propertyWindow, wxSTATIC_BORDER, FALSE);
- SetWindowStyle(m_propertyWindow, wxNO_BORDER, FALSE);
-
- SetWindowStyle(m_propertyWindow, borderStyle, TRUE);
-
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow);
- resource->SetStyle(m_propertyWindow->GetWindowStyleFlag());
- return TRUE;
- }
- else
- return FALSE;
-}
-
-void wxWindowPropertyInfo::GetPropertyNames(wxStringList& names)
-{
- names.Add("id");
- names.Add("name");
- names.Add("x");
- names.Add("y");
- names.Add("width");
- names.Add("height");
- names.Add("border");
- if (!m_propertyWindow->IsKindOf(CLASSINFO(wxControl)))
- {
- names.Add("fontPoints");
- names.Add("fontFamily");
- names.Add("fontStyle");
- names.Add("fontWeight");
- names.Add("fontUnderlined");
- }
-}
-
-// Fill in the wxItemResource members to mirror the current window settings
-bool wxWindowPropertyInfo::InstantiateResource(wxItemResource *resource)
-{
- // resource->SetType(m_propertyWindow->GetClassInfo()->GetClassName());
-
- // resource->SetStyle(m_propertyWindow->GetWindowStyleFlag());
- wxString str(m_propertyWindow->GetName());
- resource->SetName(str);
-
-#if 0 // Why did we comment this out? Possibly because of rounding errors
- // that will build up as the conversion is repeatedly done.
- // so only do the conversion when a resize happens.
- int x, y, w, h;
-
- if (m_propertyWindow->IsKindOf(CLASSINFO(wxPanel)))
- m_propertyWindow->GetClientSize(&w, &h);
- else
- m_propertyWindow->GetSize(&w, &h);
-
- m_propertyWindow->GetPosition(&x, &y);
-
- // We need to convert to dialog units if this is not a dialog or panel, but
- // the parent resource specifies dialog units.
- if (m_propertyWindow->GetParent() && m_propertyWindow->IsKindOf(CLASSINFO(wxControl)))
- {
- wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow->GetParent());
- if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS)
- {
- wxPoint pt = m_propertyWindow->GetParent()->ConvertPixelsToDialog(wxPoint(x, y));
- x = pt.x; y = pt.y;
- wxSize sz = m_propertyWindow->GetParent()->ConvertPixelsToDialog(wxSize(w, h));
- w = sz.x; h = sz.y;
- }
- }
- else if (m_propertyWindow->IsKindOf(CLASSINFO(wxPanel)))
- {
- if (resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS)
- {
- wxPoint pt = m_propertyWindow->ConvertPixelsToDialog(wxPoint(x, y));
- x = pt.x; y = pt.y;
- wxSize sz = m_propertyWindow->ConvertPixelsToDialog(wxSize(w, h));
- w = sz.x; h = sz.y;
- }
- }
-
- resource->SetSize(x, y, w, h);
-#endif
-
- return TRUE;
-}
-
-// Set the window style
-void wxWindowPropertyInfo::SetWindowStyle(wxWindow* win, long style, bool set)
-{
- if (style == 0)
- return;
-
- if ((win->GetWindowStyleFlag() & style) == style)
- {
- if (!set)
- {
- win->SetWindowStyleFlag(win->GetWindowStyleFlag() - style);
- }
- }
- else
- {
- if (set)
- {
- win->SetWindowStyleFlag(win->GetWindowStyleFlag() | style);
- }
- }
-}
-
-/*
-* Controls
-*/
-
-wxProperty *wxItemPropertyInfo::GetProperty(wxString& name)
-{
- wxControl *itemWindow = (wxControl *)m_propertyWindow;
- wxFont *font = & itemWindow->GetFont();
-
- if (name == "fontPoints" || name == "fontFamily" || name == "fontStyle" || name == "fontWeight" ||
- name == "fontUnderlined")
- return GetFontProperty(name, font);
- else if (name == "label" && itemWindow->GetLabel())
- return new wxProperty("label", m_propertyWindow->GetLabel(), "string");
- else
- return wxWindowPropertyInfo::GetProperty(name);
-}
-
-bool wxItemPropertyInfo::SetProperty(wxString& name, wxProperty *property)
-{
- wxControl *itemWindow = (wxControl *)m_propertyWindow;
-#if 0
- wxFont *font = & itemWindow->GetFont();
-
- if (font && (name == "fontPoints" || name == "fontFamily" || name == "fontStyle" || name == "fontWeight" || name == "fontUnderlined" ))
- {
- wxFont *newFont = SetFontProperty(name, property, font);
- if (newFont)
- itemWindow->SetFont(* newFont);
- return TRUE;
- }
- else
-#endif
- if (name == "label")
- {
- itemWindow->SetLabel(property->GetValue().StringValue());
- return TRUE;
- }
- else
- return wxWindowPropertyInfo::SetProperty(name, property);
-}
-
-void wxItemPropertyInfo::GetPropertyNames(wxStringList& names)
-{
- wxWindowPropertyInfo::GetPropertyNames(names);
-
- names.Add("fontPoints");
- names.Add("fontFamily");
- names.Add("fontStyle");
- names.Add("fontWeight");
- names.Add("fontUnderlined");
-}
-
-bool wxItemPropertyInfo::InstantiateResource(wxItemResource *resource)
-{
- wxWindowPropertyInfo::InstantiateResource(resource);
-
- wxControl *item = (wxControl *)m_propertyWindow;
- wxString str(item->GetLabel());
- resource->SetTitle(str);
-
- if (item->GetFont().Ok())
- resource->SetFont(* wxTheFontList->FindOrCreateFont(item->GetFont().GetPointSize(),
- item->GetFont().GetFamily(), item->GetFont().GetStyle(), item->GetFont().GetWeight(),
- item->GetFont().GetUnderlined(), item->GetFont().GetFaceName()));
- return TRUE;
-}
-
-/*
-* Button
-*/
-
-wxProperty *wxButtonPropertyInfo::GetProperty(wxString& name)
-{
- return wxItemPropertyInfo::GetProperty(name);
-}
-
-bool wxButtonPropertyInfo::SetProperty(wxString& name, wxProperty *property)
-{
- return wxItemPropertyInfo::SetProperty(name, property);
-}
-
-void wxButtonPropertyInfo::GetPropertyNames(wxStringList& names)
-{
- wxItemPropertyInfo::GetPropertyNames(names);
- names.Add("label");
-}
-
-bool wxButtonPropertyInfo::InstantiateResource(wxItemResource *resource)
-{
- return wxItemPropertyInfo::InstantiateResource(resource);
-}
-
-/*
-* wxBitmapButton
-*/
-
-wxProperty *wxBitmapButtonPropertyInfo::GetProperty(wxString& name)
-{
- wxBitmapButton *button = (wxBitmapButton *)m_propertyWindow;
- if (name == "bitmapFilename")
- {
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(button);
- wxString str("none.bmp");
-
- if (resource)
- {
- str = wxResourceManager::GetCurrentResourceManager()->FindBitmapFilenameForResource(resource);
- }
- return new wxProperty("bitmapFilename", str.GetData(), "string", new wxFilenameListValidator("Select a bitmap file", "*.bmp"));
- }
- else
- return wxButtonPropertyInfo::GetProperty(name);
-}
-
-bool wxBitmapButtonPropertyInfo::SetProperty(wxString& name, wxProperty *property)
-{
- wxBitmapButton *button = (wxBitmapButton *)m_propertyWindow;
- if (name == "bitmapFilename")
- {
- char *s = property->GetValue().StringValue();
- if (s && wxFileExists(s))
- {
- wxString str(s);
- wxBitmap *bitmap = new wxBitmap(str, wxBITMAP_TYPE_BMP);
- if (!bitmap->Ok())
- {
- delete bitmap;
- return FALSE;
- }
- else
- {
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(button);
- if (resource)
- {
- wxString oldResource(resource->GetValue4());
- wxString resName = wxResourceManager::GetCurrentResourceManager()->AddBitmapResource(str);
- resource->SetValue4(resName);
-
- if (!oldResource.IsNull())
- wxResourceManager::GetCurrentResourceManager()->PossiblyDeleteBitmapResource(oldResource);
- }
-
- button->SetLabel(* bitmap);
- return TRUE;
- }
- }
- return FALSE;
- }
- else
- return wxButtonPropertyInfo::SetProperty(name, property);
-}
-
-void wxBitmapButtonPropertyInfo::GetPropertyNames(wxStringList& names)
-{
- wxButtonPropertyInfo::GetPropertyNames(names);
- names.Delete("label");
- names.Add("bitmapFilename");
-}
-
-bool wxBitmapButtonPropertyInfo::InstantiateResource(wxItemResource *resource)
-{
- return wxItemPropertyInfo::InstantiateResource(resource);
-}
-
-/*
-* wxStaticText
-*/
-
-wxProperty *wxStaticTextPropertyInfo::GetProperty(wxString& name)
-{
- return wxItemPropertyInfo::GetProperty(name);
-}
-
-bool wxStaticTextPropertyInfo::SetProperty(wxString& name, wxProperty *property)
-{
- wxStaticText* itemWindow = (wxStaticText*) m_propertyWindow;
- if (name == "label")
- {
- // Because setting a wxStaticText control's label may change the
- // size, we must get the size and instantiate the resource immediately.
- itemWindow->SetLabel(property->GetValue().StringValue());
- int w, h;
-
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(itemWindow);
-
- m_propertyWindow->GetSize(&w, &h);
- // m_propertyWindow->GetPosition(&x, &y);
-
- // We need to convert to dialog units if
- // the parent resource specifies dialog units.
- if (m_propertyWindow->GetParent())
- {
- wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow->GetParent());
- if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS)
- {
- // wxPoint pt = m_propertyWindow->GetParent()->ConvertPixelsToDialog(wxPoint(x, y));
- // x = pt.x; y = pt.y;
- wxSize sz = m_propertyWindow->GetParent()->ConvertPixelsToDialog(wxSize(w, h));
- w = sz.x; h = sz.y;
- }
- }
- resource->SetSize(resource->GetX(), resource->GetY(), w, h);
- return TRUE;
- }
- else
- return wxItemPropertyInfo::SetProperty(name, property);
-}
-
-void wxStaticTextPropertyInfo::GetPropertyNames(wxStringList& names)
-{
- wxItemPropertyInfo::GetPropertyNames(names);
- names.Add("label");
-}
-
-bool wxStaticTextPropertyInfo::InstantiateResource(wxItemResource *resource)
-{
- return wxItemPropertyInfo::InstantiateResource(resource);
-}
-
-/*
-* wxStaticBitmap
-*/
-
-wxProperty *wxStaticBitmapPropertyInfo::GetProperty(wxString& name)
-{
- wxStaticBitmap *message = (wxStaticBitmap *)m_propertyWindow;
- if (name == "bitmapFilename")
- {
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(message);
- wxString str("none.bmp");
-
- if (resource)
- {
- str = wxResourceManager::GetCurrentResourceManager()->FindBitmapFilenameForResource(resource);
- }
- return new wxProperty("bitmapFilename", str.GetData(), "string", new wxFilenameListValidator("Select a bitmap file", "*.bmp"));
- }
- else
- return wxItemPropertyInfo::GetProperty(name);
-}
-
-bool wxStaticBitmapPropertyInfo::SetProperty(wxString& name, wxProperty *property)
-{
- wxStaticBitmap *message = (wxStaticBitmap *)m_propertyWindow;
- if (name == "bitmapFilename")
- {
- char *s = property->GetValue().StringValue();
- if (s && wxFileExists(s))
- {
- wxString str(s);
-
- wxBitmap *bitmap = new wxBitmap(str, wxBITMAP_TYPE_BMP);
- if (!bitmap->Ok())
- {
- delete bitmap;
- return FALSE;
- }
- else
- {
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(message);
- if (resource)
- {
- wxString oldResource(resource->GetValue4());
- wxString resName = wxResourceManager::GetCurrentResourceManager()->AddBitmapResource(str);
- resource->SetValue4(resName);
-
- if (!oldResource.IsNull())
- wxResourceManager::GetCurrentResourceManager()->PossiblyDeleteBitmapResource(oldResource);
- }
-
- message->SetBitmap(* bitmap);
- return TRUE;
- }
- }
- return FALSE;
- }
- else
- return wxItemPropertyInfo::SetProperty(name, property);
-}
-
-void wxStaticBitmapPropertyInfo::GetPropertyNames(wxStringList& names)
-{
- wxItemPropertyInfo::GetPropertyNames(names);
- names.Add("bitmapFilename");
-}
-
-bool wxStaticBitmapPropertyInfo::InstantiateResource(wxItemResource *resource)
-{
- return wxItemPropertyInfo::InstantiateResource(resource);
-}
-
-/*
-* Text item
-*/
-
-wxProperty *wxTextPropertyInfo::GetProperty(wxString& name)
-{
- wxTextCtrl *text = (wxTextCtrl *)m_propertyWindow;
- if (name == "value")
- return new wxProperty("value", text->GetValue(), "string");
- else if (name == "password")
- {
- bool isPassword = ((text->GetWindowStyleFlag() & wxTE_PASSWORD) == wxTE_PASSWORD);
- return new wxProperty("password", isPassword, "bool");
- }
- else if (name == "readonly")
- {
- bool isReadOnly = ((text->GetWindowStyleFlag() & wxTE_READONLY) == wxTE_READONLY);
- return new wxProperty("readonly", isReadOnly, "bool");
- }
- else
- return wxItemPropertyInfo::GetProperty(name);
-}
-
-bool wxTextPropertyInfo::SetProperty(wxString& name, wxProperty *property)
-{
- wxTextCtrl *text = (wxTextCtrl *)m_propertyWindow;
- if (name == "value")
- {
- text->SetValue(property->GetValue().StringValue());
- return TRUE;
- }
- else if (name == "password")
- {
- long flag = text->GetWindowStyleFlag();
- if (property->GetValue().BoolValue())
- {
- if ((flag & wxTE_PASSWORD) != wxTE_PASSWORD)
- flag |= wxTE_PASSWORD;
- }
- else
- {
- if ((flag & wxTE_PASSWORD) == wxTE_PASSWORD)
- flag -= wxTE_PASSWORD;
- }
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(text);
- resource->SetStyle(flag);
-
- m_propertyWindow = wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(text, this);
- return TRUE;
- }
- else if (name == "readonly")
- {
- long flag = text->GetWindowStyleFlag();
- if (property->GetValue().BoolValue())
- {
- if ((flag & wxTE_READONLY) != wxTE_READONLY)
- flag |= wxTE_READONLY;
- }
- else
- {
- if ((flag & wxTE_READONLY) == wxTE_READONLY)
- flag -= wxTE_READONLY;
- }
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(text);
- resource->SetStyle(flag);
-
- m_propertyWindow = wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(text, this);
- return TRUE;
- }
- else
- return wxItemPropertyInfo::SetProperty(name, property);
-}
-
-void wxTextPropertyInfo::GetPropertyNames(wxStringList& names)
-{
- wxItemPropertyInfo::GetPropertyNames(names);
- names.Add("value");
- names.Add("readonly");
- names.Add("password");
-}
-
-bool wxTextPropertyInfo::InstantiateResource(wxItemResource *resource)
-{
- wxTextCtrl *text = (wxTextCtrl *)m_propertyWindow;
- wxString str(text->GetValue());
- resource->SetValue4(str);
-
- return wxItemPropertyInfo::InstantiateResource(resource);
-}
-
-/*
-* Listbox item
-*/
-
-wxProperty *wxListBoxPropertyInfo::GetProperty(wxString& name)
-{
- wxListBox *listBox = (wxListBox *)m_propertyWindow;
- if (name == "values")
- {
- wxStringList *stringList = new wxStringList;
- int i;
- for (i = 0; i < listBox->GetCount(); i++)
- stringList->Add(listBox->GetString(i));
-
- return new wxProperty(name, stringList, "stringlist");
- }
- else if (name == "multiple")
- {
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(listBox);
- if (!resource)
- return NULL;
-
- char *mult = "wxLB_SINGLE";
-
- if ((listBox->GetWindowStyleFlag() & wxLB_MULTIPLE) != 0)
- mult = "wxLB_MULTIPLE";
- else if ((listBox->GetWindowStyleFlag() & wxLB_EXTENDED) != 0)
- mult = "wxLB_EXTENDED";
- else
- mult = "wxLB_SINGLE";
-
- return new wxProperty("multiple", mult, "string",
- new wxStringListValidator(new wxStringList("wxLB_SINGLE", "wxLB_MULTIPLE", "wxLB_EXTENDED",
- NULL)));
- }
- else
- return wxItemPropertyInfo::GetProperty(name);
-}
-
-bool wxListBoxPropertyInfo::SetProperty(wxString& name, wxProperty *property)
-{
- wxListBox *listBox = (wxListBox *)m_propertyWindow;
- if (name == "values")
- {
- listBox->Clear();
- wxPropertyValue *expr = property->GetValue().GetFirst();
- while (expr)
- {
- char *s = expr->StringValue();
- if (s)
- listBox->Append(s);
- expr = expr->GetNext();
- }
- return TRUE;
- }
- else if (name == "multiple")
- {
- SetWindowStyle(m_propertyWindow, wxLB_SINGLE, FALSE);
- SetWindowStyle(m_propertyWindow, wxLB_MULTIPLE, FALSE);
- SetWindowStyle(m_propertyWindow, wxLB_EXTENDED, FALSE);
-
- wxString str(property->GetValue().StringValue());
- if (str == "wxLB_MULTIPLE")
- SetWindowStyle(m_propertyWindow, wxLB_MULTIPLE, TRUE);
- else if (str == "wxLB_EXTENDED")
- SetWindowStyle(m_propertyWindow, wxLB_EXTENDED, TRUE);
- else
- SetWindowStyle(m_propertyWindow, wxLB_SINGLE, TRUE);
-
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(listBox);
- if (resource)
- resource->SetStyle(m_propertyWindow->GetWindowStyleFlag());
- m_propertyWindow = wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(listBox, this);
- return TRUE;
- }
- else
- return wxItemPropertyInfo::SetProperty(name, property);
-}
-
-void wxListBoxPropertyInfo::GetPropertyNames(wxStringList& names)
-{
- wxItemPropertyInfo::GetPropertyNames(names);
- names.Add("values");
- names.Add("multiple");
-}
-
-bool wxListBoxPropertyInfo::InstantiateResource(wxItemResource *resource)
-{
- wxListBox *lbox = (wxListBox *)m_propertyWindow;
- // This will be set for the wxItemResource on reading or in SetProperty
- // resource->SetValue1(lbox->GetSelectionMode());
- int i;
- if (lbox->GetCount() == 0)
- resource->SetStringValues(NULL);
- else
- {
- wxStringList slist;
-
- for (i = 0; i < lbox->GetCount(); i++)
- slist.Add(lbox->GetString(i));
-
- resource->SetStringValues(slist);
- }
- return wxItemPropertyInfo::InstantiateResource(resource);
-}
-
-/*
-* Choice item
-*/
-
-wxProperty *wxChoicePropertyInfo::GetProperty(wxString& name)
-{
- wxChoice *choice = (wxChoice *)m_propertyWindow;
- if (name == "values")
- {
- wxStringList* stringList = new wxStringList;
- int i;
- for (i = 0; i < choice->GetCount(); i++)
- stringList->Add(choice->GetString(i));
-
- return new wxProperty(name, stringList, "stringlist");
- }
- else
- return wxItemPropertyInfo::GetProperty(name);
-}
-
-bool wxChoicePropertyInfo::SetProperty(wxString& name, wxProperty *property)
-{
- wxChoice *choice = (wxChoice *)m_propertyWindow;
- if (name == "values")
- {
- choice->Clear();
- wxPropertyValue *expr = property->GetValue().GetFirst();
- while (expr)
- {
- char *s = expr->StringValue();
- if (s)
- choice->Append(s);
- expr = expr->GetNext();
- }
- if (choice->GetCount() > 0)
- choice->SetSelection(0);
- return TRUE;
- }
- else
- return wxItemPropertyInfo::SetProperty(name, property);
-}
-
-void wxChoicePropertyInfo::GetPropertyNames(wxStringList& names)
-{
- wxItemPropertyInfo::GetPropertyNames(names);
- names.Add("values");
-}
-
-bool wxChoicePropertyInfo::InstantiateResource(wxItemResource *resource)
-{
- wxChoice *choice = (wxChoice *)m_propertyWindow;
- int i;
- if (choice->GetCount() == 0)
- resource->SetStringValues(NULL);
- else
- {
- wxStringList slist;
-
- for (i = 0; i < choice->GetCount(); i++)
- slist.Add(choice->GetString(i));
-
- resource->SetStringValues(slist);
- }
- return wxItemPropertyInfo::InstantiateResource(resource);
-}
-
-/*
-* Choice item
-*/
-
-wxProperty *wxComboBoxPropertyInfo::GetProperty(wxString& name)
-{
- wxComboBox *choice = (wxComboBox *)m_propertyWindow;
- if (name == "values")
- {
- wxStringList *stringList = new wxStringList;
- int i;
- for (i = 0; i < choice->GetCount(); i++)
- stringList->Add(choice->GetString(i));
-
- return new wxProperty(name, stringList, "stringlist");
- }
- else if (name == "sort")
- {
- bool sort = ((m_propertyWindow->GetWindowStyleFlag() & wxCB_SORT) == wxCB_SORT);
- return new wxProperty(name, sort, "bool");
- }
- else if (name == "style")
- {
- wxString styleStr("dropdown");
- if (m_propertyWindow->GetWindowStyleFlag() & wxCB_SIMPLE)
- styleStr = "simple";
- else if (m_propertyWindow->GetWindowStyleFlag() & wxCB_READONLY)
- styleStr = "readonly";
- else
- styleStr = "dropdown";
-
- return new wxProperty(name, styleStr, "string",
- new wxStringListValidator(new wxStringList("simple", "dropdown", "readonly",
- NULL)));
- }
- else
- return wxItemPropertyInfo::GetProperty(name);
-}
-
-bool wxComboBoxPropertyInfo::SetProperty(wxString& name, wxProperty *property)
-{
- wxComboBox *choice = (wxComboBox *)m_propertyWindow;
- if (name == "values")
- {
- choice->Clear();
- wxPropertyValue *expr = property->GetValue().GetFirst();
- while (expr)
- {
- char *s = expr->StringValue();
- if (s)
- choice->Append(s);
- expr = expr->GetNext();
- }
- if (choice->GetCount() > 0)
- choice->SetSelection(0);
- return TRUE;
- }
- else if (name == "sort")
- {
- SetWindowStyle(m_propertyWindow, wxCB_SORT, property->GetValue().BoolValue());
-
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow);
- resource->SetStyle(m_propertyWindow->GetWindowStyleFlag());
-
- m_propertyWindow = wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(m_propertyWindow, this);
- return TRUE;
- }
- else if (name == "style")
- {
- SetWindowStyle(m_propertyWindow, wxCB_SIMPLE, FALSE);
- SetWindowStyle(m_propertyWindow, wxCB_DROPDOWN, FALSE);
- SetWindowStyle(m_propertyWindow, wxCB_READONLY, FALSE);
-
- wxString styleStr(property->GetValue().StringValue());
- if (styleStr == "simple")
- SetWindowStyle(m_propertyWindow, wxCB_SIMPLE, TRUE);
- else if (styleStr == "dropdown")
- SetWindowStyle(m_propertyWindow, wxCB_DROPDOWN, TRUE);
- else if (styleStr == "readonly")
- SetWindowStyle(m_propertyWindow, wxCB_READONLY, TRUE);
-
- // Necesary?
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow);
- resource->SetStyle(m_propertyWindow->GetWindowStyleFlag());
-
- m_propertyWindow = wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(m_propertyWindow, this);
-
- return TRUE;
- }
- else
- return wxItemPropertyInfo::SetProperty(name, property);
-}
-
-void wxComboBoxPropertyInfo::GetPropertyNames(wxStringList& names)
-{
- wxItemPropertyInfo::GetPropertyNames(names);
- names.Add("values");
- names.Add("style");
- names.Add("sort");
-}
-
-bool wxComboBoxPropertyInfo::InstantiateResource(wxItemResource *resource)
-{
- wxComboBox *choice = (wxComboBox *)m_propertyWindow;
- int i;
- if (choice->GetCount() == 0)
- resource->SetStringValues(NULL);
- else
- {
- wxStringList slist;
-
- for (i = 0; i < choice->GetCount(); i++)
- slist.Add(choice->GetString(i));
-
- resource->SetStringValues(slist);
- }
- return wxItemPropertyInfo::InstantiateResource(resource);
-}
-
-/*
-* Radiobox item
-*/
-
-wxProperty *wxRadioBoxPropertyInfo::GetProperty(wxString& name)
-{
- wxRadioBox *radioBox = (wxRadioBox *)m_propertyWindow;
- if (name == "numberRowsOrCols")
- {
- // FIXME: Set/GetNumberOfRowsOrCols only implemented on Motif, MSW and Mac
-#if defined(__WXMSW__) || defined(__WXMOTIF__) || defined(__WXMAC__)
- return new wxProperty("numberRowsOrCols", (long)radioBox->GetNumberOfRowsOrCols(), "integer");
-#else
- return new wxProperty("numberRowsOrCols", (long)1, "integer");
-#endif
- }
- if (name == "orientation")
- {
- wxString orient;
- if (m_propertyWindow->GetWindowStyleFlag() & wxRA_SPECIFY_COLS)
- orient = "wxRA_SPECIFY_COLS";
- else
- orient = "wxRA_SPECIFY_ROWS";
-
- return new wxProperty("orientation", orient, "string",
- new wxStringListValidator(new wxStringList("wxRA_SPECIFY_COLS", "wxRA_SPECIFY_ROWS",
- NULL)));
- }
- else if (name == "values")
- {
- wxStringList *stringList = new wxStringList;
- int i;
- for (i = 0; i < radioBox->GetCount(); i++)
- stringList->Add(radioBox->GetString(i));
-
- return new wxProperty(name, stringList, "stringlist");
- }
- return wxItemPropertyInfo::GetProperty(name);
-}
-
-bool wxRadioBoxPropertyInfo::SetProperty(wxString& name, wxProperty *property)
-{
- wxRadioBox *radioBox = (wxRadioBox *)m_propertyWindow;
- if (name == "numberRowsOrCols")
- {
- // FIXME: Set/GetNumberOfRowsOrCols only implemented on Motif, MSW and Mac
-#if defined(__WXMSW__) || defined(__WXMOTIF__) || defined(__WXMAC__)
- wxResourceManager::GetCurrentResourceManager()->DeselectItemIfNecessary(radioBox);
-
- radioBox->SetNumberOfRowsOrCols((int)property->GetValue().IntegerValue());
- m_propertyWindow = wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(radioBox, this);
-#endif
- return TRUE;
- }
- else if (name == "orientation")
- {
- long windowStyle = radioBox->GetWindowStyleFlag();
- wxString val(property->GetValue().StringValue());
- if (val == "wxRA_SPECIFY_COLS")
- {
- if (windowStyle & wxRA_SPECIFY_ROWS)
- windowStyle -= wxRA_SPECIFY_ROWS;
- windowStyle |= wxRA_SPECIFY_COLS;
- }
- else
- {
- if (windowStyle & wxRA_SPECIFY_COLS)
- windowStyle -= wxRA_SPECIFY_COLS;
- windowStyle |= wxRA_SPECIFY_ROWS;
- }
- wxResourceManager::GetCurrentResourceManager()->DeselectItemIfNecessary(radioBox);
-
- radioBox->SetWindowStyleFlag(windowStyle);
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(radioBox);
- resource->SetStyle(windowStyle);
- resource->SetSize(resource->GetX(), resource->GetY(), -1, -1); // Let it calculate it's own size
-
- m_propertyWindow = wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(radioBox, this, FALSE);
- return TRUE;
- }
- else if (name == "values")
- {
- // Set property into *resource*, not wxRadioBox, and then recreate
- // the wxRadioBox. This is because we can't dynamically set the strings
- // of a wxRadioBox.
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow);
- if (!resource)
- return FALSE;
-
- wxStringList stringList;
- wxPropertyValue *expr = property->GetValue().GetFirst();
- while (expr)
- {
- char *s = expr->StringValue();
- if (s)
- stringList.Add(s);
- expr = expr->GetNext();
- }
- resource->SetStringValues(stringList);
- resource->SetSize(resource->GetX(), resource->GetY(), -1, -1); // Let it calculate it's own size
- m_propertyWindow = wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(radioBox, this, FALSE);
- return TRUE;
- }
- else if (name == "fontPoints" || name == "fontFamily" || name == "fontStyle" || name == "fontWeight" || name == "fontUnderlined" )
- {
- wxFont *font = & m_propertyWindow->GetFont();
- if (!font)
- return FALSE;
- wxFont *newFont = SetFontProperty(name, property, font);
- if (newFont)
- {
- wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow);
- if (resource)
- {
- resource->SetFont(* newFont);
- }
-
- wxResourceManager::GetCurrentResourceManager()->DeselectItemIfNecessary(radioBox);
-
- radioBox->SetFont(* newFont);
- radioBox->SetSize(-1, -1, -1, -1, wxSIZE_AUTO_WIDTH | wxSIZE_AUTO_HEIGHT);
- return TRUE;
- }
- }
-
- return wxItemPropertyInfo::SetProperty(name, property);
-}
-
-void wxRadioBoxPropertyInfo::GetPropertyNames(wxStringList& names)
-{
- wxItemPropertyInfo::GetPropertyNames(names);
- names.Add("label");
- names.Add("values");
- names.Add("orientation");
- names.Add("numberRowsOrCols");
-}
-
-bool wxRadioBoxPropertyInfo::InstantiateResource(wxItemResource *resource)
-{
- wxRadioBox *rbox = (wxRadioBox *)m_propertyWindow;
- // Take strings from resource instead
- /*
- int i;
- if (rbox->GetCount() == 0)
- resource->SetStringValues(NULL);
- else
- {
- wxStringList *slist = new wxStringList;
-
- for (i = 0; i < rbox->GetCount(); i++)
- slist->Add(rbox->GetString(i));
-
- resource->SetStringValues(slist);
- }
- */
- // FIXME: Set/GetNumberOfRowsOrCols only implemented on Motif, MSW and Mac
-#if defined(__WXMSW__) || defined(__WXMOTIF__) || defined(__WXMAC__)
- resource->SetValue1(rbox->GetNumberOfRowsOrCols());
-#else
- resource->SetValue1(1);
-#endif
- return wxItemPropertyInfo::InstantiateResource(resource);
-}
-
-/*
-* Groupbox item
-*/
-
-wxProperty *wxGroupBoxPropertyInfo::GetProperty(wxString& name)
-{
- return wxItemPropertyInfo::GetProperty(name);
-}
-
-bool wxGroupBoxPropertyInfo::SetProperty(wxString& name, wxProperty *property)
-{
- return wxItemPropertyInfo::SetProperty(name, property);
-}
-
-void wxGroupBoxPropertyInfo::GetPropertyNames(wxStringList& names)
-{
- wxItemPropertyInfo::GetPropertyNames(names);
- names.Add("label");
-}
-
-bool wxGroupBoxPropertyInfo::InstantiateResource(wxItemResource *resource)
-{
- return wxItemPropertyInfo::InstantiateResource(resource);
-}
-
-/*
-* Checkbox item
-*/
-
-wxProperty *wxCheckBoxPropertyInfo::GetProperty(wxString& name)
-{
- wxCheckBox *checkBox = (wxCheckBox *)m_propertyWindow;
- if (name == "value")
- return new wxProperty("value", checkBox->GetValue(), "bool");
- else
- return wxItemPropertyInfo::GetProperty(name);
-}
-
-bool wxCheckBoxPropertyInfo::SetProperty(wxString& name, wxProperty *property)
-{
- wxCheckBox *checkBox = (wxCheckBox *)m_propertyWindow;
- if (name == "value")
- {
- checkBox->SetValue((bool)property->GetValue().BoolValue());
- return TRUE;
- }
- else
- return wxItemPropertyInfo::SetProperty(name, property);
-}
-
-void wxCheckBoxPropertyInfo::GetPropertyNames(wxStringList& names)
-{
- wxItemPropertyInfo::GetPropertyNames(names);
- names.Add("label");
- names.Add("value");
-}
-
-bool wxCheckBoxPropertyInfo::InstantiateResource(wxItemResource *resource)
-{
- wxCheckBox *cbox = (wxCheckBox *)m_propertyWindow;
- resource->SetValue1(cbox->GetValue());
- return wxItemPropertyInfo::InstantiateResource(resource);
-}
-
-/*
-* Radiobutton item
-*/
-
-wxProperty *wxRadioButtonPropertyInfo::GetProperty(wxString& name)
-{
- wxRadioButton *checkBox = (wxRadioButton *)m_propertyWindow;
- if (name == "value")
- return new wxProperty("value", checkBox->GetValue(), "bool");
- else
- return wxItemPropertyInfo::GetProperty(name);
-}
-
-bool wxRadioButtonPropertyInfo::SetProperty(wxString& name, wxProperty *property)
-{
- wxRadioButton *checkBox = (wxRadioButton *)m_propertyWindow;
- if (name == "value")
- {
- checkBox->SetValue((bool)property->GetValue().BoolValue());
- return TRUE;
- }
- else
- return wxItemPropertyInfo::SetProperty(name, property);
-}
-
-void wxRadioButtonPropertyInfo::GetPropertyNames(wxStringList& names)
-{
- wxItemPropertyInfo::GetPropertyNames(names);
- names.Add("label");
- names.Add("value");
-}
-
-bool wxRadioButtonPropertyInfo::InstantiateResource(wxItemResource *resource)
-{
- wxRadioButton *cbox = (wxRadioButton *)m_propertyWindow;
- resource->SetValue1(cbox->GetValue());
- return wxItemPropertyInfo::InstantiateResource(resource);
-}
-
-/*
-* Slider item
-*/
-
-wxProperty *wxSliderPropertyInfo::GetProperty(wxString& name)
-{
- wxSlider *slider = (wxSlider *)m_propertyWindow;
- if (name == "value")
- return new wxProperty("value", (long)slider->GetValue(), "integer");
- else if (name == "orientation")
- {
- char *pos = NULL;
- if (m_propertyWindow->GetWindowStyleFlag() & wxHORIZONTAL)
- pos = "wxHORIZONTAL";
- else
- pos = "wxVERTICAL";
-
- return new wxProperty("orientation", pos, "string",
- new wxStringListValidator(new wxStringList("wxHORIZONTAL", "wxVERTICAL",
- NULL)));
- }
- else if (name == "minValue")
- return new wxProperty("minValue", (long)slider->GetMin(), "integer");
- else if (name == "maxValue")
- return new wxProperty("maxValue", (long)slider->GetMax(), "integer");
- else
- return wxItemPropertyInfo::GetProperty(name);
-}
-
-bool wxSliderPropertyInfo::SetProperty(wxString& name, wxProperty *property)
-{
- wxSlider *slider = (wxSlider *)m_propertyWindow;
- if (name == "value")
- {
- slider->SetValue((int)property->GetValue().IntegerValue());
- return TRUE;
- }
- else if (name == "orientation")
- {
- long windowStyle = slider->GetWindowStyleFlag();
- long oldWindowStyle = windowStyle;
- wxString val(property->GetValue().StringValue());
- if (val == "wxHORIZONTAL")
- {
- if (windowStyle & wxVERTICAL)
- windowStyle -= wxVERTICAL;
- windowStyle |= wxHORIZONTAL;
- }
- else
- {
- if (windowStyle & wxHORIZONTAL)
- windowStyle -= wxHORIZONTAL;
- windowStyle |= wxVERTICAL;
- }
-
- if (oldWindowStyle == windowStyle)
- return TRUE;
-
- slider->SetWindowStyleFlag(windowStyle);
-
- // If the window style has changed, we swap the width and height parameters.
- int w, h;
- slider->GetSize(&w, &h);
-
- slider = (wxSlider *)wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(slider, this);
- slider->SetSize(-1, -1, h, w);
- m_propertyWindow = slider;
-
- return TRUE;
- }
- else if (name == "minValue")
- {
- slider->SetRange((int)property->GetValue().IntegerValue(), slider->GetMax());
- return TRUE;
- }
- else if (name == "maxValue")
- {
- slider->SetRange(slider->GetMin(), (int)property->GetValue().IntegerValue());
- return TRUE;
- }
- else
- return wxItemPropertyInfo::SetProperty(name, property);
-}
-
-void wxSliderPropertyInfo::GetPropertyNames(wxStringList& names)
-{
- wxItemPropertyInfo::GetPropertyNames(names);
- names.Add("value");
- names.Add("orientation");
- names.Add("minValue");
- names.Add("maxValue");
-}
-
-bool wxSliderPropertyInfo::InstantiateResource(wxItemResource *resource)
-{
- wxSlider *slider = (wxSlider *)m_propertyWindow;
- resource->SetValue1(slider->GetValue());
- resource->SetValue2(slider->GetMin());
- resource->SetValue3(slider->GetMax());
- return wxItemPropertyInfo::InstantiateResource(resource);
-}
-
-/*
-* Gauge item
-*/
-
-wxProperty *wxGaugePropertyInfo::GetProperty(wxString& name)
-{
- wxGauge *gauge = (wxGauge *)m_propertyWindow;
- if (name == "value")
- return new wxProperty("value", (long)gauge->GetValue(), "integer");
- else if (name == "maxValue")
- return new wxProperty("maxValue", (long)gauge->GetRange(), "integer");
- else
- return wxItemPropertyInfo::GetProperty(name);
-}
-
-bool wxGaugePropertyInfo::SetProperty(wxString& name, wxProperty *property)
-{
- wxGauge *gauge = (wxGauge *)m_propertyWindow;
- if (name == "value")
- {
- gauge->SetValue((int)property->GetValue().IntegerValue());
- return TRUE;
- }
- else if (name == "maxValue")
- {
- gauge->SetRange((int)property->GetValue().IntegerValue());
- return TRUE;
- }
- else
- return wxItemPropertyInfo::SetProperty(name, property);
-}
-
-void wxGaugePropertyInfo::GetPropertyNames(wxStringList& names)
-{
- wxItemPropertyInfo::GetPropertyNames(names);
- names.Add("value");
- names.Add("maxValue");
-}
-
-bool wxGaugePropertyInfo::InstantiateResource(wxItemResource *resource)
-{
- wxGauge *gauge = (wxGauge *)m_propertyWindow;
- resource->SetValue1(gauge->GetValue());
- resource->SetValue2(gauge->GetRange());
- return wxItemPropertyInfo::InstantiateResource(resource);
-}
-
-/*
-* Scrollbar item
-*/
-
-wxProperty *wxScrollBarPropertyInfo::GetProperty(wxString& name)
-{
- wxScrollBar *scrollBar = (wxScrollBar *)m_propertyWindow;
- if (name == "thumbPosition")
- return new wxProperty("value", (long)scrollBar->GetThumbPosition(), "integer");
- else if (name == "orientation")
- {
- char *pos = NULL;
- if (m_propertyWindow->GetWindowStyleFlag() & wxHORIZONTAL)
- pos = "wxHORIZONTAL";
- else
- pos = "wxVERTICAL";
-
- return new wxProperty("orientation", pos, "string",
- new wxStringListValidator(new wxStringList("wxHORIZONTAL", "wxVERTICAL",
- NULL)));
- }
- else if (name == "pageSize")
- {
- int pageLength = scrollBar->GetPageSize();
-
- return new wxProperty("pageSize", (long)pageLength, "integer");
- }
- else if (name == "thumbSize")
- {
- int thumbSize = scrollBar->GetThumbSize();
-
- return new wxProperty("thumbSize", (long)thumbSize, "integer");
- }
- else if (name == "range")
- {
- int range = scrollBar->GetRange();
- return new wxProperty("range", (long)range, "integer");
- }
- else
- return wxItemPropertyInfo::GetProperty(name);
-}
-
-bool wxScrollBarPropertyInfo::SetProperty(wxString& name, wxProperty *property)
-{
- wxScrollBar *scrollBar = (wxScrollBar *)m_propertyWindow;
- if (name == "thumbPosition")
- {
- scrollBar->SetThumbPosition((int)property->GetValue().IntegerValue());
- return TRUE;
- }
- else if (name == "orientation")
- {
- long windowStyle = scrollBar->GetWindowStyleFlag();
- long oldWindowStyle = windowStyle;
- wxString val(property->GetValue().StringValue());
- if (val == "wxHORIZONTAL")
- {
- if (windowStyle & wxVERTICAL)
- windowStyle -= wxVERTICAL;
- windowStyle |= wxHORIZONTAL;
- }
- else
- {
- if (windowStyle & wxHORIZONTAL)
- windowStyle -= wxHORIZONTAL;
- windowStyle |= wxVERTICAL;
- }
-
- if (oldWindowStyle == windowStyle)
- return TRUE;
-
- scrollBar->SetWindowStyleFlag(windowStyle);
-
- // If the window style has changed, we swap the width and height parameters.
- // int w, h;
- // scrollBar->GetSize(&w, &h);
- wxItemResource *item = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(scrollBar);
- if ( item ) {
- item->SetSize(item->GetX(), item->GetY(), item->GetHeight(), item->GetWidth());
- item->SetStyle(windowStyle);
- } /* IF */
-
- scrollBar = (wxScrollBar *)wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(scrollBar, this);
- m_propertyWindow = scrollBar;
-
- return TRUE;
- }
- else if (name == "pageSize")
- {
- int pos = scrollBar->GetThumbPosition();
- int range = scrollBar->GetRange();
- int thumbSize = scrollBar->GetThumbSize();
- scrollBar->SetScrollbar(pos, thumbSize, range, (int)property->GetValue().IntegerValue());
- return TRUE;
- }
- else if (name == "thumbSize")
- {
- int pos = scrollBar->GetThumbPosition();
- int range = scrollBar->GetRange();
- int pageSize = scrollBar->GetPageSize();
- scrollBar->SetScrollbar(pos, (int)property->GetValue().IntegerValue(), range, pageSize);
- return TRUE;
- }
- else if (name == "range")
- {
- int pos = scrollBar->GetThumbPosition();
- int thumbSize = scrollBar->GetThumbSize();
- int pageSize = scrollBar->GetPageSize();
- scrollBar->SetScrollbar(pos, thumbSize, (int)property->GetValue().IntegerValue(), pageSize);
- return TRUE;
- }
- else
- return wxItemPropertyInfo::SetProperty(name, property);
-}
-
-void wxScrollBarPropertyInfo::GetPropertyNames(wxStringList& names)
-{
- wxItemPropertyInfo::GetPropertyNames(names);
- names.Add("orientation");
- names.Add("thumbPosition");
- names.Add("thumbSize");
- names.Add("pageSize");
- names.Add("range");
-
- // Remove some properties we don't inherit
- names.Delete("fontPoints");
- names.Delete("fontFamily");
- names.Delete("fontStyle");
- names.Delete("fontWeight");
- names.Delete("fontUnderlined");
-}
-
-bool wxScrollBarPropertyInfo::InstantiateResource(wxItemResource *resource)
-{
- wxScrollBar *sbar = (wxScrollBar *)m_propertyWindow;
-
- int thumbPosition = sbar->GetThumbPosition();
- int thumbSize = sbar->GetThumbSize();
- int pageSize = sbar->GetPageSize();
- int range = sbar->GetRange();
-
- resource->SetValue1(thumbPosition);
- resource->SetValue2(thumbSize);
- resource->SetValue3(range);
- resource->SetValue5(pageSize);
-
- return wxItemPropertyInfo::InstantiateResource(resource);
-}
-
-/*
-* Panels
-*/
-#ifdef __VMS
-// next functions may contain unreacheable code
-# pragma message disable codcauunr
-#endif
-
-wxProperty *wxPanelPropertyInfo::GetProperty(wxString& name)
-{
- wxPanel *panelWindow = (wxPanel *)m_propertyWindow;
-
- /*
- wxFont *labelFont = panelWindow->GetLabelFont();
- wxFont *buttonFont = panelWindow->GetButtonFont();
-
- if (name == "labelFontPoints" || name == "labelFontFamily" || name == "labelFontStyle" || name == "labelFontWeight" ||
- name == "labelFontUnderlined")
- return GetFontProperty(name, labelFont);
- else if (name == "buttonFontPoints" || name == "buttonFontFamily" || name == "buttonFontStyle" || name == "buttonFontWeight" ||
- name == "buttonFontUnderlined")
- return GetFontProperty(name, buttonFont);
- */
-
- if (name == "no3D")
- {
- bool userColours;
- if (panelWindow->GetWindowStyleFlag() & wxNO_3D)
- userColours = TRUE;
- else
- userColours = FALSE;
-
- return new wxProperty(name, (bool)userColours, "bool");
- }
- else if (name == "backgroundColour")
- {
- wxColour col(panelWindow->GetBackgroundColour());
- char buf[7];
- wxDecToHex(col.Red(), buf);
- wxDecToHex(col.Green(), buf+2);
- wxDecToHex(col.Blue(), buf+4);
-
- return new wxProperty(name, buf, "string", new wxColourListValidator);
- }
- else if (name == "title")
- {
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow);
- if (resource)
- return new wxProperty(name, resource->GetTitle(), "string");
- else
- return new wxProperty(name, "Could not get title", "string");
- }
- else if (name == "caption")
- {
- return new wxProperty(name, ((panelWindow->GetWindowStyleFlag() & wxCAPTION) == wxCAPTION),
- "bool");
- }
- else if (name == "systemMenu")
- {
- return new wxProperty(name, ((panelWindow->GetWindowStyleFlag() & wxSYSTEM_MENU) == wxSYSTEM_MENU),
- "bool");
- }
- else if (name == "thickFrame")
- {
- return new wxProperty(name, ((panelWindow->GetWindowStyleFlag() & wxTHICK_FRAME) == wxTHICK_FRAME),
- "bool");
- }
- else if (name == "modal")
- {
- return new wxProperty(name, ((panelWindow->GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL),
- "bool");
- }
- else if (name == "useSystemDefaults")
- {
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow);
- return new wxProperty(name, ((resource->GetResourceStyle() & wxRESOURCE_USE_DEFAULTS) == wxRESOURCE_USE_DEFAULTS),
- "bool");
- }
- else if (name == "useDialogUnits")
- {
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow);
- return new wxProperty(name, ((resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) == wxRESOURCE_DIALOG_UNITS),
- "bool");
- }
- else
- return wxWindowPropertyInfo::GetProperty(name);
-}
-
-bool wxPanelPropertyInfo::SetProperty(wxString& name, wxProperty *property)
-{
- wxPanel *panelWindow = (wxPanel *)m_propertyWindow;
- /*
- wxFont *labelFont = panelWindow->GetLabelFont();
- wxFont *buttonFont = panelWindow->GetButtonFont();
-
- if (labelFont && (name == "labelFontPoints" || name == "labelFontFamily" || name == "labelFontStyle" || name == "labelFontWeight" || name == "labelFontUnderlined" ))
- {
- wxFont *newFont = SetFontProperty(name, property, labelFont);
- if (newFont)
- panelWindow->SetLabelFont(* newFont);
- return TRUE;
- }
- else if (buttonFont && (name == "buttonFontPoints" || name == "buttonFontFamily" || name == "buttonFontStyle" || name == "buttonFontWeight" || name == "buttonFontUnderlined" ))
- {
- wxFont *newFont = SetFontProperty(name, property, buttonFont);
- if (newFont)
- panelWindow->SetButtonFont(* newFont);
- return TRUE;
- }
- */
-
- if (name == "no3D")
- {
- bool userColours = property->GetValue().BoolValue();
-
- if (userColours)
- {
- if ((panelWindow->GetWindowStyleFlag() & wxNO_3D) != wxNO_3D)
- panelWindow->SetWindowStyleFlag(panelWindow->GetWindowStyleFlag() | wxNO_3D);
- }
- else
- {
- if ((panelWindow->GetWindowStyleFlag() & wxNO_3D) == wxNO_3D)
- panelWindow->SetWindowStyleFlag(panelWindow->GetWindowStyleFlag() - wxNO_3D);
- }
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow);
- resource->SetStyle(panelWindow->GetWindowStyleFlag());
-
- panelWindow = (wxPanel *)wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(panelWindow, this);
- return TRUE;
- }
- else if (name == "backgroundColour")
- {
- char *hex = property->GetValue().StringValue();
- int r = wxHexToDec(hex);
- int g = wxHexToDec(hex+2);
- int b = wxHexToDec(hex+4);
-
- wxColour col(r,g,b);
- panelWindow->SetBackgroundColour(col);
- panelWindow = (wxPanel *)wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(panelWindow, this);
- m_propertyWindow = panelWindow;
- return TRUE;
- }
- else if (name == "title")
- {
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow);
- if (resource)
- {
- resource->SetTitle(property->GetValue().StringValue());
- return TRUE;
- }
- else
- return FALSE;
- }
- else if (name == "caption")
- {
- SetWindowStyle(panelWindow, wxCAPTION, property->GetValue().BoolValue());
-
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow);
- resource->SetStyle(panelWindow->GetWindowStyleFlag());
- return TRUE;
- }
- else if (name == "thickFrame")
- {
- SetWindowStyle(panelWindow, wxTHICK_FRAME, property->GetValue().BoolValue());
-
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow);
- resource->SetStyle(panelWindow->GetWindowStyleFlag());
- return TRUE;
- }
- else if (name == "systemMenu")
- {
- SetWindowStyle(panelWindow, wxSYSTEM_MENU, property->GetValue().BoolValue());
-
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow);
- resource->SetStyle(panelWindow->GetWindowStyleFlag());
- return TRUE;
- }
- else if (name == "modal")
- {
- SetWindowStyle(panelWindow, wxDIALOG_MODAL, property->GetValue().BoolValue());
-
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow);
- resource->SetStyle(panelWindow->GetWindowStyleFlag());
- return TRUE;
- }
- else if (name == "useSystemDefaults")
- {
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow);
- bool useDefaults = property->GetValue().BoolValue();
- long style = resource->GetResourceStyle();
- if (useDefaults)
- {
- if ((style & wxRESOURCE_USE_DEFAULTS) == 0)
- style |= wxRESOURCE_USE_DEFAULTS;
- }
- else
- {
- if ((style & wxRESOURCE_USE_DEFAULTS) != 0)
- style -= wxRESOURCE_USE_DEFAULTS;
- }
- resource->SetResourceStyle(style);
- panelWindow = (wxPanel *)wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(panelWindow, this);
- return TRUE;
- }
- else if (name == "useDialogUnits")
- {
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow);
- bool useDialogUnits = property->GetValue().BoolValue();
- long style = resource->GetResourceStyle();
- if (useDialogUnits)
- {
- if ((style & wxRESOURCE_DIALOG_UNITS) == 0)
- {
- style |= wxRESOURCE_DIALOG_UNITS;
- ConvertDialogUnits(TRUE); // Convert all resources
- }
- }
- else
- {
- if ((style & wxRESOURCE_DIALOG_UNITS) != 0)
- {
- style -= wxRESOURCE_DIALOG_UNITS;
- ConvertDialogUnits(FALSE); // Convert all resources
- }
- }
- resource->SetResourceStyle(style);
- panelWindow = (wxPanel *)wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(panelWindow, this);
- m_propertyWindow = panelWindow;
- // TODO: need to regenerate the width and height properties else they'll be inconsistent.
- return TRUE;
- }
- else
- return wxWindowPropertyInfo::SetProperty(name, property);
-}
-#ifdef __VMS
-# pragma message enable codcauunr
-#endif
-
-void wxPanelPropertyInfo::GetPropertyNames(wxStringList& names)
-{
- wxWindowPropertyInfo::GetPropertyNames(names);
-
- names.Add("title");
- names.Add("no3D");
- names.Add("backgroundColour");
- names.Add("caption");
- names.Add("systemMenu");
- names.Add("thickFrame");
- names.Add("useSystemDefaults");
- names.Add("useDialogUnits");
- names.Add("modal");
-}
-
-bool wxPanelPropertyInfo::InstantiateResource(wxItemResource *resource)
-{
- wxPanel *panel = (wxPanel *)m_propertyWindow;
- if (panel->GetFont().Ok())
- resource->SetFont(* wxTheFontList->FindOrCreateFont(panel->GetFont().GetPointSize(),
- panel->GetFont().GetFamily(), panel->GetFont().GetStyle(), panel->GetFont().GetWeight(),
- panel->GetFont().GetUnderlined(), panel->GetFont().GetFaceName()));
-
- resource->SetBackgroundColour(wxColour(panel->GetBackgroundColour()));
-
- return wxWindowPropertyInfo::InstantiateResource(resource);
-}
-
-// Convert this dialog, and its children, to or from dialog units
-void wxPanelPropertyInfo::ConvertDialogUnits(bool toDialogUnits)
-{
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow);
-
- wxPoint pt;
- wxSize sz;
- if (toDialogUnits)
- {
- sz = m_propertyWindow->ConvertPixelsToDialog(wxSize(resource->GetWidth(), resource->GetHeight()));
- pt = m_propertyWindow->ConvertPixelsToDialog(wxPoint(resource->GetX(), resource->GetY()));
- }
- else
- {
- sz = m_propertyWindow->ConvertDialogToPixels(wxSize(resource->GetWidth(), resource->GetHeight()));
- pt = m_propertyWindow->ConvertDialogToPixels(wxPoint(resource->GetX(), resource->GetY()));
- }
- resource->SetSize(pt.x, pt.y, sz.x, sz.y);
-
- wxNode* node = m_propertyWindow->GetChildren().First();
- while (node)
- {
- wxWindow* child = (wxWindow*) node->Data();
- if (child->IsKindOf(CLASSINFO(wxControl)))
- {
- resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(child);
- if (toDialogUnits)
- {
- sz = m_propertyWindow->ConvertPixelsToDialog(wxSize(resource->GetWidth(), resource->GetHeight()));
- pt = m_propertyWindow->ConvertPixelsToDialog(wxPoint(resource->GetX(), resource->GetY()));
- }
- else
- {
- sz = m_propertyWindow->ConvertDialogToPixels(wxSize(resource->GetWidth(), resource->GetHeight()));
- pt = m_propertyWindow->ConvertDialogToPixels(wxPoint(resource->GetX(), resource->GetY()));
- }
- resource->SetSize(pt.x, pt.y, sz.x, sz.y);
- }
- node = node->Next();
- }
-}
-
-#if 0
-/*
-* Dialog boxes
-*/
-
-wxProperty *wxDialogPropertyInfo::GetProperty(wxString& name)
-{
- wxDialog *dialogWindow = (wxDialog *)m_propertyWindow;
- if (name == "modal")
- {
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(dialogWindow);
- if (!resource)
- return NULL;
-
- bool modal = (resource->GetValue1() != 0);
- return new wxProperty(name, modal, "bool");
- }
- else
- return wxPanelPropertyInfo::GetProperty(name);
-}
-
-bool wxDialogPropertyInfo::SetProperty(wxString& name, wxProperty *property)
-{
- wxDialog *dialogWindow = (wxDialog *)m_propertyWindow;
-
- if (name == "modal")
- {
- wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(dialogWindow);
- if (!resource)
- return FALSE;
-
- resource->SetValue1(property->GetValue().BoolValue());
- return TRUE;
- }
- else
- return wxPanelPropertyInfo::SetProperty(name, property);
-}
-
-void wxDialogPropertyInfo::GetPropertyNames(wxStringList& names)
-{
- wxPanelPropertyInfo::GetPropertyNames(names);
- names.Add("title");
- names.Add("modal");
-}
-
-bool wxDialogPropertyInfo::InstantiateResource(wxItemResource *resource)
-{
- wxDialog *dialog = (wxDialog *)m_propertyWindow;
- wxString str(dialog->GetTitle());
- resource->SetTitle(str);
-
- return wxPanelPropertyInfo::InstantiateResource(resource);
-}
-#endif
-
-/*
-* Utilities
-*/
-
-int wxStringToFontWeight(wxString& val)
-{
- if (val == "wxBOLD") return wxBOLD;
- else if (val == "wxLIGHT") return wxLIGHT;
- else return wxNORMAL;
-}
-
-int wxStringToFontStyle(wxString& val)
-{
- if (val == "wxITALIC") return wxITALIC;
- else if (val == "wxSLANT") return wxSLANT;
- else return wxNORMAL;
-}
-
-int wxStringToFontFamily(wxString& val)
-{
- if (val == "wxDECORATIVE") return wxDECORATIVE;
- else if (val == "wxROMAN") return wxROMAN;
- else if (val == "wxSCRIPT") return wxSCRIPT;
- else if (val == "wxMODERN") return wxMODERN;
- else if (val == "wxTELETYPE") return wxTELETYPE;
- else return wxSWISS;
-}
-
-///
-/// Resource symbol validator
-///
-IMPLEMENT_DYNAMIC_CLASS(wxResourceSymbolValidator, wxPropertyListValidator)
-
-wxResourceSymbolValidator::wxResourceSymbolValidator(long flags):
-wxPropertyListValidator(flags)
-{
-}
-
-wxResourceSymbolValidator::~wxResourceSymbolValidator(void)
-{
-}
-
-bool wxResourceSymbolValidator::OnCheckValue(wxProperty *WXUNUSED(property), wxPropertyListView *WXUNUSED(view), wxWindow *WXUNUSED(parentWindow))
-{
- return TRUE;
-}
-
-// Called when TICK is pressed or focus is lost or view wants to update
-// the property list.
-// Does the transferance from the property editing area to the property itself
-bool wxResourceSymbolValidator::OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *WXUNUSED(parentWindow))
-{
- if (!view->GetValueText())
- return FALSE;
- wxString value(view->GetValueText()->GetValue());
- property->GetValue() = value ;
- return TRUE;
-}
-
-// Called when TICK is pressed or focus is lost or view wants to update
-// the property list.
-// Does the transferance from the property editing area to the property itself
-bool wxResourceSymbolValidator::OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *WXUNUSED(parentWindow))
-{
- if (!view->GetValueText())
- return FALSE;
- wxString str(property->GetValue().GetStringRepresentation());
- view->GetValueText()->SetValue(str);
- return TRUE;
-}
-
-// Called when the property is double clicked. Extra functionality can be provided,
-// cycling through possible values.
-bool wxResourceSymbolValidator::OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow)
-{
- if (!view->GetValueText())
- return FALSE;
- OnEdit(property, view, parentWindow);
- return TRUE;
-}
-
-bool wxResourceSymbolValidator::OnPrepareControls(wxProperty *WXUNUSED(property), wxPropertyListView *view, wxWindow *WXUNUSED(parentWindow))
-{
- if (view->GetConfirmButton())
- view->GetConfirmButton()->Enable(TRUE);
- if (view->GetCancelButton())
- view->GetCancelButton()->Enable(TRUE);
- if (view->GetEditButton())
- view->GetEditButton()->Enable(TRUE);
- if (view->GetValueText())
- view->GetValueText()->Enable((GetFlags() & wxPROP_ALLOW_TEXT_EDITING) == wxPROP_ALLOW_TEXT_EDITING);
- return TRUE;
-}
-
-void wxResourceSymbolValidator::OnEdit(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow)
-{
- if (!view->GetValueText())
- return;
-
- wxResourceSymbolDialog* dialog = new wxResourceSymbolDialog(parentWindow, -1, "Edit Symbol");
-
- // Split name/id pair e.g. "IDC_TEXT=123"
- wxString value(property->GetValue().StringValue());
-
- wxString strName = value.Before('=');
- wxString strId = value.After('=');
-
- dialog->SetSymbol(strName);
- dialog->SetId(atoi(strId));
-
- dialog->Init();
-
- if (dialog->ShowModal() == wxID_OK)
- {
- wxString symbolName(dialog->GetSymbol());
- long id = dialog->GetId();
-
- wxString str;
- str.Printf("%d", id);
- property->GetValue() = symbolName + wxString("=") + str;
-
- view->DisplayProperty(property);
- view->UpdatePropertyDisplayInList(property);
- view->OnPropertyChanged(property);
- }
- // Moved from the 'if' branch on suggestion of Roman Pavlov
- dialog->Destroy();
-}
-
-BEGIN_EVENT_TABLE(wxResourceSymbolDialog, wxDialog)
-EVT_BUTTON(wxID_OK, wxResourceSymbolDialog::OnOK)
-EVT_COMBOBOX(ID_SYMBOLNAME_COMBOBOX, wxResourceSymbolDialog::OnComboBoxSelect)
-EVT_TEXT(ID_SYMBOLNAME_COMBOBOX, wxResourceSymbolDialog::OnSymbolNameUpdate)
-END_EVENT_TABLE()
-
-wxResourceSymbolDialog::wxResourceSymbolDialog(wxWindow* parent, const wxWindowID id, const wxString& title, const wxPoint& pos,
- const wxSize& size, long style):
-wxDialog(parent, id, title, pos, size, style)
-{
- int x = 5;
- int y = 5;
-
- (void) new wxStaticText(this, -1, "Name: ", wxPoint(x, y));
-
- x += 80;
-
- m_nameCtrl = new wxComboBox(this, ID_SYMBOLNAME_COMBOBOX, "",
- wxPoint(x, y), wxSize(200, -1), 0, NULL, wxCB_DROPDOWN|wxCB_SORT);
-
- y += 30;
- x = 5;
-
- (void) new wxStaticText(this, -1, "Id: ", wxPoint(x, y));
-
- x += 80;
-
- m_idCtrl = new wxTextCtrl(this, ID_SYMBOLID_TEXTCTRL, "",
- wxPoint(x, y), wxSize(200, -1));
-
- y += 30;
- x = 5;
- (void) new wxButton(this, wxID_OK, "OK", wxPoint(x, y), wxSize(80, -1));
-
- x += 100;
- (void) new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(x, y), wxSize(80, -1));
-
- Fit();
- Centre();
-}
-
-void wxResourceSymbolDialog::Init()
-{
- wxString defaultId;
- defaultId.Printf("%ld", m_symbolId);
-
- m_nameCtrl->SetValue(m_symbolName);
- m_idCtrl->SetValue(defaultId);
-
- wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().FillComboBox(m_nameCtrl);
-}
-
-void wxResourceSymbolDialog::OnOK(wxCommandEvent& event)
-{
- if (CheckValues())
- {
- wxDialog::OnOK(event);
- }
-}
-
-bool wxResourceSymbolDialog::CheckValues()
-{
- wxString nameStr(m_nameCtrl->GetValue());
- wxString idStr(m_idCtrl->GetValue());
- int id = atoi(idStr);
-
- if (id <= 0 )
- {
- wxMessageBox("Identifier cannot be missing or zero", "Dialog Editor", wxOK|wxICON_EXCLAMATION, this);
- return FALSE;
- }
- if (nameStr == "")
- {
- wxMessageBox("Please enter a symbol name", "Dialog Editor", wxOK|wxICON_EXCLAMATION, this);
- return FALSE;
- }
- if (nameStr.Contains(" "))
- {
- wxMessageBox("Symbol name cannot contain spaces.", "Dialog Editor", wxOK|wxICON_EXCLAMATION, this);
- return FALSE;
- }
- if (nameStr.Contains("="))
- {
- wxMessageBox("Symbol name cannot contain =.", "Dialog Editor", wxOK|wxICON_EXCLAMATION, this);
- return FALSE;
- }
- if (nameStr.IsNumber())
- {
- wxMessageBox("Symbol name cannot be a number.", "Dialog Editor", wxOK|wxICON_EXCLAMATION, this);
- return FALSE;
- }
- // TODO: other checks on the name syntax.
-
- if (!wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().IsStandardSymbol(nameStr))
- {
- // If we change the id for an existing symbol, we need to:
- // 1) Check if there are any other resources currently using the original id.
- // If so, will need to change their id to the new id, in SetProperty.
- // 2) Remove the old symbol, add the new symbol.
- // In this check, we don't have to do this, but we need to do it in SetProperty.
-
- if (nameStr == GetSymbol() && id != GetId())
- {
- // It's OK to change the id. But we'll need to change all matching ids in all resources,
- // in SetProperty.
- }
-
- // If we change the name but not the id... we'll just need to remove and
- // re-add the symbol/id pair, in SetProperty.
- if (nameStr != GetSymbol() && id == GetId())
- {
- }
-
- // What if we're changing both the name and the id?
- // - if there's no symbol of that name, just remove the old, add the new (in SetProperty)
- // - if there is a symbol of that name, if id matches, do nothing. If not, veto.
-
- if (nameStr != GetSymbol() && id != GetId())
- {
- if (!wxResourceManager::GetCurrentResourceManager()->IsIdentifierOK(nameStr, id))
- {
- wxMessageBox("This integer id is already being used under a different name.\nPlease choose another.",
- "Dialog Editor", wxOK|wxICON_EXCLAMATION, this);
- return FALSE;
- }
- }
-
- }
-
- SetSymbol(nameStr);
- SetId(id);
-
- return TRUE;
-}
-
-void wxResourceSymbolDialog::OnComboBoxSelect(wxCommandEvent& WXUNUSED(event))
-{
- wxString str(m_nameCtrl->GetStringSelection());
- if (wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().IsStandardSymbol(str))
- {
- int id = wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().GetIdForSymbol(str);
- wxString str2;
- str2.Printf("%d", id);
- m_idCtrl->SetValue(str2);
- m_idCtrl->Enable(FALSE);
- }
- else
- {
- if (wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().SymbolExists(str))
- {
- int id = wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().GetIdForSymbol(str);
- wxString str2;
- str2.Printf("%d", id);
- m_idCtrl->SetValue(str2);
- }
- m_idCtrl->Enable(TRUE);
- }
-}
-
-void wxResourceSymbolDialog::OnSymbolNameUpdate(wxCommandEvent& WXUNUSED(event))
-{
- wxString str(m_nameCtrl->GetValue());
- if (wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().IsStandardSymbol(str))
- {
- int id = wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().GetIdForSymbol(str);
- wxString str2;
- str2.Printf("%d", id);
- m_idCtrl->SetValue(str2);
- m_idCtrl->Enable(FALSE);
- }
- else
- {
- if (wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().SymbolExists(str))
- {
- int id = wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().GetIdForSymbol(str);
- wxString str2;
- str2.Printf("%d", id);
- m_idCtrl->SetValue(str2);
- }
- m_idCtrl->Enable(TRUE);
- }
-}
-
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: winprop.h
-// Purpose: Window properties
-// Author: Julian Smart
-// Modified by:
-// Created: 04/01/98
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows license
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WINPROP_H_
-#define _WINPROP_H_
-
-#if defined(__GNUG__) && !defined(__APPLE__)
-#pragma interface "winprop.h"
-#endif
-
-#include "reseditr.h"
-
-class wxPropertyInfo;
-
-class wxDialogEditorPropertyListFrame: public wxPropertyListFrame
-{
- friend class wxPropertyInfo;
-public:
- wxDialogEditorPropertyListFrame(wxPropertyListView *v, wxFrame *parent, const wxString& title,
- const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
- long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame");
- ~wxDialogEditorPropertyListFrame();
-
- wxPropertyInfo* GetInfo() const { return m_propInfo; }
-
-private:
- wxPropertySheet* m_propSheet;
- wxPropertyValidatorRegistry m_registry;
- wxPropertyInfo* m_propInfo;
-};
-
-// A kind of property list view that intercepts OnPropertyChanged
-// feedback.
-class wxResourcePropertyListView: public wxPropertyListView
-{
-public:
- wxResourcePropertyListView(wxPropertyInfo *info, wxPanel *propPanel = NULL, long flags = wxPROP_BUTTON_DEFAULT):
- wxPropertyListView(propPanel, flags)
- {
- m_propertyInfo = info;
- }
- void OnPropertyChanged(wxProperty *property);
- bool OnClose(void);
-
- wxPropertyInfo* m_propertyInfo;
-
-};
-
-// Generic class for relating an object to a collection of properties.
-// Instead of defining new functions like wxButton::GetProperty, wxButton::SetProperty,
-// we take these functions out into of the wxWindows library and associate
-// them with separate classes.
-class wxPropertyInfo: public wxObject
-{
- friend class wxDialogEditorPropertyListFrame;
-protected:
- static wxWindow *sm_propertyWindow;
- wxPropertyInfo(void)
- {
- }
- ~wxPropertyInfo(void)
- {
- }
-public:
- virtual wxProperty *GetProperty(wxString& propName) = 0;
- virtual bool SetProperty(wxString& propName, wxProperty *property) = 0;
- virtual void GetPropertyNames(wxStringList& names) = 0;
- virtual bool Edit(wxWindow *parent, const wxString& title);
- static void CloseWindow(); // Close the current window if open.
-};
-
-// For all windows
-class wxWindowPropertyInfo: public wxPropertyInfo
-{
-public:
- wxWindowPropertyInfo(wxWindow *win, wxItemResource *res = NULL);
- ~wxWindowPropertyInfo(void);
- wxProperty *GetProperty(wxString& name);
- bool SetProperty(wxString& name, wxProperty *property);
- void GetPropertyNames(wxStringList& names);
-
- inline void SetPropertyWindow(wxWindow *win) { m_propertyWindow = win; }
-
- inline void SetResource(wxItemResource *res) { m_propertyResource = res; }
-
- // Helper functions for font properties
-
- wxProperty *GetFontProperty(wxString& name, wxFont *font);
- wxFont *SetFontProperty(wxString& name, wxProperty *property, wxFont *oldFont);
-
- // Fill in the wxItemResource members to mirror the current window settings
- virtual bool InstantiateResource(wxItemResource *resource);
-
- // Set the window style
- void SetWindowStyle(wxWindow* win, long style, bool set);
-
- wxWindow* GetWindow() const { return m_propertyWindow; }
- wxItemResource* GetResource() const { return m_propertyResource; }
-
-protected:
- wxWindow* m_propertyWindow;
- wxItemResource* m_propertyResource;
-};
-
-// For panel items
-class wxItemPropertyInfo: public wxWindowPropertyInfo
-{
-protected:
-public:
- wxItemPropertyInfo(wxWindow *win, wxItemResource *res = NULL):
- wxWindowPropertyInfo(win, res) {}
- ~wxItemPropertyInfo(void) {}
- wxProperty *GetProperty(wxString& name);
- bool SetProperty(wxString& name, wxProperty *property);
- void GetPropertyNames(wxStringList& names);
- bool InstantiateResource(wxItemResource *resource);
-};
-
-// For buttons
-class wxButtonPropertyInfo: public wxItemPropertyInfo
-{
-protected:
-public:
- wxButtonPropertyInfo(wxWindow *win, wxItemResource *res = NULL):
- wxItemPropertyInfo(win, res) { }
- ~wxButtonPropertyInfo(void) {}
- wxProperty *GetProperty(wxString& name);
- bool SetProperty(wxString& name, wxProperty *property);
- void GetPropertyNames(wxStringList& names);
- bool InstantiateResource(wxItemResource *resource);
-};
-
-// For bitmap buttons
-class wxBitmapButtonPropertyInfo: public wxButtonPropertyInfo
-{
-protected:
-public:
- wxBitmapButtonPropertyInfo(wxWindow *win, wxItemResource *res = NULL):
- wxButtonPropertyInfo(win, res) { }
- ~wxBitmapButtonPropertyInfo(void) {}
- wxProperty *GetProperty(wxString& name);
- bool SetProperty(wxString& name, wxProperty *property);
- void GetPropertyNames(wxStringList& names);
- bool InstantiateResource(wxItemResource *resource);
-};
-
-// For static text controls
-class wxStaticTextPropertyInfo: public wxItemPropertyInfo
-{
-protected:
-public:
- wxStaticTextPropertyInfo(wxWindow *win, wxItemResource *res = NULL):
- wxItemPropertyInfo(win, res) { }
- ~wxStaticTextPropertyInfo(void) {}
- wxProperty *GetProperty(wxString& name);
- bool SetProperty(wxString& name, wxProperty *property);
- void GetPropertyNames(wxStringList& names);
- bool InstantiateResource(wxItemResource *resource);
-};
-
-// For static bitmap controls
-class wxStaticBitmapPropertyInfo: public wxItemPropertyInfo
-{
-protected:
-public:
- wxStaticBitmapPropertyInfo(wxWindow *win, wxItemResource *res = NULL):
- wxItemPropertyInfo(win, res) { }
- ~wxStaticBitmapPropertyInfo(void) {}
- wxProperty *GetProperty(wxString& name);
- bool SetProperty(wxString& name, wxProperty *property);
- void GetPropertyNames(wxStringList& names);
- bool InstantiateResource(wxItemResource *resource);
-};
-
-// For text/multitext items
-class wxTextPropertyInfo: public wxItemPropertyInfo
-{
-protected:
-public:
- wxTextPropertyInfo(wxWindow *win, wxItemResource *res = NULL):
- wxItemPropertyInfo(win, res) {}
- ~wxTextPropertyInfo(void) {}
- wxProperty *GetProperty(wxString& name);
- bool SetProperty(wxString& name, wxProperty *property);
- void GetPropertyNames(wxStringList& names);
- bool InstantiateResource(wxItemResource *resource);
-};
-
-// For list boxes
-class wxListBoxPropertyInfo: public wxItemPropertyInfo
-{
-protected:
-public:
- wxListBoxPropertyInfo(wxWindow *win, wxItemResource *res = NULL):
- wxItemPropertyInfo(win, res) {}
- ~wxListBoxPropertyInfo(void) {}
- wxProperty *GetProperty(wxString& name);
- bool SetProperty(wxString& name, wxProperty *property);
- void GetPropertyNames(wxStringList& names);
- bool InstantiateResource(wxItemResource *resource);
-};
-
-// For choice items
-class wxChoicePropertyInfo: public wxItemPropertyInfo
-{
-protected:
-public:
- wxChoicePropertyInfo(wxWindow *win, wxItemResource *res = NULL):
- wxItemPropertyInfo(win, res) {}
- ~wxChoicePropertyInfo(void) {}
- wxProperty *GetProperty(wxString& name);
- bool SetProperty(wxString& name, wxProperty *property);
- void GetPropertyNames(wxStringList& names);
- bool InstantiateResource(wxItemResource *resource);
-};
-
-// For choice items
-class wxComboBoxPropertyInfo: public wxChoicePropertyInfo
-{
-protected:
-public:
- wxComboBoxPropertyInfo(wxWindow *win, wxItemResource *res = NULL):
- wxChoicePropertyInfo(win, res) {}
- ~wxComboBoxPropertyInfo(void) {}
- wxProperty *GetProperty(wxString& name);
- bool SetProperty(wxString& name, wxProperty *property);
- void GetPropertyNames(wxStringList& names);
- bool InstantiateResource(wxItemResource *resource);
-};
-
-// For radiobox items
-class wxRadioBoxPropertyInfo: public wxItemPropertyInfo
-{
-protected:
-public:
- wxRadioBoxPropertyInfo(wxWindow *win, wxItemResource *res = NULL):
- wxItemPropertyInfo(win, res) {}
- ~wxRadioBoxPropertyInfo(void) {}
- wxProperty *GetProperty(wxString& name);
- bool SetProperty(wxString& name, wxProperty *property);
- void GetPropertyNames(wxStringList& names);
- bool InstantiateResource(wxItemResource *resource);
-};
-
-// For groupbox items
-class wxGroupBoxPropertyInfo: public wxItemPropertyInfo
-{
-protected:
-public:
- wxGroupBoxPropertyInfo(wxWindow *win, wxItemResource *res = NULL):
- wxItemPropertyInfo(win, res) {}
- ~wxGroupBoxPropertyInfo(void) {}
- wxProperty *GetProperty(wxString& name);
- bool SetProperty(wxString& name, wxProperty *property);
- void GetPropertyNames(wxStringList& names);
- bool InstantiateResource(wxItemResource *resource);
-};
-
-// For checkbox items
-class wxCheckBoxPropertyInfo: public wxItemPropertyInfo
-{
-protected:
-public:
- wxCheckBoxPropertyInfo(wxWindow *win, wxItemResource *res = NULL):
- wxItemPropertyInfo(win, res) {}
- ~wxCheckBoxPropertyInfo(void) {}
- wxProperty *GetProperty(wxString& name);
- bool SetProperty(wxString& name, wxProperty *property);
- void GetPropertyNames(wxStringList& names);
- bool InstantiateResource(wxItemResource *resource);
-};
-
-// For radiobutton items
-class wxRadioButtonPropertyInfo: public wxItemPropertyInfo
-{
-protected:
-public:
- wxRadioButtonPropertyInfo(wxWindow *win, wxItemResource *res = NULL):
- wxItemPropertyInfo(win, res) {}
- ~wxRadioButtonPropertyInfo(void) {}
- wxProperty *GetProperty(wxString& name);
- bool SetProperty(wxString& name, wxProperty *property);
- void GetPropertyNames(wxStringList& names);
- bool InstantiateResource(wxItemResource *resource);
-};
-
-// For gauge items
-class wxGaugePropertyInfo: public wxItemPropertyInfo
-{
-protected:
-public:
- wxGaugePropertyInfo(wxWindow *win, wxItemResource *res = NULL):
- wxItemPropertyInfo(win, res) {}
- ~wxGaugePropertyInfo(void) {}
- wxProperty *GetProperty(wxString& name);
- bool SetProperty(wxString& name, wxProperty *property);
- void GetPropertyNames(wxStringList& names);
- bool InstantiateResource(wxItemResource *resource);
-};
-
-// For scrollbar items
-class wxScrollBarPropertyInfo: public wxItemPropertyInfo
-{
-protected:
-public:
- wxScrollBarPropertyInfo(wxWindow *win, wxItemResource *res = NULL):
- wxItemPropertyInfo(win, res) {}
- ~wxScrollBarPropertyInfo(void) {}
- wxProperty *GetProperty(wxString& name);
- bool SetProperty(wxString& name, wxProperty *property);
- void GetPropertyNames(wxStringList& names);
- bool InstantiateResource(wxItemResource *resource);
-};
-
-// For slider items
-class wxSliderPropertyInfo: public wxItemPropertyInfo
-{
-protected:
-public:
- wxSliderPropertyInfo(wxWindow *win, wxItemResource *res = NULL):
- wxItemPropertyInfo(win, res) {}
- ~wxSliderPropertyInfo(void) {}
- wxProperty *GetProperty(wxString& name);
- bool SetProperty(wxString& name, wxProperty *property);
- void GetPropertyNames(wxStringList& names);
- bool InstantiateResource(wxItemResource *resource);
-};
-
-// For panels
-class wxPanelPropertyInfo: public wxWindowPropertyInfo
-{
-protected:
-public:
- wxPanelPropertyInfo(wxWindow *win, wxItemResource *res = NULL):
- wxWindowPropertyInfo(win, res) {}
- ~wxPanelPropertyInfo(void) {}
- wxProperty *GetProperty(wxString& name);
- bool SetProperty(wxString& name, wxProperty *property);
- void GetPropertyNames(wxStringList& names);
- bool InstantiateResource(wxItemResource *resource);
-
- // Convert this dialog, and its children, to or from dialog units
- void ConvertDialogUnits(bool toDialogUnits);
-};
-
-int wxStringToFontWeight(wxString& val);
-int wxStringToFontStyle(wxString& val);
-int wxStringToFontFamily(wxString& val);
-
-/*
-* A validator to allow editing symbol/id pairs
-*/
-
-class wxResourceSymbolValidator: public wxPropertyListValidator
-{
- DECLARE_DYNAMIC_CLASS(wxResourceSymbolValidator)
-protected:
-public:
- wxResourceSymbolValidator(long flags = 0);
-
- ~wxResourceSymbolValidator(void);
-
- // Called when TICK is pressed or focus is lost.
- // Return FALSE if value didn't check out; signal to restore old value.
- bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
-
- // Called when TICK is pressed or focus is lost or view wants to update
- // the property list.
- // Does the transferance from the property editing area to the property itself
- bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
- bool OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
-
- bool OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
-
- bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
-
- // Called when the edit (...) button is pressed.
- void OnEdit(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
-};
-
-/*
-* A dialog for editing symbol/id pairs
-*/
-
-class wxResourceSymbolDialog: public wxDialog
-{
-public:
- wxResourceSymbolDialog(wxWindow* parent, const wxWindowID id, const wxString& title,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL);
-
- void Init();
-
- inline void SetSymbol(const wxString& symbol) { m_symbolName = symbol; }
- inline void SetId(long id) { m_symbolId = id; }
-
- inline wxString GetSymbol() const { return m_symbolName; }
- inline long GetId() const { return m_symbolId; }
-
- bool CheckValues();
- void OnOK(wxCommandEvent& event);
- void OnComboBoxSelect(wxCommandEvent& event);
- void OnSymbolNameUpdate(wxCommandEvent& event);
-
-protected:
- wxString m_symbolName;
- long m_symbolId;
- wxComboBox* m_nameCtrl;
- wxTextCtrl* m_idCtrl;
-
- DECLARE_EVENT_TABLE()
-};
-
-#define ID_SYMBOLNAME_COMBOBOX 100
-#define ID_SYMBOLID_TEXTCTRL 101
-
-#endif
-// _WINPROP_H_
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: winstyle.cpp
-// Purpose: Window styles
-// Author: Julian Smart
-// Modified by:
-// Created: 04/01/98
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifdef __GNUG__
-#pragma implementation "winstyle.h"
-#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 "wx/treectrl.h"
-#include "wx/splitter.h"
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-
-#include "winstyle.h"
-
-/*
-* Styles
-*/
-
-/* wxListBox */
-static wxWindowStylePair g_WindowStylesListBox[] = {
- { "wxLB_SINGLE", wxLB_SINGLE },
- { "wxLB_MULTIPLE", wxLB_MULTIPLE },
- { "wxLB_EXTENDED", wxLB_EXTENDED },
- { "wxLB_NEEDED_SB", wxLB_NEEDED_SB },
- { "wxLB_ALWAYS_SB", wxLB_ALWAYS_SB },
- { "wxLB_SORT", wxLB_SORT },
- { "wxLB_OWNERDRAW", wxLB_OWNERDRAW },
- { "wxLB_HSCROLL", wxLB_HSCROLL }
-};
-
-int g_WindowStylesListBoxCount = sizeof(g_WindowStylesListBox)/sizeof(wxWindowStylePair) ;
-
-/* wxComboxBox */
-static wxWindowStylePair g_WindowStylesComboBox[] = {
- { "wxCB_SIMPLE", wxCB_SIMPLE },
- { "wxCB_DROPDOWN", wxCB_DROPDOWN },
- { "wxCB_READONLY", wxCB_READONLY },
- { "wxCB_SORT", wxCB_SORT }
-};
-
-int g_WindowStylesComboBoxCount = sizeof(g_WindowStylesComboBox)/sizeof(wxWindowStylePair) ;
-
-#if 0
-/* wxChoice */
-static wxWindowStylePair g_WindowStylesChoice[] = {
-};
-
-int g_WindowStylesChoiceCount = sizeof(g_WindowStylesChoice)/sizeof(wxWindowStylePair) ;
-#endif
-
-/* wxGauge */
-static wxWindowStylePair g_WindowStylesGauge[] = {
- { "wxGA_PROGRESSBAR", wxGA_PROGRESSBAR },
- { "wxGA_HORIZONTAL", wxGA_HORIZONTAL },
- { "wxGA_VERTICAL", wxGA_VERTICAL }
-};
-
-int g_WindowStylesGaugeCount = sizeof(g_WindowStylesGauge)/sizeof(wxWindowStylePair) ;
-
-/* wxTextCtrl */
-static wxWindowStylePair g_WindowStylesTextCtrl[] = {
- // { "wxPASSWORD", wxPASSWORD},
- // { "wxPROCESS_ENTER", wxPROCESS_ENTER},
- { "wxTE_PASSWORD", wxTE_PASSWORD},
- { "wxTE_READONLY", wxTE_READONLY},
- { "wxTE_PROCESS_ENTER", wxTE_PROCESS_ENTER},
- { "wxTE_MULTILINE", wxTE_MULTILINE}
-};
-
-int g_WindowStylesTextCtrlCount = sizeof(g_WindowStylesTextCtrl)/sizeof(wxWindowStylePair) ;
-
-/* wxRadioButton */
-static wxWindowStylePair g_WindowStylesRadioButton[] = {
- { "wxRB_GROUP", wxRB_GROUP }
-};
-
-int g_WindowStylesRadioButtonCount = sizeof(g_WindowStylesRadioButton)/sizeof(wxWindowStylePair) ;
-
-/* wxRadioBox */
-static wxWindowStylePair g_WindowStylesRadioBox[] = {
- { "wxRA_SPECIFY_COLS", wxRA_SPECIFY_COLS },
- { "wxRA_SPECIFY_ROWS", wxRA_SPECIFY_ROWS }
- /*
- ,
- { "wxRA_HORIZONTAL", wxRA_HORIZONTAL },
- { "wxRA_VERTICAL", wxRA_VERTICAL }
- */
-};
-
-int g_WindowStylesRadioBoxCount = sizeof(g_WindowStylesRadioBox)/sizeof(wxWindowStylePair) ;
-
-/* wxSlider */
-static wxWindowStylePair g_WindowStylesSlider[] = {
- { "wxSL_HORIZONTAL", wxSL_HORIZONTAL },
- { "wxSL_VERTICAL", wxSL_VERTICAL },
- { "wxSL_AUTOTICKS", wxSL_AUTOTICKS },
- { "wxSL_LABELS", wxSL_LABELS },
- { "wxSL_LEFT", wxSL_LEFT },
- { "wxSL_TOP", wxSL_TOP },
- { "wxSL_RIGHT", wxSL_RIGHT },
- { "wxSL_BOTTOM", wxSL_BOTTOM },
- { "wxSL_BOTH", wxSL_BOTH },
- { "wxSL_SELRANGE", wxSL_SELRANGE }
-};
-
-int g_WindowStylesSliderCount = sizeof(g_WindowStylesSlider)/sizeof(wxWindowStylePair) ;
-
-/* wxScrollBar */
-static wxWindowStylePair g_WindowStylesScrollBar[] = {
- { "wxSB_HORIZONTAL", wxSB_HORIZONTAL },
- { "wxSB_VERTICAL", wxSB_VERTICAL }
-};
-
-int g_WindowStylesScrollBarCount = sizeof(g_WindowStylesScrollBar)/sizeof(wxWindowStylePair) ;
-
-/* wxButton */
-static wxWindowStylePair g_WindowStylesButton[] = {
- { "wxBU_AUTODRAW", wxBU_AUTODRAW },
- { "wxBU_NOAUTODRAW", wxBU_NOAUTODRAW }
-};
-
-int g_WindowStylesButtonCount = sizeof(g_WindowStylesButton)/sizeof(wxWindowStylePair) ;
-
-/* wxTreeCtrl */
-static wxWindowStylePair g_WindowStylesTreeCtrl[] = {
- { "wxTR_HAS_BUTTONS", wxTR_HAS_BUTTONS },
- { "wxTR_EDIT_LABELS", wxTR_EDIT_LABELS },
- { "wxTR_LINES_AT_ROOT", wxTR_LINES_AT_ROOT }
-};
-
-int g_WindowStylesTreeCtrlCount = sizeof(g_WindowStylesTreeCtrl)/sizeof(wxWindowStylePair) ;
-
-/* wxListCtrl */
-static wxWindowStylePair g_WindowStylesListCtrl[] = {
- { "wxLC_ICON", wxLC_ICON },
- { "wxLC_SMALL_ICON", wxLC_SMALL_ICON },
- { "wxLC_LIST", wxLC_LIST },
- { "wxLC_REPORT", wxLC_REPORT },
- { "wxLC_ALIGN_TOP", wxLC_ALIGN_TOP },
- { "wxLC_ALIGN_LEFT", wxLC_ALIGN_LEFT },
- { "wxLC_AUTOARRANGE", wxLC_AUTOARRANGE },
- { "wxLC_USER_TEXT", wxLC_USER_TEXT },
- { "wxLC_EDIT_LABELS", wxLC_EDIT_LABELS },
- { "wxLC_NO_HEADER", wxLC_NO_HEADER },
- { "wxLC_NO_SORT_HEADER", wxLC_NO_SORT_HEADER },
- { "wxLC_SINGLE_SEL", wxLC_SINGLE_SEL },
- { "wxLC_SORT_ASCENDING", wxLC_SORT_ASCENDING },
- { "wxLC_SORT_DESCENDING", wxLC_SORT_DESCENDING }
-};
-
-int g_WindowStylesListCtrlCount = sizeof(g_WindowStylesListCtrl)/sizeof(wxWindowStylePair) ;
-
-/* wxSpinButton */
-static wxWindowStylePair g_WindowStylesSpinButton[] = {
- { "wxSP_VERTICAL", wxSP_VERTICAL},
- { "wxSP_HORIZONTAL", wxSP_HORIZONTAL},
- { "wxSP_ARROW_KEYS", wxSP_ARROW_KEYS},
- { "wxSP_WRAP", wxSP_WRAP}
-};
-
-int g_WindowStylesSpinButtonCount = sizeof(g_WindowStylesSpinButton)/sizeof(wxWindowStylePair) ;
-
-/* wxSplitterWindow */
-static wxWindowStylePair g_WindowStylesSplitterWindow[] = {
- { "wxSP_NOBORDER", wxSP_NOBORDER},
- { "wxSP_3D", wxSP_3D},
- { "wxSP_BORDER", wxSP_BORDER}
-};
-
-int g_WindowStylesSplitterWindowCount = sizeof(g_WindowStylesSplitterWindow)/sizeof(wxWindowStylePair) ;
-
-/* wxTabCtrl */
-static wxWindowStylePair g_WindowStylesTabCtrl[] = {
- { "wxTC_MULTILINE", wxTC_MULTILINE},
- { "wxTC_RIGHTJUSTIFY", wxTC_RIGHTJUSTIFY},
- { "wxTC_FIXEDWIDTH", wxTC_FIXEDWIDTH},
- { "wxTC_OWNERDRAW", wxTC_OWNERDRAW}
-};
-
-int g_WindowStylesTabCtrlCount = sizeof(g_WindowStylesTabCtrl)/sizeof(wxWindowStylePair) ;
-
-/* wxStatusBar95 */
-static wxWindowStylePair g_WindowStylesStatusBar[] = {
- { "wxST_SIZEGRIP", wxST_SIZEGRIP}
-};
-
-int g_WindowStylesStatusBarCount = sizeof(g_WindowStylesStatusBar)/sizeof(wxWindowStylePair) ;
-
-/* wxControl */
-static wxWindowStylePair g_WindowStylesControl[] = {
- { "wxFIXED_LENGTH", wxFIXED_LENGTH},
- { "wxALIGN_LEFT", wxALIGN_LEFT},
- { "wxALIGN_CENTRE", wxALIGN_CENTRE},
- { "wxALIGN_RIGHT", wxALIGN_RIGHT},
- { "wxCOLOURED", wxCOLOURED}
-};
-
-int g_WindowStylesControlCount = sizeof(g_WindowStylesControl)/sizeof(wxWindowStylePair) ;
-
-/* wxToolBar */
-static wxWindowStylePair g_WindowStylesToolBar[] = {
- { "wxTB_3DBUTTONS", wxTB_3DBUTTONS},
- { "wxTB_HORIZONTAL", wxTB_HORIZONTAL},
- { "wxTB_VERTICAL", wxTB_VERTICAL},
- { "wxTB_FLAT", wxTB_FLAT}
-};
-
-int g_WindowStylesToolBarCount = sizeof(g_WindowStylesToolBar)/sizeof(wxWindowStylePair) ;
-
-/* Frame/dialog */
-static wxWindowStylePair g_WindowStylesDialog[] = {
- { "wxSTAY_ON_TOP", wxSTAY_ON_TOP},
- { "wxCAPTION", wxCAPTION},
- { "wxICONIZE", wxICONIZE},
- { "wxMINIMIZE", wxICONIZE},
- { "wxMAXIMIZE", wxMAXIMIZE},
- { "wxTHICK_FRAME", wxTHICK_FRAME},
- { "wxRESIZE_BORDER", wxRESIZE_BORDER},
- { "wxSYSTEM_MENU", wxSYSTEM_MENU},
- { "wxMINIMIZE_BOX", wxMINIMIZE_BOX},
- { "wxMAXIMIZE_BOX", wxMAXIMIZE_BOX},
- { "wxDIALOG_MODAL", wxDIALOG_MODAL},
- { "wxRESIZE_BOX", wxRESIZE_BOX}
-};
-
-int g_WindowStylesDialogCount = sizeof(g_WindowStylesDialog)/sizeof(wxWindowStylePair) ;
-
-/* Generic */
-static wxWindowStylePair g_WindowStylesWindow[] = {
- { "wxBORDER", wxBORDER},
- { "wxDOUBLE_BORDER", wxDOUBLE_BORDER},
- { "wxSUNKEN_BORDER", wxSUNKEN_BORDER},
- { "wxRAISED_BORDER", wxRAISED_BORDER},
- { "wxSIMPLE_BORDER", wxSIMPLE_BORDER},
- { "wxSTATIC_BORDER", wxSTATIC_BORDER},
- { "wxTRANSPARENT_WINDOW", wxTRANSPARENT_WINDOW},
- { "wxNO_BORDER", wxNO_BORDER},
- { "wxCLIP_CHILDREN", wxCLIP_CHILDREN}
-
- /* Would be duplicated with e.g. wxLB_HSCROLL
- { "wxVSCROLL", wxVSCROLL },
- { "wxHSCROLL", wxHSCROLL }
- */
-};
-
-int g_WindowStylesWindowCount = sizeof(g_WindowStylesWindow)/sizeof(wxWindowStylePair) ;
-
-/*
-* A table holding all class style objects
-*/
-
-
-wxWindowStyleTable::wxWindowStyleTable():
-m_classes(wxKEY_STRING)
-{
-}
-
-wxWindowStyleTable::~wxWindowStyleTable()
-{
- ClearTable();
-}
-
-void wxWindowStyleTable::Init()
-{
- AddStyles("wxWindow", g_WindowStylesWindowCount, g_WindowStylesWindow);
- AddStyles("wxDialog", g_WindowStylesDialogCount, g_WindowStylesDialog);
- AddStyles("wxButton", g_WindowStylesButtonCount, g_WindowStylesButton);
- AddStyles("wxTextCtrl", g_WindowStylesTextCtrlCount, g_WindowStylesTextCtrl);
- AddStyles("wxSpinButton", g_WindowStylesSpinButtonCount, g_WindowStylesSpinButton);
- AddStyles("wxListBox", g_WindowStylesListBoxCount, g_WindowStylesListBox);
- AddStyles("wxRadioButton", g_WindowStylesRadioButtonCount, g_WindowStylesRadioButton);
- AddStyles("wxRadioBox", g_WindowStylesRadioBoxCount, g_WindowStylesRadioBox);
- AddStyles("wxControl", g_WindowStylesControlCount, g_WindowStylesControl);
- AddStyles("wxListCtrl", g_WindowStylesListCtrlCount, g_WindowStylesListCtrl);
- AddStyles("wxTreeCtrl", g_WindowStylesTreeCtrlCount, g_WindowStylesTreeCtrl);
- AddStyles("wxSlider", g_WindowStylesSliderCount, g_WindowStylesSlider);
- AddStyles("wxGauge", g_WindowStylesGaugeCount, g_WindowStylesGauge);
- AddStyles("wxComboBox", g_WindowStylesComboBoxCount, g_WindowStylesComboBox);
- // AddStyles("wxChoice", g_WindowStylesChoice, g_WindowStylesChoice);
- AddStyles("wxScrollBar", g_WindowStylesScrollBarCount, g_WindowStylesScrollBar);
-}
-
-// Operations
-void wxWindowStyleTable::ClearTable()
-{
- wxNode* node = m_classes.First();
- while (node)
- {
- wxWindowStyleClass* styleClass = (wxWindowStyleClass*) node->Data();
- delete styleClass;
- node = node->Next();
- }
- m_classes.Clear();
-}
-
-void wxWindowStyleTable::AddStyles(const wxString& className, int n, wxWindowStylePair *styles)
-{
- wxWindowStyleClass* styleClass = new wxWindowStyleClass(n, styles);
- m_classes.Append(className, styleClass);
-}
-
-wxWindowStyleClass* wxWindowStyleTable::FindClass(const wxString& className)
-{
- wxNode* node = m_classes.Find(className);
- if (node)
- {
- wxWindowStyleClass* styleClass = (wxWindowStyleClass*) node->Data();
- return styleClass;
- }
- else
- return NULL;
-}
-
-bool wxWindowStyleTable::GenerateStyleStrings(const wxString& className, long windowStyle, char *buf)
-{
- wxWindowStyleClass* styleClass = FindClass(className);
- if (!styleClass)
- return FALSE;
-
- styleClass->GenerateStyleStrings(windowStyle, buf);
- return TRUE;
-}
-
-/*
-* Holds all the styles for a particular class
-*/
-
-wxWindowStyleClass::wxWindowStyleClass(int n, wxWindowStylePair *styles)
-{
- m_styleCount = n;
- m_styles = styles;
- /*
- m_styles = new wxWindowStylePair[n];
- int i;
- for (i = 0; i < n; i++)
- m_styles[i] = styles[i];
- */
-}
-
-wxWindowStyleClass::~wxWindowStyleClass()
-{
-}
-
-void wxWindowStyleClass::GenerateStyleStrings(long windowStyle, char *buf)
-{
- int i;
- for (i = 0; i < m_styleCount; i++)
- GenerateStyle(buf, windowStyle, m_styles[i].m_styleId, m_styles[i].m_styleName);
-}
-
-bool wxWindowStyleClass::GenerateStyle(char *buf, long windowStyle, long flag, const wxString& strStyle)
-{
- // Ignore zero flags
- if (flag == 0)
- return TRUE;
-
- if ((windowStyle & flag) == flag)
- {
- if (strlen(buf) > 0)
- strcat(buf, " | ");
- strcat(buf, (const char*) strStyle);
- return TRUE;
- }
- else
- return FALSE;
-}
-
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: winstyle.h
-// Purpose: Window styles
-// Author: Julian Smart
-// Modified by:
-// Created: 04/01/98
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _DE_WINSTYLE_H_
-#define _DE_WINSTYLE_H_
-
-#if defined(__GNUG__) && !defined(__APPLE__)
-#pragma interface "winstyle.h"
-#endif
-
-#include "wx/wx.h"
-
-/*
-* A class for storing/generating window styles.
-*/
-
-class wxWindowStyleClass;
-
-class wxWindowStylePair
-{
- friend class wxWindowStyleClass;
-public:
- char* m_styleName;
- long m_styleId;
-};
-
-class wxWindowStyleTable: public wxObject
-{
-public:
- wxWindowStyleTable();
- ~wxWindowStyleTable();
-
- // Operations
- void ClearTable();
- void AddStyles(const wxString& className, int n, wxWindowStylePair *styles);
- wxWindowStyleClass* FindClass(const wxString& className) ;
- bool GenerateStyleStrings(const wxString& className, long windowStyle, char *buf);
-
- // Initialise with all possible styles
- void Init();
-
- // Members
-protected:
- wxList m_classes; // A list of wxWindowStyleClass objects, indexed by class name
-
-};
-
-/*
-* Classes for storing all the window style identifiers associated with a particular class
-*/
-
-class wxWindowStyleClass: public wxObject
-{
-public:
- wxWindowStyleClass(int n, wxWindowStylePair *styles);
- ~wxWindowStyleClass();
-
- // Operations
- void GenerateStyleStrings(long windowStyle, char *buf);
- bool GenerateStyle(char *buf, long windowStyle, long flag, const wxString& strStyle);
-
- // Members
-protected:
- wxWindowStylePair* m_styles; // An array of wxWindowStylePair objects
- int m_styleCount;
-};
-
-#endif
-// _DE_WINSTYLE_H_