Removed wxrcedit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34130 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
@@ -1,6 +1,6 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
CONTRIB_UTILS=wxrcedit convertrc
|
CONTRIB_UTILS=convertrc
|
||||||
|
|
||||||
all:
|
all:
|
||||||
@for d in $(CONTRIB_UTILS); do (cd $$d && $(MAKE)); done
|
@for d in $(CONTRIB_UTILS); do (cd $$d && $(MAKE)); done
|
||||||
|
@@ -1,219 +0,0 @@
|
|||||||
# =========================================================================
|
|
||||||
# This makefile was generated by
|
|
||||||
# Bakefile 0.1.8 (http://bakefile.sourceforge.net)
|
|
||||||
# Do not modify, all changes will be overwritten!
|
|
||||||
# =========================================================================
|
|
||||||
|
|
||||||
|
|
||||||
@MAKE_SET@
|
|
||||||
|
|
||||||
prefix = @prefix@
|
|
||||||
exec_prefix = @exec_prefix@
|
|
||||||
INSTALL = @INSTALL@
|
|
||||||
EXEEXT = @EXEEXT@
|
|
||||||
RESCOMP = @RESCOMP@
|
|
||||||
SETFILE = @SETFILE@
|
|
||||||
STRIP = @STRIP@
|
|
||||||
NM = @NM@
|
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
||||||
INSTALL_DIR = @INSTALL_DIR@
|
|
||||||
srcdir = @srcdir@
|
|
||||||
top_srcdir = @top_srcdir@
|
|
||||||
top_builddir = @top_builddir@
|
|
||||||
bindir = @bindir@
|
|
||||||
LDFLAGS_GUI = @LDFLAGS_GUI@
|
|
||||||
CXX = @CXX@
|
|
||||||
CXXFLAGS = @CXXFLAGS@
|
|
||||||
CPPFLAGS = @CPPFLAGS@
|
|
||||||
LDFLAGS = @LDFLAGS@
|
|
||||||
WX_LIB_FLAVOUR = @WX_LIB_FLAVOUR@
|
|
||||||
TOOLKIT = @TOOLKIT@
|
|
||||||
TOOLKIT_LOWERCASE = @TOOLKIT_LOWERCASE@
|
|
||||||
TOOLKIT_VERSION = @TOOLKIT_VERSION@
|
|
||||||
EXTRALIBS = @EXTRALIBS@
|
|
||||||
EXTRALIBS_XML = @EXTRALIBS_XML@
|
|
||||||
EXTRALIBS_HTML = @EXTRALIBS_HTML@
|
|
||||||
EXTRALIBS_GUI = @EXTRALIBS_GUI@
|
|
||||||
EXTRALIBS_SDL = @EXTRALIBS_SDL@
|
|
||||||
HOST_SUFFIX = @HOST_SUFFIX@
|
|
||||||
|
|
||||||
### Variables: ###
|
|
||||||
|
|
||||||
DESTDIR =
|
|
||||||
WX_RELEASE = 2.6
|
|
||||||
LIBDIRNAME = $(top_builddir)lib
|
|
||||||
WXRCEDIT_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
|
|
||||||
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
|
|
||||||
-I$(srcdir) $(__DLLFLAG_p) -I$(srcdir)/../../../samples \
|
|
||||||
-I$(srcdir)/../../include $(CPPFLAGS) $(CXXFLAGS)
|
|
||||||
WXRCEDIT_OBJECTS = \
|
|
||||||
$(__wxrcedit_os2_lib_res) \
|
|
||||||
wxrcedit_edapp.o \
|
|
||||||
wxrcedit_editor.o \
|
|
||||||
wxrcedit_nodehnd.o \
|
|
||||||
wxrcedit_nodesdb.o \
|
|
||||||
wxrcedit_pe_adv.o \
|
|
||||||
wxrcedit_pe_basic.o \
|
|
||||||
wxrcedit_preview.o \
|
|
||||||
wxrcedit_propedit.o \
|
|
||||||
wxrcedit_propframe.o \
|
|
||||||
wxrcedit_splittree.o \
|
|
||||||
wxrcedit_xmlhelpr.o \
|
|
||||||
$(__wxrcedit___win32rc)
|
|
||||||
|
|
||||||
### Conditionally set variables: ###
|
|
||||||
|
|
||||||
@COND_DEPS_TRACKING_0@CXXC = $(CXX)
|
|
||||||
@COND_DEPS_TRACKING_1@CXXC = $(top_builddir)./bk-deps $(CXX)
|
|
||||||
@COND_USE_PLUGINS_0@PLUGIN_ADV_EXTRALIBS = $(EXTRALIBS_SDL)
|
|
||||||
@COND_USE_GUI_0@PORTNAME = base
|
|
||||||
@COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
|
|
||||||
@COND_TOOLKIT_MAC@WXBASEPORT = _carbon
|
|
||||||
@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d
|
|
||||||
@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d
|
|
||||||
@COND_UNICODE_1@WXUNICODEFLAG = u
|
|
||||||
@COND_WXUNIV_1@WXUNIVNAME = univ
|
|
||||||
@COND_MONOLITHIC_0@EXTRALIBS_FOR_BASE = $(EXTRALIBS)
|
|
||||||
@COND_MONOLITHIC_1@EXTRALIBS_FOR_BASE = $(EXTRALIBS) $(EXTRALIBS_GUI)
|
|
||||||
@COND_MONOLITHIC_0@EXTRALIBS_FOR_GUI = $(EXTRALIBS_GUI)
|
|
||||||
@COND_MONOLITHIC_1@EXTRALIBS_FOR_GUI =
|
|
||||||
@COND_PLATFORM_MAC_1@__wxrcedit___mac_setfilecmd = \
|
|
||||||
@COND_PLATFORM_MAC_1@ $(SETFILE) -a C wxrcedit$(EXEEXT)
|
|
||||||
@COND_PLATFORM_MAC_1@__wxrcedit___mac_rezcmd = $(__MACOSX_RESOURCES_p_1)
|
|
||||||
@COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
|
|
||||||
@COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__
|
|
||||||
@COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__
|
|
||||||
@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
|
|
||||||
@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p_1 = -d wxNO_EXCEPTIONS
|
|
||||||
@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p_2 = --define wxNO_EXCEPTIONS
|
|
||||||
@COND_USE_RTTI_0@__RTTI_DEFINE_p = -DwxNO_RTTI
|
|
||||||
@COND_USE_RTTI_0@__RTTI_DEFINE_p_1 = -d wxNO_RTTI
|
|
||||||
@COND_USE_RTTI_0@__RTTI_DEFINE_p_2 = --define wxNO_RTTI
|
|
||||||
@COND_USE_THREADS_0@__THREAD_DEFINE_p = -DwxNO_THREADS
|
|
||||||
@COND_USE_THREADS_0@__THREAD_DEFINE_p_1 = -d wxNO_THREADS
|
|
||||||
@COND_USE_THREADS_0@__THREAD_DEFINE_p_2 = --define wxNO_THREADS
|
|
||||||
@COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL
|
|
||||||
@COND_SHARED_1@__DLLFLAG_p_1 = -d WXUSINGDLL
|
|
||||||
@COND_SHARED_1@__DLLFLAG_p_2 = --define WXUSINGDLL
|
|
||||||
COND_PLATFORM_OS2_1___wxrcedit___os2_emxbindcmd = $(NM) wxrcedit$(EXEEXT) | if \
|
|
||||||
grep -q pmwin.763 ; then emxbind -ep wxrcedit$(EXEEXT) ; fi
|
|
||||||
@COND_PLATFORM_OS2_1@__wxrcedit___os2_emxbindcmd = $(COND_PLATFORM_OS2_1___wxrcedit___os2_emxbindcmd)
|
|
||||||
@COND_PLATFORM_OS2_1@__wxrcedit_os2_lib_res = \
|
|
||||||
@COND_PLATFORM_OS2_1@ $(top_srcdir)/include/wx/os2/wx.res
|
|
||||||
COND_MONOLITHIC_0___WXLIB_XRC_p = \
|
|
||||||
-lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc-$(WX_RELEASE)$(HOST_SUFFIX)
|
|
||||||
@COND_MONOLITHIC_0@__WXLIB_XRC_p = $(COND_MONOLITHIC_0___WXLIB_XRC_p)
|
|
||||||
COND_MONOLITHIC_0___WXLIB_ADV_p = \
|
|
||||||
-lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv-$(WX_RELEASE)$(HOST_SUFFIX)
|
|
||||||
@COND_MONOLITHIC_0@__WXLIB_ADV_p = $(COND_MONOLITHIC_0___WXLIB_ADV_p)
|
|
||||||
COND_MONOLITHIC_0___WXLIB_HTML_p = \
|
|
||||||
-lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html-$(WX_RELEASE)$(HOST_SUFFIX)
|
|
||||||
@COND_MONOLITHIC_0@__WXLIB_HTML_p = $(COND_MONOLITHIC_0___WXLIB_HTML_p)
|
|
||||||
COND_MONOLITHIC_0___WXLIB_CORE_p = \
|
|
||||||
-lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core-$(WX_RELEASE)$(HOST_SUFFIX)
|
|
||||||
@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p)
|
|
||||||
COND_MONOLITHIC_0___WXLIB_XML_p = \
|
|
||||||
-lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml-$(WX_RELEASE)$(HOST_SUFFIX)
|
|
||||||
@COND_MONOLITHIC_0@__WXLIB_XML_p = $(COND_MONOLITHIC_0___WXLIB_XML_p)
|
|
||||||
COND_MONOLITHIC_0___WXLIB_BASE_p = \
|
|
||||||
-lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
|
|
||||||
@COND_MONOLITHIC_0@__WXLIB_BASE_p = $(COND_MONOLITHIC_0___WXLIB_BASE_p)
|
|
||||||
@COND_PLATFORM_WIN32_1@__wxrcedit___win32rc = wxrcedit_wxrcedit_rc.o
|
|
||||||
COND_MONOLITHIC_1___WXLIB_MONO_p = \
|
|
||||||
-lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
|
|
||||||
@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p)
|
|
||||||
@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \
|
|
||||||
@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \
|
|
||||||
@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
|
|
||||||
@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \
|
|
||||||
@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \
|
|
||||||
@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
|
|
||||||
@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \
|
|
||||||
@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \
|
|
||||||
@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
|
|
||||||
@COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \
|
|
||||||
@COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
|
|
||||||
@COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \
|
|
||||||
@COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
|
|
||||||
COND_WXUSE_REGEX_BUILTIN___LIB_REGEX_p = \
|
|
||||||
-lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
|
|
||||||
@COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = $(COND_WXUSE_REGEX_BUILTIN___LIB_REGEX_p)
|
|
||||||
@COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \
|
|
||||||
@COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
|
|
||||||
COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \
|
|
||||||
__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) \
|
|
||||||
$(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -i \
|
|
||||||
$(srcdir)/../../../samples -i $(top_srcdir)/include -i \
|
|
||||||
$(srcdir)/../../include -o wxrcedit$(EXEEXT) Carbon.r sample.r
|
|
||||||
@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1)
|
|
||||||
|
|
||||||
### Targets: ###
|
|
||||||
|
|
||||||
all: wxrcedit$(EXEEXT)
|
|
||||||
|
|
||||||
install: all install_wxrcedit
|
|
||||||
|
|
||||||
uninstall:
|
|
||||||
|
|
||||||
install-strip: install
|
|
||||||
$(STRIP) $(DESTDIR)$(bindir)/wxrcedit$(EXEEXT)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -rf ./.deps ./.pch
|
|
||||||
rm -f ./*.o
|
|
||||||
rm -f wxrcedit$(EXEEXT)
|
|
||||||
|
|
||||||
distclean: clean
|
|
||||||
rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile
|
|
||||||
|
|
||||||
wxrcedit$(EXEEXT): $(WXRCEDIT_OBJECTS) $(__wxrcedit___win32rc)
|
|
||||||
$(CXX) -o $@ $(WXRCEDIT_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(__WXLIB_XRC_p) $(__WXLIB_ADV_p) $(PLUGIN_ADV_EXTRALIBS) $(__WXLIB_HTML_p) $(EXTRALIBS_HTML) $(__WXLIB_CORE_p) $(__WXLIB_XML_p) $(EXTRALIBS_XML) $(__WXLIB_BASE_p) $(EXTRALIBS_XML) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(EXTRALIBS_FOR_GUI)
|
|
||||||
$(__wxrcedit___mac_rezcmd)
|
|
||||||
$(__wxrcedit___mac_setfilecmd)
|
|
||||||
$(__wxrcedit___os2_emxbindcmd)
|
|
||||||
|
|
||||||
install_wxrcedit:
|
|
||||||
$(INSTALL_DIR) $(DESTDIR)$(bindir)
|
|
||||||
$(INSTALL_PROGRAM) wxrcedit$(EXEEXT) $(DESTDIR)$(bindir)
|
|
||||||
|
|
||||||
wxrcedit_edapp.o: $(srcdir)/edapp.cpp
|
|
||||||
$(CXXC) -c -o $@ $(WXRCEDIT_CXXFLAGS) $(srcdir)/edapp.cpp
|
|
||||||
|
|
||||||
wxrcedit_editor.o: $(srcdir)/editor.cpp
|
|
||||||
$(CXXC) -c -o $@ $(WXRCEDIT_CXXFLAGS) $(srcdir)/editor.cpp
|
|
||||||
|
|
||||||
wxrcedit_nodehnd.o: $(srcdir)/nodehnd.cpp
|
|
||||||
$(CXXC) -c -o $@ $(WXRCEDIT_CXXFLAGS) $(srcdir)/nodehnd.cpp
|
|
||||||
|
|
||||||
wxrcedit_nodesdb.o: $(srcdir)/nodesdb.cpp
|
|
||||||
$(CXXC) -c -o $@ $(WXRCEDIT_CXXFLAGS) $(srcdir)/nodesdb.cpp
|
|
||||||
|
|
||||||
wxrcedit_pe_adv.o: $(srcdir)/pe_adv.cpp
|
|
||||||
$(CXXC) -c -o $@ $(WXRCEDIT_CXXFLAGS) $(srcdir)/pe_adv.cpp
|
|
||||||
|
|
||||||
wxrcedit_pe_basic.o: $(srcdir)/pe_basic.cpp
|
|
||||||
$(CXXC) -c -o $@ $(WXRCEDIT_CXXFLAGS) $(srcdir)/pe_basic.cpp
|
|
||||||
|
|
||||||
wxrcedit_preview.o: $(srcdir)/preview.cpp
|
|
||||||
$(CXXC) -c -o $@ $(WXRCEDIT_CXXFLAGS) $(srcdir)/preview.cpp
|
|
||||||
|
|
||||||
wxrcedit_propedit.o: $(srcdir)/propedit.cpp
|
|
||||||
$(CXXC) -c -o $@ $(WXRCEDIT_CXXFLAGS) $(srcdir)/propedit.cpp
|
|
||||||
|
|
||||||
wxrcedit_propframe.o: $(srcdir)/propframe.cpp
|
|
||||||
$(CXXC) -c -o $@ $(WXRCEDIT_CXXFLAGS) $(srcdir)/propframe.cpp
|
|
||||||
|
|
||||||
wxrcedit_splittree.o: $(srcdir)/splittree.cpp
|
|
||||||
$(CXXC) -c -o $@ $(WXRCEDIT_CXXFLAGS) $(srcdir)/splittree.cpp
|
|
||||||
|
|
||||||
wxrcedit_xmlhelpr.o: $(srcdir)/xmlhelpr.cpp
|
|
||||||
$(CXXC) -c -o $@ $(WXRCEDIT_CXXFLAGS) $(srcdir)/xmlhelpr.cpp
|
|
||||||
|
|
||||||
wxrcedit_wxrcedit_rc.o: $(srcdir)/wxrcedit.rc
|
|
||||||
$(RESCOMP) -i$< -o$@ --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_2) $(__EXCEPTIONS_DEFINE_p_2) $(__RTTI_DEFINE_p_2) $(__THREAD_DEFINE_p_2) --include-dir $(srcdir) $(__DLLFLAG_p_2) --include-dir $(srcdir)/../../../samples --include-dir $(top_srcdir)/include --include-dir $(srcdir)/../../include
|
|
||||||
|
|
||||||
|
|
||||||
# Include dependency info, if present:
|
|
||||||
@IF_GNU_MAKE@-include .deps/*.d
|
|
||||||
|
|
||||||
.PHONY: all install uninstall clean distclean install_wxrcedit
|
|
Before Width: | Height: | Size: 158 B |
@@ -1,33 +0,0 @@
|
|||||||
/* XPM */
|
|
||||||
static char *close_xpm[] = {
|
|
||||||
/* width height num_colors chars_per_pixel */
|
|
||||||
" 24 24 2 1",
|
|
||||||
/* colors */
|
|
||||||
". c #000000",
|
|
||||||
"# c none",
|
|
||||||
/* pixels */
|
|
||||||
"########################",
|
|
||||||
"########################",
|
|
||||||
"########################",
|
|
||||||
"########################",
|
|
||||||
"########################",
|
|
||||||
"########################",
|
|
||||||
"#######.####..##########",
|
|
||||||
"#######..##....#########",
|
|
||||||
"########..#...##########",
|
|
||||||
"########.....###########",
|
|
||||||
"#########...############",
|
|
||||||
"#########....###########",
|
|
||||||
"########......##########",
|
|
||||||
"########..#....#########",
|
|
||||||
"#######..###....########",
|
|
||||||
"#######.#####..#########",
|
|
||||||
"########################",
|
|
||||||
"########################",
|
|
||||||
"########################",
|
|
||||||
"########################",
|
|
||||||
"########################",
|
|
||||||
"########################",
|
|
||||||
"########################",
|
|
||||||
"########################"
|
|
||||||
};
|
|
Before Width: | Height: | Size: 294 B |
@@ -1,21 +0,0 @@
|
|||||||
/* XPM */
|
|
||||||
static char * control_xpm[] = {
|
|
||||||
"16 14 4 1",
|
|
||||||
" c None",
|
|
||||||
". c #008000",
|
|
||||||
"+ c #FFFFFF",
|
|
||||||
"@ c #7F7F7F",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ... ",
|
|
||||||
" .++.. ",
|
|
||||||
" .++..@ ",
|
|
||||||
" .....@ ",
|
|
||||||
" ...@@ ",
|
|
||||||
" @@@ ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" "};
|
|
Before Width: | Height: | Size: 318 B |
@@ -1,22 +0,0 @@
|
|||||||
/* XPM */
|
|
||||||
static char * gsizer_xpm[] = {
|
|
||||||
"16 16 3 1",
|
|
||||||
" c None",
|
|
||||||
". c #000000",
|
|
||||||
"+ c #FF0000",
|
|
||||||
" ",
|
|
||||||
" .... .... ",
|
|
||||||
" .++. .++. ",
|
|
||||||
" ...++....++... ",
|
|
||||||
" .++++++++++++. ",
|
|
||||||
" .++++++++++++. ",
|
|
||||||
" ...++....++... ",
|
|
||||||
" .++. .++. ",
|
|
||||||
" .++. .++. ",
|
|
||||||
" ...++....++... ",
|
|
||||||
" .++++++++++++. ",
|
|
||||||
" .++++++++++++. ",
|
|
||||||
" ...++....++... ",
|
|
||||||
" .++. .++. ",
|
|
||||||
" .... .... ",
|
|
||||||
" "};
|
|
Before Width: | Height: | Size: 318 B |
@@ -1,22 +0,0 @@
|
|||||||
/* XPM */
|
|
||||||
static char * hsizer_xpm[] = {
|
|
||||||
"16 16 3 1",
|
|
||||||
" c None",
|
|
||||||
". c #000000",
|
|
||||||
"+ c #FF0000",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" . . ",
|
|
||||||
" .. .. ",
|
|
||||||
" ..+......+.. ",
|
|
||||||
" ..++++++++++.. ",
|
|
||||||
"..++++++++++++..",
|
|
||||||
" ..++++++++++.. ",
|
|
||||||
" ..+......+.. ",
|
|
||||||
" .. .. ",
|
|
||||||
" . . ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" "};
|
|
Before Width: | Height: | Size: 1.6 KiB |
@@ -1,229 +0,0 @@
|
|||||||
/* XPM */
|
|
||||||
static char * open_xpm[] = {
|
|
||||||
"24 24 202 2",
|
|
||||||
" c None",
|
|
||||||
". c #020202",
|
|
||||||
"+ c #5A5226",
|
|
||||||
"@ c #9A8A46",
|
|
||||||
"# c #C6AE52",
|
|
||||||
"$ c #EEDE7E",
|
|
||||||
"% c #FEB26A",
|
|
||||||
"& c #06060A",
|
|
||||||
"* c #B6AE7A",
|
|
||||||
"= c #CEA272",
|
|
||||||
"- c #E2D27E",
|
|
||||||
"; c #FEDEA2",
|
|
||||||
"> c #7A6E4E",
|
|
||||||
", c #BEAA56",
|
|
||||||
"' c #1E1E22",
|
|
||||||
") c #826A4E",
|
|
||||||
"! c #FEDEA6",
|
|
||||||
"~ c #F6F6F2",
|
|
||||||
"{ c #9A7E5A",
|
|
||||||
"] c #C2BE86",
|
|
||||||
"^ c #3E3A2A",
|
|
||||||
"/ c #7E5E3A",
|
|
||||||
"( c #EADA82",
|
|
||||||
"_ c #FEDEAE",
|
|
||||||
": c #FEBE7A",
|
|
||||||
"< c #BABAB6",
|
|
||||||
"[ c #7E7E7E",
|
|
||||||
"} c #625A3A",
|
|
||||||
"| c #E2DA9A",
|
|
||||||
"1 c #322212",
|
|
||||||
"2 c #D2BA5A",
|
|
||||||
"3 c #9E9E9E",
|
|
||||||
"4 c #9E7A52",
|
|
||||||
"5 c #EAEAE6",
|
|
||||||
"6 c #969262",
|
|
||||||
"7 c #AEAEAA",
|
|
||||||
"8 c #826E52",
|
|
||||||
"9 c #FED69A",
|
|
||||||
"0 c #DEBE8A",
|
|
||||||
"a c #DEB67E",
|
|
||||||
"b c #9E8A66",
|
|
||||||
"c c #6E5A42",
|
|
||||||
"d c #C2C2BE",
|
|
||||||
"e c #32322E",
|
|
||||||
"f c #EEA256",
|
|
||||||
"g c #664226",
|
|
||||||
"h c #BEA67A",
|
|
||||||
"i c #8A8A8A",
|
|
||||||
"j c #969692",
|
|
||||||
"k c #C68246",
|
|
||||||
"l c #CECECA",
|
|
||||||
"m c #7A7256",
|
|
||||||
"n c #DEDEDE",
|
|
||||||
"o c #362E22",
|
|
||||||
"p c #6E563A",
|
|
||||||
"q c #A66A3A",
|
|
||||||
"r c #625E4A",
|
|
||||||
"s c #DADAD6",
|
|
||||||
"t c #4A4A4A",
|
|
||||||
"u c #FEC282",
|
|
||||||
"v c #D2BE6A",
|
|
||||||
"w c #464646",
|
|
||||||
"x c #363636",
|
|
||||||
"y c #A6A6A2",
|
|
||||||
"z c #6E6E72",
|
|
||||||
"A c #666666",
|
|
||||||
"B c #261A12",
|
|
||||||
"C c #B6B6B2",
|
|
||||||
"D c #FECE92",
|
|
||||||
"E c #4E3A2A",
|
|
||||||
"F c #DECA6A",
|
|
||||||
"G c #DEAE76",
|
|
||||||
"H c #2A2A26",
|
|
||||||
"I c #CACAC6",
|
|
||||||
"J c #3E2A1A",
|
|
||||||
"K c #5E4A3A",
|
|
||||||
"L c #F2F2EE",
|
|
||||||
"M c #929292",
|
|
||||||
"N c #767676",
|
|
||||||
"O c #5A5242",
|
|
||||||
"P c #EEE692",
|
|
||||||
"Q c #D2D2CE",
|
|
||||||
"R c #766A3E",
|
|
||||||
"S c #3E2E1A",
|
|
||||||
"T c #E6E6E6",
|
|
||||||
"U c #FAFAFA",
|
|
||||||
"V c #121212",
|
|
||||||
"W c #5A5A56",
|
|
||||||
"X c #EEE69A",
|
|
||||||
"Y c #968A4E",
|
|
||||||
"Z c #3E321E",
|
|
||||||
"` c #867642",
|
|
||||||
" . c #FEC686",
|
|
||||||
".. c #423626",
|
|
||||||
"+. c #3E3E3E",
|
|
||||||
"@. c #4E4E52",
|
|
||||||
"#. c #A69246",
|
|
||||||
"$. c #4A3E36",
|
|
||||||
"%. c #6E5E3A",
|
|
||||||
"&. c #E2E2E2",
|
|
||||||
"*. c #5E5E5A",
|
|
||||||
"=. c #565246",
|
|
||||||
"-. c #BEBEBA",
|
|
||||||
";. c #DAC666",
|
|
||||||
">. c #4E422A",
|
|
||||||
",. c #E2D272",
|
|
||||||
"'. c #8E8E8A",
|
|
||||||
"). c #D6D6D2",
|
|
||||||
"!. c #AAAAA6",
|
|
||||||
"~. c #C6C6C6",
|
|
||||||
"{. c #FEBA76",
|
|
||||||
"]. c #868686",
|
|
||||||
"^. c #969266",
|
|
||||||
"/. c #F6AA62",
|
|
||||||
"(. c #9A9A96",
|
|
||||||
"_. c #5A523A",
|
|
||||||
":. c #5E5236",
|
|
||||||
"<. c #525252",
|
|
||||||
"[. c #A2A29E",
|
|
||||||
"}. c #7A7A76",
|
|
||||||
"|. c #FEFEFE",
|
|
||||||
"1. c #7E6A4E",
|
|
||||||
"2. c #FEDA9E",
|
|
||||||
"3. c #EADE8E",
|
|
||||||
"4. c #EEEEEA",
|
|
||||||
"5. c #42321E",
|
|
||||||
"6. c #7E7672",
|
|
||||||
"7. c #FED296",
|
|
||||||
"8. c #2E2E2E",
|
|
||||||
"9. c #F2EA96",
|
|
||||||
"0. c #826E56",
|
|
||||||
"a. c #7E6A42",
|
|
||||||
"b. c #FECA8A",
|
|
||||||
"c. c #3E3226",
|
|
||||||
"d. c #5E5E5E",
|
|
||||||
"e. c #82764E",
|
|
||||||
"f. c #4E4236",
|
|
||||||
"g. c #626262",
|
|
||||||
"h. c #020206",
|
|
||||||
"i. c #423A2E",
|
|
||||||
"j. c #422E1A",
|
|
||||||
"k. c #CEA672",
|
|
||||||
"l. c #7E6242",
|
|
||||||
"m. c #727272",
|
|
||||||
"n. c #6A6A6E",
|
|
||||||
"o. c #CACACA",
|
|
||||||
"p. c #F2F2F6",
|
|
||||||
"q. c #C6C286",
|
|
||||||
"r. c #828286",
|
|
||||||
"s. c #F2EAA2",
|
|
||||||
"t. c #5A564A",
|
|
||||||
"u. c #565656",
|
|
||||||
"v. c #AEAEAE",
|
|
||||||
"w. c #EEE696",
|
|
||||||
"x. c #8E8E92",
|
|
||||||
"y. c #7A7A7E",
|
|
||||||
"z. c #FEDAA6",
|
|
||||||
"A. c #423226",
|
|
||||||
"B. c #B6B6B6",
|
|
||||||
"C. c #AAAAAA",
|
|
||||||
"D. c #BABABA",
|
|
||||||
"E. c #DADADA",
|
|
||||||
"F. c #422A16",
|
|
||||||
"G. c #F2E68E",
|
|
||||||
"H. c #16120E",
|
|
||||||
"I. c #DEC666",
|
|
||||||
"J. c #EAEAEA",
|
|
||||||
"K. c #969696",
|
|
||||||
"L. c #CECECE",
|
|
||||||
"M. c #BEBEBE",
|
|
||||||
"N. c #F6F6F6",
|
|
||||||
"O. c #F2F2F2",
|
|
||||||
"P. c #C2C2C2",
|
|
||||||
"Q. c #42362A",
|
|
||||||
"R. c #FECA8E",
|
|
||||||
"S. c #8A8A8E",
|
|
||||||
"T. c #D2D2D2",
|
|
||||||
"U. c #3E3222",
|
|
||||||
"V. c #8E8E8E",
|
|
||||||
"W. c #D6D6D6",
|
|
||||||
"X. c #A2A2A2",
|
|
||||||
"Y. c #423222",
|
|
||||||
"Z. c #422E1E",
|
|
||||||
"`. c #FED69E",
|
|
||||||
" + c #323232",
|
|
||||||
".+ c #362E26",
|
|
||||||
"++ c #46464A",
|
|
||||||
"@+ c #FECE96",
|
|
||||||
"#+ c #9A9A9A",
|
|
||||||
"$+ c #7A7A7A",
|
|
||||||
"%+ c #2E2E32",
|
|
||||||
"&+ c #5E5E62",
|
|
||||||
"*+ c #CACACE",
|
|
||||||
"=+ c #9A8A4A",
|
|
||||||
"-+ c #DEBE8E",
|
|
||||||
";+ c #DECA6E",
|
|
||||||
">+ c #2A2A2A",
|
|
||||||
",+ c #5A5A5A",
|
|
||||||
"'+ c #FEDAA2",
|
|
||||||
")+ c #EEEEEE",
|
|
||||||
"!+ c #FED29A",
|
|
||||||
"~+ c #727276",
|
|
||||||
" .+i.c. ",
|
|
||||||
" 0._ -+8 o ",
|
|
||||||
" 1.9 c .k.{ h. ",
|
|
||||||
" H / S ] ^ 4 k.b.a.>. c.Q.o ",
|
|
||||||
">+x.A . g 1 - w.^.m l.G a 1.0 9 h ) ",
|
|
||||||
"x n T 3 6.8.+ F G.| * :.p b.D ! ; ; h c ",
|
|
||||||
" +*+|.L 5 E.g.} Y ,.P X ] ^ 4 = @+2.! b ",
|
|
||||||
" N N.|.N.p.T.C.+.#.;.$ 9.9.6 > l.G `.z.Q. ",
|
|
||||||
" n.O.|.|.N.J.W.K.=.R # , e.v 3.* :. .`.i. ",
|
|
||||||
" W &.U O.O.J.&.T.~.x.u.> $+@.` ;+w.Y.7.Q. ",
|
|
||||||
" . v.U L )+5 &.E.T.*+P.S.< !.W =+( U.@+i. ",
|
|
||||||
" . X.O.J.T &.n W.T.L.~.P.D.v.y.} ;.S D Q. ",
|
|
||||||
" $+4.5 &.E.s T.o.~.P.D.B.7 r._.2 S b.Q. ",
|
|
||||||
" . n &.n s Q l I ~.-.C C 7 S.O =+U. ... ",
|
|
||||||
" . T.E.W.T.l ~.d -.< C v.y K.&+%.Z b.Q. ",
|
|
||||||
" . M v.~.l ~.d D.C B.C.y y M &+%.S u .. ",
|
|
||||||
" V t ,+B.-.M.B.C v.C.y X.M ~+O S {.A. ",
|
|
||||||
" +N y v.C.!.X.X.#+M i ++S {.Y. ",
|
|
||||||
" ' z ].3 #+3 (.j i ++J % Y. ",
|
|
||||||
" . %+<.M M j j '.d.E /.Z. ",
|
|
||||||
" >+,+].i '.}.K f j.h.h. ",
|
|
||||||
" . *.m.}.$.k J . . h.",
|
|
||||||
" & %+w $.q 1 h.. ",
|
|
||||||
" H.B "};
|
|
Before Width: | Height: | Size: 318 B |
@@ -1,26 +0,0 @@
|
|||||||
/* XPM */
|
|
||||||
static char * panel_xpm[] = {
|
|
||||||
"16 16 7 1",
|
|
||||||
" c None",
|
|
||||||
". c #000000",
|
|
||||||
"+ c #808080",
|
|
||||||
"@ c #0000FF",
|
|
||||||
"# c #A0A0A4",
|
|
||||||
"$ c #FFFFFF",
|
|
||||||
"% c #595959",
|
|
||||||
" ",
|
|
||||||
"................",
|
|
||||||
".++++++++++++++.",
|
|
||||||
".+@@@@@@@@@@@@#.",
|
|
||||||
".++++++++++++++.",
|
|
||||||
".+$$$$$$$$$$$$+.",
|
|
||||||
".%$$$$$$$$$$$$+.",
|
|
||||||
".+$$$$$$$$$$$$+.",
|
|
||||||
".+$$$$$$$$$$$$+.",
|
|
||||||
".+$$$$$$$$$$$$%.",
|
|
||||||
".+$$$$$$$$$$$$+.",
|
|
||||||
".+$$$$$$$$$$$$+.",
|
|
||||||
".%$$$$$$$$$$$$+.",
|
|
||||||
".++++++++++++++.",
|
|
||||||
"................",
|
|
||||||
" "};
|
|
Before Width: | Height: | Size: 1.6 KiB |
@@ -1,267 +0,0 @@
|
|||||||
/* XPM */
|
|
||||||
static char * preview_xpm[] = {
|
|
||||||
"24 24 240 2",
|
|
||||||
" c None",
|
|
||||||
". c #060606",
|
|
||||||
"+ c #1E767E",
|
|
||||||
"@ c #2AA2A2",
|
|
||||||
"# c #92C6E6",
|
|
||||||
"$ c #0E0E12",
|
|
||||||
"% c #AADAF2",
|
|
||||||
"& c #4A8282",
|
|
||||||
"* c #5A9AEA",
|
|
||||||
"= c #0E3A3A",
|
|
||||||
"- c #52667A",
|
|
||||||
"; c #9A9A96",
|
|
||||||
"> c #D6DEE6",
|
|
||||||
", c #727272",
|
|
||||||
"' c #DEE6E6",
|
|
||||||
") c #2A3E42",
|
|
||||||
"! c #0A36BE",
|
|
||||||
"~ c #9ECAEA",
|
|
||||||
"{ c #7EB2E2",
|
|
||||||
"] c #565652",
|
|
||||||
"^ c #8A8A86",
|
|
||||||
"/ c #96B2BE",
|
|
||||||
"( c #A2CAE2",
|
|
||||||
"_ c #DEEEF6",
|
|
||||||
": c #2A36BA",
|
|
||||||
"< c #06262A",
|
|
||||||
"[ c #4A4A4A",
|
|
||||||
"} c #E6EEF2",
|
|
||||||
"| c #0E3ABA",
|
|
||||||
"1 c #2276C6",
|
|
||||||
"2 c #B2C6DE",
|
|
||||||
"3 c #6E72BA",
|
|
||||||
"4 c #566EBE",
|
|
||||||
"5 c #A6A6B2",
|
|
||||||
"6 c #9EBEDE",
|
|
||||||
"7 c #2A2A2A",
|
|
||||||
"8 c #3A72BE",
|
|
||||||
"9 c #F6F6F2",
|
|
||||||
"0 c #6E8EBE",
|
|
||||||
"a c #727E86",
|
|
||||||
"b c #0A8AFA",
|
|
||||||
"c c #3E92D6",
|
|
||||||
"d c #C6C6C2",
|
|
||||||
"e c #BADAEE",
|
|
||||||
"f c #D2D6DA",
|
|
||||||
"g c #6E76B2",
|
|
||||||
"h c #464642",
|
|
||||||
"i c #469AF2",
|
|
||||||
"j c #86A2C2",
|
|
||||||
"k c #B6B6B2",
|
|
||||||
"l c #52AADE",
|
|
||||||
"m c #BED2EA",
|
|
||||||
"n c #1252BE",
|
|
||||||
"o c #222E2E",
|
|
||||||
"p c #9696B2",
|
|
||||||
"q c #6EAADA",
|
|
||||||
"r c #126ECA",
|
|
||||||
"s c #F2FAFA",
|
|
||||||
"t c #AEBED6",
|
|
||||||
"u c #92928E",
|
|
||||||
"v c #1E1E1E",
|
|
||||||
"w c #3E7EF6",
|
|
||||||
"x c #1686F6",
|
|
||||||
"y c #3E3E3E",
|
|
||||||
"z c #C6DAE6",
|
|
||||||
"A c #4A86D2",
|
|
||||||
"B c #3AAAF6",
|
|
||||||
"C c #0A76F6",
|
|
||||||
"D c #62625E",
|
|
||||||
"E c #B2C2D6",
|
|
||||||
"F c #C2CEEA",
|
|
||||||
"G c #7E7E7E",
|
|
||||||
"H c #62BED6",
|
|
||||||
"I c #828AAE",
|
|
||||||
"J c #2E2E2E",
|
|
||||||
"K c #CAD2DE",
|
|
||||||
"L c #D2E6F2",
|
|
||||||
"M c #4E4E4E",
|
|
||||||
"N c #CECECA",
|
|
||||||
"O c #5E86C2",
|
|
||||||
"P c #6A6A6A",
|
|
||||||
"Q c #F2EEEA",
|
|
||||||
"R c #5E5E5A",
|
|
||||||
"S c #767676",
|
|
||||||
"T c #AEAEAA",
|
|
||||||
"U c #363636",
|
|
||||||
"V c #868686",
|
|
||||||
"W c #A2A2A2",
|
|
||||||
"X c #E2E2DA",
|
|
||||||
"Y c #4A6EBE",
|
|
||||||
"Z c #92AEF6",
|
|
||||||
"` c #E6E6E2",
|
|
||||||
" . c #226EFE",
|
|
||||||
".. c #F6FAFA",
|
|
||||||
"+. c #8A96AE",
|
|
||||||
"@. c #96A2BE",
|
|
||||||
"#. c #3A3A36",
|
|
||||||
"$. c #BEBEBE",
|
|
||||||
"%. c #8AD2EE",
|
|
||||||
"&. c #8AB2CE",
|
|
||||||
"*. c #3292F6",
|
|
||||||
"=. c #225ABE",
|
|
||||||
"-. c #76B6DE",
|
|
||||||
";. c #FAFEFE",
|
|
||||||
">. c #222222",
|
|
||||||
",. c #96B2DA",
|
|
||||||
"'. c #0296F6",
|
|
||||||
"). c #CACAC6",
|
|
||||||
"!. c #BAE6FA",
|
|
||||||
"~. c #9E9EAA",
|
|
||||||
"{. c #5A5A5A",
|
|
||||||
"]. c #B2B2BE",
|
|
||||||
"^. c #8E8E8E",
|
|
||||||
"/. c #7A8286",
|
|
||||||
"(. c #BABAB6",
|
|
||||||
"_. c #D2D2CE",
|
|
||||||
":. c #9E9E9A",
|
|
||||||
"<. c #DADAD6",
|
|
||||||
"[. c #D2DAEE",
|
|
||||||
"}. c #3276CA",
|
|
||||||
"|. c #AEC6EE",
|
|
||||||
"1. c #96D2EE",
|
|
||||||
"2. c #52524E",
|
|
||||||
"3. c #7A7A76",
|
|
||||||
"4. c #42423E",
|
|
||||||
"5. c #DADEDE",
|
|
||||||
"6. c #323232",
|
|
||||||
"7. c #9A9696",
|
|
||||||
"8. c #0A0A0E",
|
|
||||||
"9. c #161616",
|
|
||||||
"0. c #9AD2EE",
|
|
||||||
"a. c #B2CED6",
|
|
||||||
"b. c #3EB2F6",
|
|
||||||
"c. c #666662",
|
|
||||||
"d. c #82827E",
|
|
||||||
"e. c #B2B2AE",
|
|
||||||
"f. c #B6B6C2",
|
|
||||||
"g. c #524A4A",
|
|
||||||
"h. c #BEC2C2",
|
|
||||||
"i. c #7292CE",
|
|
||||||
"j. c #92B2DE",
|
|
||||||
"k. c #969696",
|
|
||||||
"l. c #EEEEEA",
|
|
||||||
"m. c #FAF2EE",
|
|
||||||
"n. c #EAEAEA",
|
|
||||||
"o. c #262626",
|
|
||||||
"p. c #F2F2F6",
|
|
||||||
"q. c #5E6EBA",
|
|
||||||
"r. c #76AEE6",
|
|
||||||
"s. c #FEFEFE",
|
|
||||||
"t. c #3A7AD2",
|
|
||||||
"u. c #3A3E3A",
|
|
||||||
"v. c #7A7A7A",
|
|
||||||
"w. c #86A2CE",
|
|
||||||
"x. c #76B2EA",
|
|
||||||
"y. c #DEF2FA",
|
|
||||||
"z. c #6E6E6E",
|
|
||||||
"A. c #56565A",
|
|
||||||
"B. c #E2E2DE",
|
|
||||||
"C. c #CACACE",
|
|
||||||
"D. c #464646",
|
|
||||||
"E. c #3A3A3A",
|
|
||||||
"F. c #96CAEA",
|
|
||||||
"G. c #DEEAEE",
|
|
||||||
"H. c #E6F2F6",
|
|
||||||
"I. c #AAAAAA",
|
|
||||||
"J. c #BABABA",
|
|
||||||
"K. c #828286",
|
|
||||||
"L. c #B2B2B6",
|
|
||||||
"M. c #CAC6C6",
|
|
||||||
"N. c #D6D2CE",
|
|
||||||
"O. c #464242",
|
|
||||||
"P. c #C2C2C2",
|
|
||||||
"Q. c #121212",
|
|
||||||
"R. c #AADEEE",
|
|
||||||
"S. c #9ECEEE",
|
|
||||||
"T. c #6A7AAA",
|
|
||||||
"U. c #D2EAFA",
|
|
||||||
"V. c #CEDEEA",
|
|
||||||
"W. c #DEDEDA",
|
|
||||||
"X. c #E6E2E2",
|
|
||||||
"Y. c #36363A",
|
|
||||||
"Z. c #46464A",
|
|
||||||
"`. c #3A3A3E",
|
|
||||||
" + c #FAFAF6",
|
|
||||||
".+ c #D6D6D2",
|
|
||||||
"++ c #EAE6E6",
|
|
||||||
"@+ c #DAE6EE",
|
|
||||||
"#+ c #C6C6CA",
|
|
||||||
"$+ c #5E5E62",
|
|
||||||
"%+ c #9E9EA2",
|
|
||||||
"&+ c #FAFAFE",
|
|
||||||
"*+ c #BAB6B6",
|
|
||||||
"=+ c #DEDADA",
|
|
||||||
"-+ c #9A9A9A",
|
|
||||||
";+ c #8A8A8A",
|
|
||||||
">+ c #2A2A2E",
|
|
||||||
",+ c #F6F6F6",
|
|
||||||
"'+ c #CACACA",
|
|
||||||
")+ c #565656",
|
|
||||||
"!+ c #828282",
|
|
||||||
"~+ c #7A7A7E",
|
|
||||||
"{+ c #E2E2E2",
|
|
||||||
"]+ c #DEDEDE",
|
|
||||||
"^+ c #0E36BE",
|
|
||||||
"/+ c #EAEEEE",
|
|
||||||
"(+ c #F6F2F6",
|
|
||||||
"_+ c #727276",
|
|
||||||
":+ c #525252",
|
|
||||||
"<+ c #D2D2D2",
|
|
||||||
"[+ c #424242",
|
|
||||||
"}+ c #C2C2C6",
|
|
||||||
"|+ c #C6C6C6",
|
|
||||||
"1+ c #86868A",
|
|
||||||
"2+ c #929292",
|
|
||||||
"3+ c #626262",
|
|
||||||
"4+ c #CECECE",
|
|
||||||
"5+ c #4A4A4E",
|
|
||||||
"6+ c #7E7E82",
|
|
||||||
"7+ c #A2A2A6",
|
|
||||||
"8+ c #8E8E92",
|
|
||||||
"9+ c #BABABE",
|
|
||||||
"0+ c #3E3E42",
|
|
||||||
"a+ c #4E4E52",
|
|
||||||
"b+ c #5E5E5E",
|
|
||||||
"c+ c #AEAEAE",
|
|
||||||
"d+ c #E6E6E6",
|
|
||||||
"e+ c #9E9E9E",
|
|
||||||
"f+ c #666666",
|
|
||||||
"g+ c #B2B2B2",
|
|
||||||
"h+ c #FAFAFA",
|
|
||||||
"i+ c #D6D6D6",
|
|
||||||
"j+ c #06060A",
|
|
||||||
"k+ c #B6B6B6",
|
|
||||||
"l+ c #1E1E22",
|
|
||||||
"m+ c #BEBEC2",
|
|
||||||
"n+ c #225AC2",
|
|
||||||
"o+ c #DADADA",
|
|
||||||
"p+ c #96CAEE",
|
|
||||||
"q+ c #AAAAAE",
|
|
||||||
" 3.D S v., P c.R )+:+[ h Z.Z.) 7 ",
|
|
||||||
"v.<+!+]+s.s.s.s.s.s.s.s.s.;.U.1.a ",
|
|
||||||
"3+!+c.]+s.s.s.s.s.s.s.s. +!.B i - 8.8. ",
|
|
||||||
"v.o+]+n.s.s.s.s.p.W.<.i+X F.x .T.2+; 8. ",
|
|
||||||
"3.s.s.s.s.s.9 ).^ )+2.)+M a O Z ~.;+2+8. ",
|
|
||||||
"P s.s.s.s.s.W [+3.'+#+4+J.R J I.T ^ 2+8. ",
|
|
||||||
"b+ +s.s.9 W D <+ +H.% [.n./+h.M {.G ^ 8. ",
|
|
||||||
"{.s.s.s.(.)+<+s.s.G.# 2 a.-.m c+6.f+^ 8. ",
|
|
||||||
"M s.s.p.G ^. +s.s.,+> > &.r i..+$+)+V 8. ",
|
|
||||||
"h s.s.).[+<+s.s.s.y.~ j.h.@.]._.; U V 8. ",
|
|
||||||
"h s. +).4.<+s y._ e r.}.@.j 0 ).:.7 V 8. ",
|
|
||||||
"D.h+ +P.`._._ F.S.{ A n+4 8 ! f.k.7 G 8. ",
|
|
||||||
"D.9 9 4+D.).U.l c 8 =.! g I 3 (.V U v.8. ",
|
|
||||||
"D.p.p.l.G V @+q 1 n | : 5 e.k c+2.[ 3.8. ",
|
|
||||||
"D.9 p.R./ [ $.> w.Y q.p c+L.$._+Q.g.S 8. ",
|
|
||||||
"O.m.%.'.*.+.:+e+4+_.P.m+$.c+, 7 @ = d.8. ",
|
|
||||||
"[+Q # C w f -+U M v.8+^.P 5+6.+ & :+h v ",
|
|
||||||
"[+++' |.F {+=+J.^ D.o.J )+!+7.< 7 {.:+$ ",
|
|
||||||
"[+` {+{+B.H f K <+P.(.(.g+k+h.N , 6.{.:+ ",
|
|
||||||
"4.{+B.5.~ x.6 t _.C.'+'+#+'+P.}+k.:+E.b+:+ ",
|
|
||||||
"0+{+{+z b.b * ,.E '+'+'+|+}+P.P.;+P b+7 {.)+ ",
|
|
||||||
"8.j+. >.l+6.E.y y y E.U 6.6.J >+7 4.V >.o.{.:+ ",
|
|
||||||
" . I.e+e+:.-+7.; k.u u ;+V !+G v.!+8. 7 {.v ",
|
|
||||||
" 8.E.E.E.Y.E.E.Y.#.Y.Y.E.U U Y.U J 8. Q. "};
|
|
Before Width: | Height: | Size: 1.4 KiB |
@@ -1,34 +0,0 @@
|
|||||||
/* XPM */
|
|
||||||
static char * resicon_xpm[] = {
|
|
||||||
"16 16 15 1",
|
|
||||||
" c None",
|
|
||||||
". c #400000",
|
|
||||||
"+ c #800000",
|
|
||||||
"@ c #808080",
|
|
||||||
"# c #404040",
|
|
||||||
"$ c #FF0000",
|
|
||||||
"% c #FFFFFF",
|
|
||||||
"& c #000040",
|
|
||||||
"* c #000080",
|
|
||||||
"= c #0000FF",
|
|
||||||
"- c #808000",
|
|
||||||
"; c #003000",
|
|
||||||
"> c #006000",
|
|
||||||
", c #FFFF00",
|
|
||||||
"' c #00BF00",
|
|
||||||
".++.@@@@@@@@@@@#",
|
|
||||||
"+$$+%%%%%%%%%%%@",
|
|
||||||
"+$$+%%%%%%%%%%%@",
|
|
||||||
"+$$+%%%%%%%%%%%@",
|
|
||||||
"#@@#@@@@@@@@@&*&",
|
|
||||||
"@%%@%%%%%%%%%*=*",
|
|
||||||
"@%%@%%%%%%%%%*=*",
|
|
||||||
"@%%@%%%%%%%%%#@#",
|
|
||||||
"@%%@%%%%%%%%%@%@",
|
|
||||||
"@%%@%%%%%%%%%@%@",
|
|
||||||
"@%%@%%%%%%%%%@%@",
|
|
||||||
"@%%@%%%%%%%%%@%@",
|
|
||||||
"@%%@------;>>@%@",
|
|
||||||
"@%%@,,,,,,>''@%@",
|
|
||||||
"@%%@,,,,,,>''@%@",
|
|
||||||
"#@@#------;>>#@#"};
|
|
Before Width: | Height: | Size: 1.6 KiB |
@@ -1,222 +0,0 @@
|
|||||||
/* XPM */
|
|
||||||
static char * save_xpm[] = {
|
|
||||||
"24 24 195 2",
|
|
||||||
" c None",
|
|
||||||
". c #2B2B3B",
|
|
||||||
"+ c #3F3F55",
|
|
||||||
"@ c #9191DF",
|
|
||||||
"# c #51516D",
|
|
||||||
"$ c #A4A4DF",
|
|
||||||
"% c #B2B2FF",
|
|
||||||
"& c #47479C",
|
|
||||||
"* c #525252",
|
|
||||||
"= c #28283B",
|
|
||||||
"- c #9C9CEF",
|
|
||||||
"; c #5252B0",
|
|
||||||
"> c #F2F2F2",
|
|
||||||
", c #E7E7E7",
|
|
||||||
"' c #585858",
|
|
||||||
") c #373755",
|
|
||||||
"! c #9292DF",
|
|
||||||
"~ c #9494EF",
|
|
||||||
"{ c #6969BE",
|
|
||||||
"] c #DDDDED",
|
|
||||||
"^ c #DFDFDF",
|
|
||||||
"/ c #EEEEEE",
|
|
||||||
"( c #24243B",
|
|
||||||
"_ c #8989DF",
|
|
||||||
": c #9E9EFF",
|
|
||||||
"< c #4E4EAF",
|
|
||||||
"[ c #C6C6D6",
|
|
||||||
"} c #FAFAFA",
|
|
||||||
"| c #D6D6D6",
|
|
||||||
"1 c #21213B",
|
|
||||||
"2 c #9292FF",
|
|
||||||
"3 c #8181EF",
|
|
||||||
"4 c #4C4CB0",
|
|
||||||
"5 c #F3F3F3",
|
|
||||||
"6 c #FFFFFF",
|
|
||||||
"7 c #DCDCDC",
|
|
||||||
"8 c #F0F0F0",
|
|
||||||
"9 c #FDFDFD",
|
|
||||||
"0 c #2C2C55",
|
|
||||||
"a c #7777DF",
|
|
||||||
"b c #8989FF",
|
|
||||||
"c c #4444C0",
|
|
||||||
"d c #BFBFDF",
|
|
||||||
"e c #EFEFEF",
|
|
||||||
"f c #FEFEFE",
|
|
||||||
"g c #E6E6E6",
|
|
||||||
"h c #1D1D3B",
|
|
||||||
"i c #6E6EDF",
|
|
||||||
"j c #7F7FFF",
|
|
||||||
"k c #6E6EEF",
|
|
||||||
"l c #4747B0",
|
|
||||||
"m c #FBFBFB",
|
|
||||||
"n c #D7D7D7",
|
|
||||||
"o c #19193B",
|
|
||||||
"p c #7373FF",
|
|
||||||
"q c #5F5FE7",
|
|
||||||
"r c #4444B0",
|
|
||||||
"s c #DFDFEF",
|
|
||||||
"t c #DBDBDB",
|
|
||||||
"u c #34344C",
|
|
||||||
"v c #222255",
|
|
||||||
"w c #5B5BDF",
|
|
||||||
"x c #6969FF",
|
|
||||||
"y c #5050DF",
|
|
||||||
"z c #7E7ED7",
|
|
||||||
"A c #5555A7",
|
|
||||||
"B c #5B5BEF",
|
|
||||||
"C c #5959C0",
|
|
||||||
"D c #ECECEC",
|
|
||||||
"E c #4646BF",
|
|
||||||
"F c #2B2B6D",
|
|
||||||
"G c #16163B",
|
|
||||||
"H c #5353DF",
|
|
||||||
"I c #6060FF",
|
|
||||||
"J c #4E4EE7",
|
|
||||||
"K c #5454A8",
|
|
||||||
"L c #B3B3BB",
|
|
||||||
"M c #9494A9",
|
|
||||||
"N c #5353EF",
|
|
||||||
"O c #4141B0",
|
|
||||||
"P c #E0E0E0",
|
|
||||||
"Q c #CFCFE7",
|
|
||||||
"R c #4343C0",
|
|
||||||
"S c #5959F7",
|
|
||||||
"T c #1382C7",
|
|
||||||
"U c #000060",
|
|
||||||
"V c #101C3C",
|
|
||||||
"W c #4A63F8",
|
|
||||||
"X c #4545E7",
|
|
||||||
"Y c #54549C",
|
|
||||||
"Z c #A8A8B7",
|
|
||||||
"` c #3232A1",
|
|
||||||
" . c #4949CF",
|
|
||||||
".. c #9798B2",
|
|
||||||
"+. c #5454FF",
|
|
||||||
"@. c #3E3EB0",
|
|
||||||
"#. c #2424B8",
|
|
||||||
"$. c #4A63F7",
|
|
||||||
"%. c #108CD4",
|
|
||||||
"&. c #0000C5",
|
|
||||||
"*. c #000052",
|
|
||||||
"=. c #001934",
|
|
||||||
"-. c #1445C8",
|
|
||||||
";. c #5151A7",
|
|
||||||
">. c #3F3FAD",
|
|
||||||
",. c #3636E7",
|
|
||||||
"'. c #656BD2",
|
|
||||||
"). c #9FA1BC",
|
|
||||||
"!. c #BFBFBF",
|
|
||||||
"~. c #3939DF",
|
|
||||||
"{. c #4A4AFF",
|
|
||||||
"]. c #4040EF",
|
|
||||||
"^. c #5151C0",
|
|
||||||
"/. c #3A3ABF",
|
|
||||||
"(. c #415AF8",
|
|
||||||
"_. c #1477D9",
|
|
||||||
":. c #0019D0",
|
|
||||||
"<. c #00005C",
|
|
||||||
"[. c #B3B3D3",
|
|
||||||
"}. c #A5A8BA",
|
|
||||||
"|. c #474ECB",
|
|
||||||
"1. c #5A62D2",
|
|
||||||
"2. c #B1B4BD",
|
|
||||||
"3. c #5050A8",
|
|
||||||
"4. c #3434E7",
|
|
||||||
"5. c #4040FF",
|
|
||||||
"6. c #3737EF",
|
|
||||||
"7. c #3B3BB0",
|
|
||||||
"8. c #8F8FD7",
|
|
||||||
"9. c #3737C0",
|
|
||||||
"0. c #3C3CF7",
|
|
||||||
"a. c #0D89D4",
|
|
||||||
"b. c #000056",
|
|
||||||
"c. c #666666",
|
|
||||||
"d. c #E1E1E1",
|
|
||||||
"e. c #A5AABE",
|
|
||||||
"f. c #A7A9B3",
|
|
||||||
"g. c #B3B3B3",
|
|
||||||
"h. c #A8A8B0",
|
|
||||||
"i. c #4444A4",
|
|
||||||
"j. c #0000A0",
|
|
||||||
"k. c #2B2BE7",
|
|
||||||
"l. c #3434FF",
|
|
||||||
"m. c #2E47F7",
|
|
||||||
"n. c #0A86D4",
|
|
||||||
"o. c #757575",
|
|
||||||
"p. c #D5D5D5",
|
|
||||||
"q. c #A8A8A8",
|
|
||||||
"r. c #4141A0",
|
|
||||||
"s. c #0303DF",
|
|
||||||
"t. c #0202FF",
|
|
||||||
"u. c #0606BF",
|
|
||||||
"v. c #2121DF",
|
|
||||||
"w. c #2B2BFF",
|
|
||||||
"x. c #263FF8",
|
|
||||||
"y. c #0C6FD9",
|
|
||||||
"z. c #DEDEDE",
|
|
||||||
"A. c #9C9C9C",
|
|
||||||
"B. c #46468E",
|
|
||||||
"C. c #0808E7",
|
|
||||||
"D. c #0707FF",
|
|
||||||
"E. c #0505FF",
|
|
||||||
"F. c #0202DF",
|
|
||||||
"G. c #1111C0",
|
|
||||||
"H. c #2121FF",
|
|
||||||
"I. c #0783D4",
|
|
||||||
"J. c #CBCBD2",
|
|
||||||
"K. c #393996",
|
|
||||||
"L. c #0D0DE7",
|
|
||||||
"M. c #0D0DFF",
|
|
||||||
"N. c #0C0CFF",
|
|
||||||
"O. c #0808B8",
|
|
||||||
"P. c #132CF7",
|
|
||||||
"Q. c #0480D4",
|
|
||||||
"R. c #404060",
|
|
||||||
"S. c #0536B1",
|
|
||||||
"T. c #112AF8",
|
|
||||||
"U. c #1111FF",
|
|
||||||
"V. c #0C0CDF",
|
|
||||||
"W. c #0404BF",
|
|
||||||
"X. c #0A23F8",
|
|
||||||
"Y. c #0467D9",
|
|
||||||
"Z. c #001988",
|
|
||||||
"`. c #1111E7",
|
|
||||||
" + c #0202C0",
|
|
||||||
".+ c #0101F7",
|
|
||||||
"++ c #017DD4",
|
|
||||||
"@+ c #00009D",
|
|
||||||
"#+ c #000C9C",
|
|
||||||
"$+ c #0031F0",
|
|
||||||
"%+ c #007CD4",
|
|
||||||
"&+ c #001B6A",
|
|
||||||
"*+ c #0068C2",
|
|
||||||
"=+ c #000230",
|
|
||||||
"-+ c #000032",
|
|
||||||
" . ",
|
|
||||||
" + @ # ",
|
|
||||||
" . $ % & * ",
|
|
||||||
" = % - ; > , ' ",
|
|
||||||
" ) ! ~ { ] ^ / , * ",
|
|
||||||
" ( _ : < [ > } ^ > | * ",
|
|
||||||
" 1 2 3 4 5 6 7 8 9 7 > , ' ",
|
|
||||||
" 0 a b c d ^ e 6 ^ / f ^ e g * ",
|
|
||||||
" h i j j k l m ^ 5 m ^ e } ^ 5 n * ",
|
|
||||||
" o p p p q p p r s 7 5 6 7 > 9 t 5 , u ",
|
|
||||||
" v w x y z A y x B C s ^ e 6 ^ D f , d E F ",
|
|
||||||
"G H I J K L M K J I N O m P 5 m ^ 5 Q R S T U ",
|
|
||||||
"V W X Y Z ` ...Y X +.+.@.s 7 5 6 Q #.$.%.&.*. ",
|
|
||||||
"=.-.;.Z >.,.'.).!.;.~.{.].^.s , d /.(._.:.*. ",
|
|
||||||
" <.[.}.|.1.2.!.!.L 3.4.5.6.7.8.9.0.a.:.b. ",
|
|
||||||
" c.d.e.f.g.g.g.h.i.j.k.l.l.l.m.n.&.*. ",
|
|
||||||
" o.p.g.q.q.q.r.s.t.u.v.w.x.y.:.*. ",
|
|
||||||
" o.z.A.A.B.C.D.E.F.G.H.I.:.b. ",
|
|
||||||
" c.J.K.L.M.N.C.O.P.Q.&.*. ",
|
|
||||||
" R.S.T.U.V.W.X.Y.:.*. ",
|
|
||||||
" Z.Q.`. +.+++:.b. ",
|
|
||||||
" @+#+$+%+&.*. ",
|
|
||||||
" &+*+:.*. ",
|
|
||||||
" =+-+ "};
|
|
Before Width: | Height: | Size: 198 B |
@@ -1,20 +0,0 @@
|
|||||||
/* XPM */
|
|
||||||
static char * unused_xpm[] = {
|
|
||||||
"16 16 1 1",
|
|
||||||
" c None",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" "};
|
|
Before Width: | Height: | Size: 198 B |
@@ -1,21 +0,0 @@
|
|||||||
/* XPM */
|
|
||||||
static char * used_xpm[] = {
|
|
||||||
"16 16 2 1",
|
|
||||||
" c None",
|
|
||||||
". c #000000",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" . ",
|
|
||||||
" ... ",
|
|
||||||
" .... ",
|
|
||||||
" .... ",
|
|
||||||
" .. .... ",
|
|
||||||
" ....... ",
|
|
||||||
" ..... ",
|
|
||||||
" ... ",
|
|
||||||
" . ",
|
|
||||||
" ",
|
|
||||||
" ",
|
|
||||||
" "};
|
|
Before Width: | Height: | Size: 318 B |
@@ -1,22 +0,0 @@
|
|||||||
/* XPM */
|
|
||||||
static char * vsizer_xpm[] = {
|
|
||||||
"16 16 3 1",
|
|
||||||
" c None",
|
|
||||||
". c #000000",
|
|
||||||
"+ c #FF0000",
|
|
||||||
" . ",
|
|
||||||
" ... ",
|
|
||||||
" ..+.. ",
|
|
||||||
" ..+++.. ",
|
|
||||||
" ..+++++.. ",
|
|
||||||
" .+++. ",
|
|
||||||
" .+++. ",
|
|
||||||
" .+++. ",
|
|
||||||
" .+++. ",
|
|
||||||
" .+++. ",
|
|
||||||
" .+++. ",
|
|
||||||
" ..+++++.. ",
|
|
||||||
" ..+++.. ",
|
|
||||||
" ..+.. ",
|
|
||||||
" ... ",
|
|
||||||
" . "};
|
|
@@ -1,3 +0,0 @@
|
|||||||
node break
|
|
||||||
type normal
|
|
||||||
derived from menu_item
|
|
@@ -1,6 +0,0 @@
|
|||||||
node control
|
|
||||||
abstract
|
|
||||||
icon 0
|
|
||||||
derived from window
|
|
||||||
derived from panel_item
|
|
||||||
derived from toolbar_item
|
|
@@ -1,3 +0,0 @@
|
|||||||
# anything that may be placed into menu
|
|
||||||
node menu_item
|
|
||||||
abstract
|
|
@@ -1,7 +0,0 @@
|
|||||||
# don't delete this file!
|
|
||||||
# it servers as helper df for notebook pages
|
|
||||||
|
|
||||||
node notebookpage
|
|
||||||
type notebookpage
|
|
||||||
var label of text
|
|
||||||
var selected of bool
|
|
@@ -1,4 +0,0 @@
|
|||||||
# anything that may be placed into panel
|
|
||||||
node panel_item
|
|
||||||
abstract
|
|
||||||
derived from sizer_item
|
|
@@ -1,9 +0,0 @@
|
|||||||
# base "class" for panel and dialog
|
|
||||||
node panelbase
|
|
||||||
type panel
|
|
||||||
icon 1
|
|
||||||
childtype panel_item
|
|
||||||
abstract
|
|
||||||
var style of flags wxNO_3D,wxTAB_TRAVERSAL,wxCLIP_CHILDREN
|
|
||||||
var exstyle of flags wxWS_EX_VALIDATE_RECURSIVELY
|
|
||||||
derived from window
|
|
@@ -1,5 +0,0 @@
|
|||||||
node separator
|
|
||||||
icon 0
|
|
||||||
type normal
|
|
||||||
derived from menu_item
|
|
||||||
derived from toolbar_item
|
|
@@ -1,4 +0,0 @@
|
|||||||
# anything that may be placed into sizer
|
|
||||||
node sizer_item
|
|
||||||
abstract
|
|
||||||
|
|
@@ -1,9 +0,0 @@
|
|||||||
# don't delete this file!
|
|
||||||
# it servers as helper df for sizer items
|
|
||||||
|
|
||||||
node sizeritem
|
|
||||||
type sizeritem
|
|
||||||
var option of integer
|
|
||||||
var flag of flags wxEXPAND,wxALL,wxLEFT,wxRIGHT,wxTOP,wxBOTTOM,wxALIGN_CENTER,wxALIGN_LEFT,wxALIGN_TOP,wxALIGN_RIGHT,wxALIGN_BOTTOM,wxALIGN_CENTER_HORIZONTAL,wxALIGN_CENTER_VERTICAL,wxNORTH,wxSOUTH,wxEAST,wxWEST,wxGROW,wxSHAPED,wxSTRETCH_NOT
|
|
||||||
var border of dimension
|
|
||||||
var minsize of coord
|
|
@@ -1,10 +0,0 @@
|
|||||||
# don't delete this file!
|
|
||||||
# it servers as helper df for sizer items
|
|
||||||
|
|
||||||
node spacer
|
|
||||||
type normal
|
|
||||||
var option of integer
|
|
||||||
var flag of flags wxEXPAND,wxALL,wxLEFT,wxRIGHT,wxTOP,wxBOTTOM,wxALIGN_CENTER,wxALIGN_LEFT,wxALIGN_TOP,wxALIGN_RIGHT,wxALIGN_BOTTOM,wxALIGN_CENTER_HORIZONTAL,wxALIGN_CENTER_VERTICAL,wxNORTH,wxSOUTH,wxEAST,wxWEST,wxGROW,wxSHAPED,wxSTRETCH_NOT
|
|
||||||
var border of dimension
|
|
||||||
var size of coord
|
|
||||||
derived from sizer_item
|
|
@@ -1,10 +0,0 @@
|
|||||||
node tool
|
|
||||||
type normal
|
|
||||||
icon 0
|
|
||||||
var bitmap of imagefile
|
|
||||||
var bitmap2 of imagefile
|
|
||||||
var toggle of bool
|
|
||||||
var pos of coord
|
|
||||||
var tooltip of text
|
|
||||||
var longhelp of text
|
|
||||||
derived from toolbar_item
|
|
@@ -1,3 +0,0 @@
|
|||||||
# anything that may be placed into toolbar
|
|
||||||
node toolbar_item
|
|
||||||
abstract
|
|
@@ -1,4 +0,0 @@
|
|||||||
node unknown
|
|
||||||
var id of integer
|
|
||||||
var name of text
|
|
||||||
derived from control
|
|
@@ -1,12 +0,0 @@
|
|||||||
node window
|
|
||||||
type normal
|
|
||||||
abstract
|
|
||||||
var pos of coord
|
|
||||||
var size of coord
|
|
||||||
var style of flags wxSIMPLE_BORDER,wxSUNKEN_BORDER,wxDOUBLE_BORDER,wxRAISED_BORDER,wxSTATIC_BORDER,wxTRANSPARENT_WINDOW,wxWANTS_CHARS,wxNO_FULL_REPAINT_ON_RESIZE
|
|
||||||
var tooltip of text
|
|
||||||
var fg of color
|
|
||||||
var bg of color
|
|
||||||
var enabled of bool
|
|
||||||
var focused of bool
|
|
||||||
var hidden of bool
|
|
@@ -1,8 +0,0 @@
|
|||||||
node wxBitmapButton
|
|
||||||
var style of flags wxBU_AUTODRAW,wxBU_LEFT,wxBU_RIGHT,wxBU_TOP,wxBU_BOTTOM
|
|
||||||
var default of bool
|
|
||||||
var bitmap of imagefile
|
|
||||||
var selected of imagefile
|
|
||||||
var focus of imagefile
|
|
||||||
var disabled of imagefile
|
|
||||||
derived from control
|
|
@@ -1,7 +0,0 @@
|
|||||||
node wxBoxSizer
|
|
||||||
type sizer
|
|
||||||
icon 0
|
|
||||||
childtype sizer_item
|
|
||||||
derived from panel_item
|
|
||||||
var orient of choice wxHORIZONTAL,wxVERTICAL
|
|
||||||
var minsize of coord
|
|
@@ -1,4 +0,0 @@
|
|||||||
node wxButton
|
|
||||||
var label of text
|
|
||||||
var default of bool
|
|
||||||
derived from control
|
|
@@ -1,3 +0,0 @@
|
|||||||
node wxCalendarCtrl
|
|
||||||
var style of flags wxCAL_SUNDAY_FIRST,wxCAL_MONDAY_FIRST,wxCAL_SHOW_HOLIDAYS,wxCAL_NO_YEAR_CHANGE,wxCAL_NO_MONTH_CHANGE
|
|
||||||
derived from control
|
|
@@ -1,4 +0,0 @@
|
|||||||
node wxCheckBox
|
|
||||||
var label of text
|
|
||||||
var checked of bool
|
|
||||||
derived from control
|
|
@@ -1,3 +0,0 @@
|
|||||||
node wxCheckList
|
|
||||||
var content of not_implemented
|
|
||||||
derived from control
|
|
@@ -1,5 +0,0 @@
|
|||||||
node wxChoice
|
|
||||||
var style of flags wxCB_SORT
|
|
||||||
var selection of integer
|
|
||||||
var content of not_implemented
|
|
||||||
derived from control
|
|
@@ -1,6 +0,0 @@
|
|||||||
node wxComboBox
|
|
||||||
var style of flags wxCB_SIMPLE,wxCB_SORT,wxCB_READONLY,wxCB_DROPDOWN
|
|
||||||
var value of text
|
|
||||||
var selection of integer
|
|
||||||
var content of not_implemented
|
|
||||||
derived from control
|
|
@@ -1,5 +0,0 @@
|
|||||||
node wxDialog
|
|
||||||
var title of text
|
|
||||||
var style of flags wxSTAY_ON_TOP,wxCAPTION,wxDEFAULT_DIALOG_STYLE,wxTHICK_FRAME,wxSYSTEM_MENU,wxRESIZE_BORDER,wxRESIZE_BOX,wxDIALOG_MODAL,wxDIALOG_MODELESS
|
|
||||||
var centered of bool
|
|
||||||
derived from panelbase
|
|
@@ -1,13 +0,0 @@
|
|||||||
node wxFlexGridSizer
|
|
||||||
type sizer
|
|
||||||
icon 4
|
|
||||||
childtype sizer_item
|
|
||||||
derived from panel_item
|
|
||||||
var rows of integer
|
|
||||||
var cols of integer
|
|
||||||
var vgap of dimension
|
|
||||||
var hgap of dimension
|
|
||||||
var minsize of coord
|
|
||||||
var growablecols of text
|
|
||||||
var growablerows of text
|
|
||||||
|
|
@@ -1,8 +0,0 @@
|
|||||||
node wxFrame
|
|
||||||
type panel
|
|
||||||
icon 1
|
|
||||||
var title of text
|
|
||||||
var style of flags wxSTAY_ON_TOP,wxCAPTION,wxDEFAULT_FRAME_STYLE,wxSYSTEM_MENU,wxRESIZE_BORDER,wxICONIZE,wxMINIMIZE,wxMINIMIZE_BOX,wxMAXIMIZE,wxMAXIMIZE_BOX,wxSIMPLE_BORDER,wxFRAME_TOOL_WINDOW,wxFRAME_NO_TASKBAR,wxFRAME_FLOAT_ON_PARENT
|
|
||||||
var exstyle of flags wxFRAME_EX_CONTEXTHELP
|
|
||||||
var centered of bool
|
|
||||||
derived from panelbase
|
|
@@ -1,7 +0,0 @@
|
|||||||
node wxGauge
|
|
||||||
var style of flags wxGA_HORIZONTAL,wxGA_VERTICAL,wxGA_PROGRESSBAR,wxGA_SMOOTH
|
|
||||||
var range of integer
|
|
||||||
var value of integer
|
|
||||||
var shadow of dimension
|
|
||||||
var bezel of dimension
|
|
||||||
derived from control
|
|
@@ -1,6 +0,0 @@
|
|||||||
node wxGenericDirCtrl
|
|
||||||
var defaultfolder of text
|
|
||||||
var filter of text
|
|
||||||
var defaultfilter of integer
|
|
||||||
var style of flags wxDIRCTRL_DIR_ONLY,wxDIRCTRL_3D_INTERNAL,wxDIRCTRL_SELECT_FIRST,wxDIRCTRL_SHOW_FILTERS
|
|
||||||
derived from control
|
|
@@ -1,10 +0,0 @@
|
|||||||
node wxGridSizer
|
|
||||||
type sizer
|
|
||||||
icon 4
|
|
||||||
childtype sizer_item
|
|
||||||
derived from panel_item
|
|
||||||
var rows of integer
|
|
||||||
var cols of integer
|
|
||||||
var vgap of dimension
|
|
||||||
var hgap of dimension
|
|
||||||
var minsize of coord
|
|
@@ -1,6 +0,0 @@
|
|||||||
node wxHtmlWindow
|
|
||||||
var url of text
|
|
||||||
var htmlcode of text
|
|
||||||
var borders of dimension
|
|
||||||
var style of flags wxHW_SCROLLBAR_NEVER,wxHW_SCROLLBAR_AUTO
|
|
||||||
derived from control
|
|
@@ -1,5 +0,0 @@
|
|||||||
node wxListBox
|
|
||||||
var style of flags wxLB_SINGLE,wxLB_MULTIPLE,wxLB_EXTENDED,wxLB_HSCROLL,wxLB_ALWAYS_SB,wxLB_NEEDED_SB,wxLB_SORT
|
|
||||||
var selection of integer
|
|
||||||
var content of not_implemented
|
|
||||||
derived from control
|
|
@@ -1,3 +0,0 @@
|
|||||||
node wxListCtrl
|
|
||||||
var style of flags wxLC_LIST,wxLC_REPORT,wxLC_REPORT,wxLC_ICON,wxLC_SMALL_ICON,wxLC_ALIGN_TOP,wxLC_ALIGN_LEFT,wxLC_AUTOARRANGE,wxLC_USER_TEXT,wxLC_EDIT_LABELS,wxLC_NO_HEADER,wxLC_SINGLE_SEL,wxLC_SORT_ASCENDING,wxLC_SORT_DESCENDING
|
|
||||||
derived from control
|
|
@@ -1,8 +0,0 @@
|
|||||||
node wxMenu
|
|
||||||
type panel
|
|
||||||
icon 0
|
|
||||||
childtype menu_item
|
|
||||||
var label of text
|
|
||||||
var style of flags wxMENU_TEAROFF
|
|
||||||
var help of text
|
|
||||||
derived from menu_item
|
|
@@ -1,5 +0,0 @@
|
|||||||
node wxMenuBar
|
|
||||||
type panel
|
|
||||||
icon 0
|
|
||||||
childtype wxMenu
|
|
||||||
var style of flags wxMB_DOCKABLE
|
|
@@ -1,11 +0,0 @@
|
|||||||
node wxMenuItem
|
|
||||||
type normal
|
|
||||||
icon 0
|
|
||||||
var label of text
|
|
||||||
var accel of text
|
|
||||||
var help of text
|
|
||||||
var checkable of bool
|
|
||||||
var checked of bool
|
|
||||||
var enabled of bool
|
|
||||||
var bitmap of imagefile
|
|
||||||
derived from menu_item
|
|
@@ -1,6 +0,0 @@
|
|||||||
node wxNotebook
|
|
||||||
type notebook
|
|
||||||
var style of flags wxNB_FIXEDWIDTH,wxNB_LEFT,wxNB_RIGHT,wxNB_BOTTOM
|
|
||||||
var usenotebooksizer of bool
|
|
||||||
childtype wxPanel
|
|
||||||
derived from control
|
|
@@ -1,3 +0,0 @@
|
|||||||
node wxPanel
|
|
||||||
derived from panel_item
|
|
||||||
derived from panelbase
|
|
@@ -1,7 +0,0 @@
|
|||||||
node wxRadioBox
|
|
||||||
var style of flags wxRA_SPECIFY_COLS,wxRA_HORIZONTAL,wxRA_SPECIFY_ROWS,wxRA_VERTICAL
|
|
||||||
var label of text
|
|
||||||
var dimension of integer
|
|
||||||
var selection of integer
|
|
||||||
var content of not_implemented
|
|
||||||
derived from control
|
|
@@ -1,5 +0,0 @@
|
|||||||
node wxRadioButton
|
|
||||||
var label of text
|
|
||||||
var value of bool
|
|
||||||
var style of flags wxRB_GROUP
|
|
||||||
derived from control
|
|
@@ -1,7 +0,0 @@
|
|||||||
node wxScrollBar
|
|
||||||
var style of flags wxSB_HORIZONTAL,wxSB_VERTICAL
|
|
||||||
var value of integer
|
|
||||||
var thumbsize of integer
|
|
||||||
var range of integer
|
|
||||||
var pagesize of integer
|
|
||||||
derived from control
|
|
@@ -1,13 +0,0 @@
|
|||||||
node wxSlider
|
|
||||||
var value of integer
|
|
||||||
var min of integer
|
|
||||||
var max of integer
|
|
||||||
var style of flags wxSL_HORIZONTAL,wxSL_VERTICAL,wxSL_AUTOTICKS,wxSL_LABELS,wxSL_LEFT,wxSL_TOP,wxSL_RIGHT,wxSL_BOTTOM,wxSL_BOTH,wxSL_SELRANGE
|
|
||||||
var tickfreq of integer
|
|
||||||
var pagesize of integer
|
|
||||||
var linesize of integer
|
|
||||||
var thumb of integer
|
|
||||||
var tick of integer
|
|
||||||
var selmin of integer
|
|
||||||
var selmax of integer
|
|
||||||
derived from control
|
|
@@ -1,6 +0,0 @@
|
|||||||
node wxSpinButton
|
|
||||||
var style of flags wxSP_HORIZONTAL,wxSP_VERTICAL,wxSP_ARROW_KEYS,wxSP_WRAP
|
|
||||||
var value of integer
|
|
||||||
var min of integer
|
|
||||||
var max of integer
|
|
||||||
derived from control
|
|
@@ -1,6 +0,0 @@
|
|||||||
node wxSpinCtrl
|
|
||||||
var style of flags wxSP_HORIZONTAL,wxSP_VERTICAL,wxSP_ARROW_KEYS,wxSP_WRAP
|
|
||||||
var value of integer
|
|
||||||
var min of integer
|
|
||||||
var max of integer
|
|
||||||
derived from control
|
|
@@ -1,3 +0,0 @@
|
|||||||
node wxStaticBitmap
|
|
||||||
var bitmap of imagefile
|
|
||||||
derived from control
|
|
@@ -1,3 +0,0 @@
|
|||||||
node wxStaticBox
|
|
||||||
var label of text
|
|
||||||
derived from control
|
|
@@ -1,4 +0,0 @@
|
|||||||
node wxStaticBoxSizer
|
|
||||||
derived from wxBoxSizer
|
|
||||||
var label of text
|
|
||||||
var minsize of coord
|
|
@@ -1,3 +0,0 @@
|
|||||||
node wxStaticLine
|
|
||||||
var style of flags wxLI_HORIZONTAL,wxLI_VERTICAL
|
|
||||||
derived from control
|
|
@@ -1,3 +0,0 @@
|
|||||||
node wxStaticText
|
|
||||||
var label of text
|
|
||||||
derived from control
|
|
@@ -1,4 +0,0 @@
|
|||||||
node wxTextCtrl
|
|
||||||
var value of text
|
|
||||||
var style of flags wxTE_PROCESS_ENTER,wxTE_PROCESS_TAB,wxTE_MULTILINE,wxTE_PASSWORD,wxTE_READONLY,wxHSCROLL
|
|
||||||
derived from control
|
|
@@ -1,11 +0,0 @@
|
|||||||
node wxToolBar
|
|
||||||
type panel
|
|
||||||
icon 0
|
|
||||||
childtype toolbar_item
|
|
||||||
var style of flags wxTB_FLAT,wxTB_DOCKABLE,wxTB_VERTICAL,wxTB_HORIZONTAL
|
|
||||||
var bitmapsize of coord
|
|
||||||
var pos of coord
|
|
||||||
var size of coord
|
|
||||||
var margins of coord
|
|
||||||
var packing of integer
|
|
||||||
var separation of integer
|
|
@@ -1,3 +0,0 @@
|
|||||||
node wxTreeCtrl
|
|
||||||
var style of flags wxTR_HAS_BUTTONS,wxTR_EDIT_LABELS,wxTR_MULTIPLE
|
|
||||||
derived from control
|
|
@@ -1,61 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Purpose: XML resources editor
|
|
||||||
// Author: Vaclav Slavik
|
|
||||||
// Created: 2000/05/05
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) 2000 Vaclav Slavik
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
||||||
#pragma implementation
|
|
||||||
#pragma interface
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx/wx.h".
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// for all others, include the necessary headers (this file is usually all you
|
|
||||||
// need because it includes almost all "standard" wxWidgets headers
|
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/xml/xml.h"
|
|
||||||
#include "wx/image.h"
|
|
||||||
#include "wx/wx.h"
|
|
||||||
|
|
||||||
#include "editor.h"
|
|
||||||
#include "preview.h"
|
|
||||||
#include "propframe.h"
|
|
||||||
|
|
||||||
|
|
||||||
// -- Application
|
|
||||||
|
|
||||||
class MyApp : public wxApp
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
virtual bool OnInit();
|
|
||||||
};
|
|
||||||
|
|
||||||
IMPLEMENT_APP(MyApp)
|
|
||||||
|
|
||||||
|
|
||||||
bool MyApp::OnInit()
|
|
||||||
{
|
|
||||||
SetVendorName(wxT("wxWidgets"));
|
|
||||||
SetAppName(wxT("wxrcedit"));
|
|
||||||
wxString arg = (argc >= 1) ? argv[1] : _T("");
|
|
||||||
wxInitAllImageHandlers();
|
|
||||||
wxFrame *frame = new EditorFrame(NULL, arg);
|
|
||||||
SetTopWindow(frame);
|
|
||||||
frame->Show(true);
|
|
||||||
PreviewFrame::Get()->Show(true);
|
|
||||||
PropertiesFrame::Get()->Show(true);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
@@ -1,806 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Author: Vaclav Slavik
|
|
||||||
// Created: 2000/05/05
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) 2000 Vaclav Slavik
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma implementation "editor.h"
|
|
||||||
#pragma implementation "treedt.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx/wx.h".
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#include "wx/xml/xml.h"
|
|
||||||
#include "wx/xrc/xmlres.h"
|
|
||||||
#include "wx/splitter.h"
|
|
||||||
#include "wx/config.h"
|
|
||||||
#include "wx/dir.h"
|
|
||||||
#include "wx/listctrl.h"
|
|
||||||
#include "wx/imaglist.h"
|
|
||||||
|
|
||||||
#include "treedt.h"
|
|
||||||
#include "editor.h"
|
|
||||||
#include "nodehnd.h"
|
|
||||||
#include "xmlhelpr.h"
|
|
||||||
#include "preview.h"
|
|
||||||
#include "propframe.h"
|
|
||||||
|
|
||||||
|
|
||||||
void wxXmlRcEditDocument::UpgradeNodeValue(wxXmlNode *node)
|
|
||||||
{
|
|
||||||
wxXmlNode *n = node;
|
|
||||||
if (n == NULL) return;
|
|
||||||
n = n->GetChildren();
|
|
||||||
|
|
||||||
while (n)
|
|
||||||
{
|
|
||||||
if (n->GetType() == wxXML_TEXT_NODE ||
|
|
||||||
n->GetType() == wxXML_CDATA_SECTION_NODE)
|
|
||||||
{
|
|
||||||
wxString str1 = n->GetContent();
|
|
||||||
const wxChar *dt;
|
|
||||||
|
|
||||||
for (dt = str1.c_str(); *dt; dt++)
|
|
||||||
{
|
|
||||||
// Remap amp_char to &, map double amp_char to amp_char (for things
|
|
||||||
// like "&File..." -- this is illegal in XML, so we use "_File..."):
|
|
||||||
if (*dt == '$')
|
|
||||||
{
|
|
||||||
if ( *(++dt) != '$' )
|
|
||||||
str1[size_t(dt-str1.c_str()-1)] = '_';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
n->SetContent(str1);
|
|
||||||
}
|
|
||||||
n = n->GetNext();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxXmlRcEditDocument::UpgradeNode(wxXmlNode *node)
|
|
||||||
{
|
|
||||||
if (node)
|
|
||||||
{
|
|
||||||
UpgradeNodeValue(node);
|
|
||||||
UpgradeNode(node->GetNext());
|
|
||||||
UpgradeNode(node->GetChildren());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxXmlRcEditDocument::Upgrade()
|
|
||||||
{
|
|
||||||
int v1,v2,v3,v4;
|
|
||||||
long version;
|
|
||||||
wxXmlNode *node = GetRoot();
|
|
||||||
wxString verstr = wxT("0.0.0.0");
|
|
||||||
node->GetPropVal(wxT("version"),verstr);
|
|
||||||
if (wxSscanf(verstr.c_str(), wxT("%i.%i.%i.%i"),
|
|
||||||
&v1, &v2, &v3, &v4) == 4)
|
|
||||||
version = v1*256*256*256+v2*256*256+v3*256+v4;
|
|
||||||
else
|
|
||||||
version = 0;
|
|
||||||
if (!version)
|
|
||||||
{
|
|
||||||
UpgradeNode(node);
|
|
||||||
}
|
|
||||||
node->DeleteProperty(wxT("version"));
|
|
||||||
node->AddProperty(wxT("version"), WX_XMLRES_CURRENT_VERSION_STRING);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class EditorTreeCtrl : public wxTreeCtrl
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
EditorTreeCtrl(wxWindow *parent, int id, EditorFrame *frame)
|
|
||||||
: wxTreeCtrl(parent, id), m_EdFrame(frame) {}
|
|
||||||
|
|
||||||
private:
|
|
||||||
EditorFrame *m_EdFrame;
|
|
||||||
|
|
||||||
void OnRightClick(wxMouseEvent &event)
|
|
||||||
{
|
|
||||||
wxTreeItemId item =
|
|
||||||
m_EdFrame->m_TreeCtrl->HitTest(event.GetPosition());
|
|
||||||
if (item.IsOk())
|
|
||||||
{
|
|
||||||
m_EdFrame->m_TreeCtrl->SelectItem(item);
|
|
||||||
m_EdFrame->OnRightClickTree(event.GetPosition());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(EditorTreeCtrl, wxTreeCtrl)
|
|
||||||
EVT_RIGHT_DOWN(EditorTreeCtrl::OnRightClick)
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
ID_PREVIEW = wxID_HIGHEST + 100,
|
|
||||||
ID_NEW,
|
|
||||||
ID_OPEN,
|
|
||||||
ID_CLOSE,
|
|
||||||
ID_SAVE,
|
|
||||||
ID_SAVEAS,
|
|
||||||
ID_DELETE_NODE,
|
|
||||||
ID_EXIT,
|
|
||||||
ID_TREE,
|
|
||||||
|
|
||||||
ID_CUT,
|
|
||||||
ID_PASTE_SYBLING,
|
|
||||||
ID_PASTE_CHILD,
|
|
||||||
ID_COPY,
|
|
||||||
|
|
||||||
ID_NEWDIALOG,
|
|
||||||
ID_NEWFRAME,
|
|
||||||
ID_NEWPANEL,
|
|
||||||
ID_NEWMENU,
|
|
||||||
ID_NEWMENUBAR,
|
|
||||||
ID_NEWTOOLBAR,
|
|
||||||
ID_NEWNODE = wxID_HIGHEST + 10000, // safely out of XRCID range :)
|
|
||||||
ID_NEWSYBNODE = ID_NEWNODE + 20000
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(EditorFrame, wxFrame)
|
|
||||||
EVT_TREE_SEL_CHANGED(ID_TREE, EditorFrame::OnTreeSel)
|
|
||||||
EVT_TOOL_RANGE(ID_PREVIEW, ID_EXIT, EditorFrame::OnToolbar)
|
|
||||||
EVT_MENU_RANGE(ID_NEWDIALOG, ID_NEWSYBNODE + 1000, EditorFrame::OnNewNode)
|
|
||||||
EVT_MENU_RANGE(ID_CUT, ID_COPY, EditorFrame::OnClipboardAction)
|
|
||||||
EVT_CLOSE(EditorFrame::OnCloseWindow)
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(__UNIX__)
|
|
||||||
#include "bitmaps/preview.xpm"
|
|
||||||
#include "bitmaps/close.xpm"
|
|
||||||
#include "bitmaps/save.xpm"
|
|
||||||
#include "bitmaps/open.xpm"
|
|
||||||
|
|
||||||
#include "bitmaps/control.xpm"
|
|
||||||
#include "bitmaps/vsizer.xpm"
|
|
||||||
#include "bitmaps/hsizer.xpm"
|
|
||||||
#include "bitmaps/panel.xpm"
|
|
||||||
#include "bitmaps/gsizer.xpm"
|
|
||||||
#include "bitmaps/resicon.xpm"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
EditorFrame *EditorFrame::ms_Instance = NULL;
|
|
||||||
|
|
||||||
EditorFrame::EditorFrame(wxFrame *parent, const wxString& filename)
|
|
||||||
: wxFrame(parent, wxID_ANY, filename + _("- wxWidgets resources editor"))
|
|
||||||
{
|
|
||||||
ms_Instance = this;
|
|
||||||
|
|
||||||
m_Clipboard = NULL;
|
|
||||||
m_Modified = false;
|
|
||||||
|
|
||||||
wxConfigBase *cfg = wxConfigBase::Get();
|
|
||||||
|
|
||||||
SetSize(wxRect(wxPoint(cfg->Read(_T("editor_x"), wxDefaultCoord), cfg->Read(_T("editor_y"), wxDefaultCoord)),
|
|
||||||
wxSize(cfg->Read(_T("editor_w"), 400), cfg->Read(_T("editor_h"), 400))));
|
|
||||||
|
|
||||||
m_SelectedNode = NULL;
|
|
||||||
m_Resource = NULL;
|
|
||||||
m_FileName = wxEmptyString;
|
|
||||||
|
|
||||||
wxMenu *menuFile = new wxMenu;
|
|
||||||
menuFile->Append(ID_NEW, _T("&New"));
|
|
||||||
menuFile->Append(ID_OPEN, _T("&Open\tCtrl-O"));
|
|
||||||
menuFile->Append(ID_SAVE, _T("&Save\tCtrl-S"));
|
|
||||||
menuFile->Append(ID_SAVEAS, _T("Save &as..."));
|
|
||||||
menuFile->AppendSeparator();
|
|
||||||
menuFile->Append(ID_EXIT, _T("E&xit\tAlt-X"));
|
|
||||||
|
|
||||||
wxMenu *menuEdit = new wxMenu;
|
|
||||||
menuEdit->Append(ID_CUT, _T("Cut\tCtrl-X"));
|
|
||||||
menuEdit->Append(ID_COPY, _T("Copy\tCtrl-C"));
|
|
||||||
menuEdit->Append(ID_PASTE_SYBLING, _T("Paste as sybling\tCtrl-V"));
|
|
||||||
menuEdit->Append(ID_PASTE_CHILD, _T("Paste as child"));
|
|
||||||
menuEdit->AppendSeparator();
|
|
||||||
menuEdit->Append(ID_DELETE_NODE, _T("Delete"));
|
|
||||||
|
|
||||||
menuEdit->Enable(ID_PASTE_SYBLING, false);
|
|
||||||
menuEdit->Enable(ID_PASTE_CHILD, false);
|
|
||||||
|
|
||||||
wxMenuBar *menuBar = new wxMenuBar();
|
|
||||||
menuBar->Append(menuFile, _T("&File"));
|
|
||||||
menuBar->Append(menuEdit, _T("&Edit"));
|
|
||||||
SetMenuBar(menuBar);
|
|
||||||
|
|
||||||
// Create toolbar:
|
|
||||||
wxToolBar *toolBar = CreateToolBar(wxNO_BORDER | wxTB_HORIZONTAL | wxTB_FLAT);
|
|
||||||
toolBar->SetMargins(2, 2);
|
|
||||||
toolBar->SetToolBitmapSize(wxSize(24, 24));
|
|
||||||
toolBar -> AddTool(ID_EXIT, wxBITMAP(close), wxNullBitmap,
|
|
||||||
false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL,
|
|
||||||
_("Quit the editor"));
|
|
||||||
toolBar -> AddTool(ID_OPEN, wxBITMAP(open), wxNullBitmap,
|
|
||||||
false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL,
|
|
||||||
_("Open XML resource file"));
|
|
||||||
toolBar -> AddTool(ID_SAVE, wxBITMAP(save), wxNullBitmap,
|
|
||||||
false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL,
|
|
||||||
_("Save XML file"));
|
|
||||||
toolBar -> AddTool(ID_PREVIEW, wxBITMAP(preview), wxNullBitmap,
|
|
||||||
false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL,
|
|
||||||
_("Preview"));
|
|
||||||
toolBar -> Realize();
|
|
||||||
|
|
||||||
wxSizer *sizer = new wxBoxSizer(wxHORIZONTAL);
|
|
||||||
|
|
||||||
// Create tree control:
|
|
||||||
m_TreeCtrl = new EditorTreeCtrl(this, ID_TREE, this);
|
|
||||||
wxImageList *imgList = new wxImageList(16, 16);
|
|
||||||
imgList->Add(wxICON(control));
|
|
||||||
imgList->Add(wxICON(panel));
|
|
||||||
imgList->Add(wxICON(vsizer));
|
|
||||||
imgList->Add(wxICON(hsizer));
|
|
||||||
imgList->Add(wxICON(gsizer));
|
|
||||||
imgList->Add(wxICON(resicon));
|
|
||||||
m_TreeCtrl->AssignImageList(imgList);
|
|
||||||
sizer->Add(m_TreeCtrl, 1, wxEXPAND);
|
|
||||||
|
|
||||||
SetSizer(sizer);
|
|
||||||
|
|
||||||
// Load file:
|
|
||||||
if (!filename)
|
|
||||||
NewFile();
|
|
||||||
else
|
|
||||||
LoadFile(filename);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
EditorFrame::~EditorFrame()
|
|
||||||
{
|
|
||||||
PreviewFrame::Get()->Close();
|
|
||||||
PropertiesFrame::Get()->Close();
|
|
||||||
|
|
||||||
wxConfigBase *cfg = wxConfigBase::Get();
|
|
||||||
|
|
||||||
cfg->Write(_T("editor_x"), (long)GetPosition().x);
|
|
||||||
cfg->Write(_T("editor_y"), (long)GetPosition().y);
|
|
||||||
cfg->Write(_T("editor_w"), (long)GetSize().x);
|
|
||||||
cfg->Write(_T("editor_h"), (long)GetSize().y);
|
|
||||||
|
|
||||||
delete m_Clipboard;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void EditorFrame::LoadFile(const wxString& filename)
|
|
||||||
{
|
|
||||||
if (!AskToSave()) return;
|
|
||||||
|
|
||||||
delete m_Resource;
|
|
||||||
|
|
||||||
// create new resource in order to handle version differences properly
|
|
||||||
PreviewFrame::Get()->ResetResource();
|
|
||||||
|
|
||||||
m_FileName = wxEmptyString;
|
|
||||||
m_Resource = new wxXmlRcEditDocument;
|
|
||||||
m_Modified = false;
|
|
||||||
|
|
||||||
if (!m_Resource->Load(filename, wxLocale::GetSystemEncodingName()))
|
|
||||||
{
|
|
||||||
delete m_Resource;
|
|
||||||
m_Resource = NULL;
|
|
||||||
NewFile();
|
|
||||||
wxLogError(_T("Error parsing ") + filename);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_FileName = filename;
|
|
||||||
|
|
||||||
// Upgrades old versions
|
|
||||||
m_Resource->Upgrade();
|
|
||||||
RefreshTree();
|
|
||||||
}
|
|
||||||
RefreshTitle();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void EditorFrame::SaveFile(const wxString& filename)
|
|
||||||
{
|
|
||||||
m_FileName = filename;
|
|
||||||
|
|
||||||
// save it:
|
|
||||||
if (!m_Resource->Save(filename))
|
|
||||||
wxLogError(_("Error saving ") + filename);
|
|
||||||
else
|
|
||||||
m_Modified = false;
|
|
||||||
|
|
||||||
RefreshTitle();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void EditorFrame::NewFile()
|
|
||||||
{
|
|
||||||
if (!AskToSave()) return;
|
|
||||||
|
|
||||||
delete m_Resource;
|
|
||||||
|
|
||||||
m_FileName = wxEmptyString;
|
|
||||||
m_Resource = new wxXmlRcEditDocument;
|
|
||||||
m_Resource->SetRoot(new wxXmlNode(wxXML_ELEMENT_NODE, _("resource")));
|
|
||||||
|
|
||||||
m_Resource->SetFileEncoding(_T("utf-8"));
|
|
||||||
#if !wxUSE_UNICODE
|
|
||||||
m_Resource->SetEncoding(wxLocale::GetSystemEncodingName());
|
|
||||||
#endif
|
|
||||||
|
|
||||||
m_Resource->GetRoot()->AddProperty(_T("version"),
|
|
||||||
WX_XMLRES_CURRENT_VERSION_STRING);
|
|
||||||
|
|
||||||
m_Modified = false;
|
|
||||||
RefreshTree();
|
|
||||||
RefreshTitle();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void EditorFrame::RefreshTitle()
|
|
||||||
{
|
|
||||||
wxString s;
|
|
||||||
if (m_Modified) s << _T("* ");
|
|
||||||
s << _("wxrcedit");
|
|
||||||
if (m_FileName != wxEmptyString)
|
|
||||||
s << _T(" - ") << wxFileNameFromPath(m_FileName);
|
|
||||||
SetTitle(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void EditorFrame::RefreshTree()
|
|
||||||
{
|
|
||||||
wxXmlNode *sel = m_SelectedNode;
|
|
||||||
|
|
||||||
m_TreeCtrl->DeleteAllItems();
|
|
||||||
|
|
||||||
wxTreeItemId root = m_TreeCtrl->AddRoot(_T("Resource: ") + wxFileNameFromPath(m_FileName), 5, 5);
|
|
||||||
|
|
||||||
wxXmlNode *n = m_Resource->GetRoot()->GetChildren();
|
|
||||||
while (n)
|
|
||||||
{
|
|
||||||
if (n->GetType() == wxXML_ELEMENT_NODE)
|
|
||||||
CreateTreeNode(m_TreeCtrl, root, n);
|
|
||||||
n = n->GetNext();
|
|
||||||
}
|
|
||||||
|
|
||||||
m_TreeCtrl->Expand(root);
|
|
||||||
SelectNode(sel);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void RecursivelyExpand(wxTreeCtrl *t, wxTreeItemId item)
|
|
||||||
{
|
|
||||||
t->Expand(item);
|
|
||||||
void* cookie;
|
|
||||||
wxTreeItemId id = t->GetFirstChild(item, cookie);
|
|
||||||
while (id.IsOk())
|
|
||||||
{
|
|
||||||
RecursivelyExpand(t, id);
|
|
||||||
id = t->GetNextChild(item, cookie);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool EditorFrame::SelectNode(wxXmlNode *node, wxTreeItemId *root)
|
|
||||||
{
|
|
||||||
if (root == NULL)
|
|
||||||
{
|
|
||||||
wxTreeItemId rootitem = m_TreeCtrl->GetRootItem();
|
|
||||||
return SelectNode(node, &rootitem);
|
|
||||||
}
|
|
||||||
|
|
||||||
wxTreeItemId item;
|
|
||||||
XmlTreeData *dt;
|
|
||||||
wxXmlNode *nd;
|
|
||||||
void* cookie;
|
|
||||||
|
|
||||||
item = m_TreeCtrl->GetFirstChild(*root, cookie);
|
|
||||||
while (item.IsOk())
|
|
||||||
{
|
|
||||||
dt = (XmlTreeData*)(m_TreeCtrl->GetItemData(item));
|
|
||||||
nd = (dt) ? dt->Node : NULL;
|
|
||||||
if (nd == node)
|
|
||||||
{
|
|
||||||
RecursivelyExpand(m_TreeCtrl, *root);
|
|
||||||
m_TreeCtrl->SelectItem(item);
|
|
||||||
m_TreeCtrl->EnsureVisible(item);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (m_TreeCtrl->ItemHasChildren(item) && SelectNode(node, &item))
|
|
||||||
return true;
|
|
||||||
item = m_TreeCtrl->GetNextChild(*root, cookie);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wxTreeItemId EditorFrame::CreateTreeNode(wxTreeCtrl *treectrl, wxTreeItemId parent, wxXmlNode *node)
|
|
||||||
{
|
|
||||||
if (!node)
|
|
||||||
{
|
|
||||||
wxTreeItemId invalid;
|
|
||||||
return invalid;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NodeHandler::Find(node)->CreateTreeNode(treectrl, parent, node);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void EditorFrame::NotifyChanged(int change_type)
|
|
||||||
{
|
|
||||||
if (change_type & CHANGED_TREE)
|
|
||||||
RefreshTree();
|
|
||||||
|
|
||||||
if (change_type & CHANGED_TREE_SELECTED)
|
|
||||||
{
|
|
||||||
wxTreeItemId sel = m_TreeCtrl->GetSelection();
|
|
||||||
m_TreeCtrl->SetItemText(sel,
|
|
||||||
NodeHandler::Find(m_SelectedNode)->GetTreeString(m_SelectedNode));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (change_type & CHANGED_TREE_SELECTED_ICON)
|
|
||||||
{
|
|
||||||
wxTreeItemId sel = m_TreeCtrl->GetSelection();
|
|
||||||
int icon = NodeHandler::Find(m_SelectedNode)->GetTreeIcon(m_SelectedNode);
|
|
||||||
m_TreeCtrl->SetItemImage(sel, icon);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!m_Modified)
|
|
||||||
{
|
|
||||||
m_Modified = true;
|
|
||||||
RefreshTitle();
|
|
||||||
}
|
|
||||||
|
|
||||||
PreviewFrame::Get()->MakeDirty();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void EditorFrame::OnTreeSel(wxTreeEvent& event)
|
|
||||||
{
|
|
||||||
XmlTreeData *dt = (XmlTreeData*)(m_TreeCtrl->GetItemData(event.GetItem()));
|
|
||||||
wxXmlNode *node = (dt) ? dt->Node : NULL;
|
|
||||||
|
|
||||||
m_SelectedNode = node;
|
|
||||||
if (node)
|
|
||||||
PropertiesFrame::Get()->ShowProps(node);
|
|
||||||
|
|
||||||
if (m_TreeCtrl->GetItemParent(event.GetItem()) == m_TreeCtrl->GetRootItem())
|
|
||||||
{
|
|
||||||
wxTreeItemId it = event.GetOldItem();
|
|
||||||
|
|
||||||
if (it.IsOk() && m_TreeCtrl->GetRootItem() != it)
|
|
||||||
{
|
|
||||||
while (m_TreeCtrl->GetItemParent(it) != m_TreeCtrl->GetRootItem())
|
|
||||||
it = m_TreeCtrl->GetItemParent(it);
|
|
||||||
m_TreeCtrl->Collapse(it);
|
|
||||||
}
|
|
||||||
RecursivelyExpand(m_TreeCtrl, event.GetItem());
|
|
||||||
|
|
||||||
PreviewFrame::Get()->Preview(node,m_Resource);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void EditorFrame::OnToolbar(wxCommandEvent& event)
|
|
||||||
{
|
|
||||||
switch (event.GetId())
|
|
||||||
{
|
|
||||||
case ID_PREVIEW :
|
|
||||||
{
|
|
||||||
XmlTreeData* dt = (XmlTreeData*)m_TreeCtrl->GetItemData(m_TreeCtrl->GetSelection());;
|
|
||||||
if (dt != NULL && dt->Node != NULL)
|
|
||||||
PreviewFrame::Get()->Preview(dt->Node, m_Resource);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case ID_EXIT :
|
|
||||||
Close(true);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ID_NEW :
|
|
||||||
NewFile();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ID_OPEN :
|
|
||||||
{
|
|
||||||
wxString cwd = wxGetCwd(); // workaround for 2.2
|
|
||||||
wxString name = wxFileSelector(_("Open XML resource"), wxEmptyString, wxEmptyString, wxEmptyString, _("XML resources (*.xrc)|*.xrc"), wxOPEN | wxFILE_MUST_EXIST);
|
|
||||||
wxSetWorkingDirectory(cwd);
|
|
||||||
if (!name.IsEmpty())
|
|
||||||
LoadFile(name);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case ID_SAVE :
|
|
||||||
if (m_FileName != wxEmptyString) { SaveFile(m_FileName); break;}
|
|
||||||
// else go to SAVEAS
|
|
||||||
|
|
||||||
case ID_SAVEAS :
|
|
||||||
{
|
|
||||||
wxString cwd = wxGetCwd(); // workaround for 2.2
|
|
||||||
wxString name = wxFileSelector(_("Save as"), wxEmptyString, m_FileName, wxEmptyString, _("XML resources (*.xrc)|*.xrc"), wxSAVE | wxOVERWRITE_PROMPT);
|
|
||||||
wxSetWorkingDirectory(cwd);
|
|
||||||
if (!name.IsEmpty())
|
|
||||||
SaveFile((m_FileName = name));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case ID_DELETE_NODE :
|
|
||||||
{
|
|
||||||
DeleteSelectedNode();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void EditorFrame::DeleteSelectedNode()
|
|
||||||
{
|
|
||||||
XmlTreeData *dt = (XmlTreeData*)
|
|
||||||
(m_TreeCtrl->GetItemData(m_TreeCtrl->GetItemParent(m_TreeCtrl->GetSelection())));
|
|
||||||
wxXmlNode *n = (dt) ? dt->Node : NULL;
|
|
||||||
|
|
||||||
m_SelectedNode->GetParent()->RemoveChild(m_SelectedNode);
|
|
||||||
NotifyChanged(CHANGED_TREE);
|
|
||||||
SelectNode(n);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void EditorFrame::OnNewNode(wxCommandEvent& event)
|
|
||||||
{
|
|
||||||
if (event.GetId() >= ID_NEWSYBNODE)
|
|
||||||
{
|
|
||||||
XmlTreeData *pardt =
|
|
||||||
(XmlTreeData*)(m_TreeCtrl->GetItemData(
|
|
||||||
m_TreeCtrl->GetItemParent(m_TreeCtrl->GetSelection())));
|
|
||||||
|
|
||||||
if (pardt && pardt->Node && pardt->Node != m_Resource->GetRoot())
|
|
||||||
{
|
|
||||||
wxXmlNode *nd = pardt->Node;
|
|
||||||
|
|
||||||
wxXmlNode *realnode = NodeHandler::Find(nd)->GetRealNode(nd);
|
|
||||||
NodeHandler *hnd = NodeHandler::Find(realnode);
|
|
||||||
wxString name = hnd->GetChildTypes()[event.GetId()-ID_NEWSYBNODE];
|
|
||||||
|
|
||||||
wxXmlNode *node = new wxXmlNode(wxXML_ELEMENT_NODE, _T("object"));
|
|
||||||
node->AddProperty(_T("class"), name);
|
|
||||||
|
|
||||||
hnd->InsertNode(realnode, node, m_SelectedNode);
|
|
||||||
wxTreeItemId root = m_TreeCtrl->GetSelection();
|
|
||||||
SelectNode(node, &root);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
else if (event.GetId() >= ID_NEWNODE)
|
|
||||||
{
|
|
||||||
wxXmlNode *realnode = NodeHandler::Find(m_SelectedNode)->GetRealNode(m_SelectedNode);
|
|
||||||
NodeHandler *hnd = NodeHandler::Find(realnode);
|
|
||||||
wxString name = hnd->GetChildTypes()[event.GetId()-ID_NEWNODE];
|
|
||||||
|
|
||||||
wxXmlNode *node = new wxXmlNode(wxXML_ELEMENT_NODE, _T("object"));
|
|
||||||
node->AddProperty(_T("class"), name);
|
|
||||||
|
|
||||||
hnd->InsertNode(realnode, node);
|
|
||||||
wxTreeItemId root = m_TreeCtrl->GetSelection();
|
|
||||||
SelectNode(node, &root);
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
wxString name;
|
|
||||||
switch (event.GetId())
|
|
||||||
{
|
|
||||||
case ID_NEWDIALOG : name = _T("wxDialog"); break;
|
|
||||||
case ID_NEWFRAME : name = _T("wxFrame"); break;
|
|
||||||
case ID_NEWPANEL : name = _T("wxPanel"); break;
|
|
||||||
case ID_NEWMENU : name = _T("wxMenu"); break;
|
|
||||||
case ID_NEWMENUBAR : name = _T("wxMenuBar"); break;
|
|
||||||
case ID_NEWTOOLBAR : name = _T("wxToolBar"); break;
|
|
||||||
default : return; // never occurs
|
|
||||||
}
|
|
||||||
|
|
||||||
wxXmlNode *node = new wxXmlNode(wxXML_ELEMENT_NODE, _T("object"));
|
|
||||||
node->AddProperty(_T("class"), name);
|
|
||||||
m_Resource->GetRoot()->AddChild(node);
|
|
||||||
NotifyChanged(CHANGED_TREE);
|
|
||||||
SelectNode(node);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void EditorFrame::OnRightClickTree(wxPoint pos)
|
|
||||||
{
|
|
||||||
wxMenu *popup = new wxMenu;
|
|
||||||
|
|
||||||
if (m_SelectedNode == NULL || m_SelectedNode == m_Resource->GetRoot())
|
|
||||||
{
|
|
||||||
popup->Append(ID_NEWDIALOG, _("New wxDialog"));
|
|
||||||
popup->Append(ID_NEWFRAME, _("New wxFrame"));
|
|
||||||
popup->Append(ID_NEWPANEL, _("New wxPanel"));
|
|
||||||
popup->Append(ID_NEWMENU, _("New wxMenu"));
|
|
||||||
popup->Append(ID_NEWMENUBAR, _("New wxMenuBar"));
|
|
||||||
popup->Append(ID_NEWTOOLBAR, _("New wxToolBar"));
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
bool has_children;
|
|
||||||
{
|
|
||||||
wxArrayString& arr =
|
|
||||||
NodeHandler::Find(NodeHandler::Find(m_SelectedNode)->GetRealNode(m_SelectedNode))->
|
|
||||||
GetChildTypes();
|
|
||||||
|
|
||||||
has_children = !arr.IsEmpty();
|
|
||||||
if (!arr.IsEmpty())
|
|
||||||
{
|
|
||||||
wxMenu *news = new wxMenu;
|
|
||||||
wxMenu *news2 = news;
|
|
||||||
for (size_t i = 0; i < arr.GetCount(); i++)
|
|
||||||
{
|
|
||||||
news2->Append(i + ID_NEWNODE, arr[i]);
|
|
||||||
#ifdef __WXGTK__ // doesn't support Break
|
|
||||||
if (i % 20 == 19)
|
|
||||||
{
|
|
||||||
wxMenu *m = new wxMenu;
|
|
||||||
news2->Append(ID_NEWNODE+arr.GetCount(), _("More..."), m);
|
|
||||||
news2 = m;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if (i % 16 == 15) news2->Break();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
popup->Append(ID_NEWNODE-1, _("New child"), news);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
XmlTreeData *pardt =
|
|
||||||
(XmlTreeData*)(m_TreeCtrl->GetItemData(
|
|
||||||
m_TreeCtrl->GetItemParent(m_TreeCtrl->GetSelection())));
|
|
||||||
if (pardt && pardt->Node && pardt->Node != m_Resource->GetRoot())
|
|
||||||
{
|
|
||||||
wxXmlNode *nd = pardt->Node;
|
|
||||||
wxArrayString& arr =
|
|
||||||
NodeHandler::Find(NodeHandler::Find(nd)->GetRealNode(nd))->
|
|
||||||
GetChildTypes();
|
|
||||||
|
|
||||||
if (!arr.IsEmpty())
|
|
||||||
{
|
|
||||||
wxMenu *news = new wxMenu;
|
|
||||||
wxMenu *news2 = news;
|
|
||||||
for (size_t i = 0; i < arr.GetCount(); i++)
|
|
||||||
{
|
|
||||||
news2->Append(i + ID_NEWSYBNODE, arr[i]);
|
|
||||||
#ifdef __WXGTK__ // doesn't support Break
|
|
||||||
if (i % 20 == 19)
|
|
||||||
{
|
|
||||||
wxMenu *m = new wxMenu;
|
|
||||||
news2->Append(ID_NEWSYBNODE+arr.GetCount(), _("More..."), m);
|
|
||||||
news2 = m;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if (i % 16 == 15) news2->Break();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
popup->Append(ID_NEWSYBNODE-1, _("New sybling"), news);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
popup->AppendSeparator();
|
|
||||||
popup->Append(ID_CUT, _("Cut"));
|
|
||||||
popup->Append(ID_COPY, _("Copy"));
|
|
||||||
popup->Append(ID_PASTE_SYBLING, _("Paste as sybling"));
|
|
||||||
popup->Append(ID_PASTE_CHILD, _("Paste as child"));
|
|
||||||
popup->AppendSeparator();
|
|
||||||
popup->Append(ID_DELETE_NODE, _("Delete"));
|
|
||||||
popup->Enable(ID_PASTE_SYBLING, m_Clipboard != NULL);
|
|
||||||
popup->Enable(ID_PASTE_CHILD, has_children && m_Clipboard != NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_TreeCtrl->PopupMenu(popup, pos);
|
|
||||||
delete popup;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void EditorFrame::OnClipboardAction(wxCommandEvent& event)
|
|
||||||
{
|
|
||||||
switch (event.GetId())
|
|
||||||
{
|
|
||||||
case ID_COPY:
|
|
||||||
case ID_CUT:
|
|
||||||
delete m_Clipboard;
|
|
||||||
m_Clipboard = new wxXmlNode(*m_SelectedNode);
|
|
||||||
GetMenuBar()->Enable(ID_PASTE_SYBLING, true);
|
|
||||||
GetMenuBar()->Enable(ID_PASTE_CHILD, true);
|
|
||||||
if (event.GetId() == ID_CUT) DeleteSelectedNode();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ID_PASTE_SYBLING:
|
|
||||||
{
|
|
||||||
XmlTreeData *pardt =
|
|
||||||
(XmlTreeData*)(m_TreeCtrl->GetItemData(
|
|
||||||
m_TreeCtrl->GetItemParent(m_TreeCtrl->GetSelection())));
|
|
||||||
|
|
||||||
if (pardt && pardt->Node && pardt->Node != m_Resource->GetRoot())
|
|
||||||
{
|
|
||||||
wxXmlNode *nd = pardt->Node;
|
|
||||||
|
|
||||||
wxXmlNode *realnode = NodeHandler::Find(nd)->GetRealNode(nd);
|
|
||||||
NodeHandler *hnd = NodeHandler::Find(realnode);
|
|
||||||
wxXmlNode *node = new wxXmlNode(*m_Clipboard);
|
|
||||||
hnd->InsertNode(realnode, node, m_SelectedNode);
|
|
||||||
wxTreeItemId root = m_TreeCtrl->GetSelection();
|
|
||||||
SelectNode(node, &root);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ID_PASTE_CHILD:
|
|
||||||
wxXmlNode *realnode = NodeHandler::Find(m_SelectedNode)->GetRealNode(m_SelectedNode);
|
|
||||||
NodeHandler *hnd = NodeHandler::Find(realnode);
|
|
||||||
wxXmlNode *node = new wxXmlNode(*m_Clipboard);
|
|
||||||
hnd->InsertNode(realnode, node);
|
|
||||||
wxTreeItemId root = m_TreeCtrl->GetSelection();
|
|
||||||
SelectNode(node, &root);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool EditorFrame::AskToSave()
|
|
||||||
// asks the user to save current document (if modified)
|
|
||||||
// returns false if user cancelled the action, true of he choosed
|
|
||||||
// 'yes' or 'no'
|
|
||||||
{
|
|
||||||
if (!m_Modified) return true;
|
|
||||||
|
|
||||||
int res = wxMessageBox(_("File modified. Do you want to save changes?"), _("Save changes"),
|
|
||||||
wxYES_NO | wxCANCEL | wxCENTRE | wxICON_QUESTION);
|
|
||||||
if (res == wxYES)
|
|
||||||
SaveFile(m_FileName);
|
|
||||||
return (res != wxCANCEL);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void EditorFrame::OnCloseWindow(wxCloseEvent&)
|
|
||||||
{
|
|
||||||
if (!AskToSave()) return;
|
|
||||||
Destroy();
|
|
||||||
}
|
|
@@ -1,113 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Purpose: XML resources editor
|
|
||||||
// Author: Vaclav Slavik
|
|
||||||
// Created: 2000/05/05
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) 2000 Vaclav Slavik
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
||||||
#pragma interface "editor.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _EDITOR_H_
|
|
||||||
#define _EDITOR_H_
|
|
||||||
|
|
||||||
|
|
||||||
#include "wx/frame.h"
|
|
||||||
#include "wx/treectrl.h"
|
|
||||||
#include "wx/imaglist.h"
|
|
||||||
#include "wx/listctrl.h"
|
|
||||||
|
|
||||||
class WXDLLEXPORT wxXmlNode;
|
|
||||||
class WXDLLEXPORT wxTreeCtrl;
|
|
||||||
class WXDLLEXPORT wxScrolledWindow;
|
|
||||||
class WXDLLEXPORT wxSplitterWindow;
|
|
||||||
class NodeHandler;
|
|
||||||
class WXDLLEXPORT wxXmlNode;
|
|
||||||
class WXDLLEXPORT wxXmlDocument;
|
|
||||||
class EditorTreeCtrl;
|
|
||||||
class WXDLLEXPORT wxTreeCtrl;
|
|
||||||
class WXDLLEXPORT wxListCtrl;
|
|
||||||
class WXDLLEXPORT wxTreeItemId;
|
|
||||||
class WXDLLEXPORT wxImageList;
|
|
||||||
class WXDLLEXPORT wxTreeEvent;
|
|
||||||
class WXDLLEXPORT wxListEvent;
|
|
||||||
|
|
||||||
enum ChangeType
|
|
||||||
{
|
|
||||||
CHANGED_NOTHING = 0,
|
|
||||||
CHANGED_TREE = 1,
|
|
||||||
CHANGED_TREE_SELECTED = 2,
|
|
||||||
CHANGED_TREE_SELECTED_ICON = 4,
|
|
||||||
CHANGED_PROPS = 8,
|
|
||||||
CHANGED_PROPS_PANEL = 16,
|
|
||||||
CHANGED_EVERYTHING = CHANGED_TREE | CHANGED_PROPS | CHANGED_PROPS_PANEL,
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class wxXmlRcEditDocument : public wxXmlDocument
|
|
||||||
{
|
|
||||||
// Helper functions for Upgrade()
|
|
||||||
void UpgradeNodeValue(wxXmlNode *node);
|
|
||||||
void UpgradeNode(wxXmlNode *node);
|
|
||||||
|
|
||||||
public:
|
|
||||||
// Upgrades older versions
|
|
||||||
void Upgrade();
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
class EditorFrame : public wxFrame
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
friend class EditorTreeCtrl;
|
|
||||||
|
|
||||||
EditorFrame(wxFrame *parent, const wxString& filename);
|
|
||||||
~EditorFrame();
|
|
||||||
|
|
||||||
void LoadFile(const wxString& filename);
|
|
||||||
void NewFile();
|
|
||||||
void SaveFile(const wxString& filename);
|
|
||||||
wxString GetFileName() { return m_FileName; }
|
|
||||||
|
|
||||||
void RefreshTree();
|
|
||||||
void RefreshTitle();
|
|
||||||
bool SelectNode(wxXmlNode *node, wxTreeItemId *root = NULL);
|
|
||||||
|
|
||||||
wxTreeItemId CreateTreeNode(wxTreeCtrl *treectrl, wxTreeItemId parent, wxXmlNode *node);
|
|
||||||
|
|
||||||
void NotifyChanged(int change_type);
|
|
||||||
|
|
||||||
static EditorFrame *Get() { return ms_Instance; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
static EditorFrame *ms_Instance;
|
|
||||||
|
|
||||||
wxTreeCtrl *m_TreeCtrl;
|
|
||||||
|
|
||||||
wxXmlNode *m_SelectedNode;
|
|
||||||
|
|
||||||
wxXmlNode *m_Clipboard;
|
|
||||||
|
|
||||||
wxString m_FileName;
|
|
||||||
wxXmlRcEditDocument *m_Resource;
|
|
||||||
|
|
||||||
bool m_Modified;
|
|
||||||
|
|
||||||
bool AskToSave();
|
|
||||||
void DeleteSelectedNode();
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
void OnTreeSel(wxTreeEvent& event);
|
|
||||||
void OnToolbar(wxCommandEvent& event);
|
|
||||||
void OnNew(wxCommandEvent& event);
|
|
||||||
void OnNewNode(wxCommandEvent& event);
|
|
||||||
void OnRightClickTree(wxPoint pos);
|
|
||||||
void OnClipboardAction(wxCommandEvent& event);
|
|
||||||
void OnCloseWindow(wxCloseEvent&);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
@@ -1,275 +0,0 @@
|
|||||||
# =========================================================================
|
|
||||||
# This makefile was generated by
|
|
||||||
# Bakefile 0.1.8 (http://bakefile.sourceforge.net)
|
|
||||||
# Do not modify, all changes will be overwritten!
|
|
||||||
# =========================================================================
|
|
||||||
|
|
||||||
.autodepend
|
|
||||||
|
|
||||||
!ifndef BCCDIR
|
|
||||||
!ifndef MAKEDIR
|
|
||||||
!error Your Borland compiler does not define MAKEDIR. Please define the BCCDIR variable, e.g. BCCDIR=d:\bc4
|
|
||||||
!endif
|
|
||||||
BCCDIR = $(MAKEDIR)\..
|
|
||||||
!endif
|
|
||||||
|
|
||||||
!include ../../../build/msw/config.bcc
|
|
||||||
|
|
||||||
# -------------------------------------------------------------------------
|
|
||||||
# Do not modify the rest of this file!
|
|
||||||
# -------------------------------------------------------------------------
|
|
||||||
|
|
||||||
### Variables: ###
|
|
||||||
|
|
||||||
WX_RELEASE_NODOT = 26
|
|
||||||
OBJS = \
|
|
||||||
bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
|
|
||||||
LIBDIRNAME = .\..\..\..\lib\bcc_$(LIBTYPE_SUFFIX)$(CFG)
|
|
||||||
SETUPHDIR = \
|
|
||||||
$(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
|
|
||||||
WXRCEDIT_CXXFLAGS = $(__RUNTIME_LIBS_7) -I$(BCCDIR)\include $(__DEBUGINFO) \
|
|
||||||
$(__OPTIMIZEFLAG_2) $(__THREADSFLAG_6) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
|
|
||||||
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
|
|
||||||
$(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\..\include \
|
|
||||||
-I$(SETUPHDIR) -I. $(__DLLFLAG_p) -I.\..\..\..\samples -DNOPCH \
|
|
||||||
-I.\..\..\include $(CPPFLAGS) $(CXXFLAGS)
|
|
||||||
WXRCEDIT_OBJECTS = \
|
|
||||||
$(OBJS)\wxrcedit_edapp.obj \
|
|
||||||
$(OBJS)\wxrcedit_editor.obj \
|
|
||||||
$(OBJS)\wxrcedit_nodehnd.obj \
|
|
||||||
$(OBJS)\wxrcedit_nodesdb.obj \
|
|
||||||
$(OBJS)\wxrcedit_pe_adv.obj \
|
|
||||||
$(OBJS)\wxrcedit_pe_basic.obj \
|
|
||||||
$(OBJS)\wxrcedit_preview.obj \
|
|
||||||
$(OBJS)\wxrcedit_propedit.obj \
|
|
||||||
$(OBJS)\wxrcedit_propframe.obj \
|
|
||||||
$(OBJS)\wxrcedit_splittree.obj \
|
|
||||||
$(OBJS)\wxrcedit_xmlhelpr.obj
|
|
||||||
|
|
||||||
### Conditionally set variables: ###
|
|
||||||
|
|
||||||
!if "$(USE_GUI)" == "0"
|
|
||||||
PORTNAME = base
|
|
||||||
!endif
|
|
||||||
!if "$(USE_GUI)" == "1"
|
|
||||||
PORTNAME = msw
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
|
|
||||||
WXDEBUGFLAG = d
|
|
||||||
!endif
|
|
||||||
!if "$(DEBUG_FLAG)" == "1"
|
|
||||||
WXDEBUGFLAG = d
|
|
||||||
!endif
|
|
||||||
!if "$(UNICODE)" == "1"
|
|
||||||
WXUNICODEFLAG = u
|
|
||||||
!endif
|
|
||||||
!if "$(WXUNIV)" == "1"
|
|
||||||
WXUNIVNAME = univ
|
|
||||||
!endif
|
|
||||||
!if "$(SHARED)" == "1"
|
|
||||||
WXDLLFLAG = dll
|
|
||||||
!endif
|
|
||||||
!if "$(SHARED)" == "0"
|
|
||||||
LIBTYPE_SUFFIX = lib
|
|
||||||
!endif
|
|
||||||
!if "$(SHARED)" == "1"
|
|
||||||
LIBTYPE_SUFFIX = dll
|
|
||||||
!endif
|
|
||||||
!if "$(MONOLITHIC)" == "0"
|
|
||||||
EXTRALIBS_FOR_BASE =
|
|
||||||
!endif
|
|
||||||
!if "$(MONOLITHIC)" == "1"
|
|
||||||
EXTRALIBS_FOR_BASE =
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "debug"
|
|
||||||
__OPTIMIZEFLAG_2 = -Od
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "release"
|
|
||||||
__OPTIMIZEFLAG_2 = -O2
|
|
||||||
!endif
|
|
||||||
!if "$(USE_THREADS)" == "0"
|
|
||||||
__THREADSFLAG_5 =
|
|
||||||
!endif
|
|
||||||
!if "$(USE_THREADS)" == "1"
|
|
||||||
__THREADSFLAG_5 = mt
|
|
||||||
!endif
|
|
||||||
!if "$(USE_THREADS)" == "0"
|
|
||||||
__THREADSFLAG_6 =
|
|
||||||
!endif
|
|
||||||
!if "$(USE_THREADS)" == "1"
|
|
||||||
__THREADSFLAG_6 = -tWM
|
|
||||||
!endif
|
|
||||||
!if "$(RUNTIME_LIBS)" == "dynamic"
|
|
||||||
__RUNTIME_LIBS_7 = -tWR
|
|
||||||
!endif
|
|
||||||
!if "$(RUNTIME_LIBS)" == "static"
|
|
||||||
__RUNTIME_LIBS_7 =
|
|
||||||
!endif
|
|
||||||
!if "$(RUNTIME_LIBS)" == "dynamic"
|
|
||||||
__RUNTIME_LIBS_8 = i
|
|
||||||
!endif
|
|
||||||
!if "$(RUNTIME_LIBS)" == "static"
|
|
||||||
__RUNTIME_LIBS_8 =
|
|
||||||
!endif
|
|
||||||
!if "$(WXUNIV)" == "1"
|
|
||||||
__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
|
|
||||||
!endif
|
|
||||||
!if "$(WXUNIV)" == "1"
|
|
||||||
__WXUNIV_DEFINE_p_1 = -d__WXUNIVERSAL__
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
|
|
||||||
__DEBUG_DEFINE_p = -D__WXDEBUG__
|
|
||||||
!endif
|
|
||||||
!if "$(DEBUG_FLAG)" == "1"
|
|
||||||
__DEBUG_DEFINE_p = -D__WXDEBUG__
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
|
|
||||||
__DEBUG_DEFINE_p_1 = -d__WXDEBUG__
|
|
||||||
!endif
|
|
||||||
!if "$(DEBUG_FLAG)" == "1"
|
|
||||||
__DEBUG_DEFINE_p_1 = -d__WXDEBUG__
|
|
||||||
!endif
|
|
||||||
!if "$(USE_EXCEPTIONS)" == "0"
|
|
||||||
__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
|
|
||||||
!endif
|
|
||||||
!if "$(USE_EXCEPTIONS)" == "0"
|
|
||||||
__EXCEPTIONS_DEFINE_p_1 = -dwxNO_EXCEPTIONS
|
|
||||||
!endif
|
|
||||||
!if "$(USE_RTTI)" == "0"
|
|
||||||
__RTTI_DEFINE_p = -DwxNO_RTTI
|
|
||||||
!endif
|
|
||||||
!if "$(USE_RTTI)" == "0"
|
|
||||||
__RTTI_DEFINE_p_1 = -dwxNO_RTTI
|
|
||||||
!endif
|
|
||||||
!if "$(USE_THREADS)" == "0"
|
|
||||||
__THREAD_DEFINE_p = -DwxNO_THREADS
|
|
||||||
!endif
|
|
||||||
!if "$(USE_THREADS)" == "0"
|
|
||||||
__THREAD_DEFINE_p_1 = -dwxNO_THREADS
|
|
||||||
!endif
|
|
||||||
!if "$(UNICODE)" == "1"
|
|
||||||
__UNICODE_DEFINE_p = -D_UNICODE
|
|
||||||
!endif
|
|
||||||
!if "$(UNICODE)" == "1"
|
|
||||||
__UNICODE_DEFINE_p_1 = -d_UNICODE
|
|
||||||
!endif
|
|
||||||
!if "$(SHARED)" == "1"
|
|
||||||
__DLLFLAG_p = -DWXUSINGDLL
|
|
||||||
!endif
|
|
||||||
!if "$(SHARED)" == "1"
|
|
||||||
__DLLFLAG_p_1 = -dWXUSINGDLL
|
|
||||||
!endif
|
|
||||||
!if "$(MONOLITHIC)" == "0"
|
|
||||||
__WXLIB_XRC_p = \
|
|
||||||
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib
|
|
||||||
!endif
|
|
||||||
!if "$(MONOLITHIC)" == "0"
|
|
||||||
__WXLIB_ADV_p = \
|
|
||||||
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib
|
|
||||||
!endif
|
|
||||||
!if "$(MONOLITHIC)" == "0"
|
|
||||||
__WXLIB_HTML_p = \
|
|
||||||
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib
|
|
||||||
!endif
|
|
||||||
!if "$(MONOLITHIC)" == "0"
|
|
||||||
__WXLIB_CORE_p = \
|
|
||||||
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
|
|
||||||
!endif
|
|
||||||
!if "$(MONOLITHIC)" == "0"
|
|
||||||
__WXLIB_XML_p = \
|
|
||||||
wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib
|
|
||||||
!endif
|
|
||||||
!if "$(MONOLITHIC)" == "0"
|
|
||||||
__WXLIB_BASE_p = \
|
|
||||||
wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
|
|
||||||
!endif
|
|
||||||
!if "$(MONOLITHIC)" == "1"
|
|
||||||
__WXLIB_MONO_p = \
|
|
||||||
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
|
|
||||||
!endif
|
|
||||||
!if "$(USE_GUI)" == "1"
|
|
||||||
__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
|
|
||||||
!endif
|
|
||||||
!if "$(USE_GUI)" == "1"
|
|
||||||
__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
|
|
||||||
!endif
|
|
||||||
!if "$(USE_GUI)" == "1"
|
|
||||||
__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
|
|
||||||
!endif
|
|
||||||
!if "$(MSLU)" == "1"
|
|
||||||
__UNICOWS_LIB_p = unicows.lib
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
|
|
||||||
__DEBUGINFO = -v
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
|
|
||||||
__DEBUGINFO = -v-
|
|
||||||
!endif
|
|
||||||
!if "$(DEBUG_INFO)" == "0"
|
|
||||||
__DEBUGINFO = -v-
|
|
||||||
!endif
|
|
||||||
!if "$(DEBUG_INFO)" == "1"
|
|
||||||
__DEBUGINFO = -v
|
|
||||||
!endif
|
|
||||||
|
|
||||||
|
|
||||||
all: $(OBJS)
|
|
||||||
$(OBJS):
|
|
||||||
-if not exist $(OBJS) mkdir $(OBJS)
|
|
||||||
|
|
||||||
### Targets: ###
|
|
||||||
|
|
||||||
all: $(OBJS)\wxrcedit.exe
|
|
||||||
|
|
||||||
clean:
|
|
||||||
-if exist $(OBJS)\*.obj del $(OBJS)\*.obj
|
|
||||||
-if exist $(OBJS)\*.res del $(OBJS)\*.res
|
|
||||||
-if exist $(OBJS)\*.csm del $(OBJS)\*.csm
|
|
||||||
-if exist $(OBJS)\wxrcedit.exe del $(OBJS)\wxrcedit.exe
|
|
||||||
-if exist $(OBJS)\wxrcedit.tds del $(OBJS)\wxrcedit.tds
|
|
||||||
-if exist $(OBJS)\wxrcedit.ilc del $(OBJS)\wxrcedit.ilc
|
|
||||||
-if exist $(OBJS)\wxrcedit.ild del $(OBJS)\wxrcedit.ild
|
|
||||||
-if exist $(OBJS)\wxrcedit.ilf del $(OBJS)\wxrcedit.ilf
|
|
||||||
-if exist $(OBJS)\wxrcedit.ils del $(OBJS)\wxrcedit.ils
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit.exe: $(WXRCEDIT_OBJECTS) $(OBJS)\wxrcedit_wxrcedit.res
|
|
||||||
ilink32 -Tpe -q $(LDFLAGS) -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&|
|
|
||||||
c0w32.obj $(WXRCEDIT_OBJECTS),$@,, $(__WXLIB_XRC_p) $(__WXLIB_ADV_p) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_XML_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) ole2w32.lib oleacc.lib odbc32.lib import32.lib cw32$(__THREADSFLAG_5)$(__RUNTIME_LIBS_8).lib,, $(OBJS)\wxrcedit_wxrcedit.res
|
|
||||||
|
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_edapp.obj: .\edapp.cpp
|
|
||||||
$(CXX) -q -c -P -o$@ $(WXRCEDIT_CXXFLAGS) $**
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_editor.obj: .\editor.cpp
|
|
||||||
$(CXX) -q -c -P -o$@ $(WXRCEDIT_CXXFLAGS) $**
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_nodehnd.obj: .\nodehnd.cpp
|
|
||||||
$(CXX) -q -c -P -o$@ $(WXRCEDIT_CXXFLAGS) $**
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_nodesdb.obj: .\nodesdb.cpp
|
|
||||||
$(CXX) -q -c -P -o$@ $(WXRCEDIT_CXXFLAGS) $**
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_pe_adv.obj: .\pe_adv.cpp
|
|
||||||
$(CXX) -q -c -P -o$@ $(WXRCEDIT_CXXFLAGS) $**
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_pe_basic.obj: .\pe_basic.cpp
|
|
||||||
$(CXX) -q -c -P -o$@ $(WXRCEDIT_CXXFLAGS) $**
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_preview.obj: .\preview.cpp
|
|
||||||
$(CXX) -q -c -P -o$@ $(WXRCEDIT_CXXFLAGS) $**
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_propedit.obj: .\propedit.cpp
|
|
||||||
$(CXX) -q -c -P -o$@ $(WXRCEDIT_CXXFLAGS) $**
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_propframe.obj: .\propframe.cpp
|
|
||||||
$(CXX) -q -c -P -o$@ $(WXRCEDIT_CXXFLAGS) $**
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_splittree.obj: .\splittree.cpp
|
|
||||||
$(CXX) -q -c -P -o$@ $(WXRCEDIT_CXXFLAGS) $**
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_xmlhelpr.obj: .\xmlhelpr.cpp
|
|
||||||
$(CXX) -q -c -P -o$@ $(WXRCEDIT_CXXFLAGS) $**
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_wxrcedit.res: .\wxrcedit.rc
|
|
||||||
brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\..\include -i$(SETUPHDIR) -i. $(__DLLFLAG_p_1) -i.\..\..\..\samples -dNOPCH -i.\..\..\include $**
|
|
||||||
|
|
@@ -1,269 +0,0 @@
|
|||||||
# =========================================================================
|
|
||||||
# This makefile was generated by
|
|
||||||
# Bakefile 0.1.8 (http://bakefile.sourceforge.net)
|
|
||||||
# Do not modify, all changes will be overwritten!
|
|
||||||
# =========================================================================
|
|
||||||
|
|
||||||
include ../../../build/msw/config.gcc
|
|
||||||
|
|
||||||
# -------------------------------------------------------------------------
|
|
||||||
# Do not modify the rest of this file!
|
|
||||||
# -------------------------------------------------------------------------
|
|
||||||
|
|
||||||
### Variables: ###
|
|
||||||
|
|
||||||
WX_RELEASE_NODOT = 26
|
|
||||||
OBJS = \
|
|
||||||
gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
|
|
||||||
LIBDIRNAME = .\..\..\..\lib\gcc_$(LIBTYPE_SUFFIX)$(CFG)
|
|
||||||
SETUPHDIR = \
|
|
||||||
$(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
|
|
||||||
WXRCEDIT_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(__THREADSFLAG) \
|
|
||||||
$(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
|
|
||||||
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
|
|
||||||
$(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\..\include \
|
|
||||||
-I$(SETUPHDIR) -W -Wall -I. $(__DLLFLAG_p) -I.\..\..\..\samples -DNOPCH \
|
|
||||||
-I.\..\..\include $(__RTTIFLAG_5) $(__EXCEPTIONSFLAG_6) \
|
|
||||||
-Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS)
|
|
||||||
WXRCEDIT_OBJECTS = \
|
|
||||||
$(OBJS)\wxrcedit_edapp.o \
|
|
||||||
$(OBJS)\wxrcedit_editor.o \
|
|
||||||
$(OBJS)\wxrcedit_nodehnd.o \
|
|
||||||
$(OBJS)\wxrcedit_nodesdb.o \
|
|
||||||
$(OBJS)\wxrcedit_pe_adv.o \
|
|
||||||
$(OBJS)\wxrcedit_pe_basic.o \
|
|
||||||
$(OBJS)\wxrcedit_preview.o \
|
|
||||||
$(OBJS)\wxrcedit_propedit.o \
|
|
||||||
$(OBJS)\wxrcedit_propframe.o \
|
|
||||||
$(OBJS)\wxrcedit_splittree.o \
|
|
||||||
$(OBJS)\wxrcedit_xmlhelpr.o \
|
|
||||||
$(OBJS)\wxrcedit_wxrcedit_rc.o
|
|
||||||
|
|
||||||
### Conditionally set variables: ###
|
|
||||||
|
|
||||||
ifeq ($(GCC_VERSION),2.95)
|
|
||||||
GCCFLAGS = -fvtable-thunks
|
|
||||||
endif
|
|
||||||
ifeq ($(USE_GUI),0)
|
|
||||||
PORTNAME = base
|
|
||||||
endif
|
|
||||||
ifeq ($(USE_GUI),1)
|
|
||||||
PORTNAME = msw
|
|
||||||
endif
|
|
||||||
ifeq ($(BUILD),debug)
|
|
||||||
ifeq ($(DEBUG_FLAG),default)
|
|
||||||
WXDEBUGFLAG = d
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
ifeq ($(DEBUG_FLAG),1)
|
|
||||||
WXDEBUGFLAG = d
|
|
||||||
endif
|
|
||||||
ifeq ($(UNICODE),1)
|
|
||||||
WXUNICODEFLAG = u
|
|
||||||
endif
|
|
||||||
ifeq ($(WXUNIV),1)
|
|
||||||
WXUNIVNAME = univ
|
|
||||||
endif
|
|
||||||
ifeq ($(SHARED),1)
|
|
||||||
WXDLLFLAG = dll
|
|
||||||
endif
|
|
||||||
ifeq ($(SHARED),0)
|
|
||||||
LIBTYPE_SUFFIX = lib
|
|
||||||
endif
|
|
||||||
ifeq ($(SHARED),1)
|
|
||||||
LIBTYPE_SUFFIX = dll
|
|
||||||
endif
|
|
||||||
ifeq ($(MONOLITHIC),0)
|
|
||||||
EXTRALIBS_FOR_BASE =
|
|
||||||
endif
|
|
||||||
ifeq ($(MONOLITHIC),1)
|
|
||||||
EXTRALIBS_FOR_BASE =
|
|
||||||
endif
|
|
||||||
ifeq ($(BUILD),debug)
|
|
||||||
__OPTIMIZEFLAG_2 = -O0
|
|
||||||
endif
|
|
||||||
ifeq ($(BUILD),release)
|
|
||||||
__OPTIMIZEFLAG_2 = -O2
|
|
||||||
endif
|
|
||||||
ifeq ($(USE_RTTI),0)
|
|
||||||
__RTTIFLAG_5 = -fno-rtti
|
|
||||||
endif
|
|
||||||
ifeq ($(USE_RTTI),1)
|
|
||||||
__RTTIFLAG_5 =
|
|
||||||
endif
|
|
||||||
ifeq ($(USE_EXCEPTIONS),0)
|
|
||||||
__EXCEPTIONSFLAG_6 = -fno-exceptions
|
|
||||||
endif
|
|
||||||
ifeq ($(USE_EXCEPTIONS),1)
|
|
||||||
__EXCEPTIONSFLAG_6 =
|
|
||||||
endif
|
|
||||||
ifeq ($(WXUNIV),1)
|
|
||||||
__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
|
|
||||||
endif
|
|
||||||
ifeq ($(WXUNIV),1)
|
|
||||||
__WXUNIV_DEFINE_p_1 = --define __WXUNIVERSAL__
|
|
||||||
endif
|
|
||||||
ifeq ($(BUILD),debug)
|
|
||||||
ifeq ($(DEBUG_FLAG),default)
|
|
||||||
__DEBUG_DEFINE_p = -D__WXDEBUG__
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
ifeq ($(DEBUG_FLAG),1)
|
|
||||||
__DEBUG_DEFINE_p = -D__WXDEBUG__
|
|
||||||
endif
|
|
||||||
ifeq ($(BUILD),debug)
|
|
||||||
ifeq ($(DEBUG_FLAG),default)
|
|
||||||
__DEBUG_DEFINE_p_1 = --define __WXDEBUG__
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
ifeq ($(DEBUG_FLAG),1)
|
|
||||||
__DEBUG_DEFINE_p_1 = --define __WXDEBUG__
|
|
||||||
endif
|
|
||||||
ifeq ($(USE_EXCEPTIONS),0)
|
|
||||||
__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
|
|
||||||
endif
|
|
||||||
ifeq ($(USE_EXCEPTIONS),0)
|
|
||||||
__EXCEPTIONS_DEFINE_p_1 = --define wxNO_EXCEPTIONS
|
|
||||||
endif
|
|
||||||
ifeq ($(USE_RTTI),0)
|
|
||||||
__RTTI_DEFINE_p = -DwxNO_RTTI
|
|
||||||
endif
|
|
||||||
ifeq ($(USE_RTTI),0)
|
|
||||||
__RTTI_DEFINE_p_1 = --define wxNO_RTTI
|
|
||||||
endif
|
|
||||||
ifeq ($(USE_THREADS),0)
|
|
||||||
__THREAD_DEFINE_p = -DwxNO_THREADS
|
|
||||||
endif
|
|
||||||
ifeq ($(USE_THREADS),0)
|
|
||||||
__THREAD_DEFINE_p_1 = --define wxNO_THREADS
|
|
||||||
endif
|
|
||||||
ifeq ($(UNICODE),1)
|
|
||||||
__UNICODE_DEFINE_p = -D_UNICODE
|
|
||||||
endif
|
|
||||||
ifeq ($(UNICODE),1)
|
|
||||||
__UNICODE_DEFINE_p_1 = --define _UNICODE
|
|
||||||
endif
|
|
||||||
ifeq ($(SHARED),1)
|
|
||||||
__DLLFLAG_p = -DWXUSINGDLL
|
|
||||||
endif
|
|
||||||
ifeq ($(SHARED),1)
|
|
||||||
__DLLFLAG_p_1 = --define WXUSINGDLL
|
|
||||||
endif
|
|
||||||
ifeq ($(MONOLITHIC),0)
|
|
||||||
__WXLIB_XRC_p = \
|
|
||||||
-lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc
|
|
||||||
endif
|
|
||||||
ifeq ($(MONOLITHIC),0)
|
|
||||||
__WXLIB_ADV_p = \
|
|
||||||
-lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv
|
|
||||||
endif
|
|
||||||
ifeq ($(MONOLITHIC),0)
|
|
||||||
__WXLIB_HTML_p = \
|
|
||||||
-lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html
|
|
||||||
endif
|
|
||||||
ifeq ($(MONOLITHIC),0)
|
|
||||||
__WXLIB_CORE_p = \
|
|
||||||
-lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core
|
|
||||||
endif
|
|
||||||
ifeq ($(MONOLITHIC),0)
|
|
||||||
__WXLIB_XML_p = \
|
|
||||||
-lwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml
|
|
||||||
endif
|
|
||||||
ifeq ($(MONOLITHIC),0)
|
|
||||||
__WXLIB_BASE_p = \
|
|
||||||
-lwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
|
|
||||||
endif
|
|
||||||
ifeq ($(MONOLITHIC),1)
|
|
||||||
__WXLIB_MONO_p = \
|
|
||||||
-lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
|
|
||||||
endif
|
|
||||||
ifeq ($(USE_GUI),1)
|
|
||||||
__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG)
|
|
||||||
endif
|
|
||||||
ifeq ($(USE_GUI),1)
|
|
||||||
__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG)
|
|
||||||
endif
|
|
||||||
ifeq ($(USE_GUI),1)
|
|
||||||
__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG)
|
|
||||||
endif
|
|
||||||
ifeq ($(MSLU),1)
|
|
||||||
__UNICOWS_LIB_p = -lunicows
|
|
||||||
endif
|
|
||||||
ifeq ($(BUILD),debug)
|
|
||||||
ifeq ($(DEBUG_INFO),default)
|
|
||||||
__DEBUGINFO = -g
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
ifeq ($(BUILD),release)
|
|
||||||
ifeq ($(DEBUG_INFO),default)
|
|
||||||
__DEBUGINFO =
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
ifeq ($(DEBUG_INFO),0)
|
|
||||||
__DEBUGINFO =
|
|
||||||
endif
|
|
||||||
ifeq ($(DEBUG_INFO),1)
|
|
||||||
__DEBUGINFO = -g
|
|
||||||
endif
|
|
||||||
ifeq ($(USE_THREADS),0)
|
|
||||||
__THREADSFLAG =
|
|
||||||
endif
|
|
||||||
ifeq ($(USE_THREADS),1)
|
|
||||||
__THREADSFLAG = -mthreads
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
all: $(OBJS)
|
|
||||||
$(OBJS):
|
|
||||||
-if not exist $(OBJS) mkdir $(OBJS)
|
|
||||||
|
|
||||||
### Targets: ###
|
|
||||||
|
|
||||||
all: $(OBJS)\wxrcedit.exe
|
|
||||||
|
|
||||||
clean:
|
|
||||||
-if exist $(OBJS)\*.o del $(OBJS)\*.o
|
|
||||||
-if exist $(OBJS)\wxrcedit.exe del $(OBJS)\wxrcedit.exe
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit.exe: $(WXRCEDIT_OBJECTS) $(OBJS)\wxrcedit_wxrcedit_rc.o
|
|
||||||
$(CXX) -o $@ $(WXRCEDIT_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_XRC_p) $(__WXLIB_ADV_p) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_XML_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_edapp.o: ./edapp.cpp
|
|
||||||
$(CXX) -c -o $@ $(WXRCEDIT_CXXFLAGS) $<
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_editor.o: ./editor.cpp
|
|
||||||
$(CXX) -c -o $@ $(WXRCEDIT_CXXFLAGS) $<
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_nodehnd.o: ./nodehnd.cpp
|
|
||||||
$(CXX) -c -o $@ $(WXRCEDIT_CXXFLAGS) $<
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_nodesdb.o: ./nodesdb.cpp
|
|
||||||
$(CXX) -c -o $@ $(WXRCEDIT_CXXFLAGS) $<
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_pe_adv.o: ./pe_adv.cpp
|
|
||||||
$(CXX) -c -o $@ $(WXRCEDIT_CXXFLAGS) $<
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_pe_basic.o: ./pe_basic.cpp
|
|
||||||
$(CXX) -c -o $@ $(WXRCEDIT_CXXFLAGS) $<
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_preview.o: ./preview.cpp
|
|
||||||
$(CXX) -c -o $@ $(WXRCEDIT_CXXFLAGS) $<
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_propedit.o: ./propedit.cpp
|
|
||||||
$(CXX) -c -o $@ $(WXRCEDIT_CXXFLAGS) $<
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_propframe.o: ./propframe.cpp
|
|
||||||
$(CXX) -c -o $@ $(WXRCEDIT_CXXFLAGS) $<
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_splittree.o: ./splittree.cpp
|
|
||||||
$(CXX) -c -o $@ $(WXRCEDIT_CXXFLAGS) $<
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_xmlhelpr.o: ./xmlhelpr.cpp
|
|
||||||
$(CXX) -c -o $@ $(WXRCEDIT_CXXFLAGS) $<
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_wxrcedit_rc.o: ./wxrcedit.rc
|
|
||||||
windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../../include --include-dir $(SETUPHDIR) --include-dir . $(__DLLFLAG_p_1) --include-dir ./../../../samples --define NOPCH --include-dir ./../../include
|
|
||||||
|
|
||||||
.PHONY: all clean
|
|
||||||
|
|
||||||
|
|
@@ -1,326 +0,0 @@
|
|||||||
# =========================================================================
|
|
||||||
# This makefile was generated by
|
|
||||||
# Bakefile 0.1.8 (http://bakefile.sourceforge.net)
|
|
||||||
# Do not modify, all changes will be overwritten!
|
|
||||||
# =========================================================================
|
|
||||||
|
|
||||||
!include <../../../build/msw/config.vc>
|
|
||||||
|
|
||||||
# -------------------------------------------------------------------------
|
|
||||||
# Do not modify the rest of this file!
|
|
||||||
# -------------------------------------------------------------------------
|
|
||||||
|
|
||||||
### Variables: ###
|
|
||||||
|
|
||||||
WX_RELEASE_NODOT = 26
|
|
||||||
OBJS = \
|
|
||||||
vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
|
|
||||||
LIBDIRNAME = .\..\..\..\lib\vc_$(LIBTYPE_SUFFIX)$(CFG)
|
|
||||||
SETUPHDIR = \
|
|
||||||
$(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
|
|
||||||
WXRCEDIT_CXXFLAGS = /M$(__RUNTIME_LIBS_8)$(__DEBUGRUNTIME_3) /DWIN32 \
|
|
||||||
$(__DEBUGINFO_0) /Fd$(OBJS)\wxrcedit.pdb $(____DEBUGRUNTIME_2_p) \
|
|
||||||
$(__OPTIMIZEFLAG_4) $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) \
|
|
||||||
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
|
|
||||||
$(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\..\include \
|
|
||||||
/I$(SETUPHDIR) /W4 /I. $(__DLLFLAG_p) /D_WINDOWS /I.\..\..\..\samples /DNOPCH \
|
|
||||||
/I.\..\..\include $(__RTTIFLAG_9) $(__EXCEPTIONSFLAG_10) $(CPPFLAGS) \
|
|
||||||
$(CXXFLAGS)
|
|
||||||
WXRCEDIT_OBJECTS = \
|
|
||||||
$(OBJS)\wxrcedit_edapp.obj \
|
|
||||||
$(OBJS)\wxrcedit_editor.obj \
|
|
||||||
$(OBJS)\wxrcedit_nodehnd.obj \
|
|
||||||
$(OBJS)\wxrcedit_nodesdb.obj \
|
|
||||||
$(OBJS)\wxrcedit_pe_adv.obj \
|
|
||||||
$(OBJS)\wxrcedit_pe_basic.obj \
|
|
||||||
$(OBJS)\wxrcedit_preview.obj \
|
|
||||||
$(OBJS)\wxrcedit_propedit.obj \
|
|
||||||
$(OBJS)\wxrcedit_propframe.obj \
|
|
||||||
$(OBJS)\wxrcedit_splittree.obj \
|
|
||||||
$(OBJS)\wxrcedit_xmlhelpr.obj \
|
|
||||||
$(OBJS)\wxrcedit_wxrcedit.res
|
|
||||||
|
|
||||||
### Conditionally set variables: ###
|
|
||||||
|
|
||||||
!if "$(USE_GUI)" == "0"
|
|
||||||
PORTNAME = base
|
|
||||||
!endif
|
|
||||||
!if "$(USE_GUI)" == "1"
|
|
||||||
PORTNAME = msw
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
|
|
||||||
WXDEBUGFLAG = d
|
|
||||||
!endif
|
|
||||||
!if "$(DEBUG_FLAG)" == "1"
|
|
||||||
WXDEBUGFLAG = d
|
|
||||||
!endif
|
|
||||||
!if "$(UNICODE)" == "1"
|
|
||||||
WXUNICODEFLAG = u
|
|
||||||
!endif
|
|
||||||
!if "$(WXUNIV)" == "1"
|
|
||||||
WXUNIVNAME = univ
|
|
||||||
!endif
|
|
||||||
!if "$(SHARED)" == "1"
|
|
||||||
WXDLLFLAG = dll
|
|
||||||
!endif
|
|
||||||
!if "$(SHARED)" == "0"
|
|
||||||
LIBTYPE_SUFFIX = lib
|
|
||||||
!endif
|
|
||||||
!if "$(SHARED)" == "1"
|
|
||||||
LIBTYPE_SUFFIX = dll
|
|
||||||
!endif
|
|
||||||
!if "$(MONOLITHIC)" == "0"
|
|
||||||
EXTRALIBS_FOR_BASE =
|
|
||||||
!endif
|
|
||||||
!if "$(MONOLITHIC)" == "1"
|
|
||||||
EXTRALIBS_FOR_BASE =
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
|
|
||||||
__DEBUGINFO_0 = /Zi
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
|
|
||||||
__DEBUGINFO_0 =
|
|
||||||
!endif
|
|
||||||
!if "$(DEBUG_INFO)" == "0"
|
|
||||||
__DEBUGINFO_0 =
|
|
||||||
!endif
|
|
||||||
!if "$(DEBUG_INFO)" == "1"
|
|
||||||
__DEBUGINFO_0 = /Zi
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
|
|
||||||
__DEBUGINFO_1 = /DEBUG
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
|
|
||||||
__DEBUGINFO_1 =
|
|
||||||
!endif
|
|
||||||
!if "$(DEBUG_INFO)" == "0"
|
|
||||||
__DEBUGINFO_1 =
|
|
||||||
!endif
|
|
||||||
!if "$(DEBUG_INFO)" == "1"
|
|
||||||
__DEBUGINFO_1 = /DEBUG
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
|
|
||||||
____DEBUGRUNTIME_2_p = /D_DEBUG
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
|
|
||||||
____DEBUGRUNTIME_2_p =
|
|
||||||
!endif
|
|
||||||
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
|
|
||||||
____DEBUGRUNTIME_2_p =
|
|
||||||
!endif
|
|
||||||
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
|
|
||||||
____DEBUGRUNTIME_2_p = /D_DEBUG
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
|
|
||||||
____DEBUGRUNTIME_2_p_1 = /d _DEBUG
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
|
|
||||||
____DEBUGRUNTIME_2_p_1 =
|
|
||||||
!endif
|
|
||||||
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
|
|
||||||
____DEBUGRUNTIME_2_p_1 =
|
|
||||||
!endif
|
|
||||||
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
|
|
||||||
____DEBUGRUNTIME_2_p_1 = /d _DEBUG
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
|
|
||||||
__DEBUGRUNTIME_3 = d
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
|
|
||||||
__DEBUGRUNTIME_3 =
|
|
||||||
!endif
|
|
||||||
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
|
|
||||||
__DEBUGRUNTIME_3 =
|
|
||||||
!endif
|
|
||||||
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
|
|
||||||
__DEBUGRUNTIME_3 = d
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "debug"
|
|
||||||
__OPTIMIZEFLAG_4 = /Od
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "release"
|
|
||||||
__OPTIMIZEFLAG_4 = /O2
|
|
||||||
!endif
|
|
||||||
!if "$(USE_THREADS)" == "0"
|
|
||||||
__THREADSFLAG_7 = L
|
|
||||||
!endif
|
|
||||||
!if "$(USE_THREADS)" == "1"
|
|
||||||
__THREADSFLAG_7 = T
|
|
||||||
!endif
|
|
||||||
!if "$(RUNTIME_LIBS)" == "dynamic"
|
|
||||||
__RUNTIME_LIBS_8 = D
|
|
||||||
!endif
|
|
||||||
!if "$(RUNTIME_LIBS)" == "static"
|
|
||||||
__RUNTIME_LIBS_8 = $(__THREADSFLAG_7)
|
|
||||||
!endif
|
|
||||||
!if "$(USE_RTTI)" == "0"
|
|
||||||
__RTTIFLAG_9 =
|
|
||||||
!endif
|
|
||||||
!if "$(USE_RTTI)" == "1"
|
|
||||||
__RTTIFLAG_9 = /GR
|
|
||||||
!endif
|
|
||||||
!if "$(USE_EXCEPTIONS)" == "0"
|
|
||||||
__EXCEPTIONSFLAG_10 =
|
|
||||||
!endif
|
|
||||||
!if "$(USE_EXCEPTIONS)" == "1"
|
|
||||||
__EXCEPTIONSFLAG_10 = /EHsc
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0"
|
|
||||||
__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1"
|
|
||||||
__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0"
|
|
||||||
__NO_VC_CRTDBG_p_1 = /d __NO_VC_CRTDBG__
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1"
|
|
||||||
__NO_VC_CRTDBG_p_1 = /d __NO_VC_CRTDBG__
|
|
||||||
!endif
|
|
||||||
!if "$(WXUNIV)" == "1"
|
|
||||||
__WXUNIV_DEFINE_p = /D__WXUNIVERSAL__
|
|
||||||
!endif
|
|
||||||
!if "$(WXUNIV)" == "1"
|
|
||||||
__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
|
|
||||||
__DEBUG_DEFINE_p = /D__WXDEBUG__
|
|
||||||
!endif
|
|
||||||
!if "$(DEBUG_FLAG)" == "1"
|
|
||||||
__DEBUG_DEFINE_p = /D__WXDEBUG__
|
|
||||||
!endif
|
|
||||||
!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
|
|
||||||
__DEBUG_DEFINE_p_1 = /d __WXDEBUG__
|
|
||||||
!endif
|
|
||||||
!if "$(DEBUG_FLAG)" == "1"
|
|
||||||
__DEBUG_DEFINE_p_1 = /d __WXDEBUG__
|
|
||||||
!endif
|
|
||||||
!if "$(USE_EXCEPTIONS)" == "0"
|
|
||||||
__EXCEPTIONS_DEFINE_p = /DwxNO_EXCEPTIONS
|
|
||||||
!endif
|
|
||||||
!if "$(USE_EXCEPTIONS)" == "0"
|
|
||||||
__EXCEPTIONS_DEFINE_p_1 = /d wxNO_EXCEPTIONS
|
|
||||||
!endif
|
|
||||||
!if "$(USE_RTTI)" == "0"
|
|
||||||
__RTTI_DEFINE_p = /DwxNO_RTTI
|
|
||||||
!endif
|
|
||||||
!if "$(USE_RTTI)" == "0"
|
|
||||||
__RTTI_DEFINE_p_1 = /d wxNO_RTTI
|
|
||||||
!endif
|
|
||||||
!if "$(USE_THREADS)" == "0"
|
|
||||||
__THREAD_DEFINE_p = /DwxNO_THREADS
|
|
||||||
!endif
|
|
||||||
!if "$(USE_THREADS)" == "0"
|
|
||||||
__THREAD_DEFINE_p_1 = /d wxNO_THREADS
|
|
||||||
!endif
|
|
||||||
!if "$(UNICODE)" == "1"
|
|
||||||
__UNICODE_DEFINE_p = /D_UNICODE
|
|
||||||
!endif
|
|
||||||
!if "$(UNICODE)" == "1"
|
|
||||||
__UNICODE_DEFINE_p_1 = /d _UNICODE
|
|
||||||
!endif
|
|
||||||
!if "$(SHARED)" == "1"
|
|
||||||
__DLLFLAG_p = /DWXUSINGDLL
|
|
||||||
!endif
|
|
||||||
!if "$(SHARED)" == "1"
|
|
||||||
__DLLFLAG_p_1 = /d WXUSINGDLL
|
|
||||||
!endif
|
|
||||||
!if "$(MONOLITHIC)" == "0"
|
|
||||||
__WXLIB_XRC_p = \
|
|
||||||
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib
|
|
||||||
!endif
|
|
||||||
!if "$(MONOLITHIC)" == "0"
|
|
||||||
__WXLIB_ADV_p = \
|
|
||||||
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib
|
|
||||||
!endif
|
|
||||||
!if "$(MONOLITHIC)" == "0"
|
|
||||||
__WXLIB_HTML_p = \
|
|
||||||
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib
|
|
||||||
!endif
|
|
||||||
!if "$(MONOLITHIC)" == "0"
|
|
||||||
__WXLIB_CORE_p = \
|
|
||||||
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
|
|
||||||
!endif
|
|
||||||
!if "$(MONOLITHIC)" == "0"
|
|
||||||
__WXLIB_XML_p = \
|
|
||||||
wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib
|
|
||||||
!endif
|
|
||||||
!if "$(MONOLITHIC)" == "0"
|
|
||||||
__WXLIB_BASE_p = \
|
|
||||||
wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
|
|
||||||
!endif
|
|
||||||
!if "$(MONOLITHIC)" == "1"
|
|
||||||
__WXLIB_MONO_p = \
|
|
||||||
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
|
|
||||||
!endif
|
|
||||||
!if "$(USE_GUI)" == "1"
|
|
||||||
__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
|
|
||||||
!endif
|
|
||||||
!if "$(USE_GUI)" == "1"
|
|
||||||
__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
|
|
||||||
!endif
|
|
||||||
!if "$(USE_GUI)" == "1"
|
|
||||||
__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
|
|
||||||
!endif
|
|
||||||
!if "$(MSLU)" == "1"
|
|
||||||
__UNICOWS_LIB_p = unicows.lib
|
|
||||||
!endif
|
|
||||||
|
|
||||||
|
|
||||||
all: $(OBJS)
|
|
||||||
$(OBJS):
|
|
||||||
-if not exist $(OBJS) mkdir $(OBJS)
|
|
||||||
|
|
||||||
### Targets: ###
|
|
||||||
|
|
||||||
all: $(OBJS)\wxrcedit.exe
|
|
||||||
|
|
||||||
clean:
|
|
||||||
-if exist $(OBJS)\*.obj del $(OBJS)\*.obj
|
|
||||||
-if exist $(OBJS)\*.res del $(OBJS)\*.res
|
|
||||||
-if exist $(OBJS)\*.pch del $(OBJS)\*.pch
|
|
||||||
-if exist $(OBJS)\wxrcedit.exe del $(OBJS)\wxrcedit.exe
|
|
||||||
-if exist $(OBJS)\wxrcedit.ilk del $(OBJS)\wxrcedit.ilk
|
|
||||||
-if exist $(OBJS)\wxrcedit.pdb del $(OBJS)\wxrcedit.pdb
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit.exe: $(WXRCEDIT_OBJECTS) $(OBJS)\wxrcedit_wxrcedit.res
|
|
||||||
link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<<
|
|
||||||
$(WXRCEDIT_OBJECTS) $(__WXLIB_XRC_p) $(__WXLIB_ADV_p) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_XML_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib oleacc.lib odbc32.lib
|
|
||||||
<<
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_edapp.obj: .\edapp.cpp
|
|
||||||
$(CXX) /c /nologo /TP /Fo$@ $(WXRCEDIT_CXXFLAGS) $**
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_editor.obj: .\editor.cpp
|
|
||||||
$(CXX) /c /nologo /TP /Fo$@ $(WXRCEDIT_CXXFLAGS) $**
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_nodehnd.obj: .\nodehnd.cpp
|
|
||||||
$(CXX) /c /nologo /TP /Fo$@ $(WXRCEDIT_CXXFLAGS) $**
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_nodesdb.obj: .\nodesdb.cpp
|
|
||||||
$(CXX) /c /nologo /TP /Fo$@ $(WXRCEDIT_CXXFLAGS) $**
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_pe_adv.obj: .\pe_adv.cpp
|
|
||||||
$(CXX) /c /nologo /TP /Fo$@ $(WXRCEDIT_CXXFLAGS) $**
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_pe_basic.obj: .\pe_basic.cpp
|
|
||||||
$(CXX) /c /nologo /TP /Fo$@ $(WXRCEDIT_CXXFLAGS) $**
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_preview.obj: .\preview.cpp
|
|
||||||
$(CXX) /c /nologo /TP /Fo$@ $(WXRCEDIT_CXXFLAGS) $**
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_propedit.obj: .\propedit.cpp
|
|
||||||
$(CXX) /c /nologo /TP /Fo$@ $(WXRCEDIT_CXXFLAGS) $**
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_propframe.obj: .\propframe.cpp
|
|
||||||
$(CXX) /c /nologo /TP /Fo$@ $(WXRCEDIT_CXXFLAGS) $**
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_splittree.obj: .\splittree.cpp
|
|
||||||
$(CXX) /c /nologo /TP /Fo$@ $(WXRCEDIT_CXXFLAGS) $**
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_xmlhelpr.obj: .\xmlhelpr.cpp
|
|
||||||
$(CXX) /c /nologo /TP /Fo$@ $(WXRCEDIT_CXXFLAGS) $**
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_wxrcedit.res: .\wxrcedit.rc
|
|
||||||
rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) $(__NO_VC_CRTDBG_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\..\include /i $(SETUPHDIR) /i . $(__DLLFLAG_p_1) /d _WINDOWS /i .\..\..\..\samples /d NOPCH /i .\..\..\include $**
|
|
||||||
|
|
@@ -1,313 +0,0 @@
|
|||||||
# =========================================================================
|
|
||||||
# This makefile was generated by
|
|
||||||
# Bakefile 0.1.8 (http://bakefile.sourceforge.net)
|
|
||||||
# Do not modify, all changes will be overwritten!
|
|
||||||
# =========================================================================
|
|
||||||
|
|
||||||
!include ../../../build/msw/config.wat
|
|
||||||
|
|
||||||
# -------------------------------------------------------------------------
|
|
||||||
# Do not modify the rest of this file!
|
|
||||||
# -------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# Speed up compilation a bit:
|
|
||||||
!ifdef __LOADDLL__
|
|
||||||
! loaddll wcc wccd
|
|
||||||
! loaddll wccaxp wccdaxp
|
|
||||||
! loaddll wcc386 wccd386
|
|
||||||
! loaddll wpp wppdi86
|
|
||||||
! loaddll wppaxp wppdaxp
|
|
||||||
! loaddll wpp386 wppd386
|
|
||||||
! loaddll wlink wlink
|
|
||||||
! loaddll wlib wlibd
|
|
||||||
!endif
|
|
||||||
|
|
||||||
# We need these variables in some bakefile-made rules:
|
|
||||||
WATCOM_CWD = $+ $(%cdrive):$(%cwd) $-
|
|
||||||
|
|
||||||
### Conditionally set variables: ###
|
|
||||||
|
|
||||||
PORTNAME =
|
|
||||||
!ifeq USE_GUI 0
|
|
||||||
PORTNAME = base
|
|
||||||
!endif
|
|
||||||
!ifeq USE_GUI 1
|
|
||||||
PORTNAME = msw
|
|
||||||
!endif
|
|
||||||
WXDEBUGFLAG =
|
|
||||||
!ifeq BUILD debug
|
|
||||||
!ifeq DEBUG_FLAG default
|
|
||||||
WXDEBUGFLAG = d
|
|
||||||
!endif
|
|
||||||
!endif
|
|
||||||
!ifeq DEBUG_FLAG 1
|
|
||||||
WXDEBUGFLAG = d
|
|
||||||
!endif
|
|
||||||
WXUNICODEFLAG =
|
|
||||||
!ifeq UNICODE 1
|
|
||||||
WXUNICODEFLAG = u
|
|
||||||
!endif
|
|
||||||
WXUNIVNAME =
|
|
||||||
!ifeq WXUNIV 1
|
|
||||||
WXUNIVNAME = univ
|
|
||||||
!endif
|
|
||||||
WXDLLFLAG =
|
|
||||||
!ifeq SHARED 1
|
|
||||||
WXDLLFLAG = dll
|
|
||||||
!endif
|
|
||||||
LIBTYPE_SUFFIX =
|
|
||||||
!ifeq SHARED 0
|
|
||||||
LIBTYPE_SUFFIX = lib
|
|
||||||
!endif
|
|
||||||
!ifeq SHARED 1
|
|
||||||
LIBTYPE_SUFFIX = dll
|
|
||||||
!endif
|
|
||||||
EXTRALIBS_FOR_BASE =
|
|
||||||
!ifeq MONOLITHIC 0
|
|
||||||
EXTRALIBS_FOR_BASE =
|
|
||||||
!endif
|
|
||||||
!ifeq MONOLITHIC 1
|
|
||||||
EXTRALIBS_FOR_BASE =
|
|
||||||
!endif
|
|
||||||
__DEBUGINFO_0 =
|
|
||||||
!ifeq BUILD debug
|
|
||||||
!ifeq DEBUG_INFO default
|
|
||||||
__DEBUGINFO_0 = -d2
|
|
||||||
!endif
|
|
||||||
!endif
|
|
||||||
!ifeq BUILD release
|
|
||||||
!ifeq DEBUG_INFO default
|
|
||||||
__DEBUGINFO_0 = -d0
|
|
||||||
!endif
|
|
||||||
!endif
|
|
||||||
!ifeq DEBUG_INFO 0
|
|
||||||
__DEBUGINFO_0 = -d0
|
|
||||||
!endif
|
|
||||||
!ifeq DEBUG_INFO 1
|
|
||||||
__DEBUGINFO_0 = -d2
|
|
||||||
!endif
|
|
||||||
__DEBUGINFO_1 =
|
|
||||||
!ifeq BUILD debug
|
|
||||||
!ifeq DEBUG_INFO default
|
|
||||||
__DEBUGINFO_1 = debug all
|
|
||||||
!endif
|
|
||||||
!endif
|
|
||||||
!ifeq BUILD release
|
|
||||||
!ifeq DEBUG_INFO default
|
|
||||||
__DEBUGINFO_1 =
|
|
||||||
!endif
|
|
||||||
!endif
|
|
||||||
!ifeq DEBUG_INFO 0
|
|
||||||
__DEBUGINFO_1 =
|
|
||||||
!endif
|
|
||||||
!ifeq DEBUG_INFO 1
|
|
||||||
__DEBUGINFO_1 = debug all
|
|
||||||
!endif
|
|
||||||
__OPTIMIZEFLAG_2 =
|
|
||||||
!ifeq BUILD debug
|
|
||||||
__OPTIMIZEFLAG_2 = -od
|
|
||||||
!endif
|
|
||||||
!ifeq BUILD release
|
|
||||||
__OPTIMIZEFLAG_2 = -ot -ox
|
|
||||||
!endif
|
|
||||||
__THREADSFLAG_5 =
|
|
||||||
!ifeq USE_THREADS 0
|
|
||||||
__THREADSFLAG_5 =
|
|
||||||
!endif
|
|
||||||
!ifeq USE_THREADS 1
|
|
||||||
__THREADSFLAG_5 = -bm
|
|
||||||
!endif
|
|
||||||
__RUNTIME_LIBS_6 =
|
|
||||||
!ifeq RUNTIME_LIBS dynamic
|
|
||||||
__RUNTIME_LIBS_6 = -br
|
|
||||||
!endif
|
|
||||||
!ifeq RUNTIME_LIBS static
|
|
||||||
__RUNTIME_LIBS_6 =
|
|
||||||
!endif
|
|
||||||
__RTTIFLAG_7 =
|
|
||||||
!ifeq USE_RTTI 0
|
|
||||||
__RTTIFLAG_7 =
|
|
||||||
!endif
|
|
||||||
!ifeq USE_RTTI 1
|
|
||||||
__RTTIFLAG_7 = -xr
|
|
||||||
!endif
|
|
||||||
__EXCEPTIONSFLAG_8 =
|
|
||||||
!ifeq USE_EXCEPTIONS 0
|
|
||||||
__EXCEPTIONSFLAG_8 =
|
|
||||||
!endif
|
|
||||||
!ifeq USE_EXCEPTIONS 1
|
|
||||||
__EXCEPTIONSFLAG_8 = -xs
|
|
||||||
!endif
|
|
||||||
__WXLIB_XRC_p =
|
|
||||||
!ifeq MONOLITHIC 0
|
|
||||||
__WXLIB_XRC_p = &
|
|
||||||
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib
|
|
||||||
!endif
|
|
||||||
__WXLIB_ADV_p =
|
|
||||||
!ifeq MONOLITHIC 0
|
|
||||||
__WXLIB_ADV_p = &
|
|
||||||
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib
|
|
||||||
!endif
|
|
||||||
__WXLIB_HTML_p =
|
|
||||||
!ifeq MONOLITHIC 0
|
|
||||||
__WXLIB_HTML_p = &
|
|
||||||
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib
|
|
||||||
!endif
|
|
||||||
__WXLIB_CORE_p =
|
|
||||||
!ifeq MONOLITHIC 0
|
|
||||||
__WXLIB_CORE_p = &
|
|
||||||
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
|
|
||||||
!endif
|
|
||||||
__WXLIB_XML_p =
|
|
||||||
!ifeq MONOLITHIC 0
|
|
||||||
__WXLIB_XML_p = &
|
|
||||||
wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib
|
|
||||||
!endif
|
|
||||||
__WXLIB_BASE_p =
|
|
||||||
!ifeq MONOLITHIC 0
|
|
||||||
__WXLIB_BASE_p = &
|
|
||||||
wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
|
|
||||||
!endif
|
|
||||||
__WXLIB_MONO_p =
|
|
||||||
!ifeq MONOLITHIC 1
|
|
||||||
__WXLIB_MONO_p = &
|
|
||||||
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
|
|
||||||
!endif
|
|
||||||
__LIB_TIFF_p =
|
|
||||||
!ifeq USE_GUI 1
|
|
||||||
__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
|
|
||||||
!endif
|
|
||||||
__LIB_JPEG_p =
|
|
||||||
!ifeq USE_GUI 1
|
|
||||||
__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
|
|
||||||
!endif
|
|
||||||
__LIB_PNG_p =
|
|
||||||
!ifeq USE_GUI 1
|
|
||||||
__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
|
|
||||||
!endif
|
|
||||||
__WXUNIV_DEFINE_p =
|
|
||||||
!ifeq WXUNIV 1
|
|
||||||
__WXUNIV_DEFINE_p = -d__WXUNIVERSAL__
|
|
||||||
!endif
|
|
||||||
__DEBUG_DEFINE_p =
|
|
||||||
!ifeq BUILD debug
|
|
||||||
!ifeq DEBUG_FLAG default
|
|
||||||
__DEBUG_DEFINE_p = -d__WXDEBUG__
|
|
||||||
!endif
|
|
||||||
!endif
|
|
||||||
!ifeq DEBUG_FLAG 1
|
|
||||||
__DEBUG_DEFINE_p = -d__WXDEBUG__
|
|
||||||
!endif
|
|
||||||
__EXCEPTIONS_DEFINE_p =
|
|
||||||
!ifeq USE_EXCEPTIONS 0
|
|
||||||
__EXCEPTIONS_DEFINE_p = -dwxNO_EXCEPTIONS
|
|
||||||
!endif
|
|
||||||
__RTTI_DEFINE_p =
|
|
||||||
!ifeq USE_RTTI 0
|
|
||||||
__RTTI_DEFINE_p = -dwxNO_RTTI
|
|
||||||
!endif
|
|
||||||
__THREAD_DEFINE_p =
|
|
||||||
!ifeq USE_THREADS 0
|
|
||||||
__THREAD_DEFINE_p = -dwxNO_THREADS
|
|
||||||
!endif
|
|
||||||
__UNICODE_DEFINE_p =
|
|
||||||
!ifeq UNICODE 1
|
|
||||||
__UNICODE_DEFINE_p = -d_UNICODE
|
|
||||||
!endif
|
|
||||||
__DLLFLAG_p =
|
|
||||||
!ifeq SHARED 1
|
|
||||||
__DLLFLAG_p = -dWXUSINGDLL
|
|
||||||
!endif
|
|
||||||
|
|
||||||
### Variables: ###
|
|
||||||
|
|
||||||
WX_RELEASE_NODOT = 26
|
|
||||||
OBJS = &
|
|
||||||
wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
|
|
||||||
LIBDIRNAME = .\..\..\..\lib\wat_$(LIBTYPE_SUFFIX)$(CFG)
|
|
||||||
SETUPHDIR = &
|
|
||||||
$(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
|
|
||||||
WXRCEDIT_CXXFLAGS = $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) $(__THREADSFLAG_5) &
|
|
||||||
$(__RUNTIME_LIBS_6) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) &
|
|
||||||
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) &
|
|
||||||
$(__UNICODE_DEFINE_p) -i=.\..\..\..\include -i=$(SETUPHDIR) -wx -wcd=549 &
|
|
||||||
-wcd=656 -wcd=657 -wcd=667 -i=. $(__DLLFLAG_p) -i=.\..\..\..\samples -dNOPCH &
|
|
||||||
-i=.\..\..\include $(__RTTIFLAG_7) $(__EXCEPTIONSFLAG_8) $(CPPFLAGS) &
|
|
||||||
$(CXXFLAGS)
|
|
||||||
WXRCEDIT_OBJECTS = &
|
|
||||||
$(OBJS)\wxrcedit_edapp.obj &
|
|
||||||
$(OBJS)\wxrcedit_editor.obj &
|
|
||||||
$(OBJS)\wxrcedit_nodehnd.obj &
|
|
||||||
$(OBJS)\wxrcedit_nodesdb.obj &
|
|
||||||
$(OBJS)\wxrcedit_pe_adv.obj &
|
|
||||||
$(OBJS)\wxrcedit_pe_basic.obj &
|
|
||||||
$(OBJS)\wxrcedit_preview.obj &
|
|
||||||
$(OBJS)\wxrcedit_propedit.obj &
|
|
||||||
$(OBJS)\wxrcedit_propframe.obj &
|
|
||||||
$(OBJS)\wxrcedit_splittree.obj &
|
|
||||||
$(OBJS)\wxrcedit_xmlhelpr.obj
|
|
||||||
|
|
||||||
|
|
||||||
all : $(OBJS)
|
|
||||||
$(OBJS) :
|
|
||||||
-if not exist $(OBJS) mkdir $(OBJS)
|
|
||||||
|
|
||||||
### Targets: ###
|
|
||||||
|
|
||||||
all : .SYMBOLIC $(OBJS)\wxrcedit.exe
|
|
||||||
|
|
||||||
clean : .SYMBOLIC
|
|
||||||
-if exist $(OBJS)\*.obj del $(OBJS)\*.obj
|
|
||||||
-if exist $(OBJS)\*.res del $(OBJS)\*.res
|
|
||||||
-if exist $(OBJS)\*.lbc del $(OBJS)\*.lbc
|
|
||||||
-if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk
|
|
||||||
-if exist $(OBJS)\*.pch del $(OBJS)\*.pch
|
|
||||||
-if exist $(OBJS)\wxrcedit.exe del $(OBJS)\wxrcedit.exe
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit.exe : $(WXRCEDIT_OBJECTS) $(OBJS)\wxrcedit_wxrcedit.res
|
|
||||||
@%create $(OBJS)\wxrcedit.lbc
|
|
||||||
@%append $(OBJS)\wxrcedit.lbc option quiet
|
|
||||||
@%append $(OBJS)\wxrcedit.lbc name $^@
|
|
||||||
@%append $(OBJS)\wxrcedit.lbc option caseexact
|
|
||||||
@%append $(OBJS)\wxrcedit.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16'
|
|
||||||
@for %i in ($(WXRCEDIT_OBJECTS)) do @%append $(OBJS)\wxrcedit.lbc file %i
|
|
||||||
@for %i in ( $(__WXLIB_XRC_p) $(__WXLIB_ADV_p) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_XML_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib ) do @%append $(OBJS)\wxrcedit.lbc library %i
|
|
||||||
@%append $(OBJS)\wxrcedit.lbc option resource=$(OBJS)\wxrcedit_wxrcedit.res
|
|
||||||
wlink @$(OBJS)\wxrcedit.lbc
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_edapp.obj : .AUTODEPEND .\edapp.cpp
|
|
||||||
$(CXX) -zq -fo=$^@ $(WXRCEDIT_CXXFLAGS) $<
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_editor.obj : .AUTODEPEND .\editor.cpp
|
|
||||||
$(CXX) -zq -fo=$^@ $(WXRCEDIT_CXXFLAGS) $<
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_nodehnd.obj : .AUTODEPEND .\nodehnd.cpp
|
|
||||||
$(CXX) -zq -fo=$^@ $(WXRCEDIT_CXXFLAGS) $<
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_nodesdb.obj : .AUTODEPEND .\nodesdb.cpp
|
|
||||||
$(CXX) -zq -fo=$^@ $(WXRCEDIT_CXXFLAGS) $<
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_pe_adv.obj : .AUTODEPEND .\pe_adv.cpp
|
|
||||||
$(CXX) -zq -fo=$^@ $(WXRCEDIT_CXXFLAGS) $<
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_pe_basic.obj : .AUTODEPEND .\pe_basic.cpp
|
|
||||||
$(CXX) -zq -fo=$^@ $(WXRCEDIT_CXXFLAGS) $<
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_preview.obj : .AUTODEPEND .\preview.cpp
|
|
||||||
$(CXX) -zq -fo=$^@ $(WXRCEDIT_CXXFLAGS) $<
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_propedit.obj : .AUTODEPEND .\propedit.cpp
|
|
||||||
$(CXX) -zq -fo=$^@ $(WXRCEDIT_CXXFLAGS) $<
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_propframe.obj : .AUTODEPEND .\propframe.cpp
|
|
||||||
$(CXX) -zq -fo=$^@ $(WXRCEDIT_CXXFLAGS) $<
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_splittree.obj : .AUTODEPEND .\splittree.cpp
|
|
||||||
$(CXX) -zq -fo=$^@ $(WXRCEDIT_CXXFLAGS) $<
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_xmlhelpr.obj : .AUTODEPEND .\xmlhelpr.cpp
|
|
||||||
$(CXX) -zq -fo=$^@ $(WXRCEDIT_CXXFLAGS) $<
|
|
||||||
|
|
||||||
$(OBJS)\wxrcedit_wxrcedit.res : .AUTODEPEND .\wxrcedit.rc
|
|
||||||
wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\..\include -i=$(SETUPHDIR) -i=. $(__DLLFLAG_p) -i=.\..\..\..\samples -dNOPCH -i=.\..\..\include $<
|
|
||||||
|
|
Before Width: | Height: | Size: 766 B |
@@ -1,324 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Author: Vaclav Slavik
|
|
||||||
// Created: 2000/05/05
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) 2000 Vaclav Slavik
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma implementation "nodehnd.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx/wx.h".
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "nodehnd.h"
|
|
||||||
#include "wx/xml/xml.h"
|
|
||||||
#include "wx/filefn.h"
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#include "wx/arrimpl.cpp"
|
|
||||||
#include "wx/textfile.h"
|
|
||||||
#include "wx/tokenzr.h"
|
|
||||||
#include "wx/listctrl.h"
|
|
||||||
#include "editor.h"
|
|
||||||
#include "treedt.h"
|
|
||||||
#include "xmlhelpr.h"
|
|
||||||
#include "nodesdb.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wxList NodeHandler::ms_Handlers;
|
|
||||||
bool NodeHandler::ms_HandlersLoaded = false;
|
|
||||||
|
|
||||||
|
|
||||||
NodeHandler *NodeHandler::Find(wxXmlNode *node)
|
|
||||||
{
|
|
||||||
if (!ms_HandlersLoaded)
|
|
||||||
{
|
|
||||||
ms_HandlersLoaded = true;
|
|
||||||
ms_Handlers.DeleteContents(true);
|
|
||||||
|
|
||||||
NodeInfoArray& arr = NodesDb::Get()->GetNodesInfo();
|
|
||||||
NodeHandler *hnd;
|
|
||||||
for (size_t i = 0; i < arr.GetCount(); i++)
|
|
||||||
{
|
|
||||||
if (arr[i].NodeClass.IsEmpty() || arr[i].Abstract) continue;
|
|
||||||
|
|
||||||
if (arr[i].Type == _T("panel"))
|
|
||||||
hnd = new NodeHandlerPanel(&(arr[i]));
|
|
||||||
else if (arr[i].Type == _T("sizer"))
|
|
||||||
hnd = new NodeHandlerSizer(&(arr[i]));
|
|
||||||
else if (arr[i].Type == _T("sizeritem"))
|
|
||||||
hnd = new NodeHandlerSizerItem(&(arr[i]));
|
|
||||||
else if (arr[i].Type == _T("notebook"))
|
|
||||||
hnd = new NodeHandlerNotebook(&(arr[i]));
|
|
||||||
else if (arr[i].Type == _T("notebookpage"))
|
|
||||||
hnd = new NodeHandlerNotebookPage(&(arr[i]));
|
|
||||||
else
|
|
||||||
hnd = new NodeHandler(&(arr[i]));
|
|
||||||
if (hnd) ms_Handlers.Append(hnd);
|
|
||||||
}
|
|
||||||
ms_Handlers.Append(new NodeHandlerUnknown);
|
|
||||||
}
|
|
||||||
|
|
||||||
wxNode *n = ms_Handlers.GetFirst();
|
|
||||||
while (n)
|
|
||||||
{
|
|
||||||
NodeHandler *h = (NodeHandler*) n->GetData();
|
|
||||||
if (h->CanHandle(node))
|
|
||||||
return h;
|
|
||||||
n = n->GetNext();
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
NodeHandler::NodeHandler(NodeInfo *ni) :
|
|
||||||
m_NodeInfo(ni)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
NodeHandler::~NodeHandler()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool NodeHandler::CanHandle(wxXmlNode *node)
|
|
||||||
{
|
|
||||||
return (m_NodeInfo->NodeClass == XmlGetClass(node));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PropertyInfoArray& NodeHandler::GetPropsList(wxXmlNode *WXUNUSED(node))
|
|
||||||
{
|
|
||||||
return m_NodeInfo->Props;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wxTreeItemId NodeHandler::CreateTreeNode(wxTreeCtrl *treectrl,
|
|
||||||
wxTreeItemId parent,
|
|
||||||
wxXmlNode *node)
|
|
||||||
{
|
|
||||||
int icon = GetTreeIcon(node);
|
|
||||||
wxTreeItemId item =
|
|
||||||
treectrl->AppendItem(parent, GetTreeString(node),
|
|
||||||
icon, icon, new XmlTreeData(node));
|
|
||||||
if (parent == treectrl->GetRootItem())
|
|
||||||
treectrl->SetItemBold(item);
|
|
||||||
return item;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wxString NodeHandler::GetTreeString(wxXmlNode *node)
|
|
||||||
{
|
|
||||||
wxString xmlid = node->GetPropVal(_T("name"), wxEmptyString);
|
|
||||||
if (xmlid.IsEmpty())
|
|
||||||
return XmlGetClass(node);
|
|
||||||
else
|
|
||||||
return XmlGetClass(node) + _T(" '") + xmlid + _T("'");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wxArrayString& NodeHandler::GetChildTypes()
|
|
||||||
{
|
|
||||||
if (m_ChildTypes.IsEmpty())
|
|
||||||
{
|
|
||||||
wxString basetype = m_NodeInfo->ChildType;
|
|
||||||
NodeInfoArray& arr = NodesDb::Get()->GetNodesInfo();
|
|
||||||
|
|
||||||
for (size_t i = 0; i < arr.GetCount(); i++)
|
|
||||||
{
|
|
||||||
NodeInfo &ni = arr[i];
|
|
||||||
|
|
||||||
if (ni.NodeClass == basetype && !ni.Abstract)
|
|
||||||
m_ChildTypes.Add(ni.NodeClass);
|
|
||||||
|
|
||||||
if (ni.DerivedFrom.Index(basetype) != wxNOT_FOUND && !ni.Abstract)
|
|
||||||
m_ChildTypes.Add(ni.NodeClass);
|
|
||||||
}
|
|
||||||
m_ChildTypes.Sort();
|
|
||||||
}
|
|
||||||
|
|
||||||
return m_ChildTypes;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void NodeHandler::InsertNode(wxXmlNode *WXUNUSED(parent), wxXmlNode *node, wxXmlNode *WXUNUSED(insert_before))
|
|
||||||
{
|
|
||||||
delete node;
|
|
||||||
wxLogError(_("Cannot insert child into this type of node!"));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wxTreeItemId NodeHandlerPanel::CreateTreeNode(wxTreeCtrl *treectrl,
|
|
||||||
wxTreeItemId parent,
|
|
||||||
wxXmlNode *node)
|
|
||||||
{
|
|
||||||
wxTreeItemId root = NodeHandler::CreateTreeNode(treectrl, parent, node);
|
|
||||||
|
|
||||||
wxXmlNode *n = XmlFindNode(node, _T("object"));
|
|
||||||
|
|
||||||
while (n)
|
|
||||||
{
|
|
||||||
if (n->GetType() == wxXML_ELEMENT_NODE &&
|
|
||||||
n->GetName() == _T("object"))
|
|
||||||
Find(n)->CreateTreeNode(treectrl, root, n);
|
|
||||||
n = n->GetNext();
|
|
||||||
}
|
|
||||||
//treectrl->Expand(root);
|
|
||||||
return root;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void NodeHandlerPanel::InsertNode(wxXmlNode *parent, wxXmlNode *node, wxXmlNode *insert_before)
|
|
||||||
{
|
|
||||||
if (insert_before)
|
|
||||||
parent->InsertChild(node, insert_before);
|
|
||||||
else
|
|
||||||
parent->AddChild(node);
|
|
||||||
EditorFrame::Get()->NotifyChanged(CHANGED_TREE);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void NodeHandlerSizer::InsertNode(wxXmlNode *parent, wxXmlNode *node, wxXmlNode *insert_before)
|
|
||||||
{
|
|
||||||
if (XmlGetClass(node) == _T("spacer") || XmlGetClass(node) == _T("sizeritem"))
|
|
||||||
{
|
|
||||||
if (insert_before)
|
|
||||||
parent->InsertChild(node, insert_before);
|
|
||||||
else
|
|
||||||
parent->AddChild(node);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
wxXmlNode *itemnode = new wxXmlNode(wxXML_ELEMENT_NODE, _T("object"));
|
|
||||||
itemnode->AddProperty(_T("class"), _T("sizeritem"));
|
|
||||||
itemnode->AddChild(node);
|
|
||||||
|
|
||||||
if (insert_before)
|
|
||||||
parent->InsertChild(itemnode, insert_before);
|
|
||||||
else
|
|
||||||
parent->AddChild(itemnode);
|
|
||||||
}
|
|
||||||
EditorFrame::Get()->NotifyChanged(CHANGED_TREE);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int NodeHandlerSizer::GetTreeIcon(wxXmlNode *node)
|
|
||||||
{
|
|
||||||
int orig = NodeHandler::GetTreeIcon(node);
|
|
||||||
if (orig == 0)
|
|
||||||
{
|
|
||||||
if (XmlReadValue(node, _T("orient")) == _T("wxVERTICAL")) return 2;
|
|
||||||
else return 3;
|
|
||||||
}
|
|
||||||
else return orig;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wxTreeItemId NodeHandlerSizerItem::CreateTreeNode(wxTreeCtrl *treectrl,
|
|
||||||
wxTreeItemId parent,
|
|
||||||
wxXmlNode *node)
|
|
||||||
{
|
|
||||||
wxTreeItemId root;
|
|
||||||
|
|
||||||
root = Find(GetRealNode(node))->CreateTreeNode(treectrl, parent, GetRealNode(node));
|
|
||||||
((XmlTreeData*)treectrl->GetItemData(root))->Node = node;
|
|
||||||
|
|
||||||
//treectrl->Expand(root);
|
|
||||||
return root;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PropertyInfoArray& NodeHandlerSizerItem::GetPropsList(wxXmlNode *node)
|
|
||||||
{
|
|
||||||
m_dummy = NodeHandler::GetPropsList(node);
|
|
||||||
wxXmlNode *nd = GetRealNode(node);
|
|
||||||
m_dummy.Add(PropertyInfo(wxEmptyString, wxEmptyString, wxEmptyString));
|
|
||||||
size_t pos = m_dummy.GetCount();
|
|
||||||
WX_APPEND_ARRAY(m_dummy,
|
|
||||||
Find(nd)->GetPropsList(nd));
|
|
||||||
for (size_t i = pos; i < m_dummy.GetCount(); i++)
|
|
||||||
m_dummy[i].Name = _T("object/") + m_dummy[i].Name;
|
|
||||||
|
|
||||||
return m_dummy;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wxString NodeHandlerSizerItem::GetTreeString(wxXmlNode *node)
|
|
||||||
{
|
|
||||||
wxXmlNode *n = GetRealNode(node);
|
|
||||||
return Find(n)->GetTreeString(n);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int NodeHandlerSizerItem::GetTreeIcon(wxXmlNode *node)
|
|
||||||
{
|
|
||||||
wxXmlNode *n = GetRealNode(node);
|
|
||||||
return Find(n)->GetTreeIcon(n);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wxXmlNode *NodeHandlerSizerItem::GetRealNode(wxXmlNode *node)
|
|
||||||
{
|
|
||||||
return XmlFindNode(node, _T("object"));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void NodeHandlerNotebook::InsertNode(wxXmlNode *parent, wxXmlNode *node, wxXmlNode *insert_before)
|
|
||||||
{
|
|
||||||
{
|
|
||||||
wxXmlNode *itemnode;
|
|
||||||
|
|
||||||
if (XmlGetClass(node) == _T("notebookpage"))
|
|
||||||
itemnode = node;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
itemnode = new wxXmlNode(wxXML_ELEMENT_NODE, _T("object"));
|
|
||||||
itemnode->AddProperty(_T("class"), _T("notebookpage"));
|
|
||||||
itemnode->AddChild(node);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (insert_before)
|
|
||||||
parent->InsertChild(itemnode, insert_before);
|
|
||||||
else
|
|
||||||
parent->AddChild(itemnode);
|
|
||||||
}
|
|
||||||
EditorFrame::Get()->NotifyChanged(CHANGED_TREE);
|
|
||||||
}
|
|
@@ -1,130 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Purpose: XML resources editor
|
|
||||||
// Author: Vaclav Slavik
|
|
||||||
// Created: 2000/05/05
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) 2000 Vaclav Slavik
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
||||||
#pragma interface "nodehnd.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _NODEHND_H_
|
|
||||||
#define _NODEHND_H_
|
|
||||||
|
|
||||||
|
|
||||||
class WXDLLEXPORT wxXmlNode;
|
|
||||||
class WXDLLEXPORT wxList;
|
|
||||||
class WXDLLEXPORT wxListCtrl;
|
|
||||||
|
|
||||||
class EditorFrame;
|
|
||||||
|
|
||||||
#include "wx/treectrl.h"
|
|
||||||
#include "wx/xml/xml.h"
|
|
||||||
#include "nodesdb.h"
|
|
||||||
#include "wx/arrstr.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class NodeHandler : public wxObject
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
static NodeHandler *Find(wxXmlNode *node);
|
|
||||||
|
|
||||||
NodeHandler(NodeInfo *ni);
|
|
||||||
virtual ~NodeHandler();
|
|
||||||
|
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
|
||||||
virtual wxTreeItemId CreateTreeNode(wxTreeCtrl *treectrl, wxTreeItemId parent,
|
|
||||||
wxXmlNode *node);
|
|
||||||
virtual PropertyInfoArray& GetPropsList(wxXmlNode *node);
|
|
||||||
virtual int GetTreeIcon(wxXmlNode * WXUNUSED(node)) {return m_NodeInfo->Icon;}
|
|
||||||
virtual wxString GetTreeString(wxXmlNode *node);
|
|
||||||
wxArrayString& GetChildTypes();
|
|
||||||
virtual void InsertNode(wxXmlNode *parent, wxXmlNode *node, wxXmlNode *insert_before = NULL);
|
|
||||||
virtual wxXmlNode *GetRealNode(wxXmlNode *node) { return node; }
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
NodeInfo *m_NodeInfo;
|
|
||||||
wxArrayString m_ChildTypes;
|
|
||||||
|
|
||||||
static wxList ms_Handlers;
|
|
||||||
static bool ms_HandlersLoaded;
|
|
||||||
};
|
|
||||||
|
|
||||||
// wxPanel handler
|
|
||||||
class NodeHandlerPanel : public NodeHandler
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
NodeHandlerPanel(NodeInfo *ni) : NodeHandler(ni) {}
|
|
||||||
|
|
||||||
virtual wxTreeItemId CreateTreeNode(wxTreeCtrl *treectrl, wxTreeItemId parent,
|
|
||||||
wxXmlNode *node);
|
|
||||||
virtual void InsertNode(wxXmlNode *parent, wxXmlNode *node, wxXmlNode *insert_before = NULL);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// wxSizers handler
|
|
||||||
class NodeHandlerSizer : public NodeHandlerPanel
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
NodeHandlerSizer(NodeInfo *ni) : NodeHandlerPanel(ni) {}
|
|
||||||
|
|
||||||
virtual void InsertNode(wxXmlNode *parent, wxXmlNode *node, wxXmlNode *insert_before = NULL);
|
|
||||||
virtual int GetTreeIcon(wxXmlNode *node);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// item of wxSizer handler
|
|
||||||
class NodeHandlerSizerItem : public NodeHandler
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
NodeHandlerSizerItem(NodeInfo *ni) : NodeHandler(ni) {}
|
|
||||||
|
|
||||||
virtual wxTreeItemId CreateTreeNode(wxTreeCtrl *treectrl, wxTreeItemId parent,
|
|
||||||
wxXmlNode *node);
|
|
||||||
virtual PropertyInfoArray& GetPropsList(wxXmlNode *node);
|
|
||||||
virtual wxString GetTreeString(wxXmlNode *node);
|
|
||||||
virtual int GetTreeIcon(wxXmlNode *node);
|
|
||||||
virtual wxXmlNode *GetRealNode(wxXmlNode *node);
|
|
||||||
|
|
||||||
private:
|
|
||||||
PropertyInfoArray m_dummy;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// wxNotebook handler
|
|
||||||
class NodeHandlerNotebook : public NodeHandlerPanel
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
NodeHandlerNotebook(NodeInfo *ni) : NodeHandlerPanel(ni) {}
|
|
||||||
|
|
||||||
virtual void InsertNode(wxXmlNode *parent, wxXmlNode *node, wxXmlNode *insert_before = NULL);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// notebook page handler
|
|
||||||
class NodeHandlerNotebookPage : public NodeHandlerSizerItem
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
NodeHandlerNotebookPage(NodeInfo *ni) :
|
|
||||||
NodeHandlerSizerItem(ni) {}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Generic handler which handles everything
|
|
||||||
class NodeHandlerUnknown : public NodeHandler
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
NodeHandlerUnknown() : NodeHandler(new NodeInfo) {}
|
|
||||||
|
|
||||||
virtual bool CanHandle(wxXmlNode *WXUNUSED(node)) { return true; }
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
@@ -1,190 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Author: Vaclav Slavik
|
|
||||||
// Created: 2000/05/05
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) 2000 Vaclav Slavik
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma implementation "nodesdb.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// For compilers that support precompilation, includes _T("wx/wx.h").
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#include "wx/textfile.h"
|
|
||||||
#include "wx/tokenzr.h"
|
|
||||||
#include "wx/dir.h"
|
|
||||||
#include "nodesdb.h"
|
|
||||||
#include "wx/arrimpl.cpp"
|
|
||||||
|
|
||||||
WX_DEFINE_OBJARRAY(NodeInfoArray);
|
|
||||||
WX_DEFINE_OBJARRAY(PropertyInfoArray);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void NodeInfo::Read(const wxString& filename, wxPathList& list)
|
|
||||||
{
|
|
||||||
wxString tp;
|
|
||||||
wxString nd, cht;
|
|
||||||
bool ab = false;
|
|
||||||
long icn = -1;
|
|
||||||
|
|
||||||
NodeClass.Empty();
|
|
||||||
|
|
||||||
wxString path = list.FindValidPath(filename);
|
|
||||||
if (path.empty()) return;
|
|
||||||
|
|
||||||
wxTextFile tf;
|
|
||||||
tf.Open(path);
|
|
||||||
|
|
||||||
if (!tf.IsOpened()) return;
|
|
||||||
|
|
||||||
for (size_t i = 0; i < tf.GetLineCount(); i++)
|
|
||||||
{
|
|
||||||
if (tf[i].empty() || tf[i][0u] == _T('#')) continue;
|
|
||||||
wxStringTokenizer tkn(tf[i], _T(' '));
|
|
||||||
wxString s = tkn.GetNextToken();
|
|
||||||
if (s == _T("node"))
|
|
||||||
nd = tkn.GetNextToken();
|
|
||||||
else if (s == _T("childtype"))
|
|
||||||
cht = tkn.GetNextToken();
|
|
||||||
else if (s == _T("icon"))
|
|
||||||
tkn.GetNextToken().ToLong(&icn);
|
|
||||||
else if (s == _T("derived"))
|
|
||||||
{
|
|
||||||
if (tkn.GetNextToken() == _T("from"))
|
|
||||||
{
|
|
||||||
s = tkn.GetNextToken();
|
|
||||||
DerivedFrom.Add(s);
|
|
||||||
Read(s + _T(".df"), list);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (s == _T("abstract"))
|
|
||||||
ab = true;
|
|
||||||
else if (s == _T("type"))
|
|
||||||
{
|
|
||||||
tp = tkn.GetNextToken();
|
|
||||||
}
|
|
||||||
else if (s == _T("var"))
|
|
||||||
{
|
|
||||||
PropertyInfo pi;
|
|
||||||
pi.Name = tkn.GetNextToken();
|
|
||||||
tkn.GetNextToken();
|
|
||||||
pi.Type = tkn.GetNextToken();
|
|
||||||
if (tkn.HasMoreTokens()) pi.MoreInfo = tkn.GetNextToken();
|
|
||||||
|
|
||||||
bool fnd = false;
|
|
||||||
for (size_t j = 0; j < Props.GetCount(); j++)
|
|
||||||
{
|
|
||||||
if (Props[j].Name == pi.Name)
|
|
||||||
{
|
|
||||||
if (Props[j].Type == pi.Type && pi.Type == _T("flags"))
|
|
||||||
Props[j].MoreInfo << _T(',') << pi.MoreInfo;
|
|
||||||
else
|
|
||||||
Props[j] = pi;
|
|
||||||
fnd = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!fnd) Props.Add(pi);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!nd.empty()) NodeClass = nd;
|
|
||||||
if (!cht.empty()) ChildType = cht;
|
|
||||||
if (!tp.empty()) Type = tp;
|
|
||||||
if (icn != -1) Icon = icn;
|
|
||||||
Abstract = ab;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
NodesDb* NodesDb::ms_Instance = NULL;
|
|
||||||
|
|
||||||
NodesDb *NodesDb::Get()
|
|
||||||
{
|
|
||||||
if (ms_Instance == NULL)
|
|
||||||
{
|
|
||||||
(void)new NodesDb;
|
|
||||||
}
|
|
||||||
return ms_Instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
NodesDb::NodesDb()
|
|
||||||
{
|
|
||||||
ms_Instance = this;
|
|
||||||
|
|
||||||
m_Paths.Add(_T("."));
|
|
||||||
m_Paths.Add(_T("./df"));
|
|
||||||
#ifdef __UNIX__
|
|
||||||
m_Paths.Add(wxGetHomeDir() + _T("/.wxrcedit"));
|
|
||||||
#ifdef wxINSTALL_PREFIX
|
|
||||||
m_Paths.Add(wxINSTALL_PREFIX _T("/share/wx/wxrcedit"));
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Load();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void NodesDb::Load()
|
|
||||||
{
|
|
||||||
for (size_t i = 0; i < m_Paths.GetCount(); i++)
|
|
||||||
LoadDir(m_Paths[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void NodesDb::LoadDir(const wxString& path)
|
|
||||||
{
|
|
||||||
if (!wxDirExists(path)) return;
|
|
||||||
|
|
||||||
wxDir dir(path);
|
|
||||||
wxString filename;
|
|
||||||
bool cont;
|
|
||||||
|
|
||||||
cont = dir.GetFirst(&filename, _T("*.df"));
|
|
||||||
while (cont)
|
|
||||||
{
|
|
||||||
LoadFile(filename);
|
|
||||||
cont = dir.GetNext(&filename);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void NodesDb::LoadFile(const wxString& file)
|
|
||||||
{
|
|
||||||
NodeInfo *ni = new NodeInfo;
|
|
||||||
ni->Type = wxEmptyString;
|
|
||||||
ni->Icon = 0;
|
|
||||||
wxPathList paths;
|
|
||||||
size_t i;
|
|
||||||
|
|
||||||
for (i = 0; i < m_Paths.GetCount(); i++)
|
|
||||||
paths.Add(m_Paths[i]);
|
|
||||||
|
|
||||||
ni->Read(file, paths);
|
|
||||||
|
|
||||||
// maybe we already parsed it?
|
|
||||||
for (i = 0; i < m_Infos.GetCount(); i++)
|
|
||||||
if (m_Infos[i].NodeClass == ni->NodeClass) return;
|
|
||||||
|
|
||||||
m_Infos.Add(ni);
|
|
||||||
}
|
|
@@ -1,85 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Purpose: XML resources editor
|
|
||||||
// Author: Vaclav Slavik
|
|
||||||
// Created: 2000/05/05
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) 2000 Vaclav Slavik
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
||||||
#pragma interface "nodesdb.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _NODESDB_H_
|
|
||||||
#define _NODESDB_H_
|
|
||||||
|
|
||||||
#include "wx/dynarray.h"
|
|
||||||
#include "wx/arrstr.h"
|
|
||||||
|
|
||||||
class WXDLLEXPORT wxXmlNode;
|
|
||||||
class WXDLLEXPORT wxString;
|
|
||||||
class WXDLLEXPORT wxPathList;
|
|
||||||
|
|
||||||
|
|
||||||
class PropertyInfo
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PropertyInfo() {}
|
|
||||||
PropertyInfo(const wxString& atype, const wxString& aname, const wxString& amoreinfo)
|
|
||||||
: Type(atype), Name(aname), MoreInfo(amoreinfo) {}
|
|
||||||
|
|
||||||
PropertyInfo& operator=(const PropertyInfo& p)
|
|
||||||
{
|
|
||||||
Type = p.Type; Name = p.Name; MoreInfo = p.MoreInfo;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxString Type;
|
|
||||||
wxString Name;
|
|
||||||
wxString MoreInfo;
|
|
||||||
};
|
|
||||||
|
|
||||||
WX_DECLARE_OBJARRAY(PropertyInfo, PropertyInfoArray);
|
|
||||||
|
|
||||||
|
|
||||||
class NodeInfo
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
wxString NodeClass;
|
|
||||||
wxString Type;
|
|
||||||
PropertyInfoArray Props;
|
|
||||||
wxArrayString DerivedFrom;
|
|
||||||
bool Abstract;
|
|
||||||
wxString ChildType;
|
|
||||||
int Icon;
|
|
||||||
|
|
||||||
void Read(const wxString& filename, wxPathList& list);
|
|
||||||
};
|
|
||||||
|
|
||||||
WX_DECLARE_OBJARRAY(NodeInfo, NodeInfoArray);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class NodesDb
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
NodesDb();
|
|
||||||
|
|
||||||
void Load();
|
|
||||||
void LoadDir(const wxString& path);
|
|
||||||
void LoadFile(const wxString& file);
|
|
||||||
|
|
||||||
NodeInfoArray& GetNodesInfo() { return m_Infos; }
|
|
||||||
|
|
||||||
static NodesDb *Get();
|
|
||||||
|
|
||||||
private:
|
|
||||||
static NodesDb *ms_Instance;
|
|
||||||
NodeInfoArray m_Infos;
|
|
||||||
wxArrayString m_Paths;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
@@ -1,259 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Author: Vaclav Slavik
|
|
||||||
// Created: 2000/05/05
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) 2000 Vaclav Slavik
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma implementation "pe_adv.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx/wx.h".
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#include "wx/xml/xml.h"
|
|
||||||
#include "wx/tokenzr.h"
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#include "wx/dialog.h"
|
|
||||||
#include "wx/checklst.h"
|
|
||||||
#include "pe_basic.h"
|
|
||||||
#include "pe_adv.h"
|
|
||||||
#include "xmlhelpr.h"
|
|
||||||
#include "editor.h"
|
|
||||||
#include "preview.h"
|
|
||||||
#include "wx/colordlg.h"
|
|
||||||
#include "wx/config.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wxWindow* PropEditCtrlFont::CreateEditCtrl()
|
|
||||||
{
|
|
||||||
PropEditCtrlTxt::CreateEditCtrl();
|
|
||||||
m_TextCtrl->Disable();
|
|
||||||
return m_TextCtrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wxTreeItemId PropEditCtrlFont::CreateTreeEntry(wxTreeItemId parent, const PropertyInfo& pinfo)
|
|
||||||
{
|
|
||||||
wxTreeItemId ti = PropEditCtrlTxt::CreateTreeEntry(parent, pinfo);
|
|
||||||
m_PropFrame->AddSingleProp(PropertyInfo(_T("integer"), pinfo.Name + _T("/size"), wxEmptyString), &ti);
|
|
||||||
m_PropFrame->AddSingleProp(PropertyInfo(_T("text"), pinfo.Name + _T("/face"), wxEmptyString), &ti);
|
|
||||||
m_PropFrame->AddSingleProp(PropertyInfo(_T("choice"), pinfo.Name + _T("/style"), _T("normal,italic,slant")), &ti);
|
|
||||||
m_PropFrame->AddSingleProp(PropertyInfo(_T("choice"), pinfo.Name + _T("/weight"), _T("normal,light,bold")), &ti);
|
|
||||||
m_PropFrame->AddSingleProp(PropertyInfo(_T("choice"), pinfo.Name + _T("/family"), _T("default,decorative,roman,script,swiss,modern")), &ti);
|
|
||||||
m_PropFrame->AddSingleProp(PropertyInfo(_T("bool"), pinfo.Name + _T("/underlined"), wxEmptyString), &ti);
|
|
||||||
m_PropFrame->AddSingleProp(PropertyInfo(_T("text"), pinfo.Name + _T("/encoding"), wxEmptyString), &ti);
|
|
||||||
return ti;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(PropEditCtrlChoice, PropEditCtrl)
|
|
||||||
EVT_CHOICE(wxID_ANY, PropEditCtrlChoice::OnChoice)
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
wxWindow* PropEditCtrlChoice::CreateEditCtrl()
|
|
||||||
{
|
|
||||||
m_Choice = new wxChoice(this, wxID_ANY);
|
|
||||||
|
|
||||||
return m_Choice;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PropEditCtrlChoice::ReadValue()
|
|
||||||
{
|
|
||||||
wxStringTokenizer tkn(m_PropInfo->MoreInfo, _T(","));
|
|
||||||
m_Choice->Clear();
|
|
||||||
while (tkn.HasMoreTokens())
|
|
||||||
m_Choice->Append(tkn.GetNextToken());
|
|
||||||
|
|
||||||
wxString sel = XmlReadValue(GetNode(), m_PropInfo->Name);
|
|
||||||
if (!!sel) m_Choice->SetStringSelection(sel);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PropEditCtrlChoice::WriteValue()
|
|
||||||
{
|
|
||||||
XmlWriteValue(GetNode(), m_PropInfo->Name,
|
|
||||||
m_Choice->GetStringSelection());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PropEditCtrlChoice::OnChoice(wxCommandEvent& WXUNUSED(event))
|
|
||||||
{
|
|
||||||
if (CanSave())
|
|
||||||
{
|
|
||||||
WriteValue();
|
|
||||||
EditorFrame::Get()->NotifyChanged(CHANGED_PROPS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PropEditCtrlColor::OnDetails()
|
|
||||||
{
|
|
||||||
wxColour clr;
|
|
||||||
wxString txt = m_TextCtrl->GetValue();
|
|
||||||
long unsigned tmp;
|
|
||||||
|
|
||||||
if (txt.Length() == 7 && txt[0u] == _T('#') &&
|
|
||||||
wxSscanf(txt.c_str(), _T("#%lX"), &tmp) == 1)
|
|
||||||
clr = wxColour((unsigned char)((tmp & 0xFF0000) >> 16),
|
|
||||||
(unsigned char)((tmp & 0x00FF00) >> 8),
|
|
||||||
(unsigned char)((tmp & 0x0000FF)));
|
|
||||||
|
|
||||||
clr = wxGetColourFromUser(NULL, clr);
|
|
||||||
if (clr.Ok())
|
|
||||||
{
|
|
||||||
txt.Printf(_T("#%02X%02X%02X"), clr.Red(), clr.Green(), clr.Blue());
|
|
||||||
m_TextCtrl->SetValue(txt);
|
|
||||||
WriteValue();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PropEditCtrlFlags::OnDetails()
|
|
||||||
{
|
|
||||||
wxString t,txt = m_TextCtrl->GetValue();
|
|
||||||
wxArrayString arr;
|
|
||||||
size_t i;
|
|
||||||
int j;
|
|
||||||
|
|
||||||
wxStringTokenizer tkn(m_PropInfo->MoreInfo, _T(","));
|
|
||||||
while (tkn.HasMoreTokens())
|
|
||||||
arr.Add(tkn.GetNextToken());
|
|
||||||
|
|
||||||
wxConfigBase *cfg = wxConfigBase::Get();
|
|
||||||
|
|
||||||
wxDialog dlg(m_PropFrame, wxID_ANY, _("Flags"),
|
|
||||||
wxPoint(cfg->Read(_T("flagsdlg_x"), wxDefaultCoord), cfg->Read(_T("flagsdlg_y"), wxDefaultCoord)),
|
|
||||||
wxSize(cfg->Read(_T("flagsdlg_w"), 300), cfg->Read(_T("flagsdlg_h"), 300)),
|
|
||||||
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
|
|
||||||
wxSizer *sz = new wxBoxSizer(wxVERTICAL);
|
|
||||||
wxCheckListBox *lbox = new wxCheckListBox(&dlg, wxID_ANY);
|
|
||||||
sz->Add(lbox, 1, wxEXPAND | wxALL, 10);
|
|
||||||
wxSizer *sz2 = new wxBoxSizer(wxHORIZONTAL);
|
|
||||||
wxButton *btnok = new wxButton(&dlg, wxID_OK, _("OK"));
|
|
||||||
btnok->SetDefault();
|
|
||||||
sz2->Add(btnok);
|
|
||||||
sz2->Add(new wxButton(&dlg, wxID_CANCEL, _("Cancel")), 0, wxLEFT, 10);
|
|
||||||
sz->Add(sz2, 0, wxALIGN_RIGHT | wxRIGHT | wxBOTTOM, 10);
|
|
||||||
|
|
||||||
dlg.SetSizer(sz);
|
|
||||||
dlg.Layout();
|
|
||||||
|
|
||||||
for (i = 0; i < arr.GetCount(); i++)
|
|
||||||
lbox->Append(arr[i]);
|
|
||||||
|
|
||||||
tkn.SetString(txt, _T("| "));
|
|
||||||
while (tkn.HasMoreTokens())
|
|
||||||
{
|
|
||||||
t = tkn.GetNextToken();
|
|
||||||
j = arr.Index(t);
|
|
||||||
if (j != wxNOT_FOUND) lbox->Check(j);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (dlg.ShowModal() != wxID_OK) return;
|
|
||||||
|
|
||||||
txt.Empty();
|
|
||||||
|
|
||||||
for (i = 0; i < arr.GetCount(); i++)
|
|
||||||
if (lbox->IsChecked(i))
|
|
||||||
txt << arr[i] << _T('|');
|
|
||||||
if (!txt.empty()) txt.RemoveLast();
|
|
||||||
|
|
||||||
m_TextCtrl->SetValue(txt);
|
|
||||||
WriteValue();
|
|
||||||
|
|
||||||
cfg->Write(_T("flagsdlg_x"), (long)dlg.GetPosition().x);
|
|
||||||
cfg->Write(_T("flagsdlg_y"), (long)dlg.GetPosition().y);
|
|
||||||
cfg->Write(_T("flagsdlg_w"), (long)dlg.GetSize().x);
|
|
||||||
cfg->Write(_T("flagsdlg_h"), (long)dlg.GetSize().y);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wxString PropEditCtrlFile::GetFileTypes()
|
|
||||||
{
|
|
||||||
return m_PropInfo->MoreInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PropEditCtrlFile::OnDetails()
|
|
||||||
{
|
|
||||||
wxString txt = m_TextCtrl->GetValue();
|
|
||||||
txt = wxPathOnly(EditorFrame::Get()->GetFileName()) + _T("/") + txt;
|
|
||||||
wxString name = wxFileSelector(_("Choose file"),
|
|
||||||
wxPathOnly(txt),
|
|
||||||
wxFileNameFromPath(txt),
|
|
||||||
wxEmptyString,
|
|
||||||
GetFileTypes(),
|
|
||||||
wxOPEN | wxFILE_MUST_EXIST);
|
|
||||||
if (!name) return;
|
|
||||||
|
|
||||||
// compute relative path:
|
|
||||||
wxArrayString axrc, afile;
|
|
||||||
wxStringTokenizer tkn;
|
|
||||||
tkn.SetString(name, _T("/\\"));
|
|
||||||
while (tkn.HasMoreTokens()) afile.Add(tkn.GetNextToken());
|
|
||||||
tkn.SetString(EditorFrame::Get()->GetFileName(), _T("/\\"));
|
|
||||||
while (tkn.HasMoreTokens()) axrc.Add(tkn.GetNextToken());
|
|
||||||
|
|
||||||
if (afile.GetCount() == 0 || axrc.GetCount() == 0)
|
|
||||||
txt = name;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
while (axrc[0] == afile[0])
|
|
||||||
{
|
|
||||||
afile.RemoveAt(0u);
|
|
||||||
axrc.RemoveAt(0u);
|
|
||||||
}
|
|
||||||
size_t i;
|
|
||||||
txt.Empty();
|
|
||||||
for (i = 0; i < axrc.GetCount()-1/*w/o filename*/; i++) txt << _T("../");
|
|
||||||
for (i = 0; i < afile.GetCount(); i++) txt << afile[i] << _T("/");
|
|
||||||
txt.RemoveLast();
|
|
||||||
}
|
|
||||||
|
|
||||||
m_TextCtrl->SetValue(txt);
|
|
||||||
WriteValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wxString PropEditCtrlImageFile::GetFileTypes()
|
|
||||||
{
|
|
||||||
return _("GIF files (*.gif)|*.gif|JPEG files (*.jpg)|*.jpg|PNG files (*.png)|*.png|BMP files (*.bmp)|*.bmp|All files (*)|*");
|
|
||||||
}
|
|
@@ -1,101 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Purpose: XML resources editor
|
|
||||||
// Author: Vaclav Slavik
|
|
||||||
// Created: 2000/05/05
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) 2000 Vaclav Slavik
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
||||||
#pragma interface "pe_adv.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _PE_ADV_H_
|
|
||||||
#define _PE_ADV_H_
|
|
||||||
|
|
||||||
#include "propedit.h"
|
|
||||||
#include "pe_basic.h"
|
|
||||||
|
|
||||||
class WXDLLEXPORT wxChoice;
|
|
||||||
|
|
||||||
|
|
||||||
class PropEditCtrlFont : public PropEditCtrlTxt
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PropEditCtrlFont(PropertiesFrame *propFrame)
|
|
||||||
: PropEditCtrlTxt(propFrame) {}
|
|
||||||
|
|
||||||
virtual wxWindow* CreateEditCtrl();
|
|
||||||
virtual wxTreeItemId CreateTreeEntry(wxTreeItemId parent, const PropertyInfo& pinfo);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PropEditCtrlChoice : public PropEditCtrl
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PropEditCtrlChoice(PropertiesFrame *propFrame)
|
|
||||||
: PropEditCtrl(propFrame) {}
|
|
||||||
|
|
||||||
virtual wxWindow* CreateEditCtrl();
|
|
||||||
|
|
||||||
virtual void ReadValue();
|
|
||||||
virtual void WriteValue();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
wxChoice *m_Choice;
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
void OnChoice(wxCommandEvent& event);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class PropEditCtrlColor : public PropEditCtrlTxt
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PropEditCtrlColor(PropertiesFrame *propFrame)
|
|
||||||
: PropEditCtrlTxt(propFrame) {}
|
|
||||||
|
|
||||||
virtual bool HasDetails() { return true; }
|
|
||||||
virtual void OnDetails();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PropEditCtrlFlags : public PropEditCtrlTxt
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PropEditCtrlFlags(PropertiesFrame *propFrame)
|
|
||||||
: PropEditCtrlTxt(propFrame) {}
|
|
||||||
|
|
||||||
virtual bool HasDetails() { return true; }
|
|
||||||
virtual void OnDetails();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PropEditCtrlFile : public PropEditCtrlTxt
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PropEditCtrlFile(PropertiesFrame *propFrame)
|
|
||||||
: PropEditCtrlTxt(propFrame) {}
|
|
||||||
|
|
||||||
virtual bool HasDetails() { return true; }
|
|
||||||
virtual void OnDetails();
|
|
||||||
|
|
||||||
virtual wxString GetFileTypes();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class PropEditCtrlImageFile : public PropEditCtrlFile
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PropEditCtrlImageFile(PropertiesFrame *propFrame)
|
|
||||||
: PropEditCtrlFile(propFrame) {}
|
|
||||||
|
|
||||||
virtual wxString GetFileTypes();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@@ -1,446 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Author: Vaclav Slavik
|
|
||||||
// Created: 2000/05/05
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) 2000 Vaclav Slavik
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma implementation "pe_basic.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx/wx.h".
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#include "wx/xml/xml.h"
|
|
||||||
#include "wx/tokenzr.h"
|
|
||||||
#include "pe_basic.h"
|
|
||||||
#include "xmlhelpr.h"
|
|
||||||
#include "editor.h"
|
|
||||||
#include "preview.h"
|
|
||||||
#include "nodehnd.h"
|
|
||||||
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(PropEditCtrlTxt, PropEditCtrl)
|
|
||||||
EVT_TEXT(wxID_ANY, PropEditCtrlTxt::OnText)
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
|
|
||||||
wxWindow *PropEditCtrlTxt::CreateEditCtrl()
|
|
||||||
{
|
|
||||||
return (m_TextCtrl = new wxTextCtrl(this, wxID_ANY));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PropEditCtrlTxt::OnText(wxCommandEvent& WXUNUSED(event))
|
|
||||||
{
|
|
||||||
if (CanSave())
|
|
||||||
{
|
|
||||||
WriteValue();
|
|
||||||
EditorFrame::Get()->NotifyChanged(CHANGED_PROPS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PropEditCtrlTxt::ReadValue()
|
|
||||||
{
|
|
||||||
m_TextCtrl->SetValue(XmlReadValue(GetNode(), m_PropInfo->Name));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PropEditCtrlTxt::WriteValue()
|
|
||||||
{
|
|
||||||
wxString newv = m_TextCtrl->GetValue();
|
|
||||||
XmlWriteValue(GetNode(), m_PropInfo->Name, newv);
|
|
||||||
m_TreeCtrl->SetItemBold(m_TreeItem, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wxWindow *PropEditCtrlInt::CreateEditCtrl()
|
|
||||||
{
|
|
||||||
PropEditCtrlTxt::CreateEditCtrl();
|
|
||||||
#if wxUSE_VALIDATORS
|
|
||||||
m_TextCtrl->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
|
|
||||||
#endif
|
|
||||||
return m_TextCtrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(PropEditCtrlBool, PropEditCtrl)
|
|
||||||
EVT_CHOICE(wxID_ANY, PropEditCtrlBool::OnChoice)
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
wxWindow *PropEditCtrlBool::CreateEditCtrl()
|
|
||||||
{
|
|
||||||
m_Choice = new wxChoice(this, wxID_ANY);
|
|
||||||
m_Choice->Append(_T("false"));
|
|
||||||
m_Choice->Append(_T("true"));
|
|
||||||
return m_Choice;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PropEditCtrlBool::ReadValue()
|
|
||||||
{
|
|
||||||
int sel;
|
|
||||||
if (XmlReadValue(GetNode(), m_PropInfo->Name) == _T("0")) sel = 0;
|
|
||||||
else sel = 1;
|
|
||||||
m_Choice->SetSelection(sel);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PropEditCtrlBool::WriteValue()
|
|
||||||
{
|
|
||||||
wxString newv = m_Choice->GetSelection() == 0 ? _T("0") : _T("1");
|
|
||||||
|
|
||||||
XmlWriteValue(GetNode(), m_PropInfo->Name, newv);
|
|
||||||
m_TreeCtrl->SetItemBold(m_TreeItem, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wxString PropEditCtrlBool::GetValueAsText(wxTreeItemId ti)
|
|
||||||
{
|
|
||||||
PropertyInfo& pir = ((PETreeData*)m_TreeCtrl->GetItemData(ti))->PropInfo;
|
|
||||||
wxString x = XmlReadValue(GetNode(), pir.Name);
|
|
||||||
if (x == _T("1")) x = _T("true");
|
|
||||||
else if (x == _T("0")) x = _T("false");
|
|
||||||
return x;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PropEditCtrlBool::OnChoice(wxCommandEvent& WXUNUSED(event))
|
|
||||||
{
|
|
||||||
if (CanSave())
|
|
||||||
{
|
|
||||||
WriteValue();
|
|
||||||
EditorFrame::Get()->NotifyChanged(CHANGED_PROPS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// --------------------------- PropEditCtrlCoord -----------------------
|
|
||||||
|
|
||||||
class PropEditCtrlCoordXY : public PropEditCtrlInt
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PropEditCtrlCoordXY(PropertiesFrame *propFrame, int which)
|
|
||||||
: PropEditCtrlInt(propFrame), m_which(which) {}
|
|
||||||
|
|
||||||
virtual void ReadValue()
|
|
||||||
{
|
|
||||||
wxString s = XmlReadValue(GetNode(), m_PropInfo->Name);
|
|
||||||
if (s.IsEmpty())
|
|
||||||
{
|
|
||||||
m_c[0] = m_c[1] = _T("-1");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
wxStringTokenizer tkn(s.BeforeFirst(_T('d')), _T(","));
|
|
||||||
m_c[0] = tkn.GetNextToken();
|
|
||||||
m_c[1] = tkn.GetNextToken();
|
|
||||||
}
|
|
||||||
m_TextCtrl->SetValue(m_c[m_which]);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void WriteValue()
|
|
||||||
{
|
|
||||||
m_c[m_which] = m_TextCtrl->GetValue();
|
|
||||||
if (m_c[0].IsEmpty()) m_c[0] = _T("-1");
|
|
||||||
if (m_c[1].IsEmpty()) m_c[1] = _T("-1");
|
|
||||||
wxString s;
|
|
||||||
s << m_c[0] << _T(',') << m_c[1];
|
|
||||||
wxString prev = XmlReadValue(GetNode(), m_PropInfo->Name);
|
|
||||||
if (prev[prev.Len()-1] == _T('d')) s << _T('d');
|
|
||||||
XmlWriteValue(GetNode(), m_PropInfo->Name, s);
|
|
||||||
m_TreeCtrl->SetItemBold(m_TreeCtrl->GetItemParent(m_TreeItem), true);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual wxString GetValueAsText(wxTreeItemId ti)
|
|
||||||
{
|
|
||||||
PropertyInfo *pi = &(((PETreeData*)m_TreeCtrl->GetItemData(ti))->PropInfo);
|
|
||||||
wxString s = XmlReadValue(GetNode(), pi->Name);
|
|
||||||
if (s.IsEmpty())
|
|
||||||
{
|
|
||||||
m_c[0] = m_c[1] = _T("-1");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
wxStringTokenizer tkn(s.BeforeFirst(_T('d')), _T(","));
|
|
||||||
m_c[0] = tkn.GetNextToken();
|
|
||||||
m_c[1] = tkn.GetNextToken();
|
|
||||||
}
|
|
||||||
return m_c[m_which];
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual wxString GetPropName(const PropertyInfo& WXUNUSED(pinfo))
|
|
||||||
{
|
|
||||||
if (m_which == 0) return _T("x"); else return _T("y");
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool HasClearButton() { return false; }
|
|
||||||
virtual bool IsPresent(const PropertyInfo& WXUNUSED(pinfo)) { return false; }
|
|
||||||
|
|
||||||
|
|
||||||
protected:
|
|
||||||
wxString m_c[2];
|
|
||||||
int m_which;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class PropEditCtrlCoordDlg : public PropEditCtrlBool
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PropEditCtrlCoordDlg(PropertiesFrame *propFrame)
|
|
||||||
: PropEditCtrlBool(propFrame) {}
|
|
||||||
|
|
||||||
virtual void ReadValue()
|
|
||||||
{
|
|
||||||
wxString s = XmlReadValue(GetNode(), m_PropInfo->Name);
|
|
||||||
if (s.IsEmpty()) m_Choice->SetSelection(1);
|
|
||||||
else if (s[s.Length()-1] == _T('d'))
|
|
||||||
m_Choice->SetSelection(1);
|
|
||||||
else
|
|
||||||
m_Choice->SetSelection(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void WriteValue()
|
|
||||||
{
|
|
||||||
wxString s = XmlReadValue(GetNode(), m_PropInfo->Name).BeforeFirst(_T('d'));
|
|
||||||
if (m_Choice->GetSelection() == 1) s << _T('d');
|
|
||||||
XmlWriteValue(GetNode(), m_PropInfo->Name, s);
|
|
||||||
m_TreeCtrl->SetItemBold(m_TreeCtrl->GetItemParent(m_TreeItem), true);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual wxString GetValueAsText(wxTreeItemId ti)
|
|
||||||
{
|
|
||||||
PropertyInfo *pi = &(((PETreeData*)m_TreeCtrl->GetItemData(ti))->PropInfo);
|
|
||||||
wxString s = XmlReadValue(GetNode(), pi->Name);
|
|
||||||
if (s.IsEmpty())
|
|
||||||
return _("true");
|
|
||||||
else if (s[s.Length()-1] != _T('d'))
|
|
||||||
return _("false");
|
|
||||||
else
|
|
||||||
return _("true");
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual wxString GetPropName(const PropertyInfo& WXUNUSED(pinfo))
|
|
||||||
{
|
|
||||||
return _T("dlg");
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool HasClearButton() { return false; }
|
|
||||||
virtual bool IsPresent(const PropertyInfo& WXUNUSED(pinfo)) { return false; }
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PropEditCtrlCoord::PropEditCtrlCoord(PropertiesFrame *propFrame)
|
|
||||||
: PropEditCtrlTxt(propFrame)
|
|
||||||
{
|
|
||||||
m_CtrlX = new PropEditCtrlCoordXY(propFrame, 0);
|
|
||||||
m_CtrlY = new PropEditCtrlCoordXY(propFrame, 1);
|
|
||||||
m_CtrlDlg = new PropEditCtrlCoordDlg(propFrame);
|
|
||||||
}
|
|
||||||
|
|
||||||
PropEditCtrlCoord::~PropEditCtrlCoord()
|
|
||||||
{
|
|
||||||
delete m_CtrlX;
|
|
||||||
delete m_CtrlY;
|
|
||||||
delete m_CtrlDlg;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wxTreeItemId PropEditCtrlCoord::CreateTreeEntry(wxTreeItemId parent, const PropertyInfo& pinfo)
|
|
||||||
{
|
|
||||||
wxTreeItemId id = PropEditCtrlTxt::CreateTreeEntry(parent, pinfo);
|
|
||||||
m_CtrlX->CreateTreeEntry(id, PropertyInfo(_T("text"), pinfo.Name, _T("")));
|
|
||||||
m_CtrlY->CreateTreeEntry(id, PropertyInfo(_T("text"), pinfo.Name, _T("")));
|
|
||||||
m_CtrlDlg->CreateTreeEntry(id, PropertyInfo(_T("bool"), pinfo.Name, _T("")));
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// --------------------------- PropEditCtrlDim -----------------------
|
|
||||||
|
|
||||||
class PropEditCtrlDimX : public PropEditCtrlInt
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PropEditCtrlDimX(PropertiesFrame *propFrame)
|
|
||||||
: PropEditCtrlInt(propFrame){}
|
|
||||||
|
|
||||||
virtual void ReadValue()
|
|
||||||
{
|
|
||||||
wxString s = XmlReadValue(GetNode(), m_PropInfo->Name);
|
|
||||||
m_c = s.BeforeFirst(_T('d'));
|
|
||||||
m_TextCtrl->SetValue(m_c);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void WriteValue()
|
|
||||||
{
|
|
||||||
wxString s = XmlReadValue(GetNode(), m_PropInfo->Name);
|
|
||||||
bool dlg = !s.IsEmpty() && s[s.Length()-1] == _T('d');
|
|
||||||
m_c = m_TextCtrl->GetValue();
|
|
||||||
s = m_c;
|
|
||||||
if (dlg) s << _T('d');
|
|
||||||
XmlWriteValue(GetNode(), m_PropInfo->Name, s);
|
|
||||||
m_TreeCtrl->SetItemBold(m_TreeCtrl->GetItemParent(m_TreeItem), true);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual wxString GetValueAsText(wxTreeItemId ti)
|
|
||||||
{
|
|
||||||
PropertyInfo *pi = &(((PETreeData*)m_TreeCtrl->GetItemData(ti))->PropInfo);
|
|
||||||
return XmlReadValue(GetNode(), pi->Name).BeforeFirst(_T('d'));
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual wxString GetPropName(const PropertyInfo& WXUNUSED(pinfo))
|
|
||||||
{
|
|
||||||
return _T("val");
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool HasClearButton() { return false; }
|
|
||||||
virtual bool IsPresent(const PropertyInfo& WXUNUSED(pinfo)) { return false; }
|
|
||||||
|
|
||||||
|
|
||||||
protected:
|
|
||||||
wxString m_c;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PropEditCtrlDim::PropEditCtrlDim(PropertiesFrame *propFrame)
|
|
||||||
: PropEditCtrlTxt(propFrame)
|
|
||||||
{
|
|
||||||
m_CtrlX = new PropEditCtrlDimX(propFrame);
|
|
||||||
m_CtrlDlg = new PropEditCtrlCoordDlg(propFrame);
|
|
||||||
}
|
|
||||||
|
|
||||||
PropEditCtrlDim::~PropEditCtrlDim()
|
|
||||||
{
|
|
||||||
delete m_CtrlX;
|
|
||||||
delete m_CtrlDlg;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wxTreeItemId PropEditCtrlDim::CreateTreeEntry(wxTreeItemId parent, const PropertyInfo& pinfo)
|
|
||||||
{
|
|
||||||
wxTreeItemId id = PropEditCtrlTxt::CreateTreeEntry(parent, pinfo);
|
|
||||||
m_CtrlX->CreateTreeEntry(id, PropertyInfo(_T("text"), pinfo.Name, _T("")));
|
|
||||||
m_CtrlDlg->CreateTreeEntry(id, PropertyInfo(_T("bool"), pinfo.Name, _T("")));
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// --------------------- PropEditCtrlXRCID -----------------------------
|
|
||||||
|
|
||||||
#define REAL_NODE (NodeHandler::Find(GetNode())->GetRealNode(GetNode()))
|
|
||||||
|
|
||||||
|
|
||||||
void PropEditCtrlXRCID::ReadValue()
|
|
||||||
{
|
|
||||||
m_TextCtrl->SetValue(REAL_NODE->GetPropVal(_T("name"), wxEmptyString));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PropEditCtrlXRCID::WriteValue()
|
|
||||||
{
|
|
||||||
wxString s =m_TextCtrl->GetValue();
|
|
||||||
if (s.IsEmpty()) s = _T("-1");
|
|
||||||
|
|
||||||
REAL_NODE->DeleteProperty(_T("name"));
|
|
||||||
REAL_NODE->AddProperty(_T("name"), s);
|
|
||||||
|
|
||||||
m_TreeCtrl->SetItemBold(m_TreeItem, true);
|
|
||||||
EditorFrame::Get()->NotifyChanged(CHANGED_TREE_SELECTED);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PropEditCtrlXRCID::Clear()
|
|
||||||
{
|
|
||||||
EndEdit();
|
|
||||||
REAL_NODE->DeleteProperty(_T("name"));
|
|
||||||
m_TreeCtrl->SetItemBold(m_TreeItem, false);
|
|
||||||
EditorFrame::Get()->NotifyChanged(CHANGED_TREE_SELECTED);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PropEditCtrlXRCID::OnDetails()
|
|
||||||
{
|
|
||||||
wxString choices[] = {wxString(_T("-1"))
|
|
||||||
#define stdID(id) , wxString(_T(#id))
|
|
||||||
stdID(wxID_OK) stdID(wxID_CANCEL)
|
|
||||||
stdID(wxID_YES) stdID(wxID_NO)
|
|
||||||
stdID(wxID_APPLY) stdID(wxID_HELP)
|
|
||||||
stdID(wxID_HELP_CONTEXT)
|
|
||||||
|
|
||||||
stdID(wxID_OPEN) stdID(wxID_CLOSE) stdID(wxID_NEW)
|
|
||||||
stdID(wxID_SAVE) stdID(wxID_SAVEAS) stdID(wxID_REVERT)
|
|
||||||
stdID(wxID_EXIT) stdID(wxID_UNDO) stdID(wxID_REDO)
|
|
||||||
stdID(wxID_PRINT) stdID(wxID_PRINT_SETUP)
|
|
||||||
stdID(wxID_PREVIEW) stdID(wxID_ABOUT) stdID(wxID_HELP_CONTENTS)
|
|
||||||
stdID(wxID_HELP_COMMANDS) stdID(wxID_HELP_PROCEDURES)
|
|
||||||
stdID(wxID_CUT) stdID(wxID_COPY) stdID(wxID_PASTE)
|
|
||||||
stdID(wxID_CLEAR) stdID(wxID_FIND) stdID(wxID_DUPLICATE)
|
|
||||||
stdID(wxID_SELECTALL)
|
|
||||||
stdID(wxID_STATIC) stdID(wxID_FORWARD) stdID(wxID_BACKWARD)
|
|
||||||
stdID(wxID_DEFAULT) stdID(wxID_MORE) stdID(wxID_SETUP)
|
|
||||||
stdID(wxID_RESET)
|
|
||||||
#undef stdID
|
|
||||||
};
|
|
||||||
|
|
||||||
wxString s =
|
|
||||||
wxGetSingleChoice(_("Choose from predefined IDs:"), _("XRCID"),
|
|
||||||
38/*sizeof choices*/, choices);
|
|
||||||
if (!s) return;
|
|
||||||
m_TextCtrl->SetValue(s);
|
|
||||||
WriteValue();
|
|
||||||
EditorFrame::Get()->NotifyChanged(CHANGED_PROPS);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wxString PropEditCtrlXRCID::GetValueAsText(wxTreeItemId WXUNUSED(ti))
|
|
||||||
{
|
|
||||||
return REAL_NODE->GetPropVal(_T("name"), wxEmptyString);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool PropEditCtrlXRCID::IsPresent(const PropertyInfo& WXUNUSED(pinfo))
|
|
||||||
{
|
|
||||||
return REAL_NODE->HasProp(_T("name"));
|
|
||||||
}
|
|
||||||
|
|
||||||
#undef REAL_NODE
|
|
||||||
|
|
@@ -1,139 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Purpose: XML resources editor
|
|
||||||
// Author: Vaclav Slavik
|
|
||||||
// Created: 2000/05/05
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) 2000 Vaclav Slavik
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
||||||
#pragma interface "pe_basic.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _PE_BASIC_H_
|
|
||||||
#define _PE_BASIC_H_
|
|
||||||
|
|
||||||
#include "propedit.h"
|
|
||||||
|
|
||||||
class WXDLLEXPORT wxChoice;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PropEditCtrlNull : public PropEditCtrl
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PropEditCtrlNull(PropertiesFrame *propFrame)
|
|
||||||
: PropEditCtrl(propFrame) {}
|
|
||||||
|
|
||||||
virtual void BeginEdit(const wxRect& WXUNUSED(rect), wxTreeItemId WXUNUSED(ti)) {}
|
|
||||||
virtual void EndEdit() {}
|
|
||||||
|
|
||||||
virtual wxWindow* CreateEditCtrl() {return NULL;}
|
|
||||||
|
|
||||||
virtual void ReadValue() {}
|
|
||||||
virtual void WriteValue() {}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PropEditCtrlTxt : public PropEditCtrl
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PropEditCtrlTxt(PropertiesFrame *propFrame)
|
|
||||||
: PropEditCtrl(propFrame) {}
|
|
||||||
|
|
||||||
virtual wxWindow* CreateEditCtrl();
|
|
||||||
|
|
||||||
virtual void ReadValue();
|
|
||||||
virtual void WriteValue();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
wxTextCtrl *m_TextCtrl;
|
|
||||||
|
|
||||||
private:
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
void OnText(wxCommandEvent& event);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PropEditCtrlInt : public PropEditCtrlTxt
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PropEditCtrlInt(PropertiesFrame *propFrame)
|
|
||||||
: PropEditCtrlTxt(propFrame) {}
|
|
||||||
|
|
||||||
virtual wxWindow* CreateEditCtrl();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PropEditCtrlBool : public PropEditCtrl
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PropEditCtrlBool(PropertiesFrame *propFrame)
|
|
||||||
: PropEditCtrl(propFrame) {}
|
|
||||||
|
|
||||||
virtual wxWindow* CreateEditCtrl();
|
|
||||||
|
|
||||||
virtual void ReadValue();
|
|
||||||
virtual void WriteValue();
|
|
||||||
virtual wxString GetValueAsText(wxTreeItemId ti);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
wxChoice *m_Choice;
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
void OnChoice(wxCommandEvent& event);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class PropEditCtrlCoord : public PropEditCtrlTxt
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PropEditCtrlCoord(PropertiesFrame *propFrame);
|
|
||||||
~PropEditCtrlCoord();
|
|
||||||
|
|
||||||
virtual wxTreeItemId CreateTreeEntry(wxTreeItemId parent, const PropertyInfo& pinfo);
|
|
||||||
|
|
||||||
private:
|
|
||||||
PropEditCtrl *m_CtrlX, *m_CtrlY, *m_CtrlDlg;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class PropEditCtrlDim : public PropEditCtrlTxt
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PropEditCtrlDim(PropertiesFrame *propFrame);
|
|
||||||
~PropEditCtrlDim();
|
|
||||||
|
|
||||||
virtual wxTreeItemId CreateTreeEntry(wxTreeItemId parent, const PropertyInfo& pinfo);
|
|
||||||
|
|
||||||
private:
|
|
||||||
PropEditCtrl *m_CtrlX, *m_CtrlDlg;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PropEditCtrlXRCID : public PropEditCtrlTxt
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PropEditCtrlXRCID(PropertiesFrame *propFrame)
|
|
||||||
: PropEditCtrlTxt(propFrame) {}
|
|
||||||
|
|
||||||
virtual void ReadValue();
|
|
||||||
virtual void WriteValue();
|
|
||||||
virtual void Clear();
|
|
||||||
virtual bool HasDetails() { return true; }
|
|
||||||
virtual void OnDetails();
|
|
||||||
virtual wxString GetValueAsText(wxTreeItemId ti);
|
|
||||||
virtual bool IsPresent(const PropertyInfo& pinfo);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
@@ -1,291 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Author: Vaclav Slavik
|
|
||||||
// Created: 2000/05/05
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) 2000 Vaclav Slavik
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma implementation "preview.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx/wx.h".
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#include "wx/xml/xml.h"
|
|
||||||
#include "wx/xrc/xmlres.h"
|
|
||||||
#include "wx/config.h"
|
|
||||||
#include "wx/log.h"
|
|
||||||
#include "wx/splitter.h"
|
|
||||||
#include "preview.h"
|
|
||||||
#include "xmlhelpr.h"
|
|
||||||
#include "editor.h"
|
|
||||||
|
|
||||||
#include "wx/xrc/xh_menu.h"
|
|
||||||
|
|
||||||
class MyMenubarHandler : public wxMenuBarXmlHandler
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
MyMenubarHandler(wxMenuBar *mbar) : m_MenuBar(mbar) {}
|
|
||||||
|
|
||||||
wxObject *DoCreateResource()
|
|
||||||
{
|
|
||||||
//wxMenuBar *menubar = new wxMenuBar(GetStyle());
|
|
||||||
CreateChildren(m_MenuBar);
|
|
||||||
return m_MenuBar;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
wxMenuBar *m_MenuBar;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PreviewFrame* PreviewFrame::ms_Instance = NULL;
|
|
||||||
|
|
||||||
PreviewFrame *PreviewFrame::Get()
|
|
||||||
{
|
|
||||||
if (ms_Instance == NULL)
|
|
||||||
{
|
|
||||||
(void)new PreviewFrame;
|
|
||||||
ms_Instance->Show(true);
|
|
||||||
}
|
|
||||||
return ms_Instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
PreviewFrame::PreviewFrame()
|
|
||||||
: wxFrame(EditorFrame::Get(), wxID_ANY, _("Preview"),
|
|
||||||
wxDefaultPosition, wxDefaultSize,
|
|
||||||
wxDEFAULT_FRAME_STYLE | wxFRAME_NO_TASKBAR
|
|
||||||
#ifdef __WXMSW__
|
|
||||||
| wxFRAME_TOOL_WINDOW
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
|
||||||
m_Dirty = false;
|
|
||||||
ms_Instance = this;
|
|
||||||
m_Node = NULL;
|
|
||||||
|
|
||||||
SetMenuBar(new wxMenuBar());
|
|
||||||
|
|
||||||
m_RC = NULL;
|
|
||||||
m_TmpFile = wxGetTempFileName(_T("wxrcedit"));
|
|
||||||
ResetResource();
|
|
||||||
|
|
||||||
wxConfigBase *cfg = wxConfigBase::Get();
|
|
||||||
SetSize(wxRect(wxPoint(cfg->Read(_T("previewframe_x"), wxDefaultCoord), cfg->Read(_T("previewframe_y"), wxDefaultCoord)),
|
|
||||||
wxSize(cfg->Read(_T("previewframe_w"), 400), cfg->Read(_T("previewframe_h"), 400))));
|
|
||||||
|
|
||||||
m_Splitter = new wxSplitterWindow(this, wxID_ANY);
|
|
||||||
#if wxUSE_LOG
|
|
||||||
m_LogCtrl = new wxTextCtrl(m_Splitter, wxID_ANY, wxEmptyString, wxDefaultPosition,
|
|
||||||
wxDefaultSize, wxTE_MULTILINE);
|
|
||||||
#endif // wxUSE_LOG
|
|
||||||
m_ScrollWin = new wxScrolledWindow(m_Splitter, wxID_ANY);
|
|
||||||
m_ScrollWin->SetBackgroundColour(_T("light steel blue"));
|
|
||||||
#if wxUSE_LOG
|
|
||||||
m_Splitter->SplitHorizontally(m_ScrollWin, m_LogCtrl, cfg->Read(_T("previewframe_sash"), 300));
|
|
||||||
#endif // wxUSE_LOG
|
|
||||||
|
|
||||||
#if wxUSE_STATUSBAR
|
|
||||||
CreateStatusBar();
|
|
||||||
#endif // wxUSE_STATUSBAR
|
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
|
||||||
SendSizeEvent(); // force resize for WXMSW
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PreviewFrame::ResetResource()
|
|
||||||
{
|
|
||||||
delete m_RC;
|
|
||||||
m_RC = new wxXmlResource;
|
|
||||||
// these handlers take precedence over std. ones:
|
|
||||||
m_RC->AddHandler(new MyMenubarHandler(GetMenuBar()));
|
|
||||||
// std handlers:
|
|
||||||
m_RC->InitAllHandlers();
|
|
||||||
wxRemoveFile(m_TmpFile);
|
|
||||||
m_RC->Load(m_TmpFile);
|
|
||||||
}
|
|
||||||
|
|
||||||
PreviewFrame::~PreviewFrame()
|
|
||||||
{
|
|
||||||
wxConfigBase *cfg = wxConfigBase::Get();
|
|
||||||
cfg->Write(_T("previewframe_x"), (long)GetPosition().x);
|
|
||||||
cfg->Write(_T("previewframe_y"), (long)GetPosition().y);
|
|
||||||
cfg->Write(_T("previewframe_w"), (long)GetSize().x);
|
|
||||||
cfg->Write(_T("previewframe_h"), (long)GetSize().y);
|
|
||||||
cfg->Write(_T("previewframe_sash"), (long)m_Splitter->GetSashPosition());
|
|
||||||
|
|
||||||
ms_Instance = NULL;
|
|
||||||
|
|
||||||
delete m_RC;
|
|
||||||
wxRemoveFile(m_TmpFile);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PreviewFrame::MakeDirty()
|
|
||||||
{
|
|
||||||
if (m_Node == NULL) return;
|
|
||||||
if (m_Dirty) return;
|
|
||||||
m_Dirty = true;
|
|
||||||
#if wxUSE_LOG
|
|
||||||
m_LogCtrl->Clear();
|
|
||||||
m_LogCtrl->SetValue(_("Resource modified.\nMove mouse cursor over the preview window to refresh it."));
|
|
||||||
#endif // wxUSE_LOG
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PreviewFrame::Preview(wxXmlNode *node, wxXmlDocument *orig_doc)
|
|
||||||
{
|
|
||||||
wxString version = orig_doc->GetRoot()->GetPropVal(wxT("version"), wxT("0.0.0.0"));
|
|
||||||
|
|
||||||
while (node->GetParent()->GetParent() != NULL) node = node->GetParent();
|
|
||||||
|
|
||||||
{
|
|
||||||
wxXmlDocument doc;
|
|
||||||
wxXmlNode *root = new wxXmlNode(wxXML_ELEMENT_NODE, _T("resource"));
|
|
||||||
root->AddProperty(new wxXmlProperty(wxT("version"),version,NULL));
|
|
||||||
doc.SetRoot(root);
|
|
||||||
doc.GetRoot()->AddChild(new wxXmlNode(*node));
|
|
||||||
doc.SetFileEncoding(orig_doc->GetFileEncoding());
|
|
||||||
|
|
||||||
if (XmlGetClass(doc.GetRoot()->GetChildren()) == _T("wxDialog"))
|
|
||||||
XmlSetClass(doc.GetRoot()->GetChildren(), _T("wxPanel"));
|
|
||||||
|
|
||||||
if (XmlGetClass(doc.GetRoot()->GetChildren()) == _T("wxFrame"))
|
|
||||||
XmlSetClass(doc.GetRoot()->GetChildren(), _T("wxPanel"));
|
|
||||||
|
|
||||||
doc.Save(m_TmpFile);
|
|
||||||
// wxXmlResource will detect change automatically
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//if (m_Node != node)
|
|
||||||
{
|
|
||||||
SetToolBar(NULL);
|
|
||||||
for (int i = (int)(GetMenuBar()->GetMenuCount())-1; i >= 0; i--)
|
|
||||||
delete GetMenuBar()->Remove(i);
|
|
||||||
m_ScrollWin->DestroyChildren();
|
|
||||||
}
|
|
||||||
|
|
||||||
m_Node = node;
|
|
||||||
m_Doc = orig_doc;
|
|
||||||
|
|
||||||
#if wxUSE_LOG
|
|
||||||
m_LogCtrl->Clear();
|
|
||||||
wxLogTextCtrl mylog(m_LogCtrl);
|
|
||||||
wxLog *oldlog = wxLog::SetActiveTarget(&mylog);
|
|
||||||
#endif // wxUSE_LOG
|
|
||||||
|
|
||||||
wxString oldcwd = wxGetCwd();
|
|
||||||
wxSetWorkingDirectory(wxPathOnly(EditorFrame::Get()->GetFileName()));
|
|
||||||
|
|
||||||
if (XmlGetClass(node) == _T("wxMenuBar") || XmlGetClass(node) == _T("wxMenu"))
|
|
||||||
PreviewMenu();
|
|
||||||
else if (XmlGetClass(node) == _T("wxToolBar"))
|
|
||||||
PreviewToolbar();
|
|
||||||
else if (XmlGetClass(node) == _T("wxPanel") || XmlGetClass(node) == _T("wxDialog"))
|
|
||||||
PreviewPanel();
|
|
||||||
else if (XmlGetClass(node) == _T("wxFrame"))
|
|
||||||
PreviewWXFrame();
|
|
||||||
|
|
||||||
wxSetWorkingDirectory(oldcwd);
|
|
||||||
#if wxUSE_LOG
|
|
||||||
wxLog::SetActiveTarget(oldlog);
|
|
||||||
#endif // wxUSE_LOG
|
|
||||||
|
|
||||||
m_Dirty = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PreviewFrame::PreviewMenu()
|
|
||||||
{
|
|
||||||
wxMenuBar *mbar = NULL;
|
|
||||||
|
|
||||||
if (XmlGetClass(m_Node) == _T("wxMenuBar"))
|
|
||||||
mbar = m_RC->LoadMenuBar(m_Node->GetPropVal(_T("name"), _T("-1")));
|
|
||||||
else
|
|
||||||
{
|
|
||||||
wxMenu *m = m_RC->LoadMenu(m_Node->GetPropVal(_T("name"), _T("-1")));
|
|
||||||
if (m != NULL) GetMenuBar()->Append(m, _("(menu)"));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mbar == NULL)
|
|
||||||
wxLogError(_("Cannot preview the menu -- XML resource corrupted."));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PreviewFrame::PreviewToolbar()
|
|
||||||
{
|
|
||||||
SetToolBar(m_RC->LoadToolBar(this, m_Node->GetPropVal(_T("name"), _T("-1"))));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PreviewFrame::PreviewPanel()
|
|
||||||
{
|
|
||||||
wxPanel *panel = m_RC->LoadPanel(m_ScrollWin, m_Node->GetPropVal(_T("name"), _T("-1")));
|
|
||||||
|
|
||||||
if (panel == NULL)
|
|
||||||
wxLogError(_("Cannot preview the panel -- XML resource corrupted."));
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_ScrollWin->SetScrollbars(1, 1, panel->GetSize().x, panel->GetSize().y,
|
|
||||||
0, 0, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PreviewFrame::PreviewWXFrame()
|
|
||||||
{
|
|
||||||
//for this to work the frame MUST have a child panel!
|
|
||||||
|
|
||||||
wxXmlNode* child = m_Node;
|
|
||||||
wxString name;
|
|
||||||
|
|
||||||
while( child != NULL)
|
|
||||||
{
|
|
||||||
name = child->GetPropVal(_T("name"), _T("-1"));
|
|
||||||
|
|
||||||
if(name != _T("-1"))
|
|
||||||
{
|
|
||||||
wxXmlNode* parent = child->GetParent();
|
|
||||||
if(parent->GetPropVal(_T("class"),_T("-1")) == _T("wxPanel"))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
child = child->GetNext();
|
|
||||||
}
|
|
||||||
|
|
||||||
wxPanel *panel = m_RC->LoadPanel(m_ScrollWin, name);
|
|
||||||
|
|
||||||
if (panel == NULL)
|
|
||||||
wxLogError(_("Cannot preview the panel -- XML resource corrupted."));
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_ScrollWin->SetScrollbars(1, 1, panel->GetSize().x, panel->GetSize().y,
|
|
||||||
0, 0, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(PreviewFrame, wxFrame)
|
|
||||||
EVT_ENTER_WINDOW(PreviewFrame::OnMouseEnter)
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
void PreviewFrame::OnMouseEnter(wxMouseEvent& WXUNUSED(event))
|
|
||||||
{
|
|
||||||
if (m_Dirty) Preview(m_Node,m_Doc);
|
|
||||||
}
|
|
@@ -1,68 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Purpose: XML resources editor
|
|
||||||
// Author: Vaclav Slavik
|
|
||||||
// Created: 2000/05/05
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) 2000 Vaclav Slavik
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
||||||
#pragma interface "preview.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _PREVIEW_H_
|
|
||||||
#define _PREVIEW_H_
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class WXDLLEXPORT wxXmlNode;
|
|
||||||
class WXDLLEXPORT wxScrolledWindow;
|
|
||||||
class WXDLLEXPORT wxTextCtrl;
|
|
||||||
class WXDLLEXPORT wxSplitterWindow;
|
|
||||||
class WXDLLEXPORT wxXmlResource;
|
|
||||||
class WXDLLEXPORT wxXmlDocument;
|
|
||||||
#include "wx/frame.h"
|
|
||||||
|
|
||||||
|
|
||||||
class PreviewFrame : public wxFrame
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PreviewFrame();
|
|
||||||
~PreviewFrame();
|
|
||||||
|
|
||||||
void Preview(wxXmlNode *node,wxXmlDocument *doc);
|
|
||||||
void MakeDirty();
|
|
||||||
// current node updated, needs preview refresh
|
|
||||||
// (will be done once mouse enters preview win)
|
|
||||||
|
|
||||||
static PreviewFrame *Get();
|
|
||||||
void ResetResource();
|
|
||||||
|
|
||||||
private:
|
|
||||||
void PreviewMenu();
|
|
||||||
void PreviewToolbar();
|
|
||||||
void PreviewPanel();
|
|
||||||
void PreviewWXFrame();
|
|
||||||
|
|
||||||
private:
|
|
||||||
static PreviewFrame *ms_Instance;
|
|
||||||
wxXmlNode *m_Node;
|
|
||||||
wxXmlDocument *m_Doc;
|
|
||||||
wxScrolledWindow *m_ScrollWin;
|
|
||||||
#if wxUSE_LOG
|
|
||||||
wxTextCtrl *m_LogCtrl;
|
|
||||||
#endif // wxUSE_LOG
|
|
||||||
wxSplitterWindow *m_Splitter;
|
|
||||||
|
|
||||||
wxXmlResource *m_RC;
|
|
||||||
wxString m_TmpFile;
|
|
||||||
|
|
||||||
bool m_Dirty;
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
void OnMouseEnter(wxMouseEvent& event);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
@@ -1,126 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Author: Vaclav Slavik
|
|
||||||
// Created: 2000/05/05
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) 2000 Vaclav Slavik
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma implementation "propedit.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx/wx.h".
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#include "wx/xml/xml.h"
|
|
||||||
#include "propframe.h"
|
|
||||||
#include "propedit.h"
|
|
||||||
#include "xmlhelpr.h"
|
|
||||||
#include "editor.h"
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
ID_CLEAR = wxID_HIGHEST + 1,
|
|
||||||
ID_DETAILS
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(PropEditCtrl, wxPanel)
|
|
||||||
EVT_BUTTON(ID_CLEAR, PropEditCtrl::OnButtonClear)
|
|
||||||
EVT_BUTTON(ID_DETAILS, PropEditCtrl::OnButtonDetails)
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
void PropEditCtrl::OnButtonDetails(wxCommandEvent& WXUNUSED(event))
|
|
||||||
{
|
|
||||||
OnDetails();
|
|
||||||
}
|
|
||||||
|
|
||||||
void PropEditCtrl::OnButtonClear(wxCommandEvent& WXUNUSED(event))
|
|
||||||
{
|
|
||||||
Clear();
|
|
||||||
EditorFrame::Get()->NotifyChanged(CHANGED_PROPS);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void PropEditCtrl::BeginEdit(const wxRect& rect, wxTreeItemId ti)
|
|
||||||
{
|
|
||||||
m_PropInfo = &(((PETreeData*)m_TreeCtrl->GetItemData(ti))->PropInfo);
|
|
||||||
m_TreeItem = ti;
|
|
||||||
|
|
||||||
m_CanSave = false;
|
|
||||||
if (!m_Created)
|
|
||||||
{
|
|
||||||
wxSizer *sz = new wxBoxSizer(wxHORIZONTAL);
|
|
||||||
m_TheCtrl = CreateEditCtrl();
|
|
||||||
sz->Add(m_TheCtrl, 1);
|
|
||||||
if (HasDetails())
|
|
||||||
sz->Add(new wxButton(this, ID_DETAILS, _T("..."), wxDefaultPosition,
|
|
||||||
wxSize(16,wxDefaultCoord)));
|
|
||||||
if (HasClearButton())
|
|
||||||
sz->Add(new wxButton(this, ID_CLEAR, _T("X"), wxDefaultPosition,
|
|
||||||
wxSize(16,wxDefaultCoord)));
|
|
||||||
SetSizer(sz);
|
|
||||||
m_Created = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_TheCtrl->SetFocus();
|
|
||||||
|
|
||||||
SetSize(rect.x, rect.y, rect.width, rect.height);
|
|
||||||
Show(true);
|
|
||||||
ReadValue();
|
|
||||||
m_CanSave = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PropEditCtrl::EndEdit()
|
|
||||||
{
|
|
||||||
Show(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wxTreeItemId PropEditCtrl::CreateTreeEntry(wxTreeItemId parent, const PropertyInfo& pinfo)
|
|
||||||
{
|
|
||||||
wxTreeItemId t = m_TreeCtrl->AppendItem(parent, GetPropName(pinfo));
|
|
||||||
m_TreeCtrl->SetItemData(t, new PETreeData(this, pinfo));
|
|
||||||
if (IsPresent(pinfo))
|
|
||||||
m_TreeCtrl->SetItemBold(t, true);
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool PropEditCtrl::IsPresent(const PropertyInfo& pinfo)
|
|
||||||
{
|
|
||||||
return XmlFindNode(GetNode(), pinfo.Name) != NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PropEditCtrl::Clear()
|
|
||||||
{
|
|
||||||
EndEdit();
|
|
||||||
|
|
||||||
wxXmlNode *n = XmlFindNode(GetNode(), m_PropInfo->Name);
|
|
||||||
if (n)
|
|
||||||
{
|
|
||||||
n->GetParent()->RemoveChild(n);
|
|
||||||
delete n;
|
|
||||||
m_TreeCtrl->SetItemBold(m_TreeItem, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wxString PropEditCtrl::GetValueAsText(wxTreeItemId ti)
|
|
||||||
{
|
|
||||||
PropertyInfo& pir = ((PETreeData*)m_TreeCtrl->GetItemData(ti))->PropInfo;
|
|
||||||
return XmlReadValue(GetNode(), pir.Name);
|
|
||||||
}
|
|
||||||
|
|
@@ -1,87 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Purpose: XML resources editor
|
|
||||||
// Author: Vaclav Slavik
|
|
||||||
// Created: 2000/05/05
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) 2000 Vaclav Slavik
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
||||||
#pragma interface "propedit.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _PROPEDIT_H_
|
|
||||||
#define _PROPEDIT_H_
|
|
||||||
|
|
||||||
#include "wx/panel.h"
|
|
||||||
#include "wx/treectrl.h"
|
|
||||||
#include "nodesdb.h"
|
|
||||||
#include "propframe.h"
|
|
||||||
|
|
||||||
class WXDLLEXPORT wxXmlNode;
|
|
||||||
class WXDLLEXPORT wxTreeCtrl;
|
|
||||||
class WXDLLEXPORT wxTextCtrl;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PropEditCtrl : public wxPanel
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PropEditCtrl(PropertiesFrame *propFrame)
|
|
||||||
: wxPanel(propFrame->m_valueWindow, wxID_ANY),
|
|
||||||
m_PropFrame(propFrame), m_Created(false), m_TreeCtrl(propFrame->m_tree)
|
|
||||||
{Show(false);}
|
|
||||||
|
|
||||||
virtual void BeginEdit(const wxRect& rect, wxTreeItemId ti);
|
|
||||||
virtual void EndEdit();
|
|
||||||
|
|
||||||
virtual wxTreeItemId CreateTreeEntry(wxTreeItemId parent, const PropertyInfo& pinfo);
|
|
||||||
virtual wxWindow* CreateEditCtrl() = 0;
|
|
||||||
|
|
||||||
virtual bool IsPresent(const PropertyInfo& pinfo);
|
|
||||||
|
|
||||||
virtual void Clear();
|
|
||||||
virtual void ReadValue() = 0;
|
|
||||||
virtual void WriteValue() = 0;
|
|
||||||
virtual wxString GetValueAsText(wxTreeItemId ti);
|
|
||||||
virtual wxString GetPropName(const PropertyInfo& pinfo)
|
|
||||||
{ return pinfo.Name.AfterLast(_T('/')); }
|
|
||||||
|
|
||||||
virtual bool HasDetails() { return false; }
|
|
||||||
virtual void OnDetails() {}
|
|
||||||
virtual bool HasClearButton() { return true; }
|
|
||||||
|
|
||||||
void OnButtonDetails(wxCommandEvent& event);
|
|
||||||
void OnButtonClear(wxCommandEvent& event);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
wxXmlNode *GetNode() { return m_PropFrame->m_Node; }
|
|
||||||
bool CanSave() { return m_CanSave; }
|
|
||||||
|
|
||||||
PropertiesFrame *m_PropFrame;
|
|
||||||
bool m_Created;
|
|
||||||
wxTreeCtrl *m_TreeCtrl;
|
|
||||||
wxTreeItemId m_TreeItem;
|
|
||||||
wxWindow *m_TheCtrl;
|
|
||||||
PropertyInfo *m_PropInfo;
|
|
||||||
|
|
||||||
bool m_CanSave;
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PETreeData : public wxTreeItemData
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PETreeData(PropEditCtrl *p, const PropertyInfo& pi) :
|
|
||||||
wxTreeItemData(),
|
|
||||||
EditCtrl(p), PropInfo(pi) {}
|
|
||||||
PropEditCtrl *EditCtrl;
|
|
||||||
PropertyInfo PropInfo;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
@@ -1,330 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Author: Vaclav Slavik
|
|
||||||
// Created: 2000/05/05
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) 2000 Vaclav Slavik
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma implementation "propframe.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx/wx.h".
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#include "wx/xml/xml.h"
|
|
||||||
#include "wx/config.h"
|
|
||||||
#include "splittree.h"
|
|
||||||
#include "xmlhelpr.h"
|
|
||||||
#include "propframe.h"
|
|
||||||
#include "nodehnd.h"
|
|
||||||
#include "propedit.h"
|
|
||||||
#include "pe_basic.h"
|
|
||||||
#include "pe_adv.h"
|
|
||||||
#include "editor.h"
|
|
||||||
|
|
||||||
// ------------- support classes --------
|
|
||||||
|
|
||||||
|
|
||||||
class PropsTree: public wxRemotelyScrolledTreeCtrl
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PropsTree(wxWindow* parent, wxWindowID id, const wxPoint& pt = wxDefaultPosition,
|
|
||||||
const wxSize& sz = wxDefaultSize, long style = wxTR_HAS_BUTTONS)
|
|
||||||
: wxRemotelyScrolledTreeCtrl(parent, id, pt, sz, style),
|
|
||||||
m_EditCtrl(NULL)
|
|
||||||
{
|
|
||||||
#if 0
|
|
||||||
// VS: Don't do it, it is *extremely* ugly.
|
|
||||||
// FIXME: find a better solution.
|
|
||||||
|
|
||||||
//make text larger so controls will fit properly
|
|
||||||
wxFont font = GetFont();
|
|
||||||
font.SetPointSize(font.GetPointSize()*1.5);
|
|
||||||
SetFont(font);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnPaint(wxPaintEvent& event)
|
|
||||||
{
|
|
||||||
wxPaintDC dc(this);
|
|
||||||
|
|
||||||
wxTreeCtrl::OnPaint(event);
|
|
||||||
|
|
||||||
// Reset the device origin since it may have been set
|
|
||||||
dc.SetDeviceOrigin(0, 0);
|
|
||||||
|
|
||||||
wxPen pen(*wxBLACK, 1, wxSOLID);
|
|
||||||
dc.SetPen(pen);
|
|
||||||
|
|
||||||
dc.SetBrush(*wxTRANSPARENT_BRUSH);
|
|
||||||
|
|
||||||
wxSize clientSize = GetClientSize();
|
|
||||||
wxRect itemRect;
|
|
||||||
int cy=0;
|
|
||||||
wxTreeItemId h, lastH;
|
|
||||||
for(h=GetFirstVisibleItem();h;h=GetNextVisible(h))
|
|
||||||
{
|
|
||||||
if (h.IsOk() && GetBoundingRect(h, itemRect))
|
|
||||||
{
|
|
||||||
cy = itemRect.GetTop();
|
|
||||||
|
|
||||||
dc.DrawLine(0, cy, clientSize.x, cy);
|
|
||||||
lastH = h;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (lastH.IsOk() && GetBoundingRect(lastH, itemRect))
|
|
||||||
{
|
|
||||||
cy = itemRect.GetBottom();
|
|
||||||
dc.DrawLine(0, cy, clientSize.x, cy);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnSelChange(wxTreeEvent& event)
|
|
||||||
{
|
|
||||||
if (m_EditCtrl != NULL)
|
|
||||||
{
|
|
||||||
m_EditCtrl->EndEdit();
|
|
||||||
m_EditCtrl = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxTreeItemId item = event.GetItem();
|
|
||||||
PETreeData *dt = (PETreeData*)GetItemData(item);
|
|
||||||
if (dt != NULL)
|
|
||||||
{
|
|
||||||
wxRect bounding;
|
|
||||||
GetBoundingRect(item, bounding);
|
|
||||||
|
|
||||||
bounding.SetX(0);
|
|
||||||
bounding.SetWidth(GetCompanionWindow()->GetSize().x);
|
|
||||||
dt->EditCtrl->BeginEdit(bounding, item);
|
|
||||||
m_EditCtrl = dt->EditCtrl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ClearProps()
|
|
||||||
{
|
|
||||||
DeleteAllItems();
|
|
||||||
AddRoot(_("Properties"));
|
|
||||||
if (m_EditCtrl)
|
|
||||||
{
|
|
||||||
m_EditCtrl->EndEdit();
|
|
||||||
m_EditCtrl = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnScroll(wxScrollWinEvent& event)
|
|
||||||
{
|
|
||||||
event.Skip();
|
|
||||||
if (event.GetOrientation() == wxHORIZONTAL) return;
|
|
||||||
if (!m_EditCtrl) return;
|
|
||||||
|
|
||||||
wxTreeItemId id = GetSelection();
|
|
||||||
wxRect bounding;
|
|
||||||
GetBoundingRect(id, bounding);
|
|
||||||
|
|
||||||
m_EditCtrl->Move(wxDefaultCoord, bounding.y);
|
|
||||||
}
|
|
||||||
|
|
||||||
PropEditCtrl *m_EditCtrl;
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(PropsTree, wxRemotelyScrolledTreeCtrl)
|
|
||||||
EVT_PAINT(PropsTree::OnPaint)
|
|
||||||
EVT_TREE_SEL_CHANGED(wxID_ANY, PropsTree::OnSelChange)
|
|
||||||
EVT_SCROLLWIN(PropsTree::OnScroll)
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
|
|
||||||
class PropsValueWindow: public wxTreeCompanionWindow
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PropsValueWindow(wxWindow* parent, wxWindowID id = wxID_ANY,
|
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
|
||||||
const wxSize& sz = wxDefaultSize,
|
|
||||||
long style = 0)
|
|
||||||
: wxTreeCompanionWindow(parent, id, pos, sz, style) {}
|
|
||||||
|
|
||||||
virtual void DrawItem(wxDC& dc, wxTreeItemId id, const wxRect& rect)
|
|
||||||
{
|
|
||||||
if (m_treeCtrl)
|
|
||||||
{
|
|
||||||
PETreeData *data = (PETreeData*)m_treeCtrl->GetItemData(id);
|
|
||||||
wxString text;
|
|
||||||
if (data != NULL) text = data->EditCtrl->GetValueAsText(id);
|
|
||||||
dc.SetBrush(wxBrush(GetBackgroundColour(), wxSOLID));
|
|
||||||
dc.DrawRectangle(rect);
|
|
||||||
dc.SetTextForeground(* wxBLACK);
|
|
||||||
dc.SetBackgroundMode(wxTRANSPARENT);
|
|
||||||
|
|
||||||
int textW, textH;
|
|
||||||
dc.GetTextExtent(text, & textW, & textH);
|
|
||||||
|
|
||||||
int x = 5;
|
|
||||||
int y = rect.GetY() + wxMax(0, (rect.GetHeight() - textH) / 2);
|
|
||||||
|
|
||||||
dc.DrawText(text, x, y);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnClick(wxMouseEvent& event)
|
|
||||||
{
|
|
||||||
int flags;
|
|
||||||
wxTreeItemId item = GetTreeCtrl()->HitTest(wxPoint(1, event.GetY()), flags);
|
|
||||||
if (item.IsOk())
|
|
||||||
{
|
|
||||||
GetTreeCtrl()->SelectItem(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(PropsValueWindow, wxTreeCompanionWindow)
|
|
||||||
EVT_LEFT_DOWN(PropsValueWindow::OnClick)
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ------------- properties frame --------
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PropertiesFrame* PropertiesFrame::ms_Instance = NULL;
|
|
||||||
|
|
||||||
PropertiesFrame *PropertiesFrame::Get()
|
|
||||||
{
|
|
||||||
if (ms_Instance == NULL)
|
|
||||||
{
|
|
||||||
(void)new PropertiesFrame;
|
|
||||||
ms_Instance->Show(true);
|
|
||||||
}
|
|
||||||
return ms_Instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
PropertiesFrame::PropertiesFrame()
|
|
||||||
: wxFrame(EditorFrame::Get(), wxID_ANY, _("Properties"),
|
|
||||||
wxDefaultPosition, wxDefaultSize,
|
|
||||||
wxDEFAULT_FRAME_STYLE | wxFRAME_NO_TASKBAR
|
|
||||||
#ifdef __WXMSW__
|
|
||||||
| wxFRAME_TOOL_WINDOW
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
|
||||||
ms_Instance = this;
|
|
||||||
m_Node = NULL;
|
|
||||||
|
|
||||||
m_scrolledWindow = new wxSplitterScrolledWindow(this, wxID_ANY, wxDefaultPosition,
|
|
||||||
wxDefaultSize, wxNO_BORDER | wxCLIP_CHILDREN | wxVSCROLL);
|
|
||||||
m_splitter = new wxThinSplitterWindow(m_scrolledWindow, wxID_ANY, wxDefaultPosition,
|
|
||||||
wxDefaultSize, wxSP_3DBORDER | wxCLIP_CHILDREN /* | wxSP_LIVE_UPDATE */);
|
|
||||||
m_splitter->SetSashSize(2);
|
|
||||||
m_tree = new PropsTree(m_splitter, wxID_ANY, wxDefaultPosition,
|
|
||||||
wxDefaultSize, wxTR_HAS_BUTTONS | wxTR_NO_LINES | wxNO_BORDER );
|
|
||||||
m_tree->SetIndent(2);
|
|
||||||
|
|
||||||
m_valueWindow = new PropsValueWindow(m_splitter, wxID_ANY, wxDefaultPosition,
|
|
||||||
wxDefaultSize, wxNO_BORDER);
|
|
||||||
m_valueWindow->SetBackgroundColour(m_tree->GetBackgroundColour());
|
|
||||||
m_splitter->SplitVertically(m_tree, m_valueWindow, wxConfig::Get()->Read(_T("propertiesframe_sash"), 100));
|
|
||||||
//m_splitter->AdjustScrollbars();
|
|
||||||
m_scrolledWindow->SetTargetWindow(m_tree);
|
|
||||||
|
|
||||||
m_scrolledWindow->EnableScrolling(false, false);
|
|
||||||
|
|
||||||
// Let the two controls know about each other
|
|
||||||
m_valueWindow->SetTreeCtrl(m_tree);
|
|
||||||
m_tree->SetCompanionWindow(m_valueWindow);
|
|
||||||
|
|
||||||
wxConfigBase *cfg = wxConfigBase::Get();
|
|
||||||
SetSize(wxRect(wxPoint(cfg->Read(_T("propertiesframe_x"), wxDefaultCoord), cfg->Read(_T("propertiesframe_y"), wxDefaultCoord)),
|
|
||||||
wxSize(cfg->Read(_T("propertiesframe_w"), 200), cfg->Read(_T("propertiesframe_h"), 200))));
|
|
||||||
|
|
||||||
|
|
||||||
m_EditCtrls.DeleteContents(true);
|
|
||||||
m_EditCtrls.Put(_T("bool"), new PropEditCtrlBool(this));
|
|
||||||
m_EditCtrls.Put(_T("coord"), new PropEditCtrlCoord(this));
|
|
||||||
m_EditCtrls.Put(_T("color"), new PropEditCtrlColor(this));
|
|
||||||
m_EditCtrls.Put(_T("dimension"), new PropEditCtrlDim(this));
|
|
||||||
m_EditCtrls.Put(_T("flags"), new PropEditCtrlFlags(this));
|
|
||||||
m_EditCtrls.Put(_T("integer"), new PropEditCtrlInt(this));
|
|
||||||
m_EditCtrls.Put(_T("not_implemented"), new PropEditCtrlNull(this));
|
|
||||||
m_EditCtrls.Put(_T("text"), new PropEditCtrlTxt(this));
|
|
||||||
m_EditCtrls.Put(_T("xmlid"), new PropEditCtrlXRCID(this));
|
|
||||||
m_EditCtrls.Put(_T("font"), new PropEditCtrlFont(this));
|
|
||||||
m_EditCtrls.Put(_T("choice"), new PropEditCtrlChoice(this));
|
|
||||||
m_EditCtrls.Put(_T("file"), new PropEditCtrlFile(this));
|
|
||||||
m_EditCtrls.Put(_T("imagefile"), new PropEditCtrlImageFile(this));
|
|
||||||
m_EditCtrls.Put(_T(""), new PropEditCtrlNull(this));
|
|
||||||
|
|
||||||
ClearProps();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PropertiesFrame::~PropertiesFrame()
|
|
||||||
{
|
|
||||||
wxConfigBase *cfg = wxConfigBase::Get();
|
|
||||||
cfg->Write(_T("propertiesframe_x"), (long)GetPosition().x);
|
|
||||||
cfg->Write(_T("propertiesframe_y"), (long)GetPosition().y);
|
|
||||||
cfg->Write(_T("propertiesframe_w"), (long)GetSize().x);
|
|
||||||
cfg->Write(_T("propertiesframe_h"), (long)GetSize().y);
|
|
||||||
cfg->Write(_T("propertiesframe_sash"), (long)m_splitter->GetSashPosition());
|
|
||||||
|
|
||||||
ms_Instance = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PropertiesFrame::ShowProps(wxXmlNode *node)
|
|
||||||
{
|
|
||||||
m_Node = node;
|
|
||||||
|
|
||||||
ClearProps();
|
|
||||||
AddSingleProp(PropertyInfo(_T("xmlid"), _T("XRCID"), wxEmptyString));
|
|
||||||
AddProps(NodeHandler::Find(node)->GetPropsList(node));
|
|
||||||
|
|
||||||
m_tree->Expand(m_tree->GetRootItem());
|
|
||||||
m_valueWindow->Refresh();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PropertiesFrame::ClearProps()
|
|
||||||
{
|
|
||||||
((PropsTree*)m_tree)->ClearProps();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PropertiesFrame::AddProps(PropertyInfoArray& plist)
|
|
||||||
{
|
|
||||||
for (size_t i = 0; i < plist.GetCount(); i++)
|
|
||||||
{
|
|
||||||
AddSingleProp(plist[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PropertiesFrame::AddSingleProp(const PropertyInfo& pinfo, wxTreeItemId *root)
|
|
||||||
{
|
|
||||||
PropEditCtrl *pec = (PropEditCtrl*)m_EditCtrls.Get(pinfo.Type);
|
|
||||||
wxTreeItemId tid;
|
|
||||||
if (root != NULL) tid = *root;
|
|
||||||
else tid = m_tree->GetRootItem();
|
|
||||||
|
|
||||||
if (pec == NULL)
|
|
||||||
wxLogError(_("Unknown property type '%s'!"), pinfo.Type.c_str());
|
|
||||||
else
|
|
||||||
pec->CreateTreeEntry(tid, pinfo);
|
|
||||||
}
|
|
||||||
|
|
@@ -1,55 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Purpose: XML resources editor
|
|
||||||
// Author: Vaclav Slavik
|
|
||||||
// Created: 2000/05/05
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) 2000 Vaclav Slavik
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
||||||
#pragma interface "propframe.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _PROPFRAME_H_
|
|
||||||
#define _PROPFRAME_H_
|
|
||||||
|
|
||||||
#include "splittree.h"
|
|
||||||
|
|
||||||
class WXDLLEXPORT wxXmlNode;
|
|
||||||
class PropEditCtrl;
|
|
||||||
#include "wx/hash.h"
|
|
||||||
#include "wx/frame.h"
|
|
||||||
#include "nodesdb.h"
|
|
||||||
|
|
||||||
class PropertiesFrame : public wxFrame
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PropertiesFrame();
|
|
||||||
~PropertiesFrame();
|
|
||||||
|
|
||||||
void ShowProps(wxXmlNode *node);
|
|
||||||
|
|
||||||
void ClearProps();
|
|
||||||
void AddProps(PropertyInfoArray& plist);
|
|
||||||
void AddSingleProp(const PropertyInfo& pinfo, wxTreeItemId *root = NULL);
|
|
||||||
|
|
||||||
static PropertiesFrame *Get();
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
static PropertiesFrame *ms_Instance;
|
|
||||||
wxXmlNode *m_Node;
|
|
||||||
|
|
||||||
wxRemotelyScrolledTreeCtrl *m_tree;
|
|
||||||
wxThinSplitterWindow *m_splitter;
|
|
||||||
wxSplitterScrolledWindow *m_scrolledWindow;
|
|
||||||
wxTreeCompanionWindow *m_valueWindow;
|
|
||||||
|
|
||||||
wxHashTable m_EditCtrls;
|
|
||||||
|
|
||||||
friend class PropEditCtrl;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
@@ -1,673 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: splittree.cpp
|
|
||||||
// Purpose: Classes to achieve a remotely-scrolled tree in a splitter
|
|
||||||
// window that can be scrolled by a scrolled window higher in the
|
|
||||||
// hierarchy
|
|
||||||
// Author: Julian Smart
|
|
||||||
// Modified by:
|
|
||||||
// Created: 8/7/2000
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Julian Smart
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
// ============================================================================
|
|
||||||
// declarations
|
|
||||||
// ============================================================================
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// headers
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
||||||
#pragma implementation "splittree.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx/wx.h".
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// for all others, include the necessary headers (this file is usually all you
|
|
||||||
// need because it includes almost all "standard" wxWidgets headers)
|
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
|
||||||
#include <windows.h>
|
|
||||||
#include "wx/msw/winundef.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/gizmos/splittree.h"
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* wxRemotelyScrolledTreeCtrl
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if USE_GENERIC_TREECTRL
|
|
||||||
IMPLEMENT_CLASS(wxRemotelyScrolledTreeCtrl, wxGenericTreeCtrl)
|
|
||||||
#else
|
|
||||||
IMPLEMENT_CLASS(wxRemotelyScrolledTreeCtrl, wxTreeCtrl)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if USE_GENERIC_TREECTRL
|
|
||||||
BEGIN_EVENT_TABLE(wxRemotelyScrolledTreeCtrl, wxGenericTreeCtrl)
|
|
||||||
#else
|
|
||||||
BEGIN_EVENT_TABLE(wxRemotelyScrolledTreeCtrl, wxTreeCtrl)
|
|
||||||
#endif
|
|
||||||
EVT_SIZE(wxRemotelyScrolledTreeCtrl::OnSize)
|
|
||||||
EVT_TREE_ITEM_EXPANDED(wxID_ANY, wxRemotelyScrolledTreeCtrl::OnExpand)
|
|
||||||
EVT_TREE_ITEM_COLLAPSED(wxID_ANY, wxRemotelyScrolledTreeCtrl::OnExpand)
|
|
||||||
EVT_SCROLLWIN(wxRemotelyScrolledTreeCtrl::OnScroll)
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
wxRemotelyScrolledTreeCtrl::wxRemotelyScrolledTreeCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pt,
|
|
||||||
const wxSize& sz, long style):
|
|
||||||
wxTreeCtrl(parent, id, pt, sz, style)
|
|
||||||
{
|
|
||||||
m_companionWindow = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxRemotelyScrolledTreeCtrl::~wxRemotelyScrolledTreeCtrl()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxRemotelyScrolledTreeCtrl::HideVScrollbar()
|
|
||||||
{
|
|
||||||
#if defined(__WXMSW__) && USE_GENERIC_TREECTRL
|
|
||||||
if (!IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
|
|
||||||
{
|
|
||||||
::ShowScrollBar((HWND) GetHWND(), SB_VERT, false);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
// Implicit in overriding SetScrollbars
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Number of pixels per user unit (0 or -1 for no scrollbar)
|
|
||||||
// Length of virtual canvas in user units
|
|
||||||
// Length of page in user units
|
|
||||||
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
|
|
||||||
void wxRemotelyScrolledTreeCtrl::SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
|
|
||||||
int noUnitsX, int noUnitsY,
|
|
||||||
int xPos, int yPos,
|
|
||||||
bool noRefresh)
|
|
||||||
{
|
|
||||||
if (IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
|
|
||||||
{
|
|
||||||
wxGenericTreeCtrl* win = (wxGenericTreeCtrl*) this;
|
|
||||||
win->wxGenericTreeCtrl::SetScrollbars(pixelsPerUnitX, 0, noUnitsX, 0, xPos, 0, noRefresh);
|
|
||||||
|
|
||||||
wxScrolledWindow* scrolledWindow = GetScrolledWindow();
|
|
||||||
if (scrolledWindow)
|
|
||||||
{
|
|
||||||
scrolledWindow->SetScrollbars(0, pixelsPerUnitY, 0, noUnitsY, 0, yPos, noRefresh);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
void wxRemotelyScrolledTreeCtrl::SetScrollbars(int WXUNUSED(pixelsPerUnitX), int WXUNUSED(pixelsPerUnitY),
|
|
||||||
int WXUNUSED(noUnitsX), int WXUNUSED(noUnitsY),
|
|
||||||
int WXUNUSED(xPos), int WXUNUSED(yPos),
|
|
||||||
bool WXUNUSED(noRefresh))
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
// In case we're using the generic tree control.
|
|
||||||
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
|
|
||||||
int wxRemotelyScrolledTreeCtrl::GetScrollPos(int orient) const
|
|
||||||
{
|
|
||||||
wxScrolledWindow* scrolledWindow = GetScrolledWindow();
|
|
||||||
|
|
||||||
if (IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
|
|
||||||
{
|
|
||||||
wxGenericTreeCtrl* win = (wxGenericTreeCtrl*) this;
|
|
||||||
|
|
||||||
if (orient == wxHORIZONTAL)
|
|
||||||
return win->wxGenericTreeCtrl::GetScrollPos(orient);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return scrolledWindow->GetScrollPos(orient);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
int wxRemotelyScrolledTreeCtrl::GetScrollPos(int WXUNUSED(orient)) const
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// In case we're using the generic tree control.
|
|
||||||
// Get the view start
|
|
||||||
void wxRemotelyScrolledTreeCtrl::GetViewStart(int *x, int *y) const
|
|
||||||
{
|
|
||||||
wxScrolledWindow* scrolledWindow = GetScrolledWindow();
|
|
||||||
|
|
||||||
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
|
|
||||||
if (IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
|
|
||||||
{
|
|
||||||
|
|
||||||
wxGenericTreeCtrl* win = (wxGenericTreeCtrl*) this;
|
|
||||||
int x1, y1, x2, y2;
|
|
||||||
win->wxGenericTreeCtrl::GetViewStart(& x1, & y1);
|
|
||||||
* x = x1; * y = y1;
|
|
||||||
if (!scrolledWindow)
|
|
||||||
return;
|
|
||||||
|
|
||||||
scrolledWindow->GetViewStart(& x2, & y2);
|
|
||||||
* y = y2;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
// x is wrong since the horizontal scrollbar is controlled by the
|
|
||||||
// tree control, but we probably don't need it.
|
|
||||||
scrolledWindow->GetViewStart(x, y);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// In case we're using the generic tree control.
|
|
||||||
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
|
|
||||||
void wxRemotelyScrolledTreeCtrl::PrepareDC(wxDC& dc)
|
|
||||||
{
|
|
||||||
if (IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
|
|
||||||
{
|
|
||||||
wxScrolledWindow* scrolledWindow = GetScrolledWindow();
|
|
||||||
|
|
||||||
wxGenericTreeCtrl* win = (wxGenericTreeCtrl*) this;
|
|
||||||
|
|
||||||
int startX, startY;
|
|
||||||
GetViewStart(& startX, & startY);
|
|
||||||
|
|
||||||
int xppu1, yppu1, xppu2, yppu2;
|
|
||||||
win->wxGenericTreeCtrl::GetScrollPixelsPerUnit(& xppu1, & yppu1);
|
|
||||||
scrolledWindow->GetScrollPixelsPerUnit(& xppu2, & yppu2);
|
|
||||||
|
|
||||||
dc.SetDeviceOrigin( -startX * xppu1, -startY * yppu2 );
|
|
||||||
// dc.SetUserScale( win->GetScaleX(), win->GetScaleY() );
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
void wxRemotelyScrolledTreeCtrl::PrepareDC(wxDC& WXUNUSED(dc))
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
// Scroll to the given line (in scroll units where each unit is
|
|
||||||
// the height of an item)
|
|
||||||
void wxRemotelyScrolledTreeCtrl::ScrollToLine(int WXUNUSED(posHoriz), int posVert)
|
|
||||||
{
|
|
||||||
#ifdef __WXMSW__
|
|
||||||
#if USE_GENERIC_TREECTRL
|
|
||||||
if (!IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
UINT sbCode = SB_THUMBPOSITION;
|
|
||||||
HWND vertScrollBar = 0;
|
|
||||||
MSWDefWindowProc((WXUINT) WM_VSCROLL, MAKELONG(sbCode, posVert), (WXLPARAM) vertScrollBar);
|
|
||||||
}
|
|
||||||
#if USE_GENERIC_TREECTRL
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
|
|
||||||
{
|
|
||||||
wxGenericTreeCtrl* win = (wxGenericTreeCtrl*) this;
|
|
||||||
win->Refresh();
|
|
||||||
/* Doesn't work yet because scrolling is ignored by Scroll
|
|
||||||
int xppu, yppu;
|
|
||||||
wxScrolledWindow* scrolledWindow = GetScrolledWindow();
|
|
||||||
if (scrolledWindow)
|
|
||||||
{
|
|
||||||
scrolledWindow->GetScrollPixelsPerUnit(& xppu, & yppu);
|
|
||||||
win->Scroll(-1, posVert*yppu);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxRemotelyScrolledTreeCtrl::OnSize(wxSizeEvent& event)
|
|
||||||
{
|
|
||||||
HideVScrollbar();
|
|
||||||
AdjustRemoteScrollbars();
|
|
||||||
event.Skip();
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxRemotelyScrolledTreeCtrl::OnExpand(wxTreeEvent& event)
|
|
||||||
{
|
|
||||||
AdjustRemoteScrollbars();
|
|
||||||
event.Skip();
|
|
||||||
|
|
||||||
// If we don't have this, we get some bits of lines still remaining
|
|
||||||
if (event.GetEventType() == wxEVT_COMMAND_TREE_ITEM_COLLAPSED)
|
|
||||||
Refresh();
|
|
||||||
|
|
||||||
// Pass on the event
|
|
||||||
if (m_companionWindow)
|
|
||||||
m_companionWindow->GetEventHandler()->ProcessEvent(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Adjust the containing wxScrolledWindow's scrollbars appropriately
|
|
||||||
void wxRemotelyScrolledTreeCtrl::AdjustRemoteScrollbars()
|
|
||||||
{
|
|
||||||
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
|
|
||||||
if (IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
|
|
||||||
{
|
|
||||||
// This is for the generic tree control.
|
|
||||||
// It calls SetScrollbars which has been overridden
|
|
||||||
// to adjust the parent scrolled window vertical
|
|
||||||
// scrollbar.
|
|
||||||
((wxGenericTreeCtrl*) this)->AdjustMyScrollbars();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
// This is for the wxMSW tree control
|
|
||||||
wxScrolledWindow* scrolledWindow = GetScrolledWindow();
|
|
||||||
if (scrolledWindow)
|
|
||||||
{
|
|
||||||
wxRect itemRect;
|
|
||||||
if (GetBoundingRect(GetRootItem(), itemRect))
|
|
||||||
{
|
|
||||||
// Actually, the real height seems to be 1 less than reported
|
|
||||||
// (e.g. 16 instead of 16)
|
|
||||||
int itemHeight = itemRect.GetHeight() - 1;
|
|
||||||
|
|
||||||
int w, h;
|
|
||||||
GetClientSize(&w, &h);
|
|
||||||
|
|
||||||
wxRect rect(0, 0, 0, 0);
|
|
||||||
CalcTreeSize(rect);
|
|
||||||
|
|
||||||
double f = ((double) (rect.GetHeight()) / (double) itemHeight) ;
|
|
||||||
int treeViewHeight = (int) ceil(f);
|
|
||||||
|
|
||||||
int scrollPixelsPerLine = itemHeight;
|
|
||||||
int scrollPos = - (itemRect.y / itemHeight);
|
|
||||||
|
|
||||||
scrolledWindow->SetScrollbars(0, scrollPixelsPerLine, 0, treeViewHeight, 0, scrollPos);
|
|
||||||
|
|
||||||
// Ensure that when a scrollbar becomes hidden or visible,
|
|
||||||
// the contained window sizes are right.
|
|
||||||
// Problem: this is called too early (?)
|
|
||||||
wxSizeEvent event(scrolledWindow->GetSize(), scrolledWindow->GetId());
|
|
||||||
scrolledWindow->GetEventHandler()->ProcessEvent(event);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Calculate the area that contains both rectangles
|
|
||||||
static wxRect CombineRectangles(const wxRect& rect1, const wxRect& rect2)
|
|
||||||
{
|
|
||||||
wxRect rect;
|
|
||||||
|
|
||||||
int right1 = rect1.GetRight();
|
|
||||||
int bottom1 = rect1.GetBottom();
|
|
||||||
int right2 = rect2.GetRight();
|
|
||||||
int bottom2 = rect2.GetBottom();
|
|
||||||
|
|
||||||
wxPoint topLeft = wxPoint(wxMin(rect1.x, rect2.x), wxMin(rect1.y, rect2.y));
|
|
||||||
wxPoint bottomRight = wxPoint(wxMax(right1, right2), wxMax(bottom1, bottom2));
|
|
||||||
|
|
||||||
rect.x = topLeft.x; rect.y = topLeft.y;
|
|
||||||
rect.SetRight(bottomRight.x);
|
|
||||||
rect.SetBottom(bottomRight.y);
|
|
||||||
|
|
||||||
return rect;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Calculate the tree overall size so we can set the scrollbar
|
|
||||||
// correctly
|
|
||||||
void wxRemotelyScrolledTreeCtrl::CalcTreeSize(wxRect& rect)
|
|
||||||
{
|
|
||||||
CalcTreeSize(GetRootItem(), rect);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxRemotelyScrolledTreeCtrl::CalcTreeSize(const wxTreeItemId& id, wxRect& rect)
|
|
||||||
{
|
|
||||||
// More efficient implementation would be to find the last item (but how?)
|
|
||||||
// Q: is the bounding rect relative to the top of the virtual tree workspace
|
|
||||||
// or the top of the window? How would we convert?
|
|
||||||
wxRect itemSize;
|
|
||||||
if (GetBoundingRect(id, itemSize))
|
|
||||||
{
|
|
||||||
rect = CombineRectangles(rect, itemSize);
|
|
||||||
}
|
|
||||||
|
|
||||||
void* cookie;
|
|
||||||
wxTreeItemId childId = GetFirstChild(id, cookie);
|
|
||||||
while (childId)
|
|
||||||
{
|
|
||||||
CalcTreeSize(childId, rect);
|
|
||||||
childId = GetNextChild(childId, cookie);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find the scrolled window that contains this control
|
|
||||||
wxScrolledWindow* wxRemotelyScrolledTreeCtrl::GetScrolledWindow() const
|
|
||||||
{
|
|
||||||
wxWindow* parent = wxWindow::GetParent();
|
|
||||||
while (parent)
|
|
||||||
{
|
|
||||||
if (parent->IsKindOf(CLASSINFO(wxScrolledWindow)))
|
|
||||||
return (wxScrolledWindow*) parent;
|
|
||||||
parent = parent->GetParent();
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxRemotelyScrolledTreeCtrl::OnScroll(wxScrollWinEvent& event)
|
|
||||||
{
|
|
||||||
int orient = event.GetOrientation();
|
|
||||||
if (orient == wxHORIZONTAL)
|
|
||||||
{
|
|
||||||
event.Skip();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
wxScrolledWindow* scrollWin = GetScrolledWindow();
|
|
||||||
if (!scrollWin)
|
|
||||||
return;
|
|
||||||
|
|
||||||
int x, y;
|
|
||||||
scrollWin->GetViewStart(& x, & y);
|
|
||||||
|
|
||||||
ScrollToLine(-1, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* wxTreeCompanionWindow
|
|
||||||
*
|
|
||||||
* A window displaying values associated with tree control items.
|
|
||||||
*/
|
|
||||||
|
|
||||||
IMPLEMENT_CLASS(wxTreeCompanionWindow, wxWindow)
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxTreeCompanionWindow, wxWindow)
|
|
||||||
EVT_PAINT(wxTreeCompanionWindow::OnPaint)
|
|
||||||
EVT_SCROLLWIN(wxTreeCompanionWindow::OnScroll)
|
|
||||||
EVT_TREE_ITEM_EXPANDED(wxID_ANY, wxTreeCompanionWindow::OnExpand)
|
|
||||||
EVT_TREE_ITEM_COLLAPSED(wxID_ANY, wxTreeCompanionWindow::OnExpand)
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
wxTreeCompanionWindow::wxTreeCompanionWindow(wxWindow* parent, wxWindowID id,
|
|
||||||
const wxPoint& pos,
|
|
||||||
const wxSize& sz,
|
|
||||||
long style):
|
|
||||||
wxWindow(parent, id, pos, sz, style)
|
|
||||||
{
|
|
||||||
m_treeCtrl = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxTreeCompanionWindow::DrawItem(wxDC& dc, wxTreeItemId id, const wxRect& rect)
|
|
||||||
{
|
|
||||||
// TEST CODE
|
|
||||||
#if 1
|
|
||||||
if (m_treeCtrl)
|
|
||||||
{
|
|
||||||
wxString text = m_treeCtrl->GetItemText(id);
|
|
||||||
dc.SetTextForeground(* wxBLACK);
|
|
||||||
dc.SetBackgroundMode(wxTRANSPARENT);
|
|
||||||
|
|
||||||
int textW, textH;
|
|
||||||
dc.GetTextExtent(text, & textW, & textH);
|
|
||||||
|
|
||||||
int x = 5;
|
|
||||||
int y = rect.GetY() + wxMax(0, (rect.GetHeight() - textH) / 2);
|
|
||||||
|
|
||||||
dc.DrawText(text, x, y);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxTreeCompanionWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
|
|
||||||
{
|
|
||||||
wxPaintDC dc(this);
|
|
||||||
|
|
||||||
if (!m_treeCtrl)
|
|
||||||
return;
|
|
||||||
|
|
||||||
wxPen pen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT), 1, wxSOLID);
|
|
||||||
dc.SetPen(pen);
|
|
||||||
dc.SetBrush(* wxTRANSPARENT_BRUSH);
|
|
||||||
wxFont font(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
|
|
||||||
dc.SetFont(font);
|
|
||||||
|
|
||||||
wxSize clientSize = GetClientSize();
|
|
||||||
wxRect itemRect;
|
|
||||||
wxTreeItemId h, lastH;
|
|
||||||
for(h=m_treeCtrl->GetFirstVisibleItem();h;h=m_treeCtrl->GetNextVisible(h))
|
|
||||||
{
|
|
||||||
if (m_treeCtrl->GetBoundingRect(h, itemRect))
|
|
||||||
{
|
|
||||||
int cy = itemRect.GetTop();
|
|
||||||
wxRect drawItemRect(0, cy, clientSize.x, itemRect.GetHeight());
|
|
||||||
|
|
||||||
lastH = h;
|
|
||||||
|
|
||||||
// Draw the actual item
|
|
||||||
DrawItem(dc, h, drawItemRect);
|
|
||||||
dc.DrawLine(0, cy, clientSize.x, cy);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (lastH.IsOk() && m_treeCtrl->GetBoundingRect(lastH, itemRect))
|
|
||||||
{
|
|
||||||
int cy = itemRect.GetBottom();
|
|
||||||
dc.DrawLine(0, cy, clientSize.x, cy);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxTreeCompanionWindow::OnScroll(wxScrollWinEvent& event)
|
|
||||||
{
|
|
||||||
int orient = event.GetOrientation();
|
|
||||||
if (orient == wxHORIZONTAL)
|
|
||||||
{
|
|
||||||
event.Skip();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!m_treeCtrl)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// TODO: scroll the window physically instead of just refreshing.
|
|
||||||
Refresh(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxTreeCompanionWindow::OnExpand(wxTreeEvent& WXUNUSED(event))
|
|
||||||
{
|
|
||||||
// TODO: something more optimized than simply refresh the whole
|
|
||||||
// window when the tree is expanded/collapsed. Tricky.
|
|
||||||
Refresh();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* wxThinSplitterWindow
|
|
||||||
*/
|
|
||||||
|
|
||||||
IMPLEMENT_CLASS(wxThinSplitterWindow, wxSplitterWindow)
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxThinSplitterWindow, wxSplitterWindow)
|
|
||||||
EVT_SIZE(wxThinSplitterWindow::OnSize)
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
wxThinSplitterWindow::wxThinSplitterWindow(wxWindow* parent, wxWindowID id,
|
|
||||||
const wxPoint& pos,
|
|
||||||
const wxSize& sz,
|
|
||||||
long style):
|
|
||||||
wxSplitterWindow(parent, id, pos, sz, style)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
wxThinSplitterWindow::~wxThinSplitterWindow()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxThinSplitterWindow::SizeWindows()
|
|
||||||
{
|
|
||||||
// The client size may have changed inbetween
|
|
||||||
// the sizing of the first window and the sizing of
|
|
||||||
// the second. So repeat SizeWindows.
|
|
||||||
wxSplitterWindow::SizeWindows();
|
|
||||||
wxSplitterWindow::SizeWindows();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Tests for x, y over sash
|
|
||||||
bool wxThinSplitterWindow::SashHitTest(int x, int y, int WXUNUSED(tolerance))
|
|
||||||
{
|
|
||||||
return wxSplitterWindow::SashHitTest(x, y, 4);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxThinSplitterWindow::DrawSash(wxDC& dc)
|
|
||||||
{
|
|
||||||
if ( GetSashPosition() == 0 || !m_windowTwo)
|
|
||||||
return;
|
|
||||||
if (GetWindowStyle() & wxSP_NOSASH)
|
|
||||||
return;
|
|
||||||
|
|
||||||
int w, h;
|
|
||||||
GetClientSize(&w, &h);
|
|
||||||
|
|
||||||
if ( m_splitMode == wxSPLIT_VERTICAL )
|
|
||||||
{
|
|
||||||
dc.SetPen(* m_facePen);
|
|
||||||
dc.SetBrush(* m_faceBrush);
|
|
||||||
int h1 = h-1;
|
|
||||||
int y1 = 0;
|
|
||||||
if ( (GetWindowStyleFlag() & wxSP_BORDER) != wxSP_BORDER && (GetWindowStyleFlag() & wxSP_3DBORDER) != wxSP_3DBORDER )
|
|
||||||
h1 += 1; // Not sure why this is necessary...
|
|
||||||
if ( (GetWindowStyleFlag() & wxSP_3DBORDER) == wxSP_3DBORDER)
|
|
||||||
{
|
|
||||||
y1 = 2; h1 -= 3;
|
|
||||||
}
|
|
||||||
dc.DrawRectangle(GetSashPosition(), y1, GetSashSize(), h1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dc.SetPen(* m_facePen);
|
|
||||||
dc.SetBrush(* m_faceBrush);
|
|
||||||
int w1 = w-1;
|
|
||||||
int x1 = 0;
|
|
||||||
if ( (GetWindowStyleFlag() & wxSP_BORDER) != wxSP_BORDER && (GetWindowStyleFlag() & wxSP_3DBORDER) != wxSP_3DBORDER )
|
|
||||||
w1 ++;
|
|
||||||
if ( (GetWindowStyleFlag() & wxSP_3DBORDER) == wxSP_3DBORDER)
|
|
||||||
{
|
|
||||||
x1 = 2; w1 -= 3;
|
|
||||||
}
|
|
||||||
dc.DrawRectangle(x1, GetSashPosition(), w1, GetSashSize());
|
|
||||||
}
|
|
||||||
|
|
||||||
dc.SetPen(wxNullPen);
|
|
||||||
dc.SetBrush(wxNullBrush);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxThinSplitterWindow::OnSize(wxSizeEvent& event)
|
|
||||||
{
|
|
||||||
wxSplitterWindow::OnSize(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* wxSplitterScrolledWindow
|
|
||||||
*/
|
|
||||||
|
|
||||||
IMPLEMENT_CLASS(wxSplitterScrolledWindow, wxScrolledWindow)
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxSplitterScrolledWindow, wxScrolledWindow)
|
|
||||||
EVT_SCROLLWIN(wxSplitterScrolledWindow::OnScroll)
|
|
||||||
EVT_SIZE(wxSplitterScrolledWindow::OnSize)
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
wxSplitterScrolledWindow::wxSplitterScrolledWindow(wxWindow* parent, wxWindowID id,
|
|
||||||
const wxPoint& pos,
|
|
||||||
const wxSize& sz,
|
|
||||||
long style):
|
|
||||||
wxScrolledWindow(parent, id, pos, sz, style)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxSplitterScrolledWindow::OnSize(wxSizeEvent& WXUNUSED(event))
|
|
||||||
{
|
|
||||||
wxSize sz = GetClientSize();
|
|
||||||
if (GetChildren().GetFirst())
|
|
||||||
{
|
|
||||||
((wxWindow*) GetChildren().GetFirst()->GetData())->SetSize(0, 0, sz.x, sz.y);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxSplitterScrolledWindow::OnScroll(wxScrollWinEvent& event)
|
|
||||||
{
|
|
||||||
// Ensure that events being propagated back up the window hierarchy
|
|
||||||
// don't cause an infinite loop
|
|
||||||
static bool inOnScroll = false;
|
|
||||||
if (inOnScroll)
|
|
||||||
{
|
|
||||||
event.Skip();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
inOnScroll = true;
|
|
||||||
|
|
||||||
int orient = event.GetOrientation();
|
|
||||||
|
|
||||||
int nScrollInc = CalcScrollInc(event);
|
|
||||||
if (nScrollInc == 0)
|
|
||||||
{
|
|
||||||
inOnScroll = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (orient == wxHORIZONTAL)
|
|
||||||
{
|
|
||||||
inOnScroll = false;
|
|
||||||
event.Skip();
|
|
||||||
return;
|
|
||||||
#if 0
|
|
||||||
int newPos = m_xScrollPosition + nScrollInc;
|
|
||||||
SetScrollPos(wxHORIZONTAL, newPos, true );
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int newPos = m_yScrollPosition + nScrollInc;
|
|
||||||
SetScrollPos(wxVERTICAL, newPos, true );
|
|
||||||
}
|
|
||||||
|
|
||||||
if (orient == wxHORIZONTAL)
|
|
||||||
{
|
|
||||||
m_xScrollPosition += nScrollInc;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_yScrollPosition += nScrollInc;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find targets in splitter window and send the event to them
|
|
||||||
wxNode* node = (wxNode *)GetChildren().GetFirst();
|
|
||||||
while (node)
|
|
||||||
{
|
|
||||||
wxWindow* child = (wxWindow*) node->GetData();
|
|
||||||
if (child->IsKindOf(CLASSINFO(wxSplitterWindow)))
|
|
||||||
{
|
|
||||||
wxSplitterWindow* splitter = (wxSplitterWindow*) child;
|
|
||||||
if (splitter->GetWindow1())
|
|
||||||
splitter->GetWindow1()->ProcessEvent(event);
|
|
||||||
if (splitter->GetWindow2())
|
|
||||||
splitter->GetWindow2()->ProcessEvent(event);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
node = node->GetNext();
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
|
||||||
m_targetWindow->Update() ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
inOnScroll = false;
|
|
||||||
}
|
|
||||||
|
|
@@ -1,228 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: splittree.h
|
|
||||||
// Purpose: Classes to achieve a remotely-scrolled tree in a splitter
|
|
||||||
// window that can be scrolled by a scrolled window higher in the
|
|
||||||
// hierarchy
|
|
||||||
// Author: Julian Smart
|
|
||||||
// Modified by:
|
|
||||||
// Created: 8/7/2000
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Julian Smart
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef _WX_SPLITTREE_H_
|
|
||||||
#define _WX_SPLITTREE_H_
|
|
||||||
|
|
||||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
||||||
#pragma interface "splittree.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Set this to 1 to use generic tree control (doesn't yet work properly)
|
|
||||||
#define USE_GENERIC_TREECTRL 0
|
|
||||||
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#include "wx/treectrl.h"
|
|
||||||
#include "wx/splitter.h"
|
|
||||||
#include "wx/scrolwin.h"
|
|
||||||
|
|
||||||
#if USE_GENERIC_TREECTRL
|
|
||||||
#include "wx/generic/treectlg.h"
|
|
||||||
#ifndef wxTreeCtrl
|
|
||||||
#define wxTreeCtrl wxGenericTreeCtrl
|
|
||||||
#define sm_classwxTreeCtrl sm_classwxGenericTreeCtrl
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class wxRemotelyScrolledTreeCtrl;
|
|
||||||
class wxThinSplitterWindow;
|
|
||||||
class wxSplitterScrolledWindow;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* wxRemotelyScrolledTreeCtrl
|
|
||||||
*
|
|
||||||
* This tree control disables its vertical scrollbar and catches scroll
|
|
||||||
* events passed by a scrolled window higher in the hierarchy.
|
|
||||||
* It also updates the scrolled window vertical scrollbar as appropriate.
|
|
||||||
*/
|
|
||||||
|
|
||||||
class wxRemotelyScrolledTreeCtrl: public wxTreeCtrl
|
|
||||||
{
|
|
||||||
DECLARE_CLASS(wxRemotelyScrolledTreeCtrl)
|
|
||||||
public:
|
|
||||||
wxRemotelyScrolledTreeCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pt = wxDefaultPosition,
|
|
||||||
const wxSize& sz = wxDefaultSize, long style = wxTR_HAS_BUTTONS);
|
|
||||||
~wxRemotelyScrolledTreeCtrl();
|
|
||||||
|
|
||||||
//// Events
|
|
||||||
void OnSize(wxSizeEvent& event);
|
|
||||||
void OnExpand(wxTreeEvent& event);
|
|
||||||
void OnScroll(wxScrollWinEvent& event);
|
|
||||||
|
|
||||||
//// Overrides
|
|
||||||
// Override this in case we're using the generic tree control.
|
|
||||||
// Calls to this should disable the vertical scrollbar.
|
|
||||||
|
|
||||||
// Number of pixels per user unit (0 or -1 for no scrollbar)
|
|
||||||
// Length of virtual canvas in user units
|
|
||||||
// Length of page in user units
|
|
||||||
virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
|
|
||||||
int noUnitsX, int noUnitsY,
|
|
||||||
int xPos = 0, int yPos = 0,
|
|
||||||
bool noRefresh = false );
|
|
||||||
|
|
||||||
// In case we're using the generic tree control.
|
|
||||||
// Get the view start
|
|
||||||
virtual void GetViewStart(int *x, int *y) const;
|
|
||||||
|
|
||||||
// In case we're using the generic tree control.
|
|
||||||
virtual void PrepareDC(wxDC& dc);
|
|
||||||
|
|
||||||
// In case we're using the generic tree control.
|
|
||||||
virtual int GetScrollPos(int orient) const;
|
|
||||||
|
|
||||||
//// Helpers
|
|
||||||
void HideVScrollbar();
|
|
||||||
|
|
||||||
// Calculate the tree overall size so we can set the scrollbar
|
|
||||||
// correctly
|
|
||||||
void CalcTreeSize(wxRect& rect);
|
|
||||||
void CalcTreeSize(const wxTreeItemId& id, wxRect& rect);
|
|
||||||
|
|
||||||
// Adjust the containing wxScrolledWindow's scrollbars appropriately
|
|
||||||
void AdjustRemoteScrollbars();
|
|
||||||
|
|
||||||
// Find the scrolled window that contains this control
|
|
||||||
wxScrolledWindow* GetScrolledWindow() const;
|
|
||||||
|
|
||||||
// Scroll to the given line (in scroll units where each unit is
|
|
||||||
// the height of an item)
|
|
||||||
void ScrollToLine(int posHoriz, int posVert);
|
|
||||||
|
|
||||||
//// Accessors
|
|
||||||
|
|
||||||
// The companion window is one which will get notified when certain
|
|
||||||
// events happen such as node expansion
|
|
||||||
void SetCompanionWindow(wxWindow* companion) { m_companionWindow = companion; }
|
|
||||||
wxWindow* GetCompanionWindow() const { return m_companionWindow; }
|
|
||||||
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
protected:
|
|
||||||
wxWindow* m_companionWindow;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* wxTreeCompanionWindow
|
|
||||||
*
|
|
||||||
* A window displaying values associated with tree control items.
|
|
||||||
*/
|
|
||||||
|
|
||||||
class wxTreeCompanionWindow: public wxWindow
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
DECLARE_CLASS(wxTreeCompanionWindow)
|
|
||||||
|
|
||||||
wxTreeCompanionWindow(wxWindow* parent, wxWindowID id = wxID_ANY,
|
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
|
||||||
const wxSize& sz = wxDefaultSize,
|
|
||||||
long style = 0);
|
|
||||||
|
|
||||||
//// Overrides
|
|
||||||
virtual void DrawItem(wxDC& dc, wxTreeItemId id, const wxRect& rect);
|
|
||||||
|
|
||||||
//// Events
|
|
||||||
void OnPaint(wxPaintEvent& event);
|
|
||||||
void OnScroll(wxScrollWinEvent& event);
|
|
||||||
void OnExpand(wxTreeEvent& event);
|
|
||||||
|
|
||||||
//// Operations
|
|
||||||
|
|
||||||
//// Accessors
|
|
||||||
wxRemotelyScrolledTreeCtrl* GetTreeCtrl() const { return m_treeCtrl; };
|
|
||||||
void SetTreeCtrl(wxRemotelyScrolledTreeCtrl* treeCtrl) { m_treeCtrl = treeCtrl; }
|
|
||||||
|
|
||||||
//// Data members
|
|
||||||
protected:
|
|
||||||
wxRemotelyScrolledTreeCtrl* m_treeCtrl;
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* wxThinSplitterWindow
|
|
||||||
*
|
|
||||||
* Implements a splitter with a less obvious sash
|
|
||||||
* than the usual one.
|
|
||||||
*/
|
|
||||||
|
|
||||||
class wxThinSplitterWindow: public wxSplitterWindow
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
DECLARE_DYNAMIC_CLASS(wxThinSplitterWindow)
|
|
||||||
|
|
||||||
wxThinSplitterWindow(wxWindow* parent, wxWindowID id = wxID_ANY,
|
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
|
||||||
const wxSize& sz = wxDefaultSize,
|
|
||||||
long style = wxSP_3D | wxCLIP_CHILDREN);
|
|
||||||
~wxThinSplitterWindow();
|
|
||||||
|
|
||||||
//// Overrides
|
|
||||||
|
|
||||||
void SizeWindows();
|
|
||||||
// Tests for x, y over sash. Overriding this allows us to increase
|
|
||||||
// the tolerance.
|
|
||||||
bool SashHitTest(int x, int y, int tolerance = 2);
|
|
||||||
void DrawSash(wxDC& dc);
|
|
||||||
|
|
||||||
//// Events
|
|
||||||
|
|
||||||
void OnSize(wxSizeEvent& event);
|
|
||||||
|
|
||||||
//// Operations
|
|
||||||
|
|
||||||
//// Accessors
|
|
||||||
|
|
||||||
//// Data members
|
|
||||||
protected:
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* wxSplitterScrolledWindow
|
|
||||||
*
|
|
||||||
* This scrolled window is aware of the fact that one of its
|
|
||||||
* children is a splitter window. It passes on its scroll events
|
|
||||||
* (after some processing) to both splitter children for them
|
|
||||||
* scroll appropriately.
|
|
||||||
*/
|
|
||||||
|
|
||||||
class wxSplitterScrolledWindow: public wxScrolledWindow
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
DECLARE_DYNAMIC_CLASS(wxSplitterScrolledWindow)
|
|
||||||
|
|
||||||
wxSplitterScrolledWindow(wxWindow* parent, wxWindowID id = wxID_ANY,
|
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
|
||||||
const wxSize& sz = wxDefaultSize,
|
|
||||||
long style = 0);
|
|
||||||
|
|
||||||
//// Overrides
|
|
||||||
|
|
||||||
//// Events
|
|
||||||
|
|
||||||
void OnScroll(wxScrollWinEvent& event);
|
|
||||||
void OnSize(wxSizeEvent& event);
|
|
||||||
|
|
||||||
//// Operations
|
|
||||||
|
|
||||||
//// Accessors
|
|
||||||
|
|
||||||
//// Data members
|
|
||||||
public:
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
// _SPLITTREE_H_
|
|