Compare commits
1 Commits
wxPy_2_3_2
...
v2.3.1
Author | SHA1 | Date | |
---|---|---|---|
|
59ddf31b29 |
@@ -37,9 +37,6 @@ base
|
|||||||
gtk
|
gtk
|
||||||
motif
|
motif
|
||||||
win32
|
win32
|
||||||
univ
|
|
||||||
univ-debug
|
|
||||||
univ-release
|
|
||||||
base-debug
|
base-debug
|
||||||
gtk-debug
|
gtk-debug
|
||||||
motif-debug
|
motif-debug
|
||||||
@@ -49,5 +46,3 @@ gtk-release
|
|||||||
motif-release
|
motif-release
|
||||||
win32-release
|
win32-release
|
||||||
*tags
|
*tags
|
||||||
log
|
|
||||||
univtags.cmd
|
|
||||||
|
97
Makefile.in
@@ -19,39 +19,56 @@ include ./src/make.env
|
|||||||
.SUFFIXES: .o .cpp .c .cxx
|
.SUFFIXES: .o .cpp .c .cxx
|
||||||
|
|
||||||
.c.o :
|
.c.o :
|
||||||
$(CCC) -c @DEP_INFO_FLAGS@ $(CFLAGS) $(PICFLAGS) @WXMSW_DLL_DEFINES@ -o $@ $<
|
$(CCC) -c @DEP_INFO_FLAGS@ $(CFLAGS) $(PICFLAGS) -o $@ $<
|
||||||
|
|
||||||
.cpp.o :
|
.cpp.o :
|
||||||
$(CC) -c @DEP_INFO_FLAGS@ $(CXXFLAGS) $(PICFLAGS) @WXMSW_DLL_DEFINES@ -o $@ $<
|
$(CC) -c @DEP_INFO_FLAGS@ $(CPPFLAGS) $(PICFLAGS) -o $@ $<
|
||||||
|
|
||||||
.cxx.o :
|
.cxx.o :
|
||||||
$(CC) -c @DEP_INFO_FLAGS@ $(CXXFLAGS) $(PICFLAGS) @WXMSW_DLL_DEFINES@ -o $@ $<
|
$(CC) -c @DEP_INFO_FLAGS@ $(CPPFLAGS) $(PICFLAGS) -o $@ $<
|
||||||
|
|
||||||
########################### Paths #################################
|
########################### Paths #################################
|
||||||
|
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
top_srcdir = @top_srcdir@
|
|
||||||
|
|
||||||
VP1 = @TOOLKIT_VPATH@
|
VP1 = @top_srcdir@/src/common
|
||||||
VP2 = @top_srcdir@/src/common
|
VP2 = @top_srcdir@/src/@TOOLKIT_DIR@
|
||||||
VP3 = @top_srcdir@/src/generic
|
VP3 = @top_srcdir@/src/motif/xmcombo
|
||||||
VP4 = @top_srcdir@/src/unix
|
VP4 = @top_srcdir@/src/generic
|
||||||
VP5 = @top_srcdir@/src/html
|
VP5 = @top_srcdir@/src/unix
|
||||||
VP6 = @top_srcdir@/src/png
|
VP6 = @top_srcdir@/src/html
|
||||||
VP7 = @top_srcdir@/src/jpeg
|
VP7 = @top_srcdir@/src/png
|
||||||
VP8 = @top_srcdir@/src/tiff
|
VP8 = @top_srcdir@/src/jpeg
|
||||||
VP9 = @top_srcdir@/src/zlib
|
VP9 = @top_srcdir@/src/tiff
|
||||||
VPA = @top_srcdir@/src/regex
|
VP10 = @top_srcdir@/src/zlib
|
||||||
VP10 = @top_srcdir@/src/iodbc
|
VP11 = @top_srcdir@/src/iodbc
|
||||||
VP11 = @top_srcdir@/src/msw/ole
|
VP12 = @top_srcdir@/src/msw/ole
|
||||||
VP12 = $(FTVP01)@PATH_IFS@$(FTVP02)@PATH_IFS@$(FTVP03)@PATH_IFS@$(FTVP04)@PATH_IFS@$(FTVP05)@PATH_IFS@$(FTVP06)@PATH_IFS@$(FTVP07)@PATH_IFS@$(FTVP08)@PATH_IFS@
|
|
||||||
VP13 = $(FTVP09)@PATH_IFS@$(FTVP10)@PATH_IFS@$(FTVP11)@PATH_IFS@$(FTVP12)@PATH_IFS@$(FTVP13)@PATH_IFS@$(FTVP14)@PATH_IFS@$(FTVP15)@PATH_IFS@
|
FTVP01 = @top_srcdir@/src/freetype/unix
|
||||||
|
FTVP02 = @top_srcdir@/src/freetype/autohint
|
||||||
|
FTVP03 = @top_srcdir@/src/freetype/base
|
||||||
|
FTVP04 = @top_srcdir@/src/freetype/cff
|
||||||
|
FTVP05 = @top_srcdir@/src/freetype/cid
|
||||||
|
FTVP06 = @top_srcdir@/src/freetype/macfond
|
||||||
|
FTVP07 = @top_srcdir@/src/freetype/otlayout
|
||||||
|
FTVP08 = @top_srcdir@/src/freetype/psnames
|
||||||
|
FTVP09 = @top_srcdir@/src/freetype/raster1
|
||||||
|
FTVP10 = @top_srcdir@/src/freetype/sfnt
|
||||||
|
FTVP11 = @top_srcdir@/src/freetype/smooth
|
||||||
|
FTVP12 = @top_srcdir@/src/freetype/truetype
|
||||||
|
FTVP13 = @top_srcdir@/src/freetype/type1
|
||||||
|
FTVP14 = @top_srcdir@/src/freetype/type1z
|
||||||
|
FTVP15 = @top_srcdir@/src/freetype/winfonts
|
||||||
|
|
||||||
|
VP13 = $(FTVP01)@PATH_IFS@$(FTVP02)@PATH_IFS@$(FTVP03)@PATH_IFS@$(FTVP04)@PATH_IFS@$(FTVP05)@PATH_IFS@$(FTVP06)@PATH_IFS@$(FTVP07)@PATH_IFS@$(FTVP08)@PATH_IFS@
|
||||||
|
VP14 = $(FTVP09)@PATH_IFS@$(FTVP10)@PATH_IFS@$(FTVP11)@PATH_IFS@$(FTVP12)@PATH_IFS@$(FTVP13)@PATH_IFS@$(FTVP14)@PATH_IFS@$(FTVP15)@PATH_IFS@
|
||||||
|
|
||||||
# the comment at the end of the next line is needed because otherwise autoconf
|
# the comment at the end of the next line is needed because otherwise autoconf
|
||||||
# would remove this line completely - it contains a built-in hack to remove
|
# would remove this line completely - it contains a built-in hack to remove
|
||||||
# any VPATH assignment not containing ':'
|
# any VPATH assignment not containing ':'
|
||||||
VPATH = $(VP1)@PATH_IFS@$(VP2)@PATH_IFS@$(VP3)@PATH_IFS@$(VP4)@PATH_IFS@$(VP5)@PATH_IFS@$(VP6)@PATH_IFS@$(VP7)@PATH_IFS@$(VP8)@PATH_IFS@$(VP9)@PATH_IFS@$(VPA)@PATH_IFS@$(VP10)@PATH_IFS@$(VP11)@PATH_IFS@$(VP12)@PATH_IFS@$(VP13) # ':' for autoconf
|
VPATH = $(VP1)@PATH_IFS@$(VP2)@PATH_IFS@$(VP3)@PATH_IFS@$(VP4)@PATH_IFS@$(VP5)@PATH_IFS@$(VP6)@PATH_IFS@$(VP7)@PATH_IFS@$(VP8)@PATH_IFS@$(VP9)@PATH_IFS@$(VP10)@PATH_IFS@$(VP11)@PATH_IFS@$(VP12)@PATH_IFS@$(VP13)@PATH_IFS@$(VP14) # ':' for autoconf
|
||||||
|
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
|
|
||||||
@@ -158,7 +175,7 @@ WX_LINGUAS = `cd $(top_srcdir)/locale && ls *.mo 2> /dev/null | sed -n 's/\.mo//
|
|||||||
# this line will include a file which defines ALL_SOURCES, ALL_OBJECTS,
|
# this line will include a file which defines ALL_SOURCES, ALL_OBJECTS,
|
||||||
# ALL_DEPFILES and ALL_HEADERS variables with the complete list of .cpp, .o,
|
# ALL_DEPFILES and ALL_HEADERS variables with the complete list of .cpp, .o,
|
||||||
# .d and .h/.inl files for the current toolkit
|
# .d and .h/.inl files for the current toolkit
|
||||||
include @PORT_FILES@
|
include $(top_srcdir)/@PORT_FILES@
|
||||||
|
|
||||||
SOURCES = $(ALL_SOURCES)
|
SOURCES = $(ALL_SOURCES)
|
||||||
HEADERS = $(ALL_HEADERS)
|
HEADERS = $(ALL_HEADERS)
|
||||||
@@ -170,13 +187,7 @@ DEPFILES = @ALL_DEPFILES@
|
|||||||
|
|
||||||
# the object files of sublibraries (we assume that they don't change [often],
|
# the object files of sublibraries (we assume that they don't change [often],
|
||||||
# so we don't generate these lists with tmake but embed them here)
|
# so we don't generate these lists with tmake but embed them here)
|
||||||
REGEXOBJS = \
|
ZLIBOBJS = \
|
||||||
regcomp.o \
|
|
||||||
regexec.o \
|
|
||||||
regerror.o \
|
|
||||||
regfree.o
|
|
||||||
|
|
||||||
ZLIBOBJS = \
|
|
||||||
adler32.o \
|
adler32.o \
|
||||||
compress.o \
|
compress.o \
|
||||||
crc32.o \
|
crc32.o \
|
||||||
@@ -192,7 +203,7 @@ ZLIBOBJS = \
|
|||||||
infutil.o \
|
infutil.o \
|
||||||
inffast.o
|
inffast.o
|
||||||
|
|
||||||
PNGOBJS = \
|
PNGOBJS = \
|
||||||
png.o \
|
png.o \
|
||||||
pngread.o \
|
pngread.o \
|
||||||
pngrtran.o \
|
pngrtran.o \
|
||||||
@@ -228,7 +239,7 @@ FREETYPEOBJS = \
|
|||||||
type1z.o \
|
type1z.o \
|
||||||
winfnt.o
|
winfnt.o
|
||||||
|
|
||||||
JPEGOBJS = \
|
JPEGOBJS = \
|
||||||
jcomapi.o \
|
jcomapi.o \
|
||||||
jutils.o \
|
jutils.o \
|
||||||
jerror.o \
|
jerror.o \
|
||||||
@@ -276,7 +287,7 @@ JPEGOBJS = \
|
|||||||
jquant2.o \
|
jquant2.o \
|
||||||
jdmerge.o
|
jdmerge.o
|
||||||
|
|
||||||
TIFFOBJS = \
|
TIFFOBJS = \
|
||||||
tif_aux.o \
|
tif_aux.o \
|
||||||
tif_close.o \
|
tif_close.o \
|
||||||
tif_codec.o \
|
tif_codec.o \
|
||||||
@@ -357,9 +368,9 @@ all: @WX_ALL@
|
|||||||
@$(INSTALL) -d ./lib
|
@$(INSTALL) -d ./lib
|
||||||
$(SHARED_LD) ./lib/$@ $(BURNT_LIBRARY_NAME) $(OBJECTS) $(EXTRALIBS)
|
$(SHARED_LD) ./lib/$@ $(BURNT_LIBRARY_NAME) $(OBJECTS) $(EXTRALIBS)
|
||||||
|
|
||||||
@WX_LIBRARY_NAME_SHARED_GL@: glcanvas.o @WX_LIBRARY_NAME_SHARED@
|
@WX_LIBRARY_NAME_SHARED_GL@: glcanvas.o
|
||||||
@$(INSTALL) -d ./lib
|
@$(INSTALL) -d ./lib
|
||||||
$(SHARED_LD) ./lib/$@ $(BURNT_LIBRARY_NAME_GL) glcanvas.o ./lib/@WX_LIBRARY_NAME_SHARED@ $(EXTRALIBS) $(OPENGLLIBS)
|
$(SHARED_LD) ./lib/$@ $(BURNT_LIBRARY_NAME_GL) glcanvas.o $(EXTRALIBS)
|
||||||
|
|
||||||
./lib/lib@WX_LIBRARY@-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).r: ./lib/lib@WX_LIBRARY@-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).rsrc
|
./lib/lib@WX_LIBRARY@-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).r: ./lib/lib@WX_LIBRARY@-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).rsrc
|
||||||
$(DEREZ) $^ $(DEREZFLAGS) > $@
|
$(DEREZ) $^ $(DEREZFLAGS) > $@
|
||||||
@@ -429,7 +440,7 @@ lexer.c: $(COMMDIR)/lexer.l
|
|||||||
-include $(DEPFILES)
|
-include $(DEPFILES)
|
||||||
|
|
||||||
afminstall: preinstall
|
afminstall: preinstall
|
||||||
@if test ! -d $(datadir); then $(INSTALL) -d $(datadir); fi
|
$(INSTALL) -d $(datadir)
|
||||||
$(INSTALL) -d $(datadir)/wx
|
$(INSTALL) -d $(datadir)/wx
|
||||||
$(INSTALL) -d $(datadir)/wx/afm
|
$(INSTALL) -d $(datadir)/wx/afm
|
||||||
$(INSTALL) -d $(datadir)/wx/gs_afm
|
$(INSTALL) -d $(datadir)/wx/gs_afm
|
||||||
@@ -443,9 +454,9 @@ preinstall: $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(top_builddir)/wx@TOOLKIT_N
|
|||||||
@echo " Installing wxWindows..."
|
@echo " Installing wxWindows..."
|
||||||
@echo " "
|
@echo " "
|
||||||
|
|
||||||
@if test ! -d $(prefix); then $(INSTALL) -d $(prefix); fi
|
$(INSTALL) -d $(prefix)
|
||||||
@if test ! -d $(bindir); then $(INSTALL) -d $(bindir); fi
|
$(INSTALL) -d $(bindir)
|
||||||
@if test ! -d $(libdir); then $(INSTALL) -d $(libdir); fi
|
$(INSTALL) -d $(libdir)
|
||||||
|
|
||||||
$(INSTALL_SCRIPT) $(top_builddir)/wx@TOOLKIT_NAME@-config $(bindir)/wx@TOOLKIT_NAME@-config
|
$(INSTALL_SCRIPT) $(top_builddir)/wx@TOOLKIT_NAME@-config $(bindir)/wx@TOOLKIT_NAME@-config
|
||||||
cd $(bindir) && rm -f wx-config && $(LN_S) wx@TOOLKIT_NAME@-config wx-config
|
cd $(bindir) && rm -f wx-config && $(LN_S) wx@TOOLKIT_NAME@-config wx-config
|
||||||
@@ -468,10 +479,10 @@ preinstall: $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(top_builddir)/wx@TOOLKIT_N
|
|||||||
echo "$(INSTALL_DATA) $(top_srcdir)/include/wx/$$p $(includedir)/wx/$$p"; \
|
echo "$(INSTALL_DATA) $(top_srcdir)/include/wx/$$p $(includedir)/wx/$$p"; \
|
||||||
done
|
done
|
||||||
|
|
||||||
@if test ! -d $(localedir); then $(INSTALL) -d $(localedir); fi
|
$(INSTALL) -d $(localedir)
|
||||||
@for p in $(WX_LINGUAS); do \
|
@for p in $(WX_LINGUAS); do \
|
||||||
if test ! -d $(localedir)/$$p; then $(INSTALL) -d $(localedir)/$$p; fi;\
|
$(INSTALL) -d $(localedir)/$$p; \
|
||||||
if test ! -d $(localedir)/$$p/LC_MESSAGES; then $(INSTALL) -d $(localedir)/$$p/LC_MESSAGES; fi;\
|
$(INSTALL) -d $(localedir)/$$p/LC_MESSAGES; \
|
||||||
$(INSTALL_DATA) $(top_srcdir)/locale/$$p.mo $(localedir)/$$p/LC_MESSAGES/wxstd.mo; \
|
$(INSTALL_DATA) $(top_srcdir)/locale/$$p.mo $(localedir)/$$p/LC_MESSAGES/wxstd.mo; \
|
||||||
echo "$(INSTALL_DATA) $(top_srcdir)/locale/$$p.mo $(localedir)/$$p/LC_MESSAGES/wxstd.mo"; \
|
echo "$(INSTALL_DATA) $(top_srcdir)/locale/$$p.mo $(localedir)/$$p/LC_MESSAGES/wxstd.mo"; \
|
||||||
done
|
done
|
||||||
@@ -480,7 +491,7 @@ preinstall_gl: $(top_builddir)/lib/@WX_TARGET_LIBRARY_GL@
|
|||||||
@echo " "
|
@echo " "
|
||||||
@echo " Installing wxWindows OpenGl add-on..."
|
@echo " Installing wxWindows OpenGl add-on..."
|
||||||
@echo " "
|
@echo " "
|
||||||
@if test ! -d $(libdir); then $(INSTALL) -d $(libdir); fi
|
$(INSTALL) -d $(libdir)
|
||||||
$(INSTALL_PROGRAM) $(top_builddir)/lib/@WX_TARGET_LIBRARY_GL@ $(libdir)/@WX_TARGET_LIBRARY_GL@
|
$(INSTALL_PROGRAM) $(top_builddir)/lib/@WX_TARGET_LIBRARY_GL@ $(libdir)/@WX_TARGET_LIBRARY_GL@
|
||||||
|
|
||||||
install: @AFMINSTALL@ @WX_ALL_INSTALLED@
|
install: @AFMINSTALL@ @WX_ALL_INSTALLED@
|
||||||
@@ -608,7 +619,7 @@ ALL_GUI_DIST: ALL_DIST
|
|||||||
mkdir $(DISTDIR)/src/tiff
|
mkdir $(DISTDIR)/src/tiff
|
||||||
mkdir $(DISTDIR)/src/iodbc
|
mkdir $(DISTDIR)/src/iodbc
|
||||||
mkdir $(DISTDIR)/src/unix
|
mkdir $(DISTDIR)/src/unix
|
||||||
cp $(WXDIR)/@PORT_FILES@ $(DISTDIR)
|
cp $(WXDIR)/@PORT_FILES@ $(DISTDIR)/@PORT_FILES@
|
||||||
cp $(SRCDIR)/*.in $(DISTDIR)/src
|
cp $(SRCDIR)/*.in $(DISTDIR)/src
|
||||||
cp $(COMMDIR)/*.cpp $(DISTDIR)/src/common
|
cp $(COMMDIR)/*.cpp $(DISTDIR)/src/common
|
||||||
cp $(COMMDIR)/*.c $(DISTDIR)/src/common
|
cp $(COMMDIR)/*.c $(DISTDIR)/src/common
|
||||||
@@ -648,7 +659,7 @@ BASE_DIST: ALL_DIST
|
|||||||
mkdir $(DISTDIR)/include/wx/unix
|
mkdir $(DISTDIR)/include/wx/unix
|
||||||
mkdir $(DISTDIR)/src/common
|
mkdir $(DISTDIR)/src/common
|
||||||
mkdir $(DISTDIR)/src/unix
|
mkdir $(DISTDIR)/src/unix
|
||||||
cp $(WXDIR)/@PORT_FILES@ $(DISTDIR)
|
cp $(WXDIR)/@PORT_FILES@ $(DISTDIR)/@PORT_FILES@
|
||||||
cp $(WXDIR)/@RPM_FILES@ $(DISTDIR)/@RPM_FILES@
|
cp $(WXDIR)/@RPM_FILES@ $(DISTDIR)/@RPM_FILES@
|
||||||
cp $(WXDIR)/@RPM_SPEC@ $(DISTDIR)/@RPM_SPEC@
|
cp $(WXDIR)/@RPM_SPEC@ $(DISTDIR)/@RPM_SPEC@
|
||||||
cp $(WXDIR)/wxBase*.ds[pw] $(DISTDIR)
|
cp $(WXDIR)/wxBase*.ds[pw] $(DISTDIR)
|
||||||
@@ -1374,7 +1385,7 @@ clean:
|
|||||||
$(RM) *.d
|
$(RM) *.d
|
||||||
$(RM) parser.c
|
$(RM) parser.c
|
||||||
$(RM) lexer.c
|
$(RM) lexer.c
|
||||||
# $(RM) -r ./lib/wx/*
|
$(RM) -r ./lib/wx/*
|
||||||
$(RM) ./lib/lib*
|
$(RM) ./lib/lib*
|
||||||
|
|
||||||
cleanall: clean
|
cleanall: clean
|
||||||
|
119
aclocal.m4
vendored
@@ -1,104 +1,11 @@
|
|||||||
dnl aclocal.m4 generated automatically by aclocal 1.4
|
|
||||||
|
|
||||||
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
|
||||||
dnl This file is free software; the Free Software Foundation
|
|
||||||
dnl gives unlimited permission to copy and/or distribute it,
|
|
||||||
dnl with or without modifications, as long as this notice is preserved.
|
|
||||||
|
|
||||||
dnl This program is distributed in the hope that it will be useful,
|
|
||||||
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
|
||||||
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
||||||
dnl PARTICULAR PURPOSE.
|
|
||||||
|
|
||||||
# Configure paths for GTK+
|
# Configure paths for GTK+
|
||||||
# Owen Taylor 97-11-3
|
# Owen Taylor 97-11-3
|
||||||
|
|
||||||
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
|
||||||
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS. Uses variables
|
|
||||||
dnl gtk_config_prefix and/or gtk_config_exec_prefix if defined.
|
|
||||||
AC_DEFUN(AM_PATH_GTK,
|
|
||||||
[
|
|
||||||
if test x$gtk_config_exec_prefix != x ; then
|
|
||||||
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
|
|
||||||
if test x${GTK_CONFIG+set} != xset ; then
|
|
||||||
GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test x$gtk_config_prefix != x ; then
|
|
||||||
gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
|
|
||||||
if test x${GTK_CONFIG+set} != xset ; then
|
|
||||||
GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
|
|
||||||
min_gtk_version=ifelse([$1], ,0.99.7,$1)
|
|
||||||
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
|
|
||||||
no_gtk=""
|
|
||||||
if test "$GTK_CONFIG" != "no" ; then
|
|
||||||
GTK_CFLAGS=`$GTK_CONFIG --cflags`
|
|
||||||
GTK_LIBS=`$GTK_CONFIG --libs gthread`
|
|
||||||
ac_save_CFLAGS="$CFLAGS"
|
|
||||||
ac_save_LIBS="$LIBS"
|
|
||||||
CFLAGS="$CFLAGS $GTK_CFLAGS"
|
|
||||||
LIBS="$LIBS $GTK_LIBS"
|
|
||||||
dnl
|
|
||||||
dnl Now check if the installed GTK is sufficiently new. (Also sanity
|
|
||||||
dnl checks the results of gtk-config to some extent)
|
|
||||||
dnl
|
|
||||||
AC_TRY_RUN([
|
|
||||||
#include <gtk/gtk.h>
|
|
||||||
#include <gtk/gtkfeatures.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
int major, minor, micro;
|
|
||||||
|
|
||||||
if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, µ) != 3) {
|
|
||||||
printf("%s, bad version string\n", "$min_gtk_version");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((GTK_MAJOR_VERSION != gtk_major_version) ||
|
|
||||||
(GTK_MINOR_VERSION != gtk_minor_version) ||
|
|
||||||
(GTK_MICRO_VERSION != gtk_micro_version)) {
|
|
||||||
printf("Headers vs. library version mismatch!\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gtk_minor_version == 1) return FALSE;
|
|
||||||
|
|
||||||
return !((gtk_major_version > major) ||
|
|
||||||
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
|
|
||||||
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)));
|
|
||||||
}
|
|
||||||
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
|
||||||
CFLAGS="$ac_save_CFLAGS"
|
|
||||||
LIBS="$ac_save_LIBS"
|
|
||||||
else
|
|
||||||
no_gtk=yes
|
|
||||||
fi
|
|
||||||
if test "x$no_gtk" = x ; then
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
ifelse([$2], , :, [$2])
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
GTK_CFLAGS=""
|
|
||||||
GTK_LIBS=""
|
|
||||||
ifelse([$3], , :, [$3])
|
|
||||||
fi
|
|
||||||
AC_SUBST(GTK_CFLAGS)
|
|
||||||
AC_SUBST(GTK_LIBS)
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
|
dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
|
||||||
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
|
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
|
||||||
dnl
|
dnl
|
||||||
AC_DEFUN(AM_PATH_GTK_2_0,
|
AC_DEFUN(AM_PATH_GTK_2_0,
|
||||||
[dnl
|
[dnl
|
||||||
dnl Get the cflags and libraries from the gtk-config-2.0 script
|
dnl Get the cflags and libraries from the gtk-config-2.0 script
|
||||||
dnl
|
dnl
|
||||||
AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
|
AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
|
||||||
@@ -106,12 +13,12 @@ AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed
|
|||||||
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
|
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
|
||||||
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
|
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
|
||||||
AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
|
AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
|
||||||
, enable_gtktest=yes)
|
, enable_gtktest=yes)
|
||||||
|
|
||||||
for module in . $4
|
for module in . $4
|
||||||
do
|
do
|
||||||
case "$module" in
|
case "$module" in
|
||||||
gthread)
|
gthread)
|
||||||
gtk_config_args="$gtk_config_args gthread"
|
gtk_config_args="$gtk_config_args gthread"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -160,7 +67,7 @@ dnl
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
int major, minor, micro;
|
int major, minor, micro;
|
||||||
@@ -179,7 +86,7 @@ main ()
|
|||||||
(gtk_minor_version != $gtk_config_minor_version) ||
|
(gtk_minor_version != $gtk_config_minor_version) ||
|
||||||
(gtk_micro_version != $gtk_config_micro_version))
|
(gtk_micro_version != $gtk_config_micro_version))
|
||||||
{
|
{
|
||||||
printf("\n*** 'gtk-config-2.0 --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
|
printf("\n*** 'gtk-config-2.0 --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
|
||||||
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
|
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
|
||||||
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||||
printf ("*** was found! If gtk-config-2.0 was correct, then it is best\n");
|
printf ("*** was found! If gtk-config-2.0 was correct, then it is best\n");
|
||||||
@@ -190,16 +97,16 @@ main ()
|
|||||||
printf("*** If gtk-config-2.0 was wrong, set the environment variable GTK_CONFIG_2_0\n");
|
printf("*** If gtk-config-2.0 was wrong, set the environment variable GTK_CONFIG_2_0\n");
|
||||||
printf("*** to point to the correct copy of gtk-config-2.0, and remove the file config.cache\n");
|
printf("*** to point to the correct copy of gtk-config-2.0, and remove the file config.cache\n");
|
||||||
printf("*** before re-running configure\n");
|
printf("*** before re-running configure\n");
|
||||||
}
|
}
|
||||||
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
|
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
|
||||||
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
|
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
|
||||||
(gtk_minor_version != GTK_MINOR_VERSION) ||
|
(gtk_minor_version != GTK_MINOR_VERSION) ||
|
||||||
(gtk_micro_version != GTK_MICRO_VERSION))
|
(gtk_micro_version != GTK_MICRO_VERSION))
|
||||||
{
|
{
|
||||||
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
|
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
|
||||||
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
|
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
|
||||||
printf("*** library (version %d.%d.%d)\n",
|
printf("*** library (version %d.%d.%d)\n",
|
||||||
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||||
}
|
}
|
||||||
#endif /* defined (GTK_MAJOR_VERSION) ... */
|
#endif /* defined (GTK_MAJOR_VERSION) ... */
|
||||||
else
|
else
|
||||||
@@ -215,7 +122,7 @@ main ()
|
|||||||
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
|
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
|
||||||
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||||
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
|
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
|
||||||
major, minor, micro);
|
major, minor, micro);
|
||||||
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
|
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
|
||||||
printf("***\n");
|
printf("***\n");
|
||||||
printf("*** If you have already installed a sufficiently new version, this error\n");
|
printf("*** If you have already installed a sufficiently new version, this error\n");
|
||||||
@@ -236,7 +143,7 @@ main ()
|
|||||||
fi
|
fi
|
||||||
if test "x$no_gtk" = x ; then
|
if test "x$no_gtk" = x ; then
|
||||||
AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
|
AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
|
||||||
ifelse([$2], , :, [$2])
|
ifelse([$2], , :, [$2])
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
if test "$GTK_CONFIG_2_0" = "no" ; then
|
if test "$GTK_CONFIG_2_0" = "no" ; then
|
||||||
@@ -261,7 +168,7 @@ main ()
|
|||||||
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
||||||
echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
||||||
echo "*** is required on your system"
|
echo "*** is required on your system"
|
||||||
echo "***"
|
echo "***"
|
||||||
echo "*** If you have an old version installed, it is best to remove it, although"
|
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||||
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
|
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
|
||||||
echo "***"
|
echo "***"
|
||||||
@@ -285,5 +192,3 @@ main ()
|
|||||||
AC_SUBST(GTK_LIBS)
|
AC_SUBST(GTK_LIBS)
|
||||||
rm -f conf.gtktest
|
rm -f conf.gtktest
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
1734
configure.in
24
contrib/configure
vendored
@@ -812,6 +812,7 @@ done
|
|||||||
ac_given_srcdir=$srcdir
|
ac_given_srcdir=$srcdir
|
||||||
|
|
||||||
trap 'rm -fr `echo "
|
trap 'rm -fr `echo "
|
||||||
|
Makefile
|
||||||
src/Makefile
|
src/Makefile
|
||||||
src/ogl/Makefile
|
src/ogl/Makefile
|
||||||
src/mmedia/Makefile
|
src/mmedia/Makefile
|
||||||
@@ -821,8 +822,6 @@ trap 'rm -fr `echo "
|
|||||||
src/gizmos/Makefile
|
src/gizmos/Makefile
|
||||||
src/plot/Makefile
|
src/plot/Makefile
|
||||||
src/applet/Makefile
|
src/applet/Makefile
|
||||||
src/fl/Makefile
|
|
||||||
src/net/Makefile
|
|
||||||
samples/Makefile
|
samples/Makefile
|
||||||
samples/mmedia/Makefile
|
samples/mmedia/Makefile
|
||||||
samples/ogl/Makefile
|
samples/ogl/Makefile
|
||||||
@@ -836,17 +835,9 @@ trap 'rm -fr `echo "
|
|||||||
samples/gizmos/multicell/Makefile
|
samples/gizmos/multicell/Makefile
|
||||||
samples/gizmos/splittree/Makefile
|
samples/gizmos/splittree/Makefile
|
||||||
samples/gizmos/editlbox/Makefile
|
samples/gizmos/editlbox/Makefile
|
||||||
samples/gizmos/dynsash/Makefile
|
|
||||||
samples/gizmos/dynsash_switch/Makefile
|
|
||||||
samples/xrc/Makefile
|
samples/xrc/Makefile
|
||||||
samples/plot/Makefile
|
samples/plot/Makefile
|
||||||
samples/applet/Makefile
|
samples/applet/Makefile
|
||||||
samples/fl/Makefile
|
|
||||||
samples/fl/fl_demo1/Makefile
|
|
||||||
samples/fl/fl_demo2/Makefile
|
|
||||||
samples/fl/fl_sample1/Makefile
|
|
||||||
samples/fl/fl_sample2/Makefile
|
|
||||||
samples/fl/fl_sample3/Makefile
|
|
||||||
utils/Makefile
|
utils/Makefile
|
||||||
utils/wxrc/Makefile
|
utils/wxrc/Makefile
|
||||||
utils/wxrcedit/Makefile
|
utils/wxrcedit/Makefile
|
||||||
@@ -929,7 +920,8 @@ EOF
|
|||||||
|
|
||||||
cat >> $CONFIG_STATUS <<EOF
|
cat >> $CONFIG_STATUS <<EOF
|
||||||
|
|
||||||
CONFIG_FILES=\${CONFIG_FILES-"src/Makefile
|
CONFIG_FILES=\${CONFIG_FILES-"Makefile
|
||||||
|
src/Makefile
|
||||||
src/ogl/Makefile
|
src/ogl/Makefile
|
||||||
src/mmedia/Makefile
|
src/mmedia/Makefile
|
||||||
src/stc/Makefile
|
src/stc/Makefile
|
||||||
@@ -938,8 +930,6 @@ CONFIG_FILES=\${CONFIG_FILES-"src/Makefile
|
|||||||
src/gizmos/Makefile
|
src/gizmos/Makefile
|
||||||
src/plot/Makefile
|
src/plot/Makefile
|
||||||
src/applet/Makefile
|
src/applet/Makefile
|
||||||
src/fl/Makefile
|
|
||||||
src/net/Makefile
|
|
||||||
samples/Makefile
|
samples/Makefile
|
||||||
samples/mmedia/Makefile
|
samples/mmedia/Makefile
|
||||||
samples/ogl/Makefile
|
samples/ogl/Makefile
|
||||||
@@ -953,17 +943,9 @@ CONFIG_FILES=\${CONFIG_FILES-"src/Makefile
|
|||||||
samples/gizmos/multicell/Makefile
|
samples/gizmos/multicell/Makefile
|
||||||
samples/gizmos/splittree/Makefile
|
samples/gizmos/splittree/Makefile
|
||||||
samples/gizmos/editlbox/Makefile
|
samples/gizmos/editlbox/Makefile
|
||||||
samples/gizmos/dynsash/Makefile
|
|
||||||
samples/gizmos/dynsash_switch/Makefile
|
|
||||||
samples/xrc/Makefile
|
samples/xrc/Makefile
|
||||||
samples/plot/Makefile
|
samples/plot/Makefile
|
||||||
samples/applet/Makefile
|
samples/applet/Makefile
|
||||||
samples/fl/Makefile
|
|
||||||
samples/fl/fl_demo1/Makefile
|
|
||||||
samples/fl/fl_demo2/Makefile
|
|
||||||
samples/fl/fl_sample1/Makefile
|
|
||||||
samples/fl/fl_sample2/Makefile
|
|
||||||
samples/fl/fl_sample3/Makefile
|
|
||||||
utils/Makefile
|
utils/Makefile
|
||||||
utils/wxrc/Makefile
|
utils/wxrc/Makefile
|
||||||
utils/wxrcedit/Makefile
|
utils/wxrcedit/Makefile
|
||||||
|
@@ -37,6 +37,7 @@ dnl File output
|
|||||||
|
|
||||||
|
|
||||||
AC_OUTPUT([
|
AC_OUTPUT([
|
||||||
|
Makefile
|
||||||
src/Makefile
|
src/Makefile
|
||||||
src/ogl/Makefile
|
src/ogl/Makefile
|
||||||
src/mmedia/Makefile
|
src/mmedia/Makefile
|
||||||
@@ -46,8 +47,6 @@ AC_OUTPUT([
|
|||||||
src/gizmos/Makefile
|
src/gizmos/Makefile
|
||||||
src/plot/Makefile
|
src/plot/Makefile
|
||||||
src/applet/Makefile
|
src/applet/Makefile
|
||||||
src/fl/Makefile
|
|
||||||
src/net/Makefile
|
|
||||||
samples/Makefile
|
samples/Makefile
|
||||||
samples/mmedia/Makefile
|
samples/mmedia/Makefile
|
||||||
samples/ogl/Makefile
|
samples/ogl/Makefile
|
||||||
@@ -61,17 +60,9 @@ AC_OUTPUT([
|
|||||||
samples/gizmos/multicell/Makefile
|
samples/gizmos/multicell/Makefile
|
||||||
samples/gizmos/splittree/Makefile
|
samples/gizmos/splittree/Makefile
|
||||||
samples/gizmos/editlbox/Makefile
|
samples/gizmos/editlbox/Makefile
|
||||||
samples/gizmos/dynsash/Makefile
|
|
||||||
samples/gizmos/dynsash_switch/Makefile
|
|
||||||
samples/xrc/Makefile
|
samples/xrc/Makefile
|
||||||
samples/plot/Makefile
|
samples/plot/Makefile
|
||||||
samples/applet/Makefile
|
samples/applet/Makefile
|
||||||
samples/fl/Makefile
|
|
||||||
samples/fl/fl_demo1/Makefile
|
|
||||||
samples/fl/fl_demo2/Makefile
|
|
||||||
samples/fl/fl_sample1/Makefile
|
|
||||||
samples/fl/fl_sample2/Makefile
|
|
||||||
samples/fl/fl_sample3/Makefile
|
|
||||||
utils/Makefile
|
utils/Makefile
|
||||||
utils/wxrc/Makefile
|
utils/wxrc/Makefile
|
||||||
utils/wxrcedit/Makefile
|
utils/wxrcedit/Makefile
|
||||||
|
@@ -1,335 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: animate.h
|
|
||||||
// Purpose: Animation classes
|
|
||||||
// Author: Julian Smart and Guillermo Rodriguez Garcia
|
|
||||||
// Modified by:
|
|
||||||
// Created: 13/8/99
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Julian Smart and Guillermo Rodriguez Garcia
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef _WX_ANIMATEH__
|
|
||||||
#define _WX_ANIMATEH__
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma interface "animate.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <wx/defs.h>
|
|
||||||
#include <wx/string.h>
|
|
||||||
#include <wx/gdicmn.h>
|
|
||||||
#include <wx/list.h>
|
|
||||||
#include <wx/timer.h>
|
|
||||||
|
|
||||||
//#define ANIMDLLEXPORT WXDLLEXPORT
|
|
||||||
#define ANIMDLLEXPORT
|
|
||||||
|
|
||||||
class ANIMDLLEXPORT wxAnimationBase;
|
|
||||||
class ANIMDLLEXPORT wxAnimationPlayer;
|
|
||||||
class WXDLLEXPORT wxImage;
|
|
||||||
|
|
||||||
enum wxAnimationDisposal
|
|
||||||
{
|
|
||||||
wxANIM_UNSPECIFIED = -1,
|
|
||||||
wxANIM_DONOTREMOVE = 0,
|
|
||||||
wxANIM_TOBACKGROUND = 1,
|
|
||||||
wxANIM_TOPREVIOUS = 2
|
|
||||||
} ;
|
|
||||||
|
|
||||||
class ANIMDLLEXPORT wxAnimationTimer: public wxTimer
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
wxAnimationTimer() { m_player = (wxAnimationPlayer*) NULL; }
|
|
||||||
|
|
||||||
virtual void Notify();
|
|
||||||
void SetPlayer(wxAnimationPlayer* player) { m_player = player; }
|
|
||||||
|
|
||||||
protected:
|
|
||||||
wxAnimationPlayer* m_player;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* wxAnimationPlayer
|
|
||||||
* Create an object of this class, and either pass an wxXXXAnimation object in the constructor,
|
|
||||||
* or call SetAnimation. Then call Play().
|
|
||||||
* The wxAnimation object is only destroyed in the destructor if destroyAnimation is TRUE
|
|
||||||
* in the constructor.
|
|
||||||
*/
|
|
||||||
|
|
||||||
class ANIMDLLEXPORT wxAnimationPlayer : public wxObject
|
|
||||||
{
|
|
||||||
DECLARE_CLASS(wxAnimationPlayer)
|
|
||||||
|
|
||||||
public:
|
|
||||||
wxAnimationPlayer(wxAnimationBase *animation = (wxAnimationBase *) NULL, bool destroyAnimation = FALSE);
|
|
||||||
~wxAnimationPlayer();
|
|
||||||
//// Accessors
|
|
||||||
|
|
||||||
void SetAnimation(wxAnimationBase* animation, bool destroyAnimation = FALSE);
|
|
||||||
wxAnimationBase* GetAnimation() const { return m_animation; }
|
|
||||||
|
|
||||||
void SetDestroyAnimation(bool destroyAnimation) { m_destroyAnimation = destroyAnimation; };
|
|
||||||
bool GetDestroyAnimation() const { return m_destroyAnimation; }
|
|
||||||
|
|
||||||
void SetCurrentFrame(int currentFrame) { m_currentFrame = currentFrame; };
|
|
||||||
int GetCurrentFrame() const { return m_currentFrame; }
|
|
||||||
|
|
||||||
void SetWindow(wxWindow* window) { m_window = window; };
|
|
||||||
wxWindow* GetWindow() const { return m_window; }
|
|
||||||
|
|
||||||
void SetPosition(const wxPoint& pos) { m_position = pos; };
|
|
||||||
wxPoint GetPosition() const { return m_position; }
|
|
||||||
|
|
||||||
void SetLooped(bool looped) { m_looped = looped; };
|
|
||||||
bool GetLooped() const { return m_looped; }
|
|
||||||
|
|
||||||
bool HasAnimation() const { return (m_animation != (wxAnimationBase*) NULL); }
|
|
||||||
|
|
||||||
bool IsPlaying() const { return m_isPlaying; }
|
|
||||||
|
|
||||||
// Specify whether the GIF's background colour is to be shown,
|
|
||||||
// or whether the window background should show through (the default)
|
|
||||||
void UseBackgroundColour(bool useBackground) { m_useBackgroundColour = useBackground; }
|
|
||||||
bool UsingBackgroundColour() const { return m_useBackgroundColour; }
|
|
||||||
|
|
||||||
// Set and use a user-specified background colour (valid for transparent
|
|
||||||
// animations only)
|
|
||||||
void SetCustomBackgroundColour(const wxColour& col, bool useCustomBackgroundColour = TRUE)
|
|
||||||
{ m_customBackgroundColour = col; m_useCustomBackgroundColour = useCustomBackgroundColour; }
|
|
||||||
|
|
||||||
bool UsingCustomBackgroundColour() const { return m_useCustomBackgroundColour; }
|
|
||||||
const wxColour& GetCustomBackgroundColour() const { return m_customBackgroundColour; }
|
|
||||||
|
|
||||||
// Another refinement - suppose we're drawing the animation in a separate
|
|
||||||
// control or window. We may wish to use the background of the parent
|
|
||||||
// window as the background of our animation. This allows us to specify
|
|
||||||
// whether to grab from the parent or from this window.
|
|
||||||
void UseParentBackground(bool useParent) { m_useParentBackground = useParent; }
|
|
||||||
bool UsingParentBackground() const { return m_useParentBackground; }
|
|
||||||
|
|
||||||
//// Operations
|
|
||||||
|
|
||||||
// Play
|
|
||||||
virtual bool Play(wxWindow& window, const wxPoint& pos = wxPoint(0, 0), bool looped = TRUE);
|
|
||||||
|
|
||||||
// Build animation (list of wxImages). If not called before Play
|
|
||||||
// is called, Play will call this automatically.
|
|
||||||
virtual bool Build();
|
|
||||||
|
|
||||||
// Stop the animation
|
|
||||||
virtual void Stop();
|
|
||||||
|
|
||||||
// Draw the current view of the animation into this DC.
|
|
||||||
// Call this from your OnPaint, for example.
|
|
||||||
virtual void Draw(wxDC& dc);
|
|
||||||
|
|
||||||
//// Accessing the current animation
|
|
||||||
|
|
||||||
virtual int GetFrameCount() const;
|
|
||||||
virtual wxImage* GetFrame(int i) const; // Creates a new wxImage
|
|
||||||
virtual wxAnimationDisposal GetDisposalMethod(int i) const;
|
|
||||||
virtual wxRect GetFrameRect(int i) const; // Position and size of frame
|
|
||||||
virtual int GetDelay(int i) const; // Delay for this frame
|
|
||||||
|
|
||||||
virtual wxSize GetLogicalScreenSize() const;
|
|
||||||
virtual bool GetBackgroundColour(wxColour& col) const ;
|
|
||||||
virtual bool GetTransparentColour(wxColour& col) const ;
|
|
||||||
|
|
||||||
//// Implementation
|
|
||||||
|
|
||||||
// Play the frame
|
|
||||||
virtual bool PlayFrame(int frame, wxWindow& window, wxPoint& pos);
|
|
||||||
virtual bool PlayFrame();
|
|
||||||
virtual void DrawFrame(int frame, wxDC& dc, const wxPoint& pos);
|
|
||||||
virtual void DrawBackground(wxDC& dc, const wxPoint& pos, const wxColour& colour);
|
|
||||||
|
|
||||||
// Clear the wxImage cache
|
|
||||||
virtual void ClearCache();
|
|
||||||
|
|
||||||
// Save the pertinent area of the window so we can restore
|
|
||||||
// it if drawing transparently
|
|
||||||
void SaveBackground(const wxRect& rect);
|
|
||||||
|
|
||||||
wxBitmap& GetBackingStore() { return m_backingStore; }
|
|
||||||
|
|
||||||
//// Data members
|
|
||||||
protected:
|
|
||||||
wxAnimationBase* m_animation;
|
|
||||||
bool m_destroyAnimation; // Destroy m_animation on deletion of this object
|
|
||||||
wxList m_frames; // List of cached wxBitmap frames.
|
|
||||||
int m_currentFrame; // Current frame
|
|
||||||
wxWindow* m_window; // Window to draw into
|
|
||||||
wxPoint m_position; // Position to draw at
|
|
||||||
bool m_looped; // Looped, or not
|
|
||||||
wxAnimationTimer m_timer; // The timer
|
|
||||||
bool m_isPlaying; // Is the animation playing?
|
|
||||||
wxBitmap m_savedBackground; // Saved background of window portion
|
|
||||||
wxBitmap m_backingStore; // The player draws into this
|
|
||||||
bool m_useBackgroundColour; // Use colour or background
|
|
||||||
wxColour m_customBackgroundColour; // Override animation background
|
|
||||||
bool m_useCustomBackgroundColour;
|
|
||||||
bool m_useParentBackground; // Grab background from parent?
|
|
||||||
};
|
|
||||||
|
|
||||||
/* wxAnimationBase
|
|
||||||
* Base class for animations.
|
|
||||||
* A wxXXXAnimation only stores the animation, providing accessors to wxAnimationPlayer.
|
|
||||||
* Currently an animation is read-only, but we could extend the API for adding frames
|
|
||||||
* programmatically, and perhaps have a wxMemoryAnimation class that stores its frames
|
|
||||||
* in memory, and is able to save all files with suitable filenames. You could then use
|
|
||||||
* e.g. Ulead GIF Animator to load the image files into a GIF animation.
|
|
||||||
*/
|
|
||||||
|
|
||||||
class ANIMDLLEXPORT wxAnimationBase : public wxObject
|
|
||||||
{
|
|
||||||
DECLARE_ABSTRACT_CLASS(wxAnimationBase)
|
|
||||||
|
|
||||||
public:
|
|
||||||
wxAnimationBase() {};
|
|
||||||
~wxAnimationBase() {};
|
|
||||||
|
|
||||||
//// Accessors. Should be overridden by each derived class.
|
|
||||||
|
|
||||||
virtual int GetFrameCount() const = 0;
|
|
||||||
virtual wxImage* GetFrame(int i) const = 0; // Creates a new wxImage
|
|
||||||
virtual wxAnimationDisposal GetDisposalMethod(int i) const = 0;
|
|
||||||
virtual wxRect GetFrameRect(int i) const = 0; // Position and size of frame
|
|
||||||
virtual int GetDelay(int i) const = 0; // Delay for this frame
|
|
||||||
|
|
||||||
virtual wxSize GetLogicalScreenSize() const = 0;
|
|
||||||
virtual bool GetBackgroundColour(wxColour& col) const = 0;
|
|
||||||
virtual bool GetTransparentColour(wxColour& col) const = 0;
|
|
||||||
|
|
||||||
// Is the animation OK?
|
|
||||||
virtual bool IsValid() const = 0;
|
|
||||||
|
|
||||||
//// Operations
|
|
||||||
|
|
||||||
virtual bool LoadFile(const wxString& filename) { return FALSE; }
|
|
||||||
};
|
|
||||||
|
|
||||||
/* wxGIFAnimation
|
|
||||||
* This will be moved to a separate file in due course.
|
|
||||||
*/
|
|
||||||
|
|
||||||
class ANIMDLLEXPORT wxGIFDecoder;
|
|
||||||
|
|
||||||
class ANIMDLLEXPORT wxGIFAnimation : public wxAnimationBase
|
|
||||||
{
|
|
||||||
DECLARE_CLASS(wxGIFAnimation)
|
|
||||||
|
|
||||||
public:
|
|
||||||
wxGIFAnimation() ;
|
|
||||||
~wxGIFAnimation() ;
|
|
||||||
|
|
||||||
//// Accessors
|
|
||||||
|
|
||||||
virtual int GetFrameCount() const;
|
|
||||||
virtual wxImage* GetFrame(int i) const;
|
|
||||||
virtual wxAnimationDisposal GetDisposalMethod(int i) const;
|
|
||||||
virtual wxRect GetFrameRect(int i) const; // Position and size of frame
|
|
||||||
virtual int GetDelay(int i) const; // Delay for this frame
|
|
||||||
|
|
||||||
virtual wxSize GetLogicalScreenSize() const ;
|
|
||||||
virtual bool GetBackgroundColour(wxColour& col) const ;
|
|
||||||
virtual bool GetTransparentColour(wxColour& col) const ;
|
|
||||||
|
|
||||||
virtual bool IsValid() const;
|
|
||||||
|
|
||||||
//// Operations
|
|
||||||
|
|
||||||
virtual bool LoadFile(const wxString& filename);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
wxGIFDecoder* m_decoder;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* wxAnimationCtrlBase
|
|
||||||
* Abstract base class for format-specific animation controls.
|
|
||||||
* This class implements most of the functionality; all a derived
|
|
||||||
* class has to do is create the appropriate animation class on demand.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Resize to animation size if this is set
|
|
||||||
#define wxAN_FIT_ANIMATION 0x0010
|
|
||||||
|
|
||||||
class ANIMDLLEXPORT wxAnimationCtrlBase: public wxControl
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
wxAnimationCtrlBase() { }
|
|
||||||
wxAnimationCtrlBase(wxWindow *parent, wxWindowID id,
|
|
||||||
const wxString& filename = wxEmptyString,
|
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
|
||||||
const wxSize& size = wxDefaultSize, long style = wxAN_FIT_ANIMATION|wxNO_BORDER,
|
|
||||||
const wxString& name = wxT("animationControl"))
|
|
||||||
{
|
|
||||||
Create(parent, id, filename, pos, size, style, name);
|
|
||||||
}
|
|
||||||
~wxAnimationCtrlBase();
|
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id,
|
|
||||||
const wxString& filename = wxEmptyString,
|
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
|
||||||
const wxSize& size = wxDefaultSize, long style = wxAN_FIT_ANIMATION|wxNO_BORDER,
|
|
||||||
const wxString& name = wxT("animationControl"));
|
|
||||||
|
|
||||||
//// Operations
|
|
||||||
virtual bool LoadFile(const wxString& filename = wxEmptyString);
|
|
||||||
virtual bool Play(bool looped = TRUE) ;
|
|
||||||
virtual void Stop() { m_animationPlayer.Stop(); }
|
|
||||||
virtual void FitToAnimation();
|
|
||||||
|
|
||||||
//// Accessors
|
|
||||||
virtual bool IsPlaying() const { return m_animationPlayer.IsPlaying(); }
|
|
||||||
virtual wxAnimationPlayer& GetPlayer() { return m_animationPlayer; }
|
|
||||||
virtual wxAnimationBase* GetAnimation() { return m_animation; }
|
|
||||||
|
|
||||||
const wxString& GetFilename() const { return m_filename; }
|
|
||||||
void SetFilename(const wxString& filename) { m_filename = filename; }
|
|
||||||
|
|
||||||
//// Event handlers
|
|
||||||
void OnPaint(wxPaintEvent& event);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual wxSize DoGetBestSize() const;
|
|
||||||
|
|
||||||
// Override this in derived classes
|
|
||||||
virtual wxAnimationBase* DoCreateAnimation(const wxString& filename) = 0;
|
|
||||||
|
|
||||||
wxAnimationPlayer m_animationPlayer;
|
|
||||||
wxAnimationBase* m_animation;
|
|
||||||
wxString m_filename;
|
|
||||||
|
|
||||||
private:
|
|
||||||
DECLARE_ABSTRACT_CLASS(wxAnimationCtrlBase)
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* wxGIFAnimationCtrl
|
|
||||||
* Provides a GIF animation class when required.
|
|
||||||
*/
|
|
||||||
|
|
||||||
class ANIMDLLEXPORT wxGIFAnimationCtrl: public wxAnimationCtrlBase
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
wxGIFAnimationCtrl() { }
|
|
||||||
wxGIFAnimationCtrl(wxWindow *parent, wxWindowID id,
|
|
||||||
const wxString& filename = wxEmptyString,
|
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
|
||||||
const wxSize& size = wxDefaultSize, long style = wxAN_FIT_ANIMATION|wxNO_BORDER,
|
|
||||||
const wxString& name = wxT("animationControl"))
|
|
||||||
{
|
|
||||||
Create(parent, id, filename, pos, size, style, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual wxAnimationBase* DoCreateAnimation(const wxString& filename) ;
|
|
||||||
private:
|
|
||||||
DECLARE_DYNAMIC_CLASS(wxGIFAnimationCtrl)
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // _WX_ANIMATEH__
|
|
||||||
|
|
@@ -44,7 +44,7 @@ public:
|
|||||||
wxEchoVariable() : wxObject() {}
|
wxEchoVariable() : wxObject() {}
|
||||||
~wxEchoVariable() {}
|
~wxEchoVariable() {}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
RETURNS:
|
RETURNS:
|
||||||
The boolean value of the variable
|
The boolean value of the variable
|
||||||
|
|
||||||
@@ -65,8 +65,8 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// static function to retrieve any variable avaliable
|
// static function to retrieve any variable avaliable
|
||||||
static wxString FindValue(const wxString &cls, const char *parms = NULL);
|
static wxString GetValue(const wxString &cls, const char *parms = NULL);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*--------------------------------- MACROS --------------------------------*/
|
/*--------------------------------- MACROS --------------------------------*/
|
||||||
|
|
||||||
@@ -83,13 +83,13 @@ public:
|
|||||||
wxString wxEchoVariable##name :: GetValue(const char *parms) const { \
|
wxString wxEchoVariable##name :: GetValue(const char *parms) const { \
|
||||||
wxString _BEV_parm = wxString(parms);
|
wxString _BEV_parm = wxString(parms);
|
||||||
|
|
||||||
#define END_ECHO_VARIABLE(returnval) \
|
#define END_ECHO_VARIABLE(name, returnval) \
|
||||||
return returnval; \
|
return returnval; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define STRING_ECHO_VARIABLE(name, string) \
|
#define STRING_ECHO_VARIABLE(name, string) \
|
||||||
BEGIN_ECHO_VARIABLE(##name##); \
|
BEGIN_ECHO_VARIABLE(##name##); \
|
||||||
END_ECHO_VARIABLE(wxString(##string##))
|
END_ECHO_VARIABLE(##name##, wxString(##string##))
|
||||||
|
|
||||||
#endif // __WX_ECHOVAR_H
|
#endif // __WX_ECHOVAR_H
|
||||||
|
|
||||||
|
@@ -66,8 +66,8 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// static function to retrieve any variable avaliable
|
// static function to retrieve any variable avaliable
|
||||||
static bool FindValue(const wxString &cls);
|
static bool GetValue(const wxString &cls);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*--------------------------------- MACROS --------------------------------*/
|
/*--------------------------------- MACROS --------------------------------*/
|
||||||
|
|
||||||
@@ -82,13 +82,14 @@ public:
|
|||||||
IMPLEMENT_DYNAMIC_CLASS(wxIfElseVariable##name##, wxIfElseVariable); \
|
IMPLEMENT_DYNAMIC_CLASS(wxIfElseVariable##name##, wxIfElseVariable); \
|
||||||
bool wxIfElseVariable##name :: GetValue() const {
|
bool wxIfElseVariable##name :: GetValue() const {
|
||||||
|
|
||||||
#define END_IFELSE_VARIABLE(returnval) \
|
#define END_IFELSE_VARIABLE(name, returnval) \
|
||||||
return returnval; \
|
return returnval; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define IFELSE_VARIABLE(name, state) \
|
#define IFELSE_VARIABLE(name, state) \
|
||||||
BEGIN_IFELSE_VARIABLE(##name##); \
|
BEGIN_IFELSE_VARIABLE(##name##); \
|
||||||
END_IFELSE_VARIABLE(bool (state))
|
END_IFELSE_VARIABLE(##name##, bool (state))
|
||||||
|
|
||||||
|
|
||||||
#endif // __WX_IFELSEVAR_H
|
#endif // __WX_IFELSEVAR_H
|
||||||
|
|
||||||
|
@@ -5,23 +5,19 @@
|
|||||||
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* ======================================================================
|
* ========================================================================
|
||||||
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
*
|
||||||
* | |
|
* The contents of this file are subject to the wxWindows License
|
||||||
* |This copyrighted computer code is a proprietary trade secret of |
|
* Version 3.0 (the "License"); you may not use this file except in
|
||||||
* |SciTech Software, Inc., located at 505 Wall Street, Chico, CA 95928 |
|
* compliance with the License. You may obtain a copy of the License at
|
||||||
* |USA (www.scitechsoft.com). ANY UNAUTHORIZED POSSESSION, USE, |
|
* http://www.wxwindows.org/licence3.txt
|
||||||
* |VIEWING, COPYING, MODIFICATION OR DISSEMINATION OF THIS CODE IS |
|
*
|
||||||
* |STRICTLY PROHIBITED BY LAW. Unless you have current, express |
|
* Software distributed under the License is distributed on an
|
||||||
* |written authorization from SciTech to possess or use this code, you |
|
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||||
* |may be subject to civil and/or criminal penalties. |
|
* implied. See the License for the specific language governing
|
||||||
* | |
|
* rights and limitations under the License.
|
||||||
* |If you received this code in error or you would like to report |
|
*
|
||||||
* |improper use, please immediately contact SciTech Software, Inc. at |
|
* ========================================================================
|
||||||
* |530-894-8400. |
|
|
||||||
* | |
|
|
||||||
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
|
||||||
* ======================================================================
|
|
||||||
*
|
*
|
||||||
* Language: ANSI C++
|
* Language: ANSI C++
|
||||||
* Environment: Any
|
* Environment: Any
|
||||||
@@ -34,7 +30,6 @@
|
|||||||
#define __WX_APPLET_WINDOW_H
|
#define __WX_APPLET_WINDOW_H
|
||||||
|
|
||||||
#include "wx/html/htmlwin.h"
|
#include "wx/html/htmlwin.h"
|
||||||
#include "wx/process.h"
|
|
||||||
|
|
||||||
// Forward declare
|
// Forward declare
|
||||||
class wxApplet;
|
class wxApplet;
|
||||||
@@ -94,7 +89,7 @@ protected:
|
|||||||
wxToolBarBase *m_NavBar;
|
wxToolBarBase *m_NavBar;
|
||||||
int m_NavBackId;
|
int m_NavBackId;
|
||||||
int m_NavForwardId;
|
int m_NavForwardId;
|
||||||
wxString m_DocRoot;
|
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
wxHtmlAppletWindow(
|
wxHtmlAppletWindow(
|
||||||
@@ -106,8 +101,7 @@ public:
|
|||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxHW_SCROLLBAR_AUTO,
|
long style = wxHW_SCROLLBAR_AUTO,
|
||||||
const wxString& name = "htmlAppletWindow",
|
const wxString& name = "htmlAppletWindow");
|
||||||
const wxString& docroot = "" );
|
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~wxHtmlAppletWindow();
|
~wxHtmlAppletWindow();
|
||||||
@@ -141,13 +135,13 @@ public:
|
|||||||
void SendMessage(wxEvent& msg);
|
void SendMessage(wxEvent& msg);
|
||||||
|
|
||||||
// Register a cookie of data in the applet manager
|
// Register a cookie of data in the applet manager
|
||||||
static bool RegisterCookie(const wxString& name,wxObject *cookie);
|
bool RegisterCookie(const wxString& name,wxObject *cookie);
|
||||||
|
|
||||||
// UnRegister a cookie of data in the applet manager
|
// UnRegister a cookie of data in the applet manager
|
||||||
static bool UnRegisterCookie(const wxString& name);
|
bool UnRegisterCookie(const wxString& name);
|
||||||
|
|
||||||
// Find a cookie of data given it's public name
|
// Find a cookie of data given it's public name
|
||||||
static wxObject *FindCookie(const wxString& name);
|
wxObject *FindCookie(const wxString& name);
|
||||||
|
|
||||||
// Event handlers to load a new page
|
// Event handlers to load a new page
|
||||||
void OnLoadPage(wxLoadPageEvent &event);
|
void OnLoadPage(wxLoadPageEvent &event);
|
||||||
@@ -156,36 +150,16 @@ public:
|
|||||||
void OnPageLoaded(wxPageLoadedEvent &event);
|
void OnPageLoaded(wxPageLoadedEvent &event);
|
||||||
|
|
||||||
// LoadPage mutex locks
|
// LoadPage mutex locks
|
||||||
void Lock(){ m_mutexLock = true;};
|
void Lock() { m_mutexLock = true;};
|
||||||
void UnLock(){ m_mutexLock = false;};
|
void UnLock() { m_mutexLock = false;};
|
||||||
|
|
||||||
// Returns TRUE if the mutex is locked, FALSE otherwise.
|
// Returns TRUE if the mutex is locked, FALSE otherwise.
|
||||||
bool IsLocked(){ return m_mutexLock;};
|
bool IsLocked() { return m_mutexLock;};
|
||||||
|
|
||||||
// Tries to lock the mutex. If it can't, returns immediately with false.
|
// Tries to lock the mutex. If it can't, returns immediately with false.
|
||||||
bool TryLock();
|
bool TryLock();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
REMARKS:
|
|
||||||
Defines the class for AppetProcess
|
|
||||||
***************************************************************************/
|
|
||||||
class AppletProcess : public wxProcess {
|
|
||||||
public:
|
|
||||||
AppletProcess(
|
|
||||||
wxWindow *parent)
|
|
||||||
: wxProcess(parent)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// instead of overriding this virtual function we might as well process the
|
|
||||||
// event from it in the frame class - this might be more convenient in some
|
|
||||||
// cases
|
|
||||||
virtual void OnTerminate(int pid, int status);
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif // __WX_APPLET_WINDOW_H
|
#endif // __WX_APPLET_WINDOW_H
|
||||||
|
|
||||||
|
@@ -1,64 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: No names yet.
|
|
||||||
// Purpose: Contrib. demo
|
|
||||||
// Author: Aleksandras Gluchovas (@Lithuania)
|
|
||||||
// Modified by:
|
|
||||||
// Created: 23/10/98
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Aleksandras Gluchovas
|
|
||||||
// Licence: wxWindows license
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef __ANTIFLICKPL_G__
|
|
||||||
#define __ANTIFLICKPL_G__
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma interface "antiflickpl.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/fl/controlbar.h"
|
|
||||||
|
|
||||||
class cbAntiflickerPlugin : public cbPluginBase
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS( cbAntiflickerPlugin )
|
|
||||||
protected:
|
|
||||||
// double-buffers are shared "resource" among all instances of
|
|
||||||
// antiflicker plugin within the application
|
|
||||||
//
|
|
||||||
// TODO:: locking should be implemented, for multithreaded GUIs
|
|
||||||
|
|
||||||
static wxBitmap* mpVertBuf;
|
|
||||||
static wxBitmap* mpHorizBuf;
|
|
||||||
static wxMemoryDC* mpVertBufDc;
|
|
||||||
static wxMemoryDC* mpHorizBufDc;
|
|
||||||
|
|
||||||
static int mRefCount;
|
|
||||||
|
|
||||||
wxDC* mpLRUBufDc; // last-reacently-used buffer
|
|
||||||
wxRect mLRUArea; // last-reacently-used area
|
|
||||||
|
|
||||||
protected:
|
|
||||||
// returns NULL, if sutable buffer is not present
|
|
||||||
wxDC* FindSuitableBuffer( const wxRect& forArea );
|
|
||||||
wxDC* AllocNewBuffer( const wxRect& forArea );
|
|
||||||
wxDC& GetWindowDC();
|
|
||||||
|
|
||||||
wxDC& GetClientDC();
|
|
||||||
public:
|
|
||||||
|
|
||||||
cbAntiflickerPlugin(void);
|
|
||||||
|
|
||||||
cbAntiflickerPlugin( wxFrameLayout* pPanel, int paneMask = wxALL_PANES );
|
|
||||||
|
|
||||||
virtual ~cbAntiflickerPlugin();
|
|
||||||
|
|
||||||
// handlers for plugin events
|
|
||||||
|
|
||||||
void OnStartDrawInArea ( cbStartDrawInAreaEvent& event );
|
|
||||||
void OnFinishDrawInArea( cbFinishDrawInAreaEvent& event );
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* __ANTIFLICKPL_G__ */
|
|
||||||
|
|
@@ -1,122 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: No names yet.
|
|
||||||
// Purpose: Contrib. demo
|
|
||||||
// Author: Aleksandras Gluchovas
|
|
||||||
// Modified by:
|
|
||||||
// Created: 23/09/98
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Aleksandras Gluchovas
|
|
||||||
// Licence: wxWindows license
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef __BARDRAGPL_G__
|
|
||||||
#define __BARDRAGPL_G__
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma interface "bardragpl.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/fl/controlbar.h"
|
|
||||||
#include "wx/fl/toolwnd.h"
|
|
||||||
|
|
||||||
class cbBarDragPlugin : public cbPluginBase
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS( cbBarDragPlugin )
|
|
||||||
protected:
|
|
||||||
|
|
||||||
// plugin is active only in bar-dragging state
|
|
||||||
bool mBarDragStarted;
|
|
||||||
bool mCanStick; // flag used to prevent "bouncing" of hint-rectangle
|
|
||||||
wxScreenDC* mpScrDc; // created while tracking hint-rect
|
|
||||||
wxCursor* mpCurCursor;
|
|
||||||
|
|
||||||
// rectnagle shows the position/dimensions of the bar,
|
|
||||||
// if it would be docked now
|
|
||||||
|
|
||||||
wxRect mPrevHintRect;
|
|
||||||
wxRect mHintRect;
|
|
||||||
|
|
||||||
|
|
||||||
int mMouseInRectX;
|
|
||||||
int mMouseInRectY;
|
|
||||||
|
|
||||||
cbDockPane* mpSrcPane; // pane, from which the bar was originally taken
|
|
||||||
int mBarWidthInSrcPane;
|
|
||||||
|
|
||||||
cbDockPane* mpCurPane;
|
|
||||||
|
|
||||||
cbBarInfo* mpDraggedBar; // bar, which is being dragged
|
|
||||||
bool mBarWasFloating;
|
|
||||||
wxRect mFloatedBarBounds;
|
|
||||||
|
|
||||||
public: /*** public properties ***/
|
|
||||||
|
|
||||||
int mInClientHintBorder; // when hint-rect moves within client window area,
|
|
||||||
// the thicker rectangle is drawn using hatched brush,
|
|
||||||
// the default border width for this rectangle is 8 pix.
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
|
|
||||||
void AdjustHintRect( wxPoint& mousePos );
|
|
||||||
|
|
||||||
void ClipRectInFrame( wxRect& rect );
|
|
||||||
void ClipPosInFrame( wxPoint& pos );
|
|
||||||
|
|
||||||
cbDockPane* HitTestPanes( wxRect& rect );
|
|
||||||
cbDockPane* HitTestPanes( wxPoint& pos );
|
|
||||||
bool HitsPane( cbDockPane* pPane, wxRect& rect );
|
|
||||||
|
|
||||||
void CalcOnScreenDims( wxRect& rect );
|
|
||||||
|
|
||||||
int GetDistanceToPane( cbDockPane* pPane, wxPoint& mousePos );
|
|
||||||
|
|
||||||
bool IsInOtherPane ( wxPoint& mousePos );
|
|
||||||
bool IsInClientArea( wxPoint& mousePos );
|
|
||||||
bool IsInClientArea( wxRect& rect );
|
|
||||||
|
|
||||||
void StickToPane( cbDockPane* pPane, wxPoint& mousePos );
|
|
||||||
void UnstickFromPane( cbDockPane* pPane, wxPoint& mousePos );
|
|
||||||
|
|
||||||
int GetBarWidthInPane( cbDockPane* pPane );
|
|
||||||
int GetBarHeightInPane( cbDockPane* pPane );
|
|
||||||
|
|
||||||
// on-screen hint-tracking related methods
|
|
||||||
|
|
||||||
void StartTracking();
|
|
||||||
|
|
||||||
void DrawHintRect ( wxRect& rect, bool isInClientRect);
|
|
||||||
void EraseHintRect( wxRect& rect, bool isInClientRect);
|
|
||||||
|
|
||||||
void FinishTracking();
|
|
||||||
|
|
||||||
void DoDrawHintRect( wxRect& rect, bool isInClientRect);
|
|
||||||
|
|
||||||
void RectToScr( wxRect& frameRect, wxRect& scrRect );
|
|
||||||
|
|
||||||
void ShowHint( bool prevWasInClient );
|
|
||||||
|
|
||||||
public:
|
|
||||||
cbBarDragPlugin(void);
|
|
||||||
|
|
||||||
cbBarDragPlugin( wxFrameLayout* pPanel, int paneMask = wxALL_PANES );
|
|
||||||
|
|
||||||
virtual ~cbBarDragPlugin();
|
|
||||||
|
|
||||||
// handlers for plugin events
|
|
||||||
|
|
||||||
void OnMouseMove( cbMotionEvent& event );
|
|
||||||
void OnLButtonUp( cbLeftUpEvent& event );
|
|
||||||
void OnLButtonDown( cbLeftDownEvent& event );
|
|
||||||
void OnLDblClick( cbLeftDClickEvent& event );
|
|
||||||
|
|
||||||
// handles event, which oriniates from itself
|
|
||||||
void OnDrawHintRect( cbDrawHintRectEvent& event );
|
|
||||||
|
|
||||||
void OnStartBarDragging( cbStartBarDraggingEvent& event );
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* __BARDRAGPL_G__ */
|
|
||||||
|
|
@@ -1,96 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: No names yet.
|
|
||||||
// Purpose: Contrib. demo
|
|
||||||
// Author: Aleksandras Gluchovas
|
|
||||||
// Modified by:
|
|
||||||
// Created: 30/11/98 (my 22th birthday :-)
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Aleksandras Gluchovas
|
|
||||||
// Licence: wxWindows license
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef __DRAGHINTSPL_G__
|
|
||||||
#define __DRAGHINTSPL_G__
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma interface "barhintspl.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/fl/controlbar.h"
|
|
||||||
#include "wx/fl/toolwnd.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Intercepts bar-decoration and sizing events, draws 3d-hints
|
|
||||||
* around fixed and flexible bars, similar to those in Microsoft DevStudio 6.x
|
|
||||||
*/
|
|
||||||
|
|
||||||
class cbBarHintsPlugin : public cbPluginBase
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS( cbBarHintsPlugin )
|
|
||||||
|
|
||||||
protected:
|
|
||||||
cbDockPane* mpPane; // is set up temorarely, while handling event
|
|
||||||
|
|
||||||
cbMiniButton* mBoxes[2];
|
|
||||||
|
|
||||||
bool mBtnPressed;
|
|
||||||
bool mClosePressed;
|
|
||||||
cbBarInfo* mpClickedBar;
|
|
||||||
bool mDepressed;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
// drawing helpers
|
|
||||||
|
|
||||||
void Draw3DBox ( wxDC& dc, const wxPoint& pos, bool pressed );
|
|
||||||
void DrawCloseBox ( wxDC& dc, const wxPoint& pos, bool pressed );
|
|
||||||
void DrawCollapseBox( wxDC& dc, const wxPoint& pos,
|
|
||||||
bool atLeft, bool disabled, bool pressed );
|
|
||||||
|
|
||||||
void DrawGrooves ( wxDC& dc, const wxPoint& pos, int length );
|
|
||||||
|
|
||||||
void DoDrawHint( wxDC& dc, wxRect& rect, int pos, int boxOfs, int grooveOfs, bool isFixed );
|
|
||||||
|
|
||||||
void GetHintsLayout( wxRect& rect, cbBarInfo& info,
|
|
||||||
int& boxOfs, int& grooveOfs, int& pos );
|
|
||||||
|
|
||||||
int HitTestHints( cbBarInfo& info, const wxPoint& pos );
|
|
||||||
|
|
||||||
void ExcludeHints( wxRect& rect, cbBarInfo& info );
|
|
||||||
|
|
||||||
void CreateBoxes();
|
|
||||||
|
|
||||||
public:
|
|
||||||
/* public properties */
|
|
||||||
|
|
||||||
bool mCloseBoxOn; // default: ON
|
|
||||||
bool mCollapseBoxOn; // default: ON
|
|
||||||
int mGrooveCount; // default: 2 (two shaded bars)
|
|
||||||
int mHintGap; // default: 5 (pixels from above, below, right and left)
|
|
||||||
int mXWeight; // default: 2 (width in pixels of lines which used for drawing cross)
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
cbBarHintsPlugin(void);
|
|
||||||
|
|
||||||
cbBarHintsPlugin( wxFrameLayout* pLayout, int paneMask = wxALL_PANES );
|
|
||||||
|
|
||||||
~cbBarHintsPlugin();
|
|
||||||
|
|
||||||
void SetGrooveCount( int nGrooves );
|
|
||||||
|
|
||||||
void OnInitPlugin();
|
|
||||||
|
|
||||||
// handlers of plugin-events
|
|
||||||
|
|
||||||
void OnSizeBarWindow( cbSizeBarWndEvent& event );
|
|
||||||
void OnDrawBarDecorations( cbDrawBarDecorEvent& event );
|
|
||||||
|
|
||||||
void OnLeftDown( cbLeftDownEvent& event );
|
|
||||||
void OnLeftUp ( cbLeftUpEvent& event );
|
|
||||||
void OnMotion ( cbMotionEvent& event );
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* __DRAGHINTSPL_G__ */
|
|
||||||
|
|
@@ -1,47 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: No names yet.
|
|
||||||
// Purpose: Contrib. demo
|
|
||||||
// Author: Aleksandras Gluchovas
|
|
||||||
// Modified by:
|
|
||||||
// Created: 28/10/98
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Aleksandras Gluchovas
|
|
||||||
// Licence: wxWindows license
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef __CBCUSTOM_G__
|
|
||||||
#define __CBCUSTOM_G__
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma interface "cbcustom.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/fl/controlbar.h"
|
|
||||||
|
|
||||||
class cbSimpleCustomizationPlugin : public cbPluginBase
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
DECLARE_DYNAMIC_CLASS( cbSimpleCustomizationPlugin )
|
|
||||||
|
|
||||||
int mCustMenuItemId;
|
|
||||||
public:
|
|
||||||
|
|
||||||
cbSimpleCustomizationPlugin(void);
|
|
||||||
|
|
||||||
cbSimpleCustomizationPlugin( wxFrameLayout* pPanel, int paneMask = wxALL_PANES );
|
|
||||||
|
|
||||||
// plugin-event handlers
|
|
||||||
|
|
||||||
void OnCustomizeBar( cbCustomizeBarEvent& event );
|
|
||||||
|
|
||||||
void OnCustomizeLayout( cbCustomizeLayoutEvent& event );
|
|
||||||
|
|
||||||
// menu-event handler
|
|
||||||
|
|
||||||
void OnMenuItemSelected( wxCommandEvent& event );
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* __CBCUSTOM_G__ */
|
|
||||||
|
|
@@ -1,22 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: No names yet.
|
|
||||||
// Purpose: Contrib. demo
|
|
||||||
// Author: Aleksandras Gluchovas
|
|
||||||
// Modified by:
|
|
||||||
// Created: 23/01/99
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Aleksandras Gluchovas
|
|
||||||
// Licence: wxWindows license
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef __DYNBARHND_G__
|
|
||||||
#define __DYNBARHND_G__
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma interface "dynbarhnd.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/fl/controlbar.h"
|
|
||||||
|
|
||||||
#endif /* __DYNBARHND_G__ */
|
|
||||||
|
|
@@ -1,204 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: No names yet.
|
|
||||||
// Purpose: Contrib. demo
|
|
||||||
// Author: Aleksandras Gluchovas
|
|
||||||
// Modified by:
|
|
||||||
// Created: ??/10/98
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Aleksandras Gluchovas
|
|
||||||
// Licence: wxWindows license
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef __DYNTBAR_G__
|
|
||||||
#define __DYNTBAR_G__
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma interface "dyntbar.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/tbarbase.h"
|
|
||||||
#include "wx/dynarray.h"
|
|
||||||
|
|
||||||
// layout item
|
|
||||||
|
|
||||||
class wxToolLayoutItem : public wxObject
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
wxRect mRect;
|
|
||||||
bool mIsSeparator;
|
|
||||||
};
|
|
||||||
|
|
||||||
class wxDynToolInfo;
|
|
||||||
|
|
||||||
typedef wxToolLayoutItem* wxToolLayoutItemPtrT;
|
|
||||||
typedef wxDynToolInfo* wxDynToolInfoPtrT;
|
|
||||||
|
|
||||||
|
|
||||||
WX_DEFINE_ARRAY( wxToolLayoutItemPtrT, wxLayoutItemArrayT );
|
|
||||||
WX_DEFINE_ARRAY( wxDynToolInfoPtrT, wxDynToolInfoArrayT );
|
|
||||||
|
|
||||||
// base class for layouting algorithm implementations
|
|
||||||
|
|
||||||
class LayoutManagerBase
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
virtual void Layout( const wxSize& parentDim,
|
|
||||||
wxSize& resultingDim,
|
|
||||||
wxLayoutItemArrayT& items,
|
|
||||||
int horizGap,
|
|
||||||
int vertGap ) = 0;
|
|
||||||
|
|
||||||
virtual ~LayoutManagerBase() {}
|
|
||||||
};
|
|
||||||
|
|
||||||
// layouts items in left-to-right order from
|
|
||||||
// top towards bottom
|
|
||||||
|
|
||||||
class BagLayout : public LayoutManagerBase
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
virtual void Layout( const wxSize& parentDim,
|
|
||||||
wxSize& resultingDim,
|
|
||||||
wxLayoutItemArrayT& items,
|
|
||||||
int horizGap,
|
|
||||||
int vertGap );
|
|
||||||
};
|
|
||||||
|
|
||||||
class wxDynToolInfo : public wxToolLayoutItem
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS(wxDynToolInfo)
|
|
||||||
|
|
||||||
public:
|
|
||||||
wxWindow* mpToolWnd;
|
|
||||||
int mIndex;
|
|
||||||
wxSize mRealSize;
|
|
||||||
};
|
|
||||||
|
|
||||||
// layouting orientations for tools
|
|
||||||
|
|
||||||
#define LO_HORIZONTAL 0
|
|
||||||
#define LO_VERTICAL 1
|
|
||||||
#define LO_FIT_TO_WINDOW 2
|
|
||||||
|
|
||||||
// class manages containment and layouting of tool-windows
|
|
||||||
|
|
||||||
class wxDynamicToolBar : public wxToolBarBase
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS(wxDynamicToolBar)
|
|
||||||
protected:
|
|
||||||
|
|
||||||
friend class wxDynamicToolBarSerializer;
|
|
||||||
|
|
||||||
wxDynToolInfoArrayT mTools;
|
|
||||||
LayoutManagerBase* mpLayoutMan;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual void SizeToolWindows();
|
|
||||||
|
|
||||||
public: /* public properties */
|
|
||||||
|
|
||||||
int mSepartorSize; // default: 8
|
|
||||||
int mVertGap; // default: 0
|
|
||||||
int mHorizGap; // default: 0
|
|
||||||
|
|
||||||
public:
|
|
||||||
wxDynamicToolBar();
|
|
||||||
|
|
||||||
wxDynamicToolBar(wxWindow *parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
|
||||||
const long style = wxNO_BORDER, const int orientation = wxVERTICAL,
|
|
||||||
const int RowsOrColumns = 1, const wxString& name = wxToolBarNameStr);
|
|
||||||
|
|
||||||
~wxDynamicToolBar(void);
|
|
||||||
|
|
||||||
bool Create(wxWindow *parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
|
||||||
const long style = wxNO_BORDER, const int orientation = wxVERTICAL, const int RowsOrColumns = 1, const wxString& name = wxToolBarNameStr);
|
|
||||||
|
|
||||||
// overridables
|
|
||||||
|
|
||||||
virtual void AddTool( int toolIndex,
|
|
||||||
wxWindow* pToolWindow,
|
|
||||||
const wxSize& size = wxDefaultSize );
|
|
||||||
|
|
||||||
virtual void AddTool( int toolIndex,
|
|
||||||
const wxString& imageFileName,
|
|
||||||
int imageFileType = wxBITMAP_TYPE_BMP,
|
|
||||||
const wxString& labelText = "", bool alignTextRight = FALSE,
|
|
||||||
bool isFlat = TRUE );
|
|
||||||
virtual void AddTool( int toolIndex, wxBitmap labelBmp,
|
|
||||||
const wxString& labelText = "", bool alignTextRight = FALSE,
|
|
||||||
bool isFlat = TRUE );
|
|
||||||
|
|
||||||
// method from wxToolBarBase (for compatibility), only
|
|
||||||
// first two arguments are valid
|
|
||||||
|
|
||||||
virtual wxToolBarToolBase *AddTool(const int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap,
|
|
||||||
const bool toggle = FALSE, const long xPos = -1, const long yPos = -1, wxObject *clientData = NULL,
|
|
||||||
const wxString& helpString1 = "", const wxString& helpString2 = "");
|
|
||||||
|
|
||||||
virtual void AddSeparator( wxWindow* pSepartorWnd = NULL );
|
|
||||||
|
|
||||||
wxDynToolInfo* GetToolInfo( int toolIndex );
|
|
||||||
|
|
||||||
void RemveTool( int toolIndex );
|
|
||||||
|
|
||||||
// the default implementation draws shaded line
|
|
||||||
virtual void DrawSeparator( wxDynToolInfo& info, wxDC& dc );
|
|
||||||
|
|
||||||
// see definitions of orientation types
|
|
||||||
virtual bool Layout();
|
|
||||||
|
|
||||||
virtual void GetPreferredDim( const wxSize& givenDim, wxSize& prefDim );
|
|
||||||
|
|
||||||
virtual LayoutManagerBase* CreateDefaulLayout() { return new BagLayout(); }
|
|
||||||
|
|
||||||
virtual void SetLayout( LayoutManagerBase* pLayout );
|
|
||||||
|
|
||||||
virtual void EnableTool(const int toolIndex, const bool enable = TRUE);
|
|
||||||
|
|
||||||
// event handlers
|
|
||||||
|
|
||||||
void OnSize( wxSizeEvent& event );
|
|
||||||
void OnPaint( wxPaintEvent& event );
|
|
||||||
void OnEraseBackground( wxEraseEvent& event );
|
|
||||||
|
|
||||||
// overriden from wxToolBarBase
|
|
||||||
|
|
||||||
virtual bool Realize(void);
|
|
||||||
|
|
||||||
// stuff from the 2.1.15
|
|
||||||
|
|
||||||
virtual wxToolBarToolBase *FindToolForPosition(wxCoord x,
|
|
||||||
wxCoord y) const;
|
|
||||||
|
|
||||||
|
|
||||||
virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool);
|
|
||||||
|
|
||||||
// the tool is still in m_tools list when this function is called, it will
|
|
||||||
// only be deleted from it if it succeeds
|
|
||||||
virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool);
|
|
||||||
|
|
||||||
// called when the tools enabled flag changes
|
|
||||||
virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable);
|
|
||||||
|
|
||||||
// called when the tool is toggled
|
|
||||||
virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle);
|
|
||||||
|
|
||||||
// called when the tools "can be toggled" flag changes
|
|
||||||
virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle);
|
|
||||||
|
|
||||||
// the functions to create toolbar tools
|
|
||||||
virtual wxToolBarToolBase *CreateTool(int id,
|
|
||||||
const wxBitmap& bitmap1,
|
|
||||||
const wxBitmap& bitmap2,
|
|
||||||
bool toggle,
|
|
||||||
wxObject *clientData,
|
|
||||||
const wxString& shortHelpString,
|
|
||||||
const wxString& longHelpString);
|
|
||||||
virtual wxToolBarToolBase *CreateTool(wxControl *control);
|
|
||||||
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* __DYNTBAR_G__ */
|
|
||||||
|
|
@@ -1,31 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: No names yet.
|
|
||||||
// Purpose: Contrib. demo
|
|
||||||
// Author: Aleksandras Gluchovas
|
|
||||||
// Modified by:
|
|
||||||
// Created: 23/01/99
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Aleksandras Gluchovas
|
|
||||||
// Licence: wxWindows license
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef __DYNTBARHND_G__
|
|
||||||
#define __DYNTBARHND_G__
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma interface "dyntbarhnd.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/fl/controlbar.h"
|
|
||||||
#include "wx/fl/dyntbar.h"
|
|
||||||
|
|
||||||
class cbDynToolBarDimHandler : public cbBarDimHandlerBase
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS( cbDynToolBarDimHandler )
|
|
||||||
public:
|
|
||||||
void OnChangeBarState(cbBarInfo* pBar, int newState );
|
|
||||||
void OnResizeBar( cbBarInfo* pBar, const wxSize& given, wxSize& preferred );
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* __DYNTBARHND_G__ */
|
|
||||||
|
|
@@ -1,140 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: No names yet.
|
|
||||||
// Purpose: Contrib. demo
|
|
||||||
// Author: Aleksandras Gluchovas
|
|
||||||
// Modified by:
|
|
||||||
// Created: 02/01/99
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Aleksandras Gluchovas
|
|
||||||
// Licence: wxWindows license
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef __FRMVIEW_G__
|
|
||||||
#define __FRMVIEW_G__
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma interface "frmview.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/module.h"
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
#include "wx/fl/objstore.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class wxObjectStorage;
|
|
||||||
|
|
||||||
#include "wx/fl/controlbar.h"
|
|
||||||
|
|
||||||
class wxFrameManager;
|
|
||||||
|
|
||||||
class wxFrameView : public wxEvtHandler
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
wxStringList mTopMenus;
|
|
||||||
wxFrameLayout* mpLayout;
|
|
||||||
wxFrameManager* mpFrameMgr;
|
|
||||||
bool mDoToolUpdates;
|
|
||||||
|
|
||||||
friend class wxFrameManager;
|
|
||||||
friend class wxFrameViewSerializer;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void OnIdle( wxIdleEvent& event);
|
|
||||||
|
|
||||||
public:
|
|
||||||
wxFrameView();
|
|
||||||
~wxFrameView();
|
|
||||||
|
|
||||||
virtual void Activate();
|
|
||||||
virtual void Deactivate();
|
|
||||||
|
|
||||||
wxFrame* GetParentFrame();
|
|
||||||
wxWindow* GetClientWindow();
|
|
||||||
|
|
||||||
wxFrameManager& GetFrameManager();
|
|
||||||
|
|
||||||
void RegisterMenu( const wxString& topMenuName );
|
|
||||||
|
|
||||||
void CreateLayout();
|
|
||||||
wxFrameLayout* GetLayout();
|
|
||||||
void SetLayout( wxFrameLayout* pLayout );
|
|
||||||
void SetToolUpdates( bool doToolUpdates = TRUE );
|
|
||||||
|
|
||||||
|
|
||||||
// hooks for specific frame-views
|
|
||||||
|
|
||||||
virtual void OnInit() {}
|
|
||||||
|
|
||||||
virtual void OnSerialize( wxObjectStorage& store ) {}
|
|
||||||
virtual void OnActiveate() {}
|
|
||||||
virtual void OnDeactivate() {}
|
|
||||||
|
|
||||||
// imp. is mandatory
|
|
||||||
virtual void OnRecreate() {}
|
|
||||||
virtual void OnInitMenus() {}
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
class wxFrame;
|
|
||||||
|
|
||||||
class wxFrameManager : wxObject
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
wxList mViews;
|
|
||||||
wxWindow* mpFrameWnd;
|
|
||||||
int mActiveViewNo;
|
|
||||||
wxWindow* mpClientWnd;
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
wxObjectStorage mStore;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxString mSettingsFile;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void DoSerialize( wxObjectStorage& store );
|
|
||||||
void DestroyViews();
|
|
||||||
int GetViewNo( wxFrameView* pView );
|
|
||||||
void EnableMenusForView( wxFrameView* pView, bool enable );
|
|
||||||
void SyncAllMenus();
|
|
||||||
|
|
||||||
public:
|
|
||||||
wxFrameManager();
|
|
||||||
~wxFrameManager();
|
|
||||||
|
|
||||||
// if file name is empty, views are are not saved/loaded
|
|
||||||
|
|
||||||
virtual void Init( wxWindow* pMainFrame, const wxString& settingsFile = "" );
|
|
||||||
|
|
||||||
// synonyms
|
|
||||||
wxFrame* GetParentFrame();
|
|
||||||
wxWindow* GetParentWindow();
|
|
||||||
|
|
||||||
int GetActiveViewNo();
|
|
||||||
wxFrameView* GetActiveView();
|
|
||||||
wxNode* GetActiveViewNode();
|
|
||||||
|
|
||||||
wxFrameView* GetView( int viewNo );
|
|
||||||
|
|
||||||
void SetClinetWindow( wxWindow* pFrameClient );
|
|
||||||
wxWindow* GetClientWindow();
|
|
||||||
|
|
||||||
void AddView( wxFrameView* pFrmView );
|
|
||||||
void RemoveView( wxFrameView* pFrmView );
|
|
||||||
|
|
||||||
void ActivateView( int viewNo );
|
|
||||||
void ActivateView( wxFrameView* pFrmView );
|
|
||||||
void DeactivateCurrentView();
|
|
||||||
|
|
||||||
wxObjectStorage& GetObjectStore();
|
|
||||||
|
|
||||||
void SaveViewsNow();
|
|
||||||
bool ReloadViews();
|
|
||||||
|
|
||||||
bool ViewsAreLoaded();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* __FRMVIEW_G__ */
|
|
||||||
|
|
@@ -1,74 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: No names yet.
|
|
||||||
// Purpose: Contrib. demo
|
|
||||||
// Author: Aleksandras Gluchovas (@Lithuania)
|
|
||||||
// Modified by:
|
|
||||||
// Created: ??/10/98
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Aleksandras Gluchovas
|
|
||||||
// Licence: wxWindows license
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef __GARBAGEC_G__
|
|
||||||
#define __GARBAGEC_G__
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma interface "garbagec.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/list.h"
|
|
||||||
|
|
||||||
struct GCItem
|
|
||||||
{
|
|
||||||
void* mpObj;
|
|
||||||
wxList mRefs; // references to other nodes
|
|
||||||
};
|
|
||||||
|
|
||||||
inline void* gc_node_to_obj( wxNode* pGCNode )
|
|
||||||
{
|
|
||||||
return ( (GCItem*) (pGCNode->Data()) )->mpObj;
|
|
||||||
}
|
|
||||||
|
|
||||||
// class implements extremely slow, but probably one of the most simple GC algorithms
|
|
||||||
|
|
||||||
class GarbageCollector
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
wxList mAllNodes;
|
|
||||||
wxList mRegularLst;
|
|
||||||
wxList mCycledLst;
|
|
||||||
|
|
||||||
wxNode* FindItemNode( void* pForObj );
|
|
||||||
void ResolveReferences();
|
|
||||||
|
|
||||||
wxNode* FindReferenceFreeItemNode();
|
|
||||||
void RemoveReferencesToNode( wxNode* pItemNode );
|
|
||||||
void DestroyItemList( wxList& lst );
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
GarbageCollector() {}
|
|
||||||
|
|
||||||
virtual ~GarbageCollector();
|
|
||||||
|
|
||||||
// prepare data for GC alg.
|
|
||||||
|
|
||||||
virtual void AddObject( void* pObj, int refCnt = 1 );
|
|
||||||
virtual void AddDependency( void* pObj, void* pDependsOnObj );
|
|
||||||
|
|
||||||
// executes GC alg.
|
|
||||||
|
|
||||||
virtual void ArrangeCollection();
|
|
||||||
|
|
||||||
// access results of the alg.
|
|
||||||
|
|
||||||
wxList& GetRegularObjects();
|
|
||||||
wxList& GetCycledObjects();
|
|
||||||
|
|
||||||
// removes all data from GC
|
|
||||||
|
|
||||||
void Reset();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* __GARBAGEC_G__ */
|
|
||||||
|
|
@@ -1,123 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: No names yet.
|
|
||||||
// Purpose: Contrib. demo
|
|
||||||
// Author: Aleksandras Gluchovas
|
|
||||||
// Modified by:
|
|
||||||
// Created: 19/10/98
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Aleksandras Gluchovas
|
|
||||||
// Licence: wxWindows license
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef __GCUPDATESMGR_G__
|
|
||||||
#define __GCUPDATESMGR_G__
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma interface "gcupdatesmgr.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/fl/controlbar.h"
|
|
||||||
#include "wx/fl/updatesmgr.h"
|
|
||||||
|
|
||||||
#include "wx/fl/garbagec.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* class implements optimized logic for refreshing
|
|
||||||
* areas of frame layout - which actually need to be updated.
|
|
||||||
* Is used as default updates-manager by wxFrameLayout.
|
|
||||||
*
|
|
||||||
* it is called "Garbage Collecting" u.mgr for it's implementation
|
|
||||||
* tries to find out dependencies between bars, and to order
|
|
||||||
* them ito "hierarchy", this hierarchical sorting resembles
|
|
||||||
* implemenation of heap-garbage collectors, which resolve
|
|
||||||
* dependencies between references.
|
|
||||||
*
|
|
||||||
* Example: there are situations where the order of moving
|
|
||||||
* the windows does matter:
|
|
||||||
*
|
|
||||||
* case 1)
|
|
||||||
* ------ ---
|
|
||||||
* | A | |B|
|
|
||||||
* ------ ---> | |
|
|
||||||
* --- --- ------
|
|
||||||
* |B| | A |
|
|
||||||
* | | ------
|
|
||||||
* ---
|
|
||||||
* (future)
|
|
||||||
* (past)
|
|
||||||
*
|
|
||||||
* past/future positions of A and B windows completely overlapp, i.e.
|
|
||||||
* depend on each other, and there is not solution for
|
|
||||||
* moving the windows witout refreshing both of them,
|
|
||||||
* -- we have cyclic dependency here. The gc. alg will
|
|
||||||
* find this cyclic dependecy and will force "refresh"
|
|
||||||
* after movement.
|
|
||||||
*
|
|
||||||
* case 2)
|
|
||||||
*
|
|
||||||
* ------
|
|
||||||
* | A |
|
|
||||||
* ------ --->
|
|
||||||
* ---
|
|
||||||
* |B| ------
|
|
||||||
* | | | A |
|
|
||||||
* --- ------
|
|
||||||
* ---
|
|
||||||
* |B|
|
|
||||||
* | |
|
|
||||||
* ---
|
|
||||||
*
|
|
||||||
* (future)
|
|
||||||
* (past)
|
|
||||||
*
|
|
||||||
* in this case past/future positions do not overlapp, thus
|
|
||||||
* it's enough only to move windows, without refreshing them.
|
|
||||||
* GC will "notice" it.
|
|
||||||
*
|
|
||||||
* there is also third case, when overlapping is partial
|
|
||||||
* in this case the refershing can be also avoided by
|
|
||||||
* moving windows in the order of "most-dependant" towards the
|
|
||||||
* "least-dependent". GC handles this automatically, by
|
|
||||||
* sorting windows by their dependency-level (or "hierarchy")
|
|
||||||
*
|
|
||||||
* See garbagec.h for more details of this method, garbagec.h/cpp
|
|
||||||
* implement sorting of generic-dependencies (does not deal
|
|
||||||
* with graphical objects directly)
|
|
||||||
*
|
|
||||||
* Summary: improves performance when complex/large windows are
|
|
||||||
* moved around, by reducing number of repaints. Also helps
|
|
||||||
* to avoid dirty non-client areas of moved windows
|
|
||||||
* in some special cases of "overlapping anomalies"
|
|
||||||
*/
|
|
||||||
|
|
||||||
class cbGCUpdatesMgr : public cbSimpleUpdatesMgr
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS( cbGCUpdatesMgr )
|
|
||||||
protected:
|
|
||||||
|
|
||||||
GarbageCollector mGC;
|
|
||||||
|
|
||||||
void DoRepositionItems( wxList& items );
|
|
||||||
|
|
||||||
void AddItem( wxList& itemList,
|
|
||||||
cbBarInfo* pBar,
|
|
||||||
cbDockPane* pPane,
|
|
||||||
wxRect& curBounds,
|
|
||||||
wxRect& prevBounds );
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
cbGCUpdatesMgr(void) {}
|
|
||||||
|
|
||||||
cbGCUpdatesMgr( wxFrameLayout* pPanel );
|
|
||||||
|
|
||||||
// notificiactions received from Frame Layout :
|
|
||||||
|
|
||||||
virtual void OnStartChanges();
|
|
||||||
|
|
||||||
// refreshes parts of the frame layout, which need an update
|
|
||||||
virtual void UpdateNow();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* __GCUPDATESMGR_G__ */
|
|
||||||
|
|
@@ -1,120 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: No names yet.
|
|
||||||
// Purpose: Contrib. demo
|
|
||||||
// Author: Aleksandras Gluchovas
|
|
||||||
// Modified by:
|
|
||||||
// Created: 9/11/98
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Aleksandras Gluchovas
|
|
||||||
// Licence: wxWindows license
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef __HINTANIMPL_G__
|
|
||||||
#define __HINTANIMPL_G__
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma interface "hintanimpl.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/fl/controlbar.h"
|
|
||||||
|
|
||||||
#include "wx/timer.h"
|
|
||||||
|
|
||||||
class cbHintAnimTimer;
|
|
||||||
|
|
||||||
class cbHintAnimationPlugin : public cbPluginBase
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS( cbHintAnimationPlugin )
|
|
||||||
protected:
|
|
||||||
friend class cbHintAnimTimer;
|
|
||||||
|
|
||||||
wxScreenDC* mpScrDc; // created while tracking hint-rect
|
|
||||||
cbHintAnimTimer* mpAnimTimer;
|
|
||||||
|
|
||||||
// FOR NOW:: try it without mutually exculisve locks
|
|
||||||
volatile wxRect mCurRect;
|
|
||||||
|
|
||||||
// state variables
|
|
||||||
|
|
||||||
bool mAnimStarted;
|
|
||||||
bool mStopPending;
|
|
||||||
|
|
||||||
bool mPrevInClient;
|
|
||||||
bool mCurInClient;
|
|
||||||
|
|
||||||
wxRect mPrevRect;
|
|
||||||
|
|
||||||
public:
|
|
||||||
int mMorphDelay; // delay between frames in miliseconds, default: 20
|
|
||||||
int mMaxFrames; // number of iterations for hint morphing, default: 30
|
|
||||||
// (morph duration = mMorphDelay * mMaxFrames msec)
|
|
||||||
|
|
||||||
int mInClientHintBorder; // default: 4 pixels
|
|
||||||
|
|
||||||
bool mAccelerationOn; // TRUE, if morph accelerates, otherwise morph
|
|
||||||
// speed is constant. Default: TRUE
|
|
||||||
|
|
||||||
// TBD:: get/set methods for above members
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void StartTracking();
|
|
||||||
|
|
||||||
void DrawHintRect ( wxRect& rect, bool isInClientRect);
|
|
||||||
void EraseHintRect( wxRect& rect, bool isInClientRect);
|
|
||||||
|
|
||||||
void FinishTracking();
|
|
||||||
|
|
||||||
void DoDrawHintRect( wxRect& rect, bool isInClientRect);
|
|
||||||
|
|
||||||
void RectToScr( wxRect& frameRect, wxRect& scrRect );
|
|
||||||
|
|
||||||
public:
|
|
||||||
cbHintAnimationPlugin(void);
|
|
||||||
|
|
||||||
~cbHintAnimationPlugin();
|
|
||||||
|
|
||||||
cbHintAnimationPlugin( wxFrameLayout* pPanel, int paneMask = wxALL_PANES );
|
|
||||||
|
|
||||||
void OnDrawHintRect( cbDrawHintRectEvent& event );
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// helper classes
|
|
||||||
|
|
||||||
struct MorphInfoT
|
|
||||||
{
|
|
||||||
wxPoint mFrom;
|
|
||||||
wxPoint mTill;
|
|
||||||
};
|
|
||||||
|
|
||||||
class cbHintAnimTimer : public wxTimer
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
|
|
||||||
friend class cbHintAnimationPlugin;
|
|
||||||
|
|
||||||
wxRect mPrevMorphed;
|
|
||||||
|
|
||||||
MorphInfoT mUpperLeft;
|
|
||||||
MorphInfoT mLowerRight;
|
|
||||||
int mCurIter;
|
|
||||||
|
|
||||||
long mLock;
|
|
||||||
|
|
||||||
cbHintAnimationPlugin* mpPl;
|
|
||||||
|
|
||||||
void MorphPoint( wxPoint& origin, MorphInfoT& info, wxPoint& point );
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
cbHintAnimTimer(void);
|
|
||||||
|
|
||||||
virtual void Notify(void);
|
|
||||||
|
|
||||||
virtual bool Init( cbHintAnimationPlugin* pAnimPl, bool reinit );
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* __HINTANIMPL_G__ */
|
|
||||||
|
|
@@ -1,165 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: No names yet.
|
|
||||||
// Purpose: Contrib. demo
|
|
||||||
// Author: Aleksandras Gluchovas
|
|
||||||
// Modified by:
|
|
||||||
// Created: ??/09/98
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Aleksandras Gluchovas
|
|
||||||
// Licence: wxWindows license
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef __NEWBMPBTN_G__
|
|
||||||
#define __NEWBMPBTN_G__
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma interface "newbmpbtn.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/button.h"
|
|
||||||
#include "wx/string.h"
|
|
||||||
|
|
||||||
// button lable-text alignment types
|
|
||||||
|
|
||||||
#define NB_ALIGN_TEXT_RIGHT 0
|
|
||||||
#define NB_ALIGN_TEXT_BOTTOM 1
|
|
||||||
#define NB_NO_TEXT 2
|
|
||||||
#define NB_NO_IMAGE 3
|
|
||||||
|
|
||||||
// classes declared in this header file
|
|
||||||
|
|
||||||
class wxNewBitmapButton;
|
|
||||||
class wxBorderLessBitmapButton;
|
|
||||||
|
|
||||||
// alternative class for wxBmpButton
|
|
||||||
|
|
||||||
class wxNewBitmapButton: public wxPanel
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS(wxNewBitmapButton)
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
friend class wxNewBitmapButtonSerializer;
|
|
||||||
|
|
||||||
int mTextToLabelGap;
|
|
||||||
int mMarginX;
|
|
||||||
int mMarginY;
|
|
||||||
int mTextAlignment;
|
|
||||||
bool mIsSticky;
|
|
||||||
bool mIsFlat;
|
|
||||||
|
|
||||||
wxString mLabelText;
|
|
||||||
wxString mImageFileName;
|
|
||||||
int mImageFileType;
|
|
||||||
|
|
||||||
wxBitmap mDepressedBmp; // source image for rendering
|
|
||||||
// labels for particular state
|
|
||||||
|
|
||||||
wxBitmap mFocusedBmp; // may not be always present -
|
|
||||||
// only if mHasFocusedBmp is TRUE
|
|
||||||
|
|
||||||
wxBitmap* mpDepressedImg;
|
|
||||||
wxBitmap* mpPressedImg;
|
|
||||||
wxBitmap* mpDisabledImg;
|
|
||||||
wxBitmap* mpFocusedImg;
|
|
||||||
|
|
||||||
// button state variables;
|
|
||||||
bool mDragStarted;
|
|
||||||
bool mIsPressed;
|
|
||||||
bool mIsInFocus;
|
|
||||||
bool mPrevPressedState;
|
|
||||||
bool mPrevInFocusState;
|
|
||||||
|
|
||||||
bool mHasFocusedBmp;
|
|
||||||
|
|
||||||
// type of event which is fired upon depression of this button
|
|
||||||
int mFiredEventType;
|
|
||||||
|
|
||||||
// pens for drawing decorations (borders)
|
|
||||||
wxPen mBlackPen;
|
|
||||||
wxPen mDarkPen;
|
|
||||||
wxPen mGrayPen;
|
|
||||||
wxPen mLightPen;
|
|
||||||
|
|
||||||
bool mIsCreated;
|
|
||||||
int mSizeIsSet;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void DestroyLabels();
|
|
||||||
|
|
||||||
// returns the label which match the current button state
|
|
||||||
virtual wxBitmap* GetStateLabel();
|
|
||||||
|
|
||||||
virtual void DrawShade( int outerLevel,
|
|
||||||
wxDC& dc,
|
|
||||||
wxPen& upperLeftSidePen,
|
|
||||||
wxPen& lowerRightSidePen );
|
|
||||||
|
|
||||||
bool IsInWindow( int x,int y );
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
wxNewBitmapButton( const wxBitmap& labelBitmap = wxNullBitmap,
|
|
||||||
const wxString& labelText = "",
|
|
||||||
int alignText = NB_ALIGN_TEXT_BOTTOM,
|
|
||||||
bool isFlat = TRUE,
|
|
||||||
// this is the default type of fired events
|
|
||||||
int firedEventType = wxEVT_COMMAND_MENU_SELECTED,
|
|
||||||
int marginX = 2,
|
|
||||||
int marginY = 2,
|
|
||||||
int textToLabelGap = 2,
|
|
||||||
bool isSticky = FALSE
|
|
||||||
);
|
|
||||||
|
|
||||||
// use this constructor if buttons have to be persistant
|
|
||||||
|
|
||||||
wxNewBitmapButton( const wxString& bitmapFileName,
|
|
||||||
const int bitmapFileType = wxBITMAP_TYPE_BMP,
|
|
||||||
const wxString& labelText = "",
|
|
||||||
int alignText = NB_ALIGN_TEXT_BOTTOM,
|
|
||||||
bool isFlat = TRUE,
|
|
||||||
// this is the default type of fired events
|
|
||||||
int firedEventType = wxEVT_COMMAND_MENU_SELECTED,
|
|
||||||
int marginX = 2,
|
|
||||||
int marginY = 2,
|
|
||||||
int textToLabelGap = 2,
|
|
||||||
bool isSticky = FALSE
|
|
||||||
);
|
|
||||||
|
|
||||||
~wxNewBitmapButton();
|
|
||||||
|
|
||||||
// should be called after Create();
|
|
||||||
virtual void Reshape();
|
|
||||||
|
|
||||||
// overridables
|
|
||||||
virtual void SetLabel(const wxBitmap& labelBitmap, const wxString& labelText = "" );
|
|
||||||
|
|
||||||
virtual void SetAlignments( int alignText = NB_ALIGN_TEXT_BOTTOM,
|
|
||||||
int marginX = 2,
|
|
||||||
int marginY = 2,
|
|
||||||
int textToLabelGap = 2);
|
|
||||||
|
|
||||||
virtual void DrawDecorations( wxDC& dc );
|
|
||||||
virtual void DrawLabel( wxDC& dc );
|
|
||||||
|
|
||||||
virtual void RenderLabelImage( wxBitmap*& destBmp, wxBitmap* srcBmp,
|
|
||||||
bool isEnabled = TRUE,
|
|
||||||
bool isPressed = FALSE);
|
|
||||||
|
|
||||||
virtual void RenderLabelImages();
|
|
||||||
virtual void RenderAllLabelImages();
|
|
||||||
|
|
||||||
// event handlers
|
|
||||||
void OnLButtonDown( wxMouseEvent& event );
|
|
||||||
void OnLButtonUp( wxMouseEvent& event );
|
|
||||||
void OnMouseMove( wxMouseEvent& event );
|
|
||||||
void OnSize( wxSizeEvent& event );
|
|
||||||
void OnPaint( wxPaintEvent& event );
|
|
||||||
void OnEraseBackground( wxEraseEvent& event );
|
|
||||||
void OnKillFocus( wxFocusEvent& event );
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* __NEWBMPBTN_G__ */
|
|
||||||
|
|
@@ -1,119 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: No names yet.
|
|
||||||
// Purpose: Central header file for control-bar related classes
|
|
||||||
//
|
|
||||||
// Author: Aleksandras Gluchovas <mailto:alex@soften.ktu.lt>
|
|
||||||
// Modified by:
|
|
||||||
// Created: 06/09/98
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Aleksandras Gluchovas
|
|
||||||
// Licence: wxWindows license
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef __PANEDRAWPL_G__
|
|
||||||
#define __PANEDRAWPL_G__
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma interface "panedrawpl.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/fl/controlbar.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Simple, but all-in-one plugin implementation. Resembles look & feel of
|
|
||||||
* to MFC control-bars. Handles painting of pane and items in it.
|
|
||||||
* Fires bar/layout customization event, when user right-clicks bar/pane.
|
|
||||||
* Hooking an instance of this and row-layouting plugins per each pane,
|
|
||||||
* would be enough for the frame layout to function properly.
|
|
||||||
* (they are plugged in autimatically by wxFrameLayout class)
|
|
||||||
*/
|
|
||||||
|
|
||||||
class cbPaneDrawPlugin : public cbPluginBase
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
DECLARE_DYNAMIC_CLASS( cbPaneDrawPlugin )
|
|
||||||
protected:
|
|
||||||
|
|
||||||
// resizing bars/rows state variables
|
|
||||||
bool mResizeStarted;
|
|
||||||
bool mResizeCursorOn;
|
|
||||||
wxPoint mDragOrigin;
|
|
||||||
|
|
||||||
cbBarInfo* mpDraggedBar; // also used when in bar-drag action
|
|
||||||
cbRowInfo* mpResizedRow;
|
|
||||||
|
|
||||||
bool mRowHandleHitted;
|
|
||||||
bool mIsUpperHandle;
|
|
||||||
bool mBarHandleHitted;
|
|
||||||
bool mIsLeftHandle;
|
|
||||||
bool mBarContentHitted;
|
|
||||||
|
|
||||||
// contstraints for dragging the handle
|
|
||||||
wxRect mHandleDragArea;
|
|
||||||
bool mHandleIsVertical;
|
|
||||||
int mHandleOfs;
|
|
||||||
int mDraggedDelta;
|
|
||||||
wxPoint mPrevPos;
|
|
||||||
|
|
||||||
// used for handling, start-draw-in-area events
|
|
||||||
wxClientDC* mpClntDc;
|
|
||||||
|
|
||||||
cbDockPane* mpPane; // is set up temorary short-cut, while handling event
|
|
||||||
|
|
||||||
protected:
|
|
||||||
// helpers
|
|
||||||
void DrawDraggedHandle( const wxPoint& pos, cbDockPane& pane );
|
|
||||||
|
|
||||||
virtual void DrawPaneShade( wxDC& dc, int alignment );
|
|
||||||
virtual void DrawPaneShadeForRow( cbRowInfo* pRow, wxDC& dc );
|
|
||||||
|
|
||||||
virtual void DrawUpperRowHandle( cbRowInfo* pRow, wxDC& dc );
|
|
||||||
virtual void DrawLowerRowHandle( cbRowInfo* pRow, wxDC& dc );
|
|
||||||
|
|
||||||
virtual void DrawUpperRowShades( cbRowInfo* pRow, wxDC& dc, int level );
|
|
||||||
virtual void DrawLowerRowShades( cbRowInfo* pRow, wxDC& dc, int level );
|
|
||||||
|
|
||||||
virtual void DrawBarInnerShadeRect( cbBarInfo* pBar, wxDC& dc );
|
|
||||||
|
|
||||||
virtual void DrawShade( int level, wxRect& rect, int alignment, wxDC& dc );
|
|
||||||
virtual void DrawShade1( int level, wxRect& rect, int alignment, wxDC& dc );
|
|
||||||
|
|
||||||
inline void SetLightPixel( int x, int y, wxDC& dc );
|
|
||||||
inline void SetDarkPixel ( int x, int y, wxDC& dc );
|
|
||||||
|
|
||||||
public:
|
|
||||||
cbPaneDrawPlugin(void);
|
|
||||||
|
|
||||||
cbPaneDrawPlugin( wxFrameLayout* pPanel, int paneMask = wxALL_PANES );
|
|
||||||
|
|
||||||
virtual ~cbPaneDrawPlugin();
|
|
||||||
|
|
||||||
virtual cbPluginBase* Clone() { return new cbPaneDrawPlugin(0,0); }
|
|
||||||
|
|
||||||
// handlers for plugin-events
|
|
||||||
|
|
||||||
void OnLButtonDown( cbLeftDownEvent& event );
|
|
||||||
void OnLDblClick ( cbLeftDClickEvent& event );
|
|
||||||
void OnLButtonUp ( cbLeftUpEvent& event );
|
|
||||||
void OnRButtonUp ( cbRightUpEvent& event );
|
|
||||||
void OnMouseMove ( cbMotionEvent& event );
|
|
||||||
|
|
||||||
void OnDrawPaneBackground ( cbDrawPaneBkGroundEvent& event );
|
|
||||||
void OnDrawPaneDecorations( cbDrawPaneDecorEvent& event );
|
|
||||||
|
|
||||||
void OnDrawRowDecorations ( cbDrawRowDecorEvent& event );
|
|
||||||
void OnDrawRowHandles ( cbDrawRowHandlesEvent& event );
|
|
||||||
void OnDrawRowBackground ( cbDrawRowBkGroundEvent& event );
|
|
||||||
|
|
||||||
void OnSizeBarWindow ( cbSizeBarWndEvent& event );
|
|
||||||
void OnDrawBarDecorations ( cbDrawBarDecorEvent& event );
|
|
||||||
void OnDrawBarHandles ( cbDrawBarHandlesEvent& event );
|
|
||||||
|
|
||||||
void OnStartDrawInArea ( cbStartDrawInAreaEvent& event );
|
|
||||||
void OnFinishDrawInArea ( cbFinishDrawInAreaEvent& event );
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* __PANEDRAWPL_G__ */
|
|
||||||
|
|
@@ -1,164 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: No names yet.
|
|
||||||
// Purpose: Contrib. demo
|
|
||||||
// Author: Aleksandras Gluchovas
|
|
||||||
// Modified by:
|
|
||||||
// Created: 06/10/98
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Aleksandras Gluchovas
|
|
||||||
// Licence: wxWindows license
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef __ROWDRAGPL_G__
|
|
||||||
#define __ROWDRAGPL_G__
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma interface "rowdragpl.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/fl/controlbar.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Plugin adds row-dragging fuctionality to the pane.
|
|
||||||
* Handles mouse/movement and pane-background erasing plugin-events.
|
|
||||||
* Behaviour and appearence resembles drag & drop posotioning
|
|
||||||
* of the toolbar-rows int Netscape Comunicator 4.xx.
|
|
||||||
*/
|
|
||||||
|
|
||||||
class cbRowDragPlugin : public cbPluginBase
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS( cbRowDragPlugin )
|
|
||||||
public:
|
|
||||||
// background colours for the highlighted/unhighlighted icons
|
|
||||||
|
|
||||||
wxColour mHightColor; // light-blue for NC-look
|
|
||||||
wxColour mLowColor; // light-gray -/-
|
|
||||||
wxColour mTrianInnerColor; // blue -/-
|
|
||||||
wxPen mTrianInnerPen; // black -/-
|
|
||||||
|
|
||||||
protected:
|
|
||||||
friend class cbRowDragPluginSerializer;
|
|
||||||
|
|
||||||
// drag & drop state variables
|
|
||||||
bool mDragStarted;
|
|
||||||
bool mDecisionMode;
|
|
||||||
wxPoint mDragOrigin;
|
|
||||||
int mCurDragOfs;
|
|
||||||
bool mCaptureIsOn;
|
|
||||||
|
|
||||||
// saved margins of the pane
|
|
||||||
int mSvTopMargin;
|
|
||||||
int mSvBottomMargin;
|
|
||||||
int mSvLeftMargin;
|
|
||||||
int mSvRightMargin;
|
|
||||||
|
|
||||||
//on-screen drawing state variables
|
|
||||||
wxBitmap* mpPaneImage;
|
|
||||||
wxBitmap* mpRowImage;
|
|
||||||
wxBitmap* mpCombinedImage;
|
|
||||||
|
|
||||||
wxScreenDC* mpScrDc;
|
|
||||||
wxRect mCombRect;
|
|
||||||
wxSize mRowImgDim;
|
|
||||||
int mInitialRowOfs;
|
|
||||||
|
|
||||||
// NOTE:: if mpRowInFocus is not NULL, then mCollapsedIconInFocus is -1,
|
|
||||||
// and v.v. (two different items cannot be in focus at the same time)
|
|
||||||
|
|
||||||
cbRowInfo* mpRowInFocus;
|
|
||||||
int mCollapsedIconInFocus;
|
|
||||||
|
|
||||||
cbDockPane* mpPane; // is set up temorarely, while handling event
|
|
||||||
|
|
||||||
wxList mHiddenBars;
|
|
||||||
|
|
||||||
wxBitmap* CaptureDCArea( wxDC& dc, wxRect& area );
|
|
||||||
|
|
||||||
// helpers for drag&drop
|
|
||||||
|
|
||||||
int GetHRowsCountForPane( cbDockPane* pPane );
|
|
||||||
|
|
||||||
void SetMouseCapture( bool captureOn );
|
|
||||||
void PrepareForRowDrag();
|
|
||||||
void ShowDraggedRow( int offset );
|
|
||||||
void ShowPaneImage();
|
|
||||||
void FinishOnScreenDraw();
|
|
||||||
void CollapseRow( cbRowInfo* pRow );
|
|
||||||
void ExpandRow( int collapsedIconIdx );
|
|
||||||
void InsertDraggedRowBefore( cbRowInfo* pBeforeRow );
|
|
||||||
bool ItemIsInFocus();
|
|
||||||
void CheckPrevItemInFocus( cbRowInfo* pRow, int iconIdx );
|
|
||||||
void UnhiglightItemInFocus();
|
|
||||||
|
|
||||||
cbRowInfo* GetFirstRow();
|
|
||||||
|
|
||||||
// "hard-coded metafile" for NN-look
|
|
||||||
|
|
||||||
virtual void DrawTrianUp( wxRect& inRect, wxDC& dc );
|
|
||||||
virtual void DrawTrianDown( wxRect& inRect, wxDC& dc );
|
|
||||||
virtual void DrawTrianRight( wxRect& inRect, wxDC& dc );
|
|
||||||
virtual void Draw3DPattern( wxRect& inRect, wxDC& dc );
|
|
||||||
virtual void DrawRombShades( wxPoint& p1, wxPoint& p2, wxPoint& p3, wxPoint& p4, wxDC& dc );
|
|
||||||
virtual void DrawOrtoRomb( wxRect& inRect, wxDC& dc, wxBrush& bkBrush );
|
|
||||||
virtual void DrawRomb( wxRect& inRect, wxDC& dc, wxBrush& bkBrush );
|
|
||||||
virtual void Draw3DRect( wxRect& inRect, wxDC& dc, wxBrush& bkBrush );
|
|
||||||
virtual void DrawRectShade( wxRect& inRect, wxDC& dc,
|
|
||||||
int level, wxPen& upperPen, wxPen& lowerPen );
|
|
||||||
|
|
||||||
virtual void GetRowHintRect( cbRowInfo* pRow, wxRect& rect );
|
|
||||||
virtual void GetCollapsedInconRect( int iconIdx, wxRect& rect );
|
|
||||||
|
|
||||||
virtual int GetCollapsedIconsPos();
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
cbRowDragPlugin(void);
|
|
||||||
|
|
||||||
cbRowDragPlugin( wxFrameLayout* pLayout, int paneMask = wxALL_PANES );
|
|
||||||
virtual ~cbRowDragPlugin();
|
|
||||||
|
|
||||||
virtual cbPluginBase* Clone() { return new cbRowDragPlugin(NULL,0); }
|
|
||||||
|
|
||||||
virtual void OnInitPlugin();
|
|
||||||
|
|
||||||
// handlers for plugin events (appearence-independent logic)
|
|
||||||
|
|
||||||
void OnMouseMove ( cbMotionEvent& event );
|
|
||||||
void OnLButtonDown( cbLeftDownEvent& event );
|
|
||||||
void OnLButtonUp ( cbLeftUpEvent& event );
|
|
||||||
void OnDrawPaneBackground( cbDrawPaneDecorEvent& event );
|
|
||||||
|
|
||||||
// overridables (appearence-depedent)
|
|
||||||
|
|
||||||
virtual void DrawCollapsedRowIcon( int index, wxDC& dc, bool isHighlighted );
|
|
||||||
virtual void DrawCollapsedRowsBorder( wxDC& dc );
|
|
||||||
virtual void DrawRowsDragHintsBorder( wxDC& dc );
|
|
||||||
virtual void DrawRowDragHint( cbRowInfo* pRow, wxDC& dc, bool isHighlighted );
|
|
||||||
virtual void DrawEmptyRow( wxDC& dc, wxRect& rowBounds );
|
|
||||||
|
|
||||||
virtual int GetCollapsedRowIconHeight();
|
|
||||||
virtual int GetRowDragHintWidth();
|
|
||||||
|
|
||||||
virtual void SetPaneMargins();
|
|
||||||
|
|
||||||
|
|
||||||
virtual bool HitTestCollapsedRowIcon( int iconIdx, const wxPoint& pos );
|
|
||||||
virtual bool HitTestRowDragHint( cbRowInfo* pRow, const wxPoint& pos );
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
// internal helper-class
|
|
||||||
|
|
||||||
class cbHiddenBarInfo : public wxObject
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS( cbHiddenBarInfo )
|
|
||||||
public:
|
|
||||||
cbBarInfo* mpBar;
|
|
||||||
int mRowNo;
|
|
||||||
int mIconNo;
|
|
||||||
int mAlignment;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* __ROWDRAGPL_G__ */
|
|
||||||
|
|
@@ -1,87 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: No names yet.
|
|
||||||
// Purpose: Contrib. demo
|
|
||||||
// Author: Aleksandras Gluchovas
|
|
||||||
// Modified by:
|
|
||||||
// Created: 02/10/98
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Aleksandras Gluchovas
|
|
||||||
// Licence: wxWindows license
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef __ROWLAYOUTPL_G__
|
|
||||||
#define __ROWLAYOUTPL_G__
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma interface "rowlayoutpl.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/fl/controlbar.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Simple implementation of plugin, which handles row-layouting
|
|
||||||
* requests sent from Frame Layout
|
|
||||||
*/
|
|
||||||
|
|
||||||
class cbRowLayoutPlugin : public cbPluginBase
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS( cbRowLayoutPlugin )
|
|
||||||
protected:
|
|
||||||
cbDockPane* mpPane; // is set up temorarely, while handling event
|
|
||||||
protected:
|
|
||||||
|
|
||||||
// not-fixed-bars layouting related helpers
|
|
||||||
|
|
||||||
void FitBarsToRange( int from, int till, cbBarInfo* pTheBar, cbRowInfo* pRow );
|
|
||||||
void RelayoutNotFixedBarsAround( cbBarInfo* pTheBar, cbRowInfo* pRow );
|
|
||||||
void MinimzeNotFixedBars( cbRowInfo* pRow, cbBarInfo* pBarToPreserve );
|
|
||||||
int GetRowFreeSpace( cbRowInfo* pRow );
|
|
||||||
|
|
||||||
void RecalcLengthRatios( cbRowInfo* pRow );
|
|
||||||
void ApplyLengthRatios( cbRowInfo* pRow );
|
|
||||||
void ExpandNotFixedBars( cbRowInfo* pRow );
|
|
||||||
void AdjustLengthOfInserted( cbRowInfo* pRow, cbBarInfo* pTheBar );
|
|
||||||
|
|
||||||
void DetectBarHandles( cbRowInfo* pRow );
|
|
||||||
void CheckIfAtTheBoundary( cbBarInfo* pTheBar, cbRowInfo& rowInfo );
|
|
||||||
|
|
||||||
|
|
||||||
// row-layouting helpers (simulate "bar-friction")
|
|
||||||
|
|
||||||
int CalcRowHeight( cbRowInfo& row );
|
|
||||||
void LayoutItemsVertically( cbRowInfo& row );
|
|
||||||
|
|
||||||
void StickRightSideBars( cbBarInfo* pToBar );
|
|
||||||
|
|
||||||
void SlideLeftSideBars ( cbBarInfo* pTheBar );
|
|
||||||
void SlideRightSideBars( cbBarInfo* pTheBar );
|
|
||||||
|
|
||||||
void ShiftLeftTrashold ( cbBarInfo* pTheBar, cbRowInfo& row );
|
|
||||||
void ShiftRightTrashold( cbBarInfo* pTheBar, cbRowInfo& row );
|
|
||||||
|
|
||||||
void InsertBefore( cbBarInfo* pBeforeBar,
|
|
||||||
cbBarInfo* pTheBar,
|
|
||||||
cbRowInfo& row
|
|
||||||
);
|
|
||||||
|
|
||||||
void DoInsertBar( cbBarInfo* pTheBar, cbRowInfo& row );
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
cbRowLayoutPlugin(void);
|
|
||||||
|
|
||||||
cbRowLayoutPlugin( wxFrameLayout* pPanel, int paneMask = wxALL_PANES );
|
|
||||||
|
|
||||||
// event handlers
|
|
||||||
|
|
||||||
void OnResizeRow ( cbResizeRowEvent& event );
|
|
||||||
void OnInsertBar ( cbInsertBarEvent& event );
|
|
||||||
void OnRemoveBar ( cbRemoveBarEvent& event );
|
|
||||||
void OnLayoutRow ( cbLayoutRowEvent& event );
|
|
||||||
void OnLayoutRows( cbLayoutRowsEvent& event );
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* __ROWLAYOUTPL_G__ */
|
|
||||||
|
|
@@ -1,216 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: No names yet.
|
|
||||||
// Purpose: Contrib. demo
|
|
||||||
// Author: Aleksandras Gluchovas
|
|
||||||
// Modified by:
|
|
||||||
// Created: 06/09/98
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Aleksandras Gluchovas
|
|
||||||
// Licence: wxWindows license
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef __TOOLWND_G__
|
|
||||||
#define __TOOLWND_G__
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma interface "toolwnd.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/frame.h"
|
|
||||||
#include "wx/dynarray.h"
|
|
||||||
|
|
||||||
// fixed settings
|
|
||||||
|
|
||||||
#define BTN_BOX_HEIGHT 12
|
|
||||||
#define BTN_BOX_WIDTH 12
|
|
||||||
#define BTN_X_WIEGHT 2
|
|
||||||
|
|
||||||
class cbMiniButton;
|
|
||||||
|
|
||||||
typedef cbMiniButton* cbMinitButtonPtrT;
|
|
||||||
|
|
||||||
WX_DEFINE_ARRAY( cbMinitButtonPtrT, cbMiniButtonArrayT );
|
|
||||||
|
|
||||||
class wxToolWindow : public wxFrame
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS( wxToolWindow )
|
|
||||||
|
|
||||||
public: /** protected really, accessed only by serializers **/
|
|
||||||
|
|
||||||
cbMiniButtonArrayT mButtons;
|
|
||||||
wxWindow* mpClientWnd;
|
|
||||||
|
|
||||||
wxFont mTitleFont;
|
|
||||||
|
|
||||||
int mTitleHeight;
|
|
||||||
int mClntHorizGap;
|
|
||||||
int mClntVertGap;
|
|
||||||
int mWndVertGap;
|
|
||||||
int mWndHorizGap;
|
|
||||||
int mButtonGap;
|
|
||||||
int mInTitleMargin;
|
|
||||||
int mHintBorder;
|
|
||||||
|
|
||||||
bool mResizeStarted;
|
|
||||||
bool mRealTimeUpdatesOn;
|
|
||||||
|
|
||||||
int mMTolerance;
|
|
||||||
|
|
||||||
int mCursorType;
|
|
||||||
bool mMouseCaptured;
|
|
||||||
|
|
||||||
// drag&drop state variables
|
|
||||||
|
|
||||||
wxPoint mDragOrigin;
|
|
||||||
wxRect mInitialRect;
|
|
||||||
wxRect mPrevHintRect;
|
|
||||||
wxScreenDC* mpScrDc;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void GetScrWindowRect( wxRect& r );
|
|
||||||
void GetScrMousePos ( wxMouseEvent& event, wxPoint& pos );
|
|
||||||
void SetHintCursor ( int type );
|
|
||||||
|
|
||||||
void CalcResizedRect( wxRect& rect, wxPoint& delta, const wxSize& minDim );
|
|
||||||
void AdjustRectPos( const wxRect& original, const wxSize& newDim, wxRect& newRect );
|
|
||||||
wxSize GetMinimalWndDim();
|
|
||||||
|
|
||||||
void DrawHintRect( const wxRect& r );
|
|
||||||
|
|
||||||
int HitTestWindow( wxMouseEvent& event );
|
|
||||||
|
|
||||||
void LayoutMiniButtons();
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
wxToolWindow();
|
|
||||||
~wxToolWindow();
|
|
||||||
|
|
||||||
void SetClient( wxWindow* pWnd );
|
|
||||||
wxWindow* GetClient();
|
|
||||||
|
|
||||||
void SetTitleFont( wxFont& font );
|
|
||||||
|
|
||||||
// buttons are added in right-to-left order
|
|
||||||
void AddMiniButton( cbMiniButton* pBtn );
|
|
||||||
|
|
||||||
void OnPaint( wxPaintEvent& event );
|
|
||||||
|
|
||||||
void OnMotion( wxMouseEvent& event );
|
|
||||||
void OnLeftDown( wxMouseEvent& event );
|
|
||||||
void OnLeftUp( wxMouseEvent& event );
|
|
||||||
void OnSize( wxSizeEvent& event );
|
|
||||||
|
|
||||||
void OnEraseBackground( wxEraseEvent& event );
|
|
||||||
|
|
||||||
// overridables:
|
|
||||||
|
|
||||||
virtual wxSize GetPreferredSize( const wxSize& given );
|
|
||||||
virtual void OnMiniButtonClicked( int btnIdx ) {}
|
|
||||||
virtual bool HandleTitleClick( wxMouseEvent& event ) { return FALSE; }
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
// FIXME:: the code below should be moved to a separate file
|
|
||||||
|
|
||||||
#include "wx/fl/controlbar.h"
|
|
||||||
|
|
||||||
class cbMiniButton : public wxObject
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
wxPoint mPos;
|
|
||||||
wxSize mDim;
|
|
||||||
bool mVisible;
|
|
||||||
bool mEnabled;
|
|
||||||
|
|
||||||
wxFrameLayout* mpLayout;
|
|
||||||
cbDockPane* mpPane;
|
|
||||||
cbPluginBase* mpPlugin;
|
|
||||||
|
|
||||||
wxWindow* mpWnd;
|
|
||||||
|
|
||||||
bool mWasClicked;
|
|
||||||
bool mDragStarted;
|
|
||||||
|
|
||||||
bool mPressed;
|
|
||||||
public:
|
|
||||||
cbMiniButton();
|
|
||||||
|
|
||||||
void SetPos( const wxPoint& pos );
|
|
||||||
bool HitTest( const wxPoint& pos );
|
|
||||||
|
|
||||||
void OnLeftDown( const wxPoint& pos );
|
|
||||||
void OnLeftUp( const wxPoint& pos );
|
|
||||||
void OnMotion( const wxPoint& pos );
|
|
||||||
|
|
||||||
void Refresh();
|
|
||||||
virtual void Draw( wxDC& dc );
|
|
||||||
|
|
||||||
bool WasClicked();
|
|
||||||
void Reset();
|
|
||||||
|
|
||||||
void Enable( bool enable ) { mEnabled = enable; }
|
|
||||||
|
|
||||||
bool IsPressed() { return mPressed; }
|
|
||||||
};
|
|
||||||
|
|
||||||
// classes specific to wxFrameLayout engine (FOR NOW in here...)
|
|
||||||
|
|
||||||
class cbCloseBox : public cbMiniButton
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
virtual void Draw( wxDC& dc );
|
|
||||||
};
|
|
||||||
|
|
||||||
class cbCollapseBox : public cbMiniButton
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
bool mIsAtLeft;
|
|
||||||
|
|
||||||
virtual void Draw( wxDC& dc );
|
|
||||||
};
|
|
||||||
|
|
||||||
class cbDockBox : public cbMiniButton
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
virtual void Draw( wxDC& dc );
|
|
||||||
};
|
|
||||||
|
|
||||||
class cbFloatedBarWindow : public wxToolWindow
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS( cbFloatedBarWindow )
|
|
||||||
protected:
|
|
||||||
cbBarInfo* mpBar;
|
|
||||||
wxFrameLayout* mpLayout;
|
|
||||||
|
|
||||||
friend class cbFloatedBarWindowSerializer;
|
|
||||||
|
|
||||||
public:
|
|
||||||
cbFloatedBarWindow();
|
|
||||||
|
|
||||||
void SetBar( cbBarInfo* pBar );
|
|
||||||
void SetLayout( wxFrameLayout* pLayout );
|
|
||||||
cbBarInfo* GetBar();
|
|
||||||
|
|
||||||
// given coordinates are those of the bar itself
|
|
||||||
// floated container window's position and size
|
|
||||||
// are ajusted accordingly
|
|
||||||
|
|
||||||
void PositionFloatedWnd( int scrX, int scrY,
|
|
||||||
int width, int height );
|
|
||||||
|
|
||||||
// overriden methods of wxToolWindow
|
|
||||||
|
|
||||||
virtual wxSize GetPreferredSize( const wxSize& given );
|
|
||||||
virtual void OnMiniButtonClicked( int btnIdx );
|
|
||||||
virtual bool HandleTitleClick( wxMouseEvent& event );
|
|
||||||
|
|
||||||
void OnDblClick( wxMouseEvent& event );
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* __TOOLWND_G__ */
|
|
||||||
|
|
||||||
|
|
@@ -1,56 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: No names yet.
|
|
||||||
// Purpose: Contrib. demo
|
|
||||||
// Author: Aleksandras Gluchovas (@Lithuania)
|
|
||||||
// Modified by:
|
|
||||||
// Created: 19/10/98
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Aleksandras Gluchovas
|
|
||||||
// Licence: wxWindows license
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef __UPDATESMGR_G__
|
|
||||||
#define __UPDATESMGR_G__
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma interface "updatesmgr.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/fl/controlbar.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* class implements slightly optimized logic for refreshing
|
|
||||||
* areas of frame layout - which actually need to be updated.
|
|
||||||
*/
|
|
||||||
|
|
||||||
class cbSimpleUpdatesMgr : public cbUpdatesManagerBase
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS( cbSimpleUpdatesMgr )
|
|
||||||
protected:
|
|
||||||
|
|
||||||
bool WasChanged( cbUpdateMgrData& data, wxRect& currentBounds );
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
cbSimpleUpdatesMgr(void) {}
|
|
||||||
|
|
||||||
cbSimpleUpdatesMgr( wxFrameLayout* pPanel );
|
|
||||||
|
|
||||||
// notificiactions received from Frame Layout (in the order, in which
|
|
||||||
// they usually would be invoked)
|
|
||||||
|
|
||||||
virtual void OnStartChanges();
|
|
||||||
|
|
||||||
virtual void OnRowWillChange( cbRowInfo* pRow, cbDockPane* pInPane );
|
|
||||||
virtual void OnBarWillChange( cbBarInfo* pBar, cbRowInfo* pInRow, cbDockPane* pInPane );
|
|
||||||
virtual void OnPaneMarginsWillChange( cbDockPane* pPane );
|
|
||||||
virtual void OnPaneWillChange( cbDockPane* pPane );
|
|
||||||
|
|
||||||
virtual void OnFinishChanges();
|
|
||||||
|
|
||||||
// refreshes parts of the frame layout, which need an update
|
|
||||||
virtual void UpdateNow();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* __UPDATESMGR_G__ */
|
|
||||||
|
|
@@ -1,148 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: dynamicsash.h
|
|
||||||
// Purpose: A window which can be dynamically split to an arbitrary depth
|
|
||||||
// and later reunified through the user interface
|
|
||||||
// Author: Matt Kimball
|
|
||||||
// Modified by:
|
|
||||||
// Created: 7/15/2001
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) 2001 Matt Kimball
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef _WX_DYNAMICSASH_H_
|
|
||||||
#define _WX_DYNAMICSASH_H_
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
wxDynamicSashWindow
|
|
||||||
|
|
||||||
wxDynamicSashWindow widgets manages the way other widgets are viewed.
|
|
||||||
When a wxDynamicSashWindow is first shown, it will contain one child
|
|
||||||
view, a viewport for that child, and a pair of scrollbars to allow the
|
|
||||||
user to navigate the child view area. Next to each scrollbar is a small
|
|
||||||
tab. By clicking on either tab and dragging to the appropriate spot, a
|
|
||||||
user can split the view area into two smaller views separated by a
|
|
||||||
draggable sash. Later, when the user wishes to reunify the two subviews,
|
|
||||||
the user simply drags the sash to the side of the window.
|
|
||||||
wxDynamicSashWindow will automatically reparent the appropriate child
|
|
||||||
view back up the window hierarchy, and the wxDynamicSashWindow will have
|
|
||||||
only one child view once again.
|
|
||||||
|
|
||||||
As an application developer, you will simply create a wxDynamicSashWindow
|
|
||||||
using either the Create() function or the more complex constructor
|
|
||||||
provided below, and then create a view window whose parent is the
|
|
||||||
wxDynamicSashWindow. The child should respond to
|
|
||||||
wxDynamicSashSplitEvents -- perhaps with an OnSplit() event handler -- by
|
|
||||||
constructing a new view window whose parent is also the
|
|
||||||
wxDynamicSashWindow. That's it! Now your users can dynamically split
|
|
||||||
and reunify the view you provided.
|
|
||||||
|
|
||||||
If you wish to handle the scrollbar events for your view, rather than
|
|
||||||
allowing wxDynamicSashWindow to do it for you, things are a bit more
|
|
||||||
complex. (You might want to handle scrollbar events yourself, if,
|
|
||||||
for instance, you wish to scroll a subwindow of the view you add to
|
|
||||||
your wxDynamicSashWindow object, rather than scrolling the whole view.)
|
|
||||||
In this case, you will need to construct your wxDynamicSashWindow without
|
|
||||||
the wxMANAGE_SCROLLBARS style and you will need to use the
|
|
||||||
GetHScrollBar() and GetVScrollBar() methods to retrieve the scrollbar
|
|
||||||
controls and call SetEventHanler() on them to redirect the scrolling
|
|
||||||
events whenever your window is reparented by wxDyanmicSashWindow.
|
|
||||||
You will need to set the scrollbars' event handler at three times:
|
|
||||||
|
|
||||||
* When your view is created
|
|
||||||
* When your view receives a wxDynamicSashSplitEvent
|
|
||||||
* When your view receives a wxDynamicSashUnifyEvent
|
|
||||||
|
|
||||||
See the dynsash_switch sample application for an example which does this.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include <wx/event.h>
|
|
||||||
#include <wx/window.h>
|
|
||||||
class wxScrollBar;
|
|
||||||
|
|
||||||
|
|
||||||
#define wxEVT_DYNAMIC_SASH_BASE (((int)('d' - 'a') << 11) | ((int)('s' - 'a') << 6) | ((int)('h' - 'a') << 1))
|
|
||||||
#define wxEVT_DYNAMIC_SASH_SPLIT (wxEVT_DYNAMIC_SASH_BASE + 1)
|
|
||||||
#define wxEVT_DYNAMIC_SASH_UNIFY (wxEVT_DYNAMIC_SASH_BASE + 2)
|
|
||||||
|
|
||||||
#define EVT_DYNAMIC_SASH_SPLIT(id, func) EVT_CUSTOM(wxEVT_DYNAMIC_SASH_SPLIT, (id), (func))
|
|
||||||
#define EVT_DYNAMIC_SASH_UNIFY(id, func) EVT_CUSTOM(wxEVT_DYNAMIC_SASH_UNIFY, (id), (func))
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
wxMANAGE_SCROLLBARS is a default style of wxDynamicSashWindow which
|
|
||||||
will cause it to respond to scrollbar events for your application by
|
|
||||||
automatically scrolling the child view.
|
|
||||||
*/
|
|
||||||
#define wxMANAGE_SCROLLBARS 0x00800000
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
wxDynamicSashSplitEvents are sent to your view by wxDynamicSashWindow
|
|
||||||
whenever your view is being split by the user. It is your
|
|
||||||
responsibility to handle this event by creating a new view window as
|
|
||||||
a child of the wxDynamicSashWindow. wxDynamicSashWindow will
|
|
||||||
automatically reparent it to the proper place in its window hierarchy.
|
|
||||||
*/
|
|
||||||
class wxDynamicSashSplitEvent : public wxCommandEvent {
|
|
||||||
public:
|
|
||||||
wxDynamicSashSplitEvent();
|
|
||||||
wxDynamicSashSplitEvent(wxObject *target);
|
|
||||||
|
|
||||||
private:
|
|
||||||
DECLARE_DYNAMIC_CLASS(wxDynamicSashSplitEvent)
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
wxDynamicSashUnifyEvents are sent to your view by wxDynamicSashWindow
|
|
||||||
whenever the sash which splits your view and its sibling is being
|
|
||||||
reunified such that your view is expanding to replace its sibling.
|
|
||||||
You needn't do anything with this event if you are allowing
|
|
||||||
wxDynamicSashWindow to manage your view's scrollbars, but it is useful
|
|
||||||
if you are managing the scrollbars yourself so that you can keep
|
|
||||||
the scrollbars' event handlers connected to your view's event handler
|
|
||||||
class.
|
|
||||||
*/
|
|
||||||
class wxDynamicSashUnifyEvent : public wxCommandEvent {
|
|
||||||
public:
|
|
||||||
wxDynamicSashUnifyEvent();
|
|
||||||
wxDynamicSashUnifyEvent(wxObject *target);
|
|
||||||
|
|
||||||
private:
|
|
||||||
DECLARE_DYNAMIC_CLASS(wxDynamicSashUnifyEvent);
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
wxDynamicSashWindow. See above.
|
|
||||||
*/
|
|
||||||
class wxDynamicSashWindow : public wxWindow {
|
|
||||||
public:
|
|
||||||
wxDynamicSashWindow();
|
|
||||||
wxDynamicSashWindow(wxWindow *parent, wxWindowID id,
|
|
||||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
|
||||||
long style = wxCLIP_CHILDREN | wxMANAGE_SCROLLBARS,
|
|
||||||
const wxString& name = "dynamicSashWindow");
|
|
||||||
virtual ~wxDynamicSashWindow();
|
|
||||||
|
|
||||||
virtual bool Create(wxWindow *parent, wxWindowID id,
|
|
||||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
|
||||||
long style = wxCLIP_CHILDREN | wxMANAGE_SCROLLBARS,
|
|
||||||
const wxString& name = "dynamicSashWindow");
|
|
||||||
virtual wxScrollBar *GetHScrollBar(const wxWindow *child) const;
|
|
||||||
virtual wxScrollBar *GetVScrollBar(const wxWindow *child) const;
|
|
||||||
|
|
||||||
/* This is overloaded from wxWindowBase. It's not here for you to
|
|
||||||
call directly. */
|
|
||||||
virtual void AddChild(wxWindowBase *child);
|
|
||||||
|
|
||||||
private:
|
|
||||||
class wxDynamicSashWindowImpl *m_impl;
|
|
||||||
|
|
||||||
DECLARE_DYNAMIC_CLASS(wxDynamicSashWindow)
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
@@ -1,43 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: email.h
|
|
||||||
// Purpose: wxEmail: portable email client class
|
|
||||||
// Author: Julian Smart
|
|
||||||
// Modified by:
|
|
||||||
// Created: 2001-08-21
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Julian Smart
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma interface "email.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _WX_EMAIL_H_
|
|
||||||
#define _WX_EMAIL_H_
|
|
||||||
|
|
||||||
#include "wx/net/msg.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* wxEmail
|
|
||||||
* Miscellaneous email functions
|
|
||||||
*/
|
|
||||||
|
|
||||||
class wxEmail
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
//// Ctor/dtor
|
|
||||||
wxEmail() {};
|
|
||||||
|
|
||||||
//// Operations
|
|
||||||
|
|
||||||
// Send a message.
|
|
||||||
// Specify profile, or leave it to wxWindows to find the current user name
|
|
||||||
static bool Send(wxMailMessage& message, const wxString& profileName = wxEmptyString );
|
|
||||||
|
|
||||||
protected:
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif //_WX_EMAIL_H_
|
|
||||||
|
|
@@ -1,67 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: msg.h
|
|
||||||
// Purpose: wxMailMessage
|
|
||||||
// Author: Julian Smart
|
|
||||||
// Modified by:
|
|
||||||
// Created: 2001-08-21
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Julian Smart
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma interface "msg.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _WX_MSG_H_
|
|
||||||
#define _WX_MSG_H_
|
|
||||||
|
|
||||||
/*
|
|
||||||
* wxMailMessage
|
|
||||||
* Encapsulates an email message
|
|
||||||
*/
|
|
||||||
|
|
||||||
class wxMailMessage
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
// A common usage
|
|
||||||
wxMailMessage(const wxString& subject, const wxString& to,
|
|
||||||
const wxString& body, const wxString& attachment = wxEmptyString,
|
|
||||||
const wxString& attachmentTitle = wxEmptyString)
|
|
||||||
{
|
|
||||||
m_to.Add(to);
|
|
||||||
m_subject = subject;
|
|
||||||
m_body = body;
|
|
||||||
if (!attachment.IsEmpty())
|
|
||||||
{
|
|
||||||
m_attachments.Add(attachment);
|
|
||||||
m_attachmentTitles.Add(attachmentTitle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
wxMailMessage() {};
|
|
||||||
|
|
||||||
//// Accessors
|
|
||||||
|
|
||||||
void AddTo(const wxString& to) { m_to.Add(to); }
|
|
||||||
void AddCc(const wxString& cc) { m_cc.Add(cc); }
|
|
||||||
void AddBcc(const wxString& bcc) { m_bcc.Add(bcc); }
|
|
||||||
void AddAttachment(const wxString& attach, const wxString& title = wxEmptyString)
|
|
||||||
{ m_attachments.Add(attach); m_attachmentTitles.Add(title); }
|
|
||||||
|
|
||||||
void SetSubject(const wxString& subject) { m_subject = subject; }
|
|
||||||
void SetBody(const wxString& body) { m_body = body; }
|
|
||||||
|
|
||||||
public:
|
|
||||||
wxArrayString m_to; //The To: Recipients
|
|
||||||
wxArrayString m_cc; //The CC: Recipients
|
|
||||||
wxArrayString m_bcc; //The BCC Recipients
|
|
||||||
wxString m_subject; //The Subject of the message
|
|
||||||
wxString m_body; //The Body of the message
|
|
||||||
wxArrayString m_attachments; //Files to attach to the email
|
|
||||||
wxArrayString m_attachmentTitles; //Titles to use for the email file attachments
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // _WX_MSG_H_
|
|
||||||
|
|
@@ -1,56 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: smapi.h
|
|
||||||
// Purpose: Simple MAPI classes
|
|
||||||
// Author: PJ Naughter <pjna@naughter.com>
|
|
||||||
// Modified by: Julian Smart
|
|
||||||
// Created: 2001-08-21
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) PJ Naughter
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma interface "smapi.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _WX_SMAPI_H_
|
|
||||||
#define _WX_SMAPI_H_
|
|
||||||
|
|
||||||
#include "wx/net/msg.h"
|
|
||||||
|
|
||||||
class wxMapiData;
|
|
||||||
|
|
||||||
//The class which encapsulates the MAPI connection
|
|
||||||
class wxMapiSession
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
//Constructors / Destructors
|
|
||||||
wxMapiSession();
|
|
||||||
~wxMapiSession();
|
|
||||||
|
|
||||||
//Logon / Logoff Methods
|
|
||||||
bool Logon(const wxString& sProfileName, const wxString& sPassword = wxEmptyString, wxWindow* pParentWnd = NULL);
|
|
||||||
bool LoggedOn() const;
|
|
||||||
bool Logoff();
|
|
||||||
|
|
||||||
//Send a message
|
|
||||||
bool Send(wxMailMessage& message);
|
|
||||||
|
|
||||||
//General MAPI support
|
|
||||||
bool MapiInstalled() const;
|
|
||||||
|
|
||||||
//Error Handling
|
|
||||||
long GetLastError() const;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
//Methods
|
|
||||||
void Initialise();
|
|
||||||
void Deinitialise();
|
|
||||||
bool Resolve(const wxString& sName, void* lppRecip1);
|
|
||||||
|
|
||||||
wxMapiData* m_data;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif //_WX_SMAPI_H_
|
|
@@ -1,37 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: web.h
|
|
||||||
// Purpose: wxWeb: portable web browser-related class
|
|
||||||
// Author: Julian Smart
|
|
||||||
// Modified by:
|
|
||||||
// Created: 2001-08-21
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Julian Smart
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma interface "web.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _WX_WEB_H_
|
|
||||||
#define _WX_WEB_H_
|
|
||||||
|
|
||||||
/*
|
|
||||||
* wxWeb
|
|
||||||
* Miscellaneous web functions
|
|
||||||
*/
|
|
||||||
|
|
||||||
class wxWeb
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
//// Ctor/dtor
|
|
||||||
wxWeb() {};
|
|
||||||
|
|
||||||
//// Operations
|
|
||||||
|
|
||||||
protected:
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif //_WX_WEB_H_
|
|
||||||
|
|
@@ -57,28 +57,6 @@
|
|||||||
#define wxSTC_MARK_ARROWDOWN 6
|
#define wxSTC_MARK_ARROWDOWN 6
|
||||||
#define wxSTC_MARK_MINUS 7
|
#define wxSTC_MARK_MINUS 7
|
||||||
#define wxSTC_MARK_PLUS 8
|
#define wxSTC_MARK_PLUS 8
|
||||||
|
|
||||||
// Shapes used for outlining column
|
|
||||||
#define wxSTC_MARK_VLINE 9
|
|
||||||
#define wxSTC_MARK_LCORNER 10
|
|
||||||
#define wxSTC_MARK_TCORNER 11
|
|
||||||
#define wxSTC_MARK_BOXPLUS 12
|
|
||||||
#define wxSTC_MARK_BOXPLUSCONNECTED 13
|
|
||||||
#define wxSTC_MARK_BOXMINUS 14
|
|
||||||
#define wxSTC_MARK_BOXMINUSCONNECTED 15
|
|
||||||
#define wxSTC_MARK_LCORNERCURVE 16
|
|
||||||
#define wxSTC_MARK_TCORNERCURVE 17
|
|
||||||
#define wxSTC_MARK_CIRCLEPLUS 18
|
|
||||||
#define wxSTC_MARK_CIRCLEPLUSCONNECTED 19
|
|
||||||
#define wxSTC_MARK_CIRCLEMINUS 20
|
|
||||||
#define wxSTC_MARK_CIRCLEMINUSCONNECTED 21
|
|
||||||
|
|
||||||
// Markers used for outlining column
|
|
||||||
#define wxSTC_MARKNUM_FOLDEREND 25
|
|
||||||
#define wxSTC_MARKNUM_FOLDEROPENMID 26
|
|
||||||
#define wxSTC_MARKNUM_FOLDERMIDTAIL 27
|
|
||||||
#define wxSTC_MARKNUM_FOLDERTAIL 28
|
|
||||||
#define wxSTC_MARKNUM_FOLDERSUB 29
|
|
||||||
#define wxSTC_MARKNUM_FOLDER 30
|
#define wxSTC_MARKNUM_FOLDER 30
|
||||||
#define wxSTC_MARKNUM_FOLDEROPEN 31
|
#define wxSTC_MARKNUM_FOLDEROPEN 31
|
||||||
#define wxSTC_MARGIN_SYMBOL 0
|
#define wxSTC_MARGIN_SYMBOL 0
|
||||||
@@ -112,9 +90,6 @@
|
|||||||
#define wxSTC_CHARSET_ARABIC 178
|
#define wxSTC_CHARSET_ARABIC 178
|
||||||
#define wxSTC_CHARSET_VIETNAMESE 163
|
#define wxSTC_CHARSET_VIETNAMESE 163
|
||||||
#define wxSTC_CHARSET_THAI 222
|
#define wxSTC_CHARSET_THAI 222
|
||||||
#define wxSTC_CASE_MIXED 0
|
|
||||||
#define wxSTC_CASE_UPPER 1
|
|
||||||
#define wxSTC_CASE_LOWER 2
|
|
||||||
#define wxSTC_INDIC_MAX 7
|
#define wxSTC_INDIC_MAX 7
|
||||||
#define wxSTC_INDIC_PLAIN 0
|
#define wxSTC_INDIC_PLAIN 0
|
||||||
#define wxSTC_INDIC_SQUIGGLE 1
|
#define wxSTC_INDIC_SQUIGGLE 1
|
||||||
@@ -134,15 +109,12 @@
|
|||||||
|
|
||||||
// PrintColourMode - force black text on white background for printing.
|
// PrintColourMode - force black text on white background for printing.
|
||||||
#define wxSTC_PRINT_BLACKONWHITE 2
|
#define wxSTC_PRINT_BLACKONWHITE 2
|
||||||
|
#define wxSTC_FIND_DOWN 1
|
||||||
// PrintColourMode - text stays coloured, but all background is forced to be white for printing.
|
|
||||||
#define wxSTC_PRINT_COLOURONWHITE 3
|
|
||||||
|
|
||||||
// PrintColourMode - only the default-background is forced to be white for printing.
|
|
||||||
#define wxSTC_PRINT_COLOURONWHITEDEFAULTBG 4
|
|
||||||
#define wxSTC_FIND_WHOLEWORD 2
|
#define wxSTC_FIND_WHOLEWORD 2
|
||||||
#define wxSTC_FIND_MATCHCASE 4
|
#define wxSTC_FIND_MATCHCASE 4
|
||||||
#define wxSTC_FIND_WORDSTART 0x00100000
|
#define wxSTC_FIND_WORDSTART 0x00100000
|
||||||
|
|
||||||
|
// SCFIND_REGEXP is not yet implemented.
|
||||||
#define wxSTC_FIND_REGEXP 0x00200000
|
#define wxSTC_FIND_REGEXP 0x00200000
|
||||||
#define wxSTC_CMD_UNDO 2176
|
#define wxSTC_CMD_UNDO 2176
|
||||||
#define wxSTC_CMD_CUT 2177
|
#define wxSTC_CMD_CUT 2177
|
||||||
@@ -152,7 +124,6 @@
|
|||||||
#define wxSTC_FOLDLEVELWHITEFLAG 0x1000
|
#define wxSTC_FOLDLEVELWHITEFLAG 0x1000
|
||||||
#define wxSTC_FOLDLEVELHEADERFLAG 0x2000
|
#define wxSTC_FOLDLEVELHEADERFLAG 0x2000
|
||||||
#define wxSTC_FOLDLEVELNUMBERMASK 0x0FFF
|
#define wxSTC_FOLDLEVELNUMBERMASK 0x0FFF
|
||||||
#define wxSTC_TIME_FOREVER 10000000
|
|
||||||
#define wxSTC_CMD_LINEDOWN 2300
|
#define wxSTC_CMD_LINEDOWN 2300
|
||||||
#define wxSTC_CMD_LINEDOWNEXTEND 2301
|
#define wxSTC_CMD_LINEDOWNEXTEND 2301
|
||||||
#define wxSTC_CMD_LINEUP 2302
|
#define wxSTC_CMD_LINEUP 2302
|
||||||
@@ -202,31 +173,15 @@
|
|||||||
#define wxSTC_EDGE_BACKGROUND 2
|
#define wxSTC_EDGE_BACKGROUND 2
|
||||||
|
|
||||||
// Show caret within N lines of edge when it's scrolled to view
|
// Show caret within N lines of edge when it's scrolled to view
|
||||||
// If CARET_SLOP not set then centre caret on screen when it's
|
|
||||||
// scrolled to view
|
|
||||||
#define wxSTC_CARET_SLOP 0x01
|
#define wxSTC_CARET_SLOP 0x01
|
||||||
|
|
||||||
// Value not used
|
// Center caret on screen when it's scrolled to view
|
||||||
#define wxSTC_CARET_CENTER 0x02
|
#define wxSTC_CARET_CENTER 0x02
|
||||||
|
|
||||||
// If CARET_SLOP also set then reposition whenever outside slop border
|
// OR this with CARET_CENTER to reposition even when visible, or
|
||||||
// If CARET_SLOP not set then recentre even when visible
|
// OR this with CARET_SLOP to reposition whenever outside slop border
|
||||||
#define wxSTC_CARET_STRICT 0x04
|
#define wxSTC_CARET_STRICT 0x04
|
||||||
|
|
||||||
// If CARET_XEVEN set then both left and right margins are given equal weight
|
|
||||||
// rather than favouring left following behaviour.
|
|
||||||
#define wxSTC_CARET_XEVEN 0x08
|
|
||||||
|
|
||||||
// If CARET_XJUMPS set then when caret reaches the margin the display jumps
|
|
||||||
// enough to leave the caret solidly within the display.
|
|
||||||
#define wxSTC_CARET_XJUMPS 0x10
|
|
||||||
#define wxSTC_CURSORNORMAL -1
|
|
||||||
#define wxSTC_CURSORWAIT 3
|
|
||||||
|
|
||||||
// Constants for use with SetVisiblePolicy, similar to SetCaretPolicy
|
|
||||||
#define wxSTC_VISIBLE_SLOP 0x01
|
|
||||||
#define wxSTC_VISIBLE_STRICT 0x04
|
|
||||||
|
|
||||||
// Notifications
|
// Notifications
|
||||||
// Type of modification and the action which caused the modification
|
// Type of modification and the action which caused the modification
|
||||||
// These are defined as a bit mask to make it easy to specify which notifications are wanted.
|
// These are defined as a bit mask to make it easy to specify which notifications are wanted.
|
||||||
@@ -286,19 +241,6 @@
|
|||||||
#define wxSTC_LEX_LATEX 14
|
#define wxSTC_LEX_LATEX 14
|
||||||
#define wxSTC_LEX_LUA 15
|
#define wxSTC_LEX_LUA 15
|
||||||
#define wxSTC_LEX_DIFF 16
|
#define wxSTC_LEX_DIFF 16
|
||||||
#define wxSTC_LEX_CONF 17
|
|
||||||
#define wxSTC_LEX_PASCAL 18
|
|
||||||
#define wxSTC_LEX_AVE 19
|
|
||||||
#define wxSTC_LEX_ADA 20
|
|
||||||
#define wxSTC_LEX_LISP 21
|
|
||||||
#define wxSTC_LEX_RUBY 22
|
|
||||||
#define wxSTC_LEX_EIFFEL 23
|
|
||||||
#define wxSTC_LEX_EIFFELKW 24
|
|
||||||
#define wxSTC_LEX_TCL 25
|
|
||||||
|
|
||||||
// When a lexer specifies its language as SCLEX_AUTOMATIC it receives a
|
|
||||||
// value assigned in sequence from SCLEX_AUTOMATIC+1.
|
|
||||||
#define wxSTC_LEX_AUTOMATIC 1000
|
|
||||||
|
|
||||||
// Lexical states for SCLEX_PYTHON
|
// Lexical states for SCLEX_PYTHON
|
||||||
#define wxSTC_P_DEFAULT 0
|
#define wxSTC_P_DEFAULT 0
|
||||||
@@ -331,9 +273,6 @@
|
|||||||
#define wxSTC_C_IDENTIFIER 11
|
#define wxSTC_C_IDENTIFIER 11
|
||||||
#define wxSTC_C_STRINGEOL 12
|
#define wxSTC_C_STRINGEOL 12
|
||||||
#define wxSTC_C_VERBATIM 13
|
#define wxSTC_C_VERBATIM 13
|
||||||
#define wxSTC_C_REGEX 14
|
|
||||||
#define wxSTC_C_COMMENTLINEDOC 15
|
|
||||||
#define wxSTC_C_WORD2 16
|
|
||||||
|
|
||||||
// Lexical states for SCLEX_HTML, SCLEX_XML
|
// Lexical states for SCLEX_HTML, SCLEX_XML
|
||||||
#define wxSTC_H_DEFAULT 0
|
#define wxSTC_H_DEFAULT 0
|
||||||
@@ -361,12 +300,6 @@
|
|||||||
// More HTML
|
// More HTML
|
||||||
#define wxSTC_H_VALUE 19
|
#define wxSTC_H_VALUE 19
|
||||||
|
|
||||||
// X-Code
|
|
||||||
#define wxSTC_H_XCCOMMENT 20
|
|
||||||
|
|
||||||
// SGML
|
|
||||||
#define wxSTC_H_SGML 21
|
|
||||||
|
|
||||||
// Embedded Javascript
|
// Embedded Javascript
|
||||||
#define wxSTC_HJ_START 40
|
#define wxSTC_HJ_START 40
|
||||||
#define wxSTC_HJ_DEFAULT 41
|
#define wxSTC_HJ_DEFAULT 41
|
||||||
@@ -380,7 +313,6 @@
|
|||||||
#define wxSTC_HJ_SINGLESTRING 49
|
#define wxSTC_HJ_SINGLESTRING 49
|
||||||
#define wxSTC_HJ_SYMBOLS 50
|
#define wxSTC_HJ_SYMBOLS 50
|
||||||
#define wxSTC_HJ_STRINGEOL 51
|
#define wxSTC_HJ_STRINGEOL 51
|
||||||
#define wxSTC_HJ_REGEX 52
|
|
||||||
|
|
||||||
// ASP Javascript
|
// ASP Javascript
|
||||||
#define wxSTC_HJA_START 55
|
#define wxSTC_HJA_START 55
|
||||||
@@ -395,7 +327,6 @@
|
|||||||
#define wxSTC_HJA_SINGLESTRING 64
|
#define wxSTC_HJA_SINGLESTRING 64
|
||||||
#define wxSTC_HJA_SYMBOLS 65
|
#define wxSTC_HJA_SYMBOLS 65
|
||||||
#define wxSTC_HJA_STRINGEOL 66
|
#define wxSTC_HJA_STRINGEOL 66
|
||||||
#define wxSTC_HJA_REGEX 67
|
|
||||||
|
|
||||||
// Embedded VBScript
|
// Embedded VBScript
|
||||||
#define wxSTC_HB_START 70
|
#define wxSTC_HB_START 70
|
||||||
@@ -456,12 +387,11 @@
|
|||||||
#define wxSTC_HPHP_VARIABLE 123
|
#define wxSTC_HPHP_VARIABLE 123
|
||||||
#define wxSTC_HPHP_COMMENT 124
|
#define wxSTC_HPHP_COMMENT 124
|
||||||
#define wxSTC_HPHP_COMMENTLINE 125
|
#define wxSTC_HPHP_COMMENTLINE 125
|
||||||
#define wxSTC_HPHP_HSTRING_VARIABLE 126
|
#define wxSTC_HPHP_STRINGEOL 126
|
||||||
#define wxSTC_HPHP_OPERATOR 127
|
|
||||||
|
|
||||||
// Lexical states for SCLEX_PERL
|
// Lexical states for SCLEX_PERL
|
||||||
#define wxSTC_PL_DEFAULT 0
|
#define wxSTC_PL_DEFAULT 0
|
||||||
#define wxSTC_PL_ERROR 1
|
#define wxSTC_PL_HERE 1
|
||||||
#define wxSTC_PL_COMMENTLINE 2
|
#define wxSTC_PL_COMMENTLINE 2
|
||||||
#define wxSTC_PL_POD 3
|
#define wxSTC_PL_POD 3
|
||||||
#define wxSTC_PL_NUMBER 4
|
#define wxSTC_PL_NUMBER 4
|
||||||
@@ -476,20 +406,12 @@
|
|||||||
#define wxSTC_PL_ARRAY 13
|
#define wxSTC_PL_ARRAY 13
|
||||||
#define wxSTC_PL_HASH 14
|
#define wxSTC_PL_HASH 14
|
||||||
#define wxSTC_PL_SYMBOLTABLE 15
|
#define wxSTC_PL_SYMBOLTABLE 15
|
||||||
|
#define wxSTC_PL_REF 16
|
||||||
#define wxSTC_PL_REGEX 17
|
#define wxSTC_PL_REGEX 17
|
||||||
#define wxSTC_PL_REGSUBST 18
|
#define wxSTC_PL_REGSUBST 18
|
||||||
#define wxSTC_PL_LONGQUOTE 19
|
#define wxSTC_PL_LONGQUOTE 19
|
||||||
#define wxSTC_PL_BACKTICKS 20
|
#define wxSTC_PL_BACKTICKS 20
|
||||||
#define wxSTC_PL_DATASECTION 21
|
#define wxSTC_PL_DATASECTION 21
|
||||||
#define wxSTC_PL_HERE_DELIM 22
|
|
||||||
#define wxSTC_PL_HERE_Q 23
|
|
||||||
#define wxSTC_PL_HERE_QQ 24
|
|
||||||
#define wxSTC_PL_HERE_QX 25
|
|
||||||
#define wxSTC_PL_STRING_Q 26
|
|
||||||
#define wxSTC_PL_STRING_QQ 27
|
|
||||||
#define wxSTC_PL_STRING_QX 28
|
|
||||||
#define wxSTC_PL_STRING_QR 29
|
|
||||||
#define wxSTC_PL_STRING_QW 30
|
|
||||||
|
|
||||||
// Lexical states for SCLEX_LATEX
|
// Lexical states for SCLEX_LATEX
|
||||||
#define wxSTC_L_DEFAULT 0
|
#define wxSTC_L_DEFAULT 0
|
||||||
@@ -512,8 +434,6 @@
|
|||||||
#define wxSTC_LUA_OPERATOR 10
|
#define wxSTC_LUA_OPERATOR 10
|
||||||
#define wxSTC_LUA_IDENTIFIER 11
|
#define wxSTC_LUA_IDENTIFIER 11
|
||||||
#define wxSTC_LUA_STRINGEOL 12
|
#define wxSTC_LUA_STRINGEOL 12
|
||||||
|
|
||||||
// Lexical states for SCLEX_ERRORLIST
|
|
||||||
#define wxSTC_ERR_DEFAULT 0
|
#define wxSTC_ERR_DEFAULT 0
|
||||||
#define wxSTC_ERR_PYTHON 1
|
#define wxSTC_ERR_PYTHON 1
|
||||||
#define wxSTC_ERR_GCC 2
|
#define wxSTC_ERR_GCC 2
|
||||||
@@ -521,88 +441,6 @@
|
|||||||
#define wxSTC_ERR_CMD 4
|
#define wxSTC_ERR_CMD 4
|
||||||
#define wxSTC_ERR_BORLAND 5
|
#define wxSTC_ERR_BORLAND 5
|
||||||
#define wxSTC_ERR_PERL 6
|
#define wxSTC_ERR_PERL 6
|
||||||
#define wxSTC_ERR_NET 7
|
|
||||||
#define wxSTC_ERR_LUA 8
|
|
||||||
#define wxSTC_ERR_DIFF_CHANGED 10
|
|
||||||
#define wxSTC_ERR_DIFF_ADDITION 11
|
|
||||||
#define wxSTC_ERR_DIFF_DELETION 12
|
|
||||||
#define wxSTC_ERR_DIFF_MESSAGE 13
|
|
||||||
|
|
||||||
// Lexical states for SCLEX_BATCH
|
|
||||||
#define wxSTC_BAT_DEFAULT 0
|
|
||||||
#define wxSTC_BAT_COMMENT 1
|
|
||||||
#define wxSTC_BAT_WORD 2
|
|
||||||
#define wxSTC_BAT_LABEL 3
|
|
||||||
#define wxSTC_BAT_HIDE 4
|
|
||||||
#define wxSTC_BAT_COMMAND 5
|
|
||||||
#define wxSTC_BAT_IDENTIFIER 6
|
|
||||||
#define wxSTC_BAT_OPERATOR 7
|
|
||||||
|
|
||||||
// Lexical states for SCLEX_MAKEFILE
|
|
||||||
#define wxSTC_MAKE_DEFAULT 0
|
|
||||||
#define wxSTC_MAKE_COMMENT 1
|
|
||||||
#define wxSTC_MAKE_PREPROCESSOR 2
|
|
||||||
#define wxSTC_MAKE_IDENTIFIER 3
|
|
||||||
#define wxSTC_MAKE_OPERATOR 4
|
|
||||||
#define wxSTC_MAKE_TARGET 5
|
|
||||||
#define wxSTC_MAKE_IDEOL 9
|
|
||||||
|
|
||||||
// Lexical states for the SCLEX_CONF (Apache Configuration Files Lexer)
|
|
||||||
#define wxSTC_CONF_DEFAULT 0
|
|
||||||
#define wxSTC_CONF_COMMENT 1
|
|
||||||
#define wxSTC_CONF_NUMBER 2
|
|
||||||
#define wxSTC_CONF_IDENTIFIER 3
|
|
||||||
#define wxSTC_CONF_EXTENSION 4
|
|
||||||
#define wxSTC_CONF_PARAMETER 5
|
|
||||||
#define wxSTC_CONF_STRING 6
|
|
||||||
#define wxSTC_CONF_OPERATOR 7
|
|
||||||
#define wxSTC_CONF_IP 8
|
|
||||||
#define wxSTC_CONF_DIRECTIVE 9
|
|
||||||
|
|
||||||
// Avenue
|
|
||||||
#define wxSTC_AVE_DEFAULT 0
|
|
||||||
#define wxSTC_AVE_COMMENT 1
|
|
||||||
#define wxSTC_AVE_NUMBER 2
|
|
||||||
#define wxSTC_AVE_WORD 3
|
|
||||||
#define wxSTC_AVE_KEYWORD 4
|
|
||||||
#define wxSTC_AVE_STATEMENT 5
|
|
||||||
#define wxSTC_AVE_STRING 6
|
|
||||||
#define wxSTC_AVE_ENUM 7
|
|
||||||
#define wxSTC_AVE_STRINGEOL 8
|
|
||||||
#define wxSTC_AVE_IDENTIFIER 9
|
|
||||||
#define wxSTC_AVE_OPERATOR 10
|
|
||||||
|
|
||||||
// Lexical states for SCLEX_ADA
|
|
||||||
#define wxSTC_ADA_DEFAULT 0
|
|
||||||
#define wxSTC_ADA_COMMENT 1
|
|
||||||
#define wxSTC_ADA_NUMBER 2
|
|
||||||
#define wxSTC_ADA_WORD 3
|
|
||||||
#define wxSTC_ADA_STRING 4
|
|
||||||
#define wxSTC_ADA_CHARACTER 5
|
|
||||||
#define wxSTC_ADA_OPERATOR 6
|
|
||||||
#define wxSTC_ADA_IDENTIFIER 7
|
|
||||||
#define wxSTC_ADA_STRINGEOL 8
|
|
||||||
|
|
||||||
// Lexical states for SCLEX_LISP
|
|
||||||
#define wxSTC_LISP_DEFAULT 0
|
|
||||||
#define wxSTC_LISP_COMMENT 1
|
|
||||||
#define wxSTC_LISP_NUMBER 2
|
|
||||||
#define wxSTC_LISP_KEYWORD 3
|
|
||||||
#define wxSTC_LISP_STRING 6
|
|
||||||
#define wxSTC_LISP_STRINGEOL 8
|
|
||||||
#define wxSTC_LISP_IDENTIFIER 9
|
|
||||||
#define wxSTC_LISP_OPERATOR 10
|
|
||||||
|
|
||||||
// Lexical states for SCLEX_EIFFEL and SCLEX_EIFFELKW
|
|
||||||
#define wxSTC_EIFFEL_DEFAULT 0
|
|
||||||
#define wxSTC_EIFFEL_COMMENTLINE 1
|
|
||||||
#define wxSTC_EIFFEL_NUMBER 2
|
|
||||||
#define wxSTC_EIFFEL_WORD 3
|
|
||||||
#define wxSTC_EIFFEL_STRING 4
|
|
||||||
#define wxSTC_EIFFEL_CHARACTER 5
|
|
||||||
#define wxSTC_EIFFEL_OPERATOR 6
|
|
||||||
#define wxSTC_EIFFEL_IDENTIFIER 7
|
|
||||||
#define wxSTC_EIFFEL_STRINGEOL 8
|
|
||||||
|
|
||||||
// END of generated section
|
// END of generated section
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
@@ -718,10 +556,6 @@ public:
|
|||||||
// Find the position from a point within the window.
|
// Find the position from a point within the window.
|
||||||
int PositionFromPoint(wxPoint pt);
|
int PositionFromPoint(wxPoint pt);
|
||||||
|
|
||||||
// Find the position from a point within the window but return
|
|
||||||
// INVALID_POSITION if not close to text.
|
|
||||||
int PositionFromPointClose(int x, int y);
|
|
||||||
|
|
||||||
// Set caret to start of a line and ensure it is visible.
|
// Set caret to start of a line and ensure it is visible.
|
||||||
void GotoLine(int line);
|
void GotoLine(int line);
|
||||||
|
|
||||||
@@ -739,8 +573,8 @@ public:
|
|||||||
// Retrieve the position of the last correctly styled character.
|
// Retrieve the position of the last correctly styled character.
|
||||||
int GetEndStyled();
|
int GetEndStyled();
|
||||||
|
|
||||||
// Convert all line endings in the document to one mode.
|
// Convert all line endings in the document to use the current mode.
|
||||||
void ConvertEOLs(int eolMode);
|
void ConvertEOLs();
|
||||||
|
|
||||||
// Retrieve the current end of line mode - one of CRLF, CR, or LF.
|
// Retrieve the current end of line mode - one of CRLF, CR, or LF.
|
||||||
int GetEOLMode();
|
int GetEOLMode();
|
||||||
@@ -859,9 +693,6 @@ public:
|
|||||||
// Set a style to be underlined or not.
|
// Set a style to be underlined or not.
|
||||||
void StyleSetUnderline(int style, bool underline);
|
void StyleSetUnderline(int style, bool underline);
|
||||||
|
|
||||||
// Set a style to be mixed case, or to force upper or lower case.
|
|
||||||
void StyleSetCase(int style, int caseForce);
|
|
||||||
|
|
||||||
// Set the foreground colour of the selection and whether to use this setting.
|
// Set the foreground colour of the selection and whether to use this setting.
|
||||||
void SetSelForeground(bool useSetting, const wxColour& fore);
|
void SetSelForeground(bool useSetting, const wxColour& fore);
|
||||||
|
|
||||||
@@ -932,18 +763,6 @@ public:
|
|||||||
// Retrieve the last line number that has line state.
|
// Retrieve the last line number that has line state.
|
||||||
int GetMaxLineState();
|
int GetMaxLineState();
|
||||||
|
|
||||||
// Is the background of the line containing the caret in a different colour?
|
|
||||||
bool GetCaretLineVisible();
|
|
||||||
|
|
||||||
// Display the background of the line containing the caret in a different colour.
|
|
||||||
void SetCaretLineVisible(bool show);
|
|
||||||
|
|
||||||
// Get the colour of the background of the line containing the caret.
|
|
||||||
wxColour GetCaretLineBack();
|
|
||||||
|
|
||||||
// Set the colour of the background of the line containing the caret.
|
|
||||||
void SetCaretLineBack(const wxColour& back);
|
|
||||||
|
|
||||||
// Display a auto-completion list.
|
// Display a auto-completion list.
|
||||||
// The lenEntered parameter indicates how many characters before
|
// The lenEntered parameter indicates how many characters before
|
||||||
// the caret should be used to provide context.
|
// the caret should be used to provide context.
|
||||||
@@ -997,15 +816,6 @@ public:
|
|||||||
// Retrieve state of ignore case flag.
|
// Retrieve state of ignore case flag.
|
||||||
bool AutoCompGetIgnoreCase();
|
bool AutoCompGetIgnoreCase();
|
||||||
|
|
||||||
// Display a list of strings and send notification when user chooses one.
|
|
||||||
void UserListShow(int listType, const wxString& itemList);
|
|
||||||
|
|
||||||
// Set whether or not autocompletion is hidden automatically when nothing matches
|
|
||||||
void AutoCompSetAutoHide(bool autoHide);
|
|
||||||
|
|
||||||
// Retrieve whether or not autocompletion is hidden automatically when nothing matches
|
|
||||||
bool AutoCompGetAutoHide();
|
|
||||||
|
|
||||||
// Set the number of spaces used for one level of indentation.
|
// Set the number of spaces used for one level of indentation.
|
||||||
void SetIndent(int indentSize);
|
void SetIndent(int indentSize);
|
||||||
|
|
||||||
@@ -1113,13 +923,13 @@ public:
|
|||||||
int GetLineCount();
|
int GetLineCount();
|
||||||
|
|
||||||
// Sets the size in pixels of the left margin.
|
// Sets the size in pixels of the left margin.
|
||||||
void SetMarginLeft(int pixelWidth);
|
void SetMarginLeft(int width);
|
||||||
|
|
||||||
// Returns the size in pixels of the left margin.
|
// Returns the size in pixels of the left margin.
|
||||||
int GetMarginLeft();
|
int GetMarginLeft();
|
||||||
|
|
||||||
// Sets the size in pixels of the right margin.
|
// Sets the size in pixels of the right margin.
|
||||||
void SetMarginRight(int pixelWidth);
|
void SetMarginRight(int width);
|
||||||
|
|
||||||
// Returns the size in pixels of the right margin.
|
// Returns the size in pixels of the right margin.
|
||||||
int GetMarginRight();
|
int GetMarginRight();
|
||||||
@@ -1196,48 +1006,6 @@ public:
|
|||||||
// Returns true if overtype mode is active otherwise false is returned.
|
// Returns true if overtype mode is active otherwise false is returned.
|
||||||
bool GetOvertype();
|
bool GetOvertype();
|
||||||
|
|
||||||
// Set the width of the insert mode caret
|
|
||||||
void SetCaretWidth(int pixelWidth);
|
|
||||||
|
|
||||||
// Returns the width of the insert mode caret
|
|
||||||
int GetCaretWidth();
|
|
||||||
|
|
||||||
// Sets the position that starts the target which is used for updating the
|
|
||||||
// document without affecting the scroll position.
|
|
||||||
void SetTargetStart(int pos);
|
|
||||||
|
|
||||||
// Get the position that starts the target.
|
|
||||||
int GetTargetStart();
|
|
||||||
|
|
||||||
// Sets the position that ends the target which is used for updating the
|
|
||||||
// document without affecting the scroll position.
|
|
||||||
void SetTargetEnd(int pos);
|
|
||||||
|
|
||||||
// Get the position that ends the target.
|
|
||||||
int GetTargetEnd();
|
|
||||||
|
|
||||||
// Replace the target text with the argument text.
|
|
||||||
// Returns the length of the replacement text.
|
|
||||||
int ReplaceTarget(const wxString& text);
|
|
||||||
|
|
||||||
// Replace the target text with the argument text after \d processing.
|
|
||||||
// Looks for \d where d is between 1 and 9 and replaces these with the strings
|
|
||||||
// matched in the last search operation which were surrounded by \( and \).
|
|
||||||
// Returns the length of the replacement text including any change
|
|
||||||
// caused by processing the \d patterns.
|
|
||||||
int ReplaceTargetRE(const wxString& text);
|
|
||||||
|
|
||||||
// Search for a counted string in the target and set the target to the found
|
|
||||||
// range.
|
|
||||||
// Returns length of range or -1 for failure in which case target is not moved.
|
|
||||||
int SearchInTarget(const wxString& text);
|
|
||||||
|
|
||||||
// Set the search flags used by SearchInTarget
|
|
||||||
void SetSearchFlags(int flags);
|
|
||||||
|
|
||||||
// Get the search flags used by SearchInTarget
|
|
||||||
int GetSearchFlags();
|
|
||||||
|
|
||||||
// Show a call tip containing a definition near position pos.
|
// Show a call tip containing a definition near position pos.
|
||||||
void CallTipShow(int pos, const wxString& definition);
|
void CallTipShow(int pos, const wxString& definition);
|
||||||
|
|
||||||
@@ -1300,31 +1068,6 @@ public:
|
|||||||
// Set some debugging options for folding
|
// Set some debugging options for folding
|
||||||
void SetFoldFlags(int flags);
|
void SetFoldFlags(int flags);
|
||||||
|
|
||||||
// Ensure a particular line is visible by expanding any header line hiding it.
|
|
||||||
// Use the currently set visibility policy to determine which range to display.
|
|
||||||
void EnsureVisibleEnforcePolicy(int line);
|
|
||||||
|
|
||||||
// Sets whether a tab pressed when caret is within indentation indents
|
|
||||||
void SetTabIndents(bool tabIndents);
|
|
||||||
|
|
||||||
// Does a tab pressed when caret is within indentation indent?
|
|
||||||
bool GetTabIndents();
|
|
||||||
|
|
||||||
// Sets whether a backspace pressed when caret is within indentation unindents
|
|
||||||
void SetBackSpaceUnIndents(bool bsUnIndents);
|
|
||||||
|
|
||||||
// Does a backspace pressed when caret is within indentation unindent?
|
|
||||||
bool GetBackSpaceUnIndents();
|
|
||||||
|
|
||||||
// Sets the time the mouse must sit still to generate a mouse dwell event
|
|
||||||
void SetMouseDwellTime(int periodMilliseconds);
|
|
||||||
|
|
||||||
// Retrieve the time the mouse must sit still to generate a mouse dwell event
|
|
||||||
int GetMouseDwellTime();
|
|
||||||
|
|
||||||
// Move the caret inside current view if it's not there already
|
|
||||||
void MoveCaretInsideView();
|
|
||||||
|
|
||||||
// How many characters are on a line, not including end of line characters.
|
// How many characters are on a line, not including end of line characters.
|
||||||
int LineLength(int line);
|
int LineLength(int line);
|
||||||
|
|
||||||
@@ -1376,11 +1119,9 @@ public:
|
|||||||
void SearchAnchor();
|
void SearchAnchor();
|
||||||
|
|
||||||
// Find some text starting at the search anchor.
|
// Find some text starting at the search anchor.
|
||||||
// Does not ensure the selection is visible.
|
|
||||||
int SearchNext(int flags, const wxString& text);
|
int SearchNext(int flags, const wxString& text);
|
||||||
|
|
||||||
// Find some text starting at the search anchor and moving backwards.
|
// Find some text starting at the search anchor and moving backwards.
|
||||||
// Does not ensure the selection is visible.
|
|
||||||
int SearchPrev(int flags, const wxString& text);
|
int SearchPrev(int flags, const wxString& text);
|
||||||
|
|
||||||
// Set the way the line the caret is on is kept visible.
|
// Set the way the line the caret is on is kept visible.
|
||||||
@@ -1416,51 +1157,6 @@ public:
|
|||||||
// Get which document modification events are sent to the container.
|
// Get which document modification events are sent to the container.
|
||||||
int GetModEventMask();
|
int GetModEventMask();
|
||||||
|
|
||||||
// Change internal focus flag
|
|
||||||
void SetFocus(bool focus);
|
|
||||||
|
|
||||||
// Get internal focus flag
|
|
||||||
bool GetFocus();
|
|
||||||
|
|
||||||
// Change error status - 0 = OK
|
|
||||||
void SetStatus(int statusCode);
|
|
||||||
|
|
||||||
// Get error status
|
|
||||||
int GetStatus();
|
|
||||||
|
|
||||||
// Set whether the mouse is captured when its button is pressed
|
|
||||||
void SetMouseDownCaptures(bool captures);
|
|
||||||
|
|
||||||
// Get whether mouse gets captured
|
|
||||||
bool GetMouseDownCaptures();
|
|
||||||
|
|
||||||
// Sets the cursor to one of the SC_CURSOR* values
|
|
||||||
void SetCursor(int cursorType);
|
|
||||||
|
|
||||||
// Get cursor type
|
|
||||||
int GetCursor();
|
|
||||||
|
|
||||||
// Move to the previous change in capitalistion
|
|
||||||
void WordPartLeft();
|
|
||||||
|
|
||||||
// Move to the previous change in capitalistion extending selection to new caret position.
|
|
||||||
void WordPartLeftExtend();
|
|
||||||
|
|
||||||
// Move to the change next in capitalistion
|
|
||||||
void WordPartRight();
|
|
||||||
|
|
||||||
// Move to the next change in capitalistion extending selection to new caret position.
|
|
||||||
void WordPartRightExtend();
|
|
||||||
|
|
||||||
// Set the way the display area is determined when a particular line is to be moved to.
|
|
||||||
void SetVisiblePolicy(int visiblePolicy, int visibleSlop);
|
|
||||||
|
|
||||||
// Delete back from the current position to the start of the line
|
|
||||||
void DelLineLeft();
|
|
||||||
|
|
||||||
// Delete forwards from the current position to the end of the line
|
|
||||||
void DelLineRight();
|
|
||||||
|
|
||||||
// Start notifying the container of all key presses and commands.
|
// Start notifying the container of all key presses and commands.
|
||||||
void StartRecord();
|
void StartRecord();
|
||||||
|
|
||||||
@@ -1482,9 +1178,6 @@ public:
|
|||||||
// Set up the key words used by the lexer.
|
// Set up the key words used by the lexer.
|
||||||
void SetKeyWords(int keywordSet, const wxString& keyWords);
|
void SetKeyWords(int keywordSet, const wxString& keyWords);
|
||||||
|
|
||||||
// Set the lexing language of the document based on string name.
|
|
||||||
void SetLexerLanguage(const wxString& language);
|
|
||||||
|
|
||||||
// END of generated section
|
// END of generated section
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// Others...
|
// Others...
|
||||||
@@ -1550,10 +1243,6 @@ public:
|
|||||||
// Scroll enough to make the given column visible
|
// Scroll enough to make the given column visible
|
||||||
void ScrollToColumn(int column);
|
void ScrollToColumn(int column);
|
||||||
|
|
||||||
|
|
||||||
// Send a message to Scintilla
|
|
||||||
long SendMsg(int msg, long wp=0, long lp=0);
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
@@ -1566,7 +1255,7 @@ private:
|
|||||||
void OnMouseLeftDown(wxMouseEvent& evt);
|
void OnMouseLeftDown(wxMouseEvent& evt);
|
||||||
void OnMouseMove(wxMouseEvent& evt);
|
void OnMouseMove(wxMouseEvent& evt);
|
||||||
void OnMouseLeftUp(wxMouseEvent& evt);
|
void OnMouseLeftUp(wxMouseEvent& evt);
|
||||||
void OnContextMenu(wxContextMenuEvent& evt);
|
void OnMouseRightUp(wxMouseEvent& evt);
|
||||||
void OnMouseWheel(wxMouseEvent& evt);
|
void OnMouseWheel(wxMouseEvent& evt);
|
||||||
void OnChar(wxKeyEvent& evt);
|
void OnChar(wxKeyEvent& evt);
|
||||||
void OnKeyDown(wxKeyEvent& evt);
|
void OnKeyDown(wxKeyEvent& evt);
|
||||||
@@ -1582,6 +1271,8 @@ private:
|
|||||||
void NotifyChange();
|
void NotifyChange();
|
||||||
void NotifyParent(SCNotification* scn);
|
void NotifyParent(SCNotification* scn);
|
||||||
|
|
||||||
|
long SendMsg(int msg, long wp=0, long lp=0);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
DECLARE_CLASS(wxStyledTextCtrl)
|
DECLARE_CLASS(wxStyledTextCtrl)
|
||||||
@@ -1616,9 +1307,6 @@ public:
|
|||||||
void SetMessage(int val) { m_message = val; }
|
void SetMessage(int val) { m_message = val; }
|
||||||
void SetWParam(int val) { m_wParam = val; }
|
void SetWParam(int val) { m_wParam = val; }
|
||||||
void SetLParam(int val) { m_lParam = val; }
|
void SetLParam(int val) { m_lParam = val; }
|
||||||
void SetListType(int val) { m_listType = val; }
|
|
||||||
void SetX(int val) { m_x = val; }
|
|
||||||
void SetY(int val) { m_y = val; }
|
|
||||||
|
|
||||||
int GetPosition() const { return m_position; }
|
int GetPosition() const { return m_position; }
|
||||||
int GetKey() const { return m_key; }
|
int GetKey() const { return m_key; }
|
||||||
@@ -1634,9 +1322,6 @@ public:
|
|||||||
int GetMessage() const { return m_message; }
|
int GetMessage() const { return m_message; }
|
||||||
int GetWParam() const { return m_wParam; }
|
int GetWParam() const { return m_wParam; }
|
||||||
int GetLParam() const { return m_lParam; }
|
int GetLParam() const { return m_lParam; }
|
||||||
int GetListType() const { return m_listType; }
|
|
||||||
int GetX() const { return m_x; }
|
|
||||||
int GetY() const { return m_y; }
|
|
||||||
|
|
||||||
bool GetShift() const;
|
bool GetShift() const;
|
||||||
bool GetControl() const;
|
bool GetControl() const;
|
||||||
@@ -1665,56 +1350,42 @@ private:
|
|||||||
int m_message; // wxEVT_STC_MACRORECORD
|
int m_message; // wxEVT_STC_MACRORECORD
|
||||||
int m_wParam;
|
int m_wParam;
|
||||||
int m_lParam;
|
int m_lParam;
|
||||||
|
|
||||||
int m_listType;
|
|
||||||
int m_x;
|
|
||||||
int m_y;
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef SWIG
|
#ifndef SWIG
|
||||||
BEGIN_DECLARE_EVENT_TYPES()
|
BEGIN_DECLARE_EVENT_TYPES()
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHANGE, 1650)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHANGE, 1650)
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_STYLENEEDED, 1651)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_STYLENEEDED, 1651)
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHARADDED, 1652)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHARADDED, 1652)
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_SAVEPOINTREACHED, 1653)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_UPDATEUI, 1653)
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_SAVEPOINTLEFT, 1654)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_SAVEPOINTREACHED, 1654)
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_ROMODIFYATTEMPT, 1655)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_SAVEPOINTLEFT, 1655)
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_KEY, 1656)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_ROMODIFYATTEMPT, 1656)
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DOUBLECLICK, 1657)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DOUBLECLICK, 1657)
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_UPDATEUI, 1658)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MODIFIED, 1658)
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MODIFIED, 1659)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_KEY, 1659)
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MACRORECORD, 1660)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MACRORECORD, 1660)
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MARGINCLICK, 1661)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MARGINCLICK, 1661)
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_NEEDSHOWN, 1662)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_NEEDSHOWN, 1662)
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_POSCHANGED, 1663)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_POSCHANGED, 1663)
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_PAINTED, 1664)
|
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_USERLISTSELECTION, 1665)
|
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_URIDROPPED, 1666)
|
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DWELLSTART, 1667)
|
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DWELLEND, 1668)
|
|
||||||
END_DECLARE_EVENT_TYPES()
|
END_DECLARE_EVENT_TYPES()
|
||||||
#else
|
#else
|
||||||
enum {
|
enum {
|
||||||
wxEVT_STC_CHANGE,
|
wxEVT_STC_CHANGE,
|
||||||
wxEVT_STC_STYLENEEDED,
|
wxEVT_STC_STYLENEEDED,
|
||||||
wxEVT_STC_CHARADDED,
|
wxEVT_STC_CHARADDED,
|
||||||
|
wxEVT_STC_UPDATEUI,
|
||||||
wxEVT_STC_SAVEPOINTREACHED,
|
wxEVT_STC_SAVEPOINTREACHED,
|
||||||
wxEVT_STC_SAVEPOINTLEFT,
|
wxEVT_STC_SAVEPOINTLEFT,
|
||||||
wxEVT_STC_ROMODIFYATTEMPT,
|
wxEVT_STC_ROMODIFYATTEMPT,
|
||||||
wxEVT_STC_KEY,
|
|
||||||
wxEVT_STC_DOUBLECLICK,
|
wxEVT_STC_DOUBLECLICK,
|
||||||
wxEVT_STC_UPDATEUI,
|
|
||||||
wxEVT_STC_MODIFIED,
|
wxEVT_STC_MODIFIED,
|
||||||
|
wxEVT_STC_KEY,
|
||||||
wxEVT_STC_MACRORECORD,
|
wxEVT_STC_MACRORECORD,
|
||||||
wxEVT_STC_MARGINCLICK,
|
wxEVT_STC_MARGINCLICK,
|
||||||
wxEVT_STC_NEEDSHOWN,
|
wxEVT_STC_NEEDSHOWN,
|
||||||
wxEVT_STC_POSCHANGED,
|
wxEVT_STC_POSCHANGED
|
||||||
wxEVT_STC_PAINTED,
|
|
||||||
wxEVT_STC_USERLISTSELECTION,
|
|
||||||
wxEVT_STC_URIDROPPED,
|
|
||||||
wxEVT_STC_DWELLSTART,
|
|
||||||
wxEVT_STC_DWELLEND,
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1723,26 +1394,20 @@ END_DECLARE_EVENT_TYPES()
|
|||||||
#ifndef SWIG
|
#ifndef SWIG
|
||||||
typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
|
typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
|
||||||
|
|
||||||
#define EVT_STC_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#define EVT_STC_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#define EVT_STC_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#define EVT_STC_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#define EVT_STC_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#define EVT_STC_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#define EVT_STC_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#define EVT_STC_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#define EVT_STC_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#define EVT_STC_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#define EVT_STC_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#define EVT_STC_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#define EVT_STC_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#define EVT_STC_POSCHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_POSCHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#define EVT_STC_PAINTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_PAINTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
|
||||||
#define EVT_STC_USERLISTSELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_USERLISTSELECTION, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
|
||||||
#define EVT_STC_URIDROPPED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
|
||||||
#define EVT_STC_DWELLSTART(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
|
||||||
#define EVT_STC_DWELLEND(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -77,6 +77,7 @@ public:
|
|||||||
wxXmlProperty(const wxString& name, const wxString& value,
|
wxXmlProperty(const wxString& name, const wxString& value,
|
||||||
wxXmlProperty *next)
|
wxXmlProperty *next)
|
||||||
: m_name(name), m_value(value), m_next(next) {}
|
: m_name(name), m_value(value), m_next(next) {}
|
||||||
|
~wxXmlProperty() { delete m_next; }
|
||||||
|
|
||||||
wxString GetName() const { return m_name; }
|
wxString GetName() const { return m_name; }
|
||||||
wxString GetValue() const { return m_value; }
|
wxString GetValue() const { return m_value; }
|
||||||
@@ -115,7 +116,7 @@ public:
|
|||||||
wxXmlNode(wxXmlNode *parent,wxXmlNodeType type,
|
wxXmlNode(wxXmlNode *parent,wxXmlNodeType type,
|
||||||
const wxString& name, const wxString& content,
|
const wxString& name, const wxString& content,
|
||||||
wxXmlProperty *props, wxXmlNode *next);
|
wxXmlProperty *props, wxXmlNode *next);
|
||||||
~wxXmlNode();
|
~wxXmlNode() { delete m_properties; delete m_next; delete m_children; }
|
||||||
|
|
||||||
// copy ctor & operator=. Note that this does NOT copy syblings
|
// copy ctor & operator=. Note that this does NOT copy syblings
|
||||||
// and parent pointer, i.e. m_parent and m_next will be NULL
|
// and parent pointer, i.e. m_parent and m_next will be NULL
|
||||||
|
@@ -154,7 +154,7 @@ public:
|
|||||||
// Returns numeric ID that is equivalent to string id used in XML
|
// Returns numeric ID that is equivalent to string id used in XML
|
||||||
// resource. To be used in event tables
|
// resource. To be used in event tables
|
||||||
// Macro XMLID is provided for convenience
|
// Macro XMLID is provided for convenience
|
||||||
static int GetXMLID(const wxChar *str_id);
|
static int GetXMLID(const char *str_id);
|
||||||
|
|
||||||
// Returns version info (a.b.c.d = d+ 256*c + 256^2*b + 256^3*a)
|
// Returns version info (a.b.c.d = d+ 256*c + 256^2*b + 256^3*a)
|
||||||
long GetVersion() const { return m_version; }
|
long GetVersion() const { return m_version; }
|
||||||
@@ -176,6 +176,10 @@ protected:
|
|||||||
// Creates resource from info in given node:
|
// Creates resource from info in given node:
|
||||||
wxObject *CreateResFromNode(wxXmlNode *node, wxObject *parent, wxObject *instance = NULL);
|
wxObject *CreateResFromNode(wxXmlNode *node, wxObject *parent, wxObject *instance = NULL);
|
||||||
|
|
||||||
|
// Remove nodes with property "platform" that does not
|
||||||
|
// match current platform
|
||||||
|
void ProcessPlatformProperty(wxXmlNode *node);
|
||||||
|
|
||||||
bool GetUseLocale() { return m_useLocale; }
|
bool GetUseLocale() { return m_useLocale; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -343,9 +347,7 @@ protected:
|
|||||||
{ return m_resource->CreateResFromNode(node, parent, instance); }
|
{ return m_resource->CreateResFromNode(node, parent, instance); }
|
||||||
|
|
||||||
// helper
|
// helper
|
||||||
#if wxUSE_FILESYSTEM
|
|
||||||
wxFileSystem& GetCurFileSystem() { return m_resource->GetCurFileSystem(); }
|
wxFileSystem& GetCurFileSystem() { return m_resource->GetCurFileSystem(); }
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define ADD_STYLE(style) AddStyle(wxT(#style), style)
|
#define ADD_STYLE(style) AddStyle(wxT(#style), style)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
CONTRIB_SAMPLES=mmedia ogl stc gizmos canvas xrc plot applet fl
|
CONTRIB_SAMPLES=mmedia ogl stc gizmos canvas xrc plot applet
|
||||||
|
|
||||||
all:
|
all:
|
||||||
@for d in $(CONTRIB_SAMPLES); do (cd $$d && $(MAKE)); done
|
@for d in $(CONTRIB_SAMPLES); do (cd $$d && $(MAKE)); done
|
||||||
|
@@ -1,223 +0,0 @@
|
|||||||
# Microsoft Developer Studio Project File - Name="AniTestVC" - Package Owner=<4>
|
|
||||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
|
||||||
# ** DO NOT EDIT **
|
|
||||||
|
|
||||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
|
||||||
|
|
||||||
CFG=AniTestVC - Win32 UnivDebug
|
|
||||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
|
||||||
!MESSAGE use the Export Makefile command and run
|
|
||||||
!MESSAGE
|
|
||||||
!MESSAGE NMAKE /f "AniTestVC.mak".
|
|
||||||
!MESSAGE
|
|
||||||
!MESSAGE You can specify a configuration when running NMAKE
|
|
||||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
|
||||||
!MESSAGE
|
|
||||||
!MESSAGE NMAKE /f "AniTestVC.mak" CFG="AniTestVC - Win32 UnivDebug"
|
|
||||||
!MESSAGE
|
|
||||||
!MESSAGE Possible choices for configuration are:
|
|
||||||
!MESSAGE
|
|
||||||
!MESSAGE "AniTestVC - Win32 Release" (based on "Win32 (x86) Application")
|
|
||||||
!MESSAGE "AniTestVC - Win32 Debug" (based on "Win32 (x86) Application")
|
|
||||||
!MESSAGE "AniTestVC - Win32 Debug DLL" (based on "Win32 (x86) Application")
|
|
||||||
!MESSAGE "AniTestVC - Win32 Release DLL" (based on "Win32 (x86) Application")
|
|
||||||
!MESSAGE "AniTestVC - Win32 UnivRelease" (based on "Win32 (x86) Application")
|
|
||||||
!MESSAGE "AniTestVC - Win32 UnivDebug" (based on "Win32 (x86) Application")
|
|
||||||
!MESSAGE
|
|
||||||
|
|
||||||
# Begin Project
|
|
||||||
# PROP AllowPerConfigDependencies 0
|
|
||||||
# PROP Scc_ProjName ""
|
|
||||||
# PROP Scc_LocalPath ""
|
|
||||||
CPP=cl.exe
|
|
||||||
MTL=midl.exe
|
|
||||||
RSC=rc.exe
|
|
||||||
|
|
||||||
!IF "$(CFG)" == "AniTestVC - Win32 Release"
|
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
|
||||||
# PROP BASE Use_Debug_Libraries 0
|
|
||||||
# PROP BASE Output_Dir "Release"
|
|
||||||
# PROP BASE Intermediate_Dir "Release"
|
|
||||||
# PROP BASE Target_Dir ""
|
|
||||||
# PROP Use_MFC 0
|
|
||||||
# PROP Use_Debug_Libraries 0
|
|
||||||
# PROP Output_Dir "Release"
|
|
||||||
# PROP Intermediate_Dir "Release"
|
|
||||||
# PROP Ignore_Export_Lib 0
|
|
||||||
# PROP Target_Dir ""
|
|
||||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
|
||||||
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
|
|
||||||
# SUBTRACT CPP /YX
|
|
||||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
|
||||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
|
||||||
# ADD BASE RSC /l 0x809 /d "NDEBUG"
|
|
||||||
# ADD RSC /l 0x809 /d "NDEBUG"
|
|
||||||
BSC32=bscmake.exe
|
|
||||||
# ADD BASE BSC32 /nologo
|
|
||||||
# ADD BSC32 /nologo
|
|
||||||
LINK32=link.exe
|
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386
|
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib png.lib zlib.lib jpeg.lib tiff.lib regex.lib anim.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/anitest.exe" /libpath:"../../../lib"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "AniTestVC - Win32 Debug"
|
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
|
||||||
# PROP BASE Use_Debug_Libraries 1
|
|
||||||
# PROP BASE Output_Dir "Debug"
|
|
||||||
# PROP BASE Intermediate_Dir "Debug"
|
|
||||||
# PROP BASE Target_Dir ""
|
|
||||||
# PROP Use_MFC 0
|
|
||||||
# PROP Use_Debug_Libraries 1
|
|
||||||
# PROP Output_Dir "Debug"
|
|
||||||
# PROP Intermediate_Dir "Debug"
|
|
||||||
# PROP Ignore_Export_Lib 0
|
|
||||||
# PROP Target_Dir ""
|
|
||||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
|
||||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
|
||||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
|
||||||
# ADD BASE RSC /l 0x809 /d "_DEBUG"
|
|
||||||
# ADD RSC /l 0x809 /d "_DEBUG"
|
|
||||||
BSC32=bscmake.exe
|
|
||||||
# ADD BASE BSC32 /nologo
|
|
||||||
# ADD BSC32 /nologo
|
|
||||||
LINK32=link.exe
|
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib animd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/anitest.exe" /pdbtype:sept /libpath:"../../../lib"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "AniTestVC - Win32 Debug DLL"
|
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
|
||||||
# PROP BASE Use_Debug_Libraries 1
|
|
||||||
# PROP BASE Output_Dir "DebugDLL"
|
|
||||||
# PROP BASE Intermediate_Dir "DebugDLL"
|
|
||||||
# PROP BASE Target_Dir ""
|
|
||||||
# PROP Use_MFC 0
|
|
||||||
# PROP Use_Debug_Libraries 1
|
|
||||||
# PROP Output_Dir "DebugDLL"
|
|
||||||
# PROP Intermediate_Dir "DebugDLL"
|
|
||||||
# PROP Ignore_Export_Lib 0
|
|
||||||
# PROP Target_Dir ""
|
|
||||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
|
||||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c
|
|
||||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
|
||||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
|
||||||
# ADD BASE RSC /l 0x809 /d "_DEBUG"
|
|
||||||
# ADD RSC /l 0x809 /d "_DEBUG"
|
|
||||||
BSC32=bscmake.exe
|
|
||||||
# ADD BASE BSC32 /nologo
|
|
||||||
# ADD BSC32 /nologo
|
|
||||||
LINK32=link.exe
|
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx23_2d.lib animd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/anitest.exe" /pdbtype:sept /libpath:"../../../lib"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "AniTestVC - Win32 Release DLL"
|
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
|
||||||
# PROP BASE Use_Debug_Libraries 0
|
|
||||||
# PROP BASE Output_Dir "ReleaseDLL"
|
|
||||||
# PROP BASE Intermediate_Dir "ReleaseDLL"
|
|
||||||
# PROP BASE Target_Dir ""
|
|
||||||
# PROP Use_MFC 0
|
|
||||||
# PROP Use_Debug_Libraries 0
|
|
||||||
# PROP Output_Dir "ReleaseDLL"
|
|
||||||
# PROP Intermediate_Dir "ReleaseDLL"
|
|
||||||
# PROP Ignore_Export_Lib 0
|
|
||||||
# PROP Target_Dir ""
|
|
||||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
|
||||||
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c
|
|
||||||
# SUBTRACT CPP /YX
|
|
||||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
|
||||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
|
||||||
# ADD BASE RSC /l 0x809 /d "NDEBUG"
|
|
||||||
# ADD RSC /l 0x809 /d "NDEBUG"
|
|
||||||
BSC32=bscmake.exe
|
|
||||||
# ADD BASE BSC32 /nologo
|
|
||||||
# ADD BSC32 /nologo
|
|
||||||
LINK32=link.exe
|
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386
|
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx23_2.lib anim.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/anitest.exe" /libpath:"../../../lib"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "AniTestVC - Win32 UnivRelease"
|
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
|
||||||
# PROP BASE Use_Debug_Libraries 0
|
|
||||||
# PROP BASE Output_Dir "UnivRelease"
|
|
||||||
# PROP BASE Intermediate_Dir "UnivRelease"
|
|
||||||
# PROP BASE Ignore_Export_Lib 0
|
|
||||||
# PROP BASE Target_Dir ""
|
|
||||||
# PROP Use_MFC 0
|
|
||||||
# PROP Use_Debug_Libraries 0
|
|
||||||
# PROP Output_Dir "UnivRelease"
|
|
||||||
# PROP Intermediate_Dir "UnivRelease"
|
|
||||||
# PROP Ignore_Export_Lib 0
|
|
||||||
# PROP Target_Dir ""
|
|
||||||
# ADD BASE CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
|
|
||||||
# SUBTRACT BASE CPP /YX
|
|
||||||
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
|
|
||||||
# SUBTRACT CPP /YX
|
|
||||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
|
||||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
|
||||||
# ADD BASE RSC /l 0x809 /d "NDEBUG"
|
|
||||||
# ADD RSC /l 0x809 /d "NDEBUG"
|
|
||||||
BSC32=bscmake.exe
|
|
||||||
# ADD BASE BSC32 /nologo
|
|
||||||
# ADD BSC32 /nologo
|
|
||||||
LINK32=link.exe
|
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib png.lib zlib.lib jpeg.lib tiff.lib regex.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/minimal.exe" /libpath:"../../lib" /libpath:"../../contrib/lib"
|
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx_univ.lib png.lib zlib.lib jpeg.lib tiff.lib regex.lib anim.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"UnivRelease/anitest.exe" /libpath:"../../../lib"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "AniTestVC - Win32 UnivDebug"
|
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
|
||||||
# PROP BASE Use_Debug_Libraries 1
|
|
||||||
# PROP BASE Output_Dir "UnivDebug"
|
|
||||||
# PROP BASE Intermediate_Dir "UnivDebug"
|
|
||||||
# PROP BASE Ignore_Export_Lib 0
|
|
||||||
# PROP BASE Target_Dir ""
|
|
||||||
# PROP Use_MFC 0
|
|
||||||
# PROP Use_Debug_Libraries 1
|
|
||||||
# PROP Output_Dir "UnivDebug"
|
|
||||||
# PROP Intermediate_Dir "UnivDebug"
|
|
||||||
# PROP Ignore_Export_Lib 0
|
|
||||||
# PROP Target_Dir ""
|
|
||||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c
|
|
||||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
|
||||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
|
||||||
# ADD BASE RSC /l 0x809 /d "_DEBUG"
|
|
||||||
# ADD RSC /l 0x809 /d "_DEBUG"
|
|
||||||
BSC32=bscmake.exe
|
|
||||||
# ADD BASE BSC32 /nologo
|
|
||||||
# ADD BSC32 /nologo
|
|
||||||
LINK32=link.exe
|
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/minimal.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib"
|
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx_univd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib animd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"UnivDebug/anitest.exe" /pdbtype:sept /libpath:"../../../lib"
|
|
||||||
|
|
||||||
!ENDIF
|
|
||||||
|
|
||||||
# Begin Target
|
|
||||||
|
|
||||||
# Name "AniTestVC - Win32 Release"
|
|
||||||
# Name "AniTestVC - Win32 Debug"
|
|
||||||
# Name "AniTestVC - Win32 Debug DLL"
|
|
||||||
# Name "AniTestVC - Win32 Release DLL"
|
|
||||||
# Name "AniTestVC - Win32 UnivRelease"
|
|
||||||
# Name "AniTestVC - Win32 UnivDebug"
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\anitest.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\anitest.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\anitest.rc
|
|
||||||
# End Source File
|
|
||||||
# End Target
|
|
||||||
# End Project
|
|
@@ -1,29 +0,0 @@
|
|||||||
Microsoft Developer Studio Workspace File, Format Version 5.00
|
|
||||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
Project: "AniTestVC"=.\AniTestVC.dsp - Package Owner=<4>
|
|
||||||
|
|
||||||
Package=<5>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
Package=<4>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
Global:
|
|
||||||
|
|
||||||
Package=<5>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
Package=<3>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
@@ -1,24 +0,0 @@
|
|||||||
#
|
|
||||||
# File: makefile.unx
|
|
||||||
# Author: Julian Smart
|
|
||||||
# Created: 1998
|
|
||||||
# Updated:
|
|
||||||
# Copyright: (c) 1998 Julian Smart
|
|
||||||
#
|
|
||||||
# "%W% %G%"
|
|
||||||
#
|
|
||||||
# Makefile for anitest example (UNIX).
|
|
||||||
|
|
||||||
top_srcdir = @top_srcdir@/..
|
|
||||||
top_builddir = ../../..
|
|
||||||
program_dir = contrib/samples/animate
|
|
||||||
|
|
||||||
PROGRAM=anitest
|
|
||||||
|
|
||||||
OBJECTS=$(PROGRAM).o
|
|
||||||
|
|
||||||
APPEXTRALIBS=$(top_builddir)/lib/libwx_anim.@WX_TARGET_LIBRARY_TYPE@
|
|
||||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
|
||||||
|
|
||||||
include $(top_builddir)/src/makeprog.env
|
|
||||||
|
|
@@ -1,197 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: anitest.cpp
|
|
||||||
// Purpose: Animation sample
|
|
||||||
// Author: Julian Smart
|
|
||||||
// Modified by:
|
|
||||||
// Created: 02/07/2001
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Julian Smart
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
// ===========================================================================
|
|
||||||
// declarations
|
|
||||||
// ===========================================================================
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// headers
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx/wx.h".
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__)
|
|
||||||
#include "mondrian.xpm"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "anitest.h"
|
|
||||||
|
|
||||||
IMPLEMENT_APP(MyApp)
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// global variables
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// event tables
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|
||||||
EVT_MENU(ANITEST_ABOUT, MyFrame::OnAbout)
|
|
||||||
EVT_MENU(ANITEST_QUIT, MyFrame::OnQuit)
|
|
||||||
EVT_MENU(ANITEST_OPEN, MyFrame::OnOpen)
|
|
||||||
|
|
||||||
EVT_SIZE(MyFrame::OnSize)
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
// ===========================================================================
|
|
||||||
// implementation
|
|
||||||
// ===========================================================================
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// MyApp
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// Initialise this in OnInit, not statically
|
|
||||||
bool MyApp::OnInit()
|
|
||||||
{
|
|
||||||
// Create the main frame window
|
|
||||||
|
|
||||||
MyFrame* frame = new MyFrame((wxFrame *)NULL, -1, "Animation Demo",
|
|
||||||
wxPoint(-1, -1), wxSize(500, 400),
|
|
||||||
wxDEFAULT_FRAME_STYLE);
|
|
||||||
|
|
||||||
// Give it an icon
|
|
||||||
#ifdef __WXMSW__
|
|
||||||
frame->SetIcon(wxIcon("mdi_icn"));
|
|
||||||
#else
|
|
||||||
frame->SetIcon(wxIcon( mondrian_xpm ));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Make a menubar
|
|
||||||
wxMenu *file_menu = new wxMenu;
|
|
||||||
|
|
||||||
file_menu->Append(ANITEST_OPEN, "&Open Animation...\tCtrl+O", "Open a GIF animation");
|
|
||||||
file_menu->Append(ANITEST_QUIT, "&Exit\tAlt+X", "Quit the program");
|
|
||||||
|
|
||||||
wxMenu *help_menu = new wxMenu;
|
|
||||||
help_menu->Append(ANITEST_ABOUT, "&About\tF1");
|
|
||||||
|
|
||||||
wxMenuBar *menu_bar = new wxMenuBar;
|
|
||||||
|
|
||||||
menu_bar->Append(file_menu, "&File");
|
|
||||||
menu_bar->Append(help_menu, "&Help");
|
|
||||||
|
|
||||||
// Associate the menu bar with the frame
|
|
||||||
frame->SetMenuBar(menu_bar);
|
|
||||||
|
|
||||||
frame->CreateStatusBar();
|
|
||||||
|
|
||||||
frame->Show(TRUE);
|
|
||||||
|
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// MyFrame
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// Define my frame constructor
|
|
||||||
MyFrame::MyFrame(wxWindow *parent,
|
|
||||||
const wxWindowID id,
|
|
||||||
const wxString& title,
|
|
||||||
const wxPoint& pos,
|
|
||||||
const wxSize& size,
|
|
||||||
const long style)
|
|
||||||
: wxFrame(parent, id, title, pos, size,
|
|
||||||
style | wxNO_FULL_REPAINT_ON_RESIZE)
|
|
||||||
{
|
|
||||||
// m_animation = NULL;
|
|
||||||
m_canvas = new MyCanvas(this, wxPoint(0, 0), wxSize(-1, -1));
|
|
||||||
#if 0
|
|
||||||
m_player.SetDestroyAnimation(FALSE);
|
|
||||||
m_player.SetWindow(m_canvas);
|
|
||||||
m_player.SetPosition(wxPoint(0, 0));
|
|
||||||
#endif
|
|
||||||
m_animationCtrl = new wxGIFAnimationCtrl(m_canvas, -1, wxEmptyString,
|
|
||||||
wxPoint(0, 0), wxSize(200, 200));
|
|
||||||
}
|
|
||||||
|
|
||||||
MyFrame::~MyFrame()
|
|
||||||
{
|
|
||||||
// m_player.Stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
|
||||||
{
|
|
||||||
Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) )
|
|
||||||
{
|
|
||||||
(void)wxMessageBox("wxWindows 2 Animation Demo\n"
|
|
||||||
"Author: Julian Smart (c) 2001\n",
|
|
||||||
"About Animation Demo");
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::OnOpen(wxCommandEvent& event)
|
|
||||||
{
|
|
||||||
wxFileDialog dialog(this, wxT("Please choose an animated GIF"),
|
|
||||||
wxEmptyString, wxEmptyString, wxT("*.gif"), wxOPEN);
|
|
||||||
if (dialog.ShowModal() == wxID_OK)
|
|
||||||
{
|
|
||||||
wxString filename(dialog.GetPath());
|
|
||||||
|
|
||||||
m_animationCtrl->Stop();
|
|
||||||
if (m_animationCtrl->LoadFile(filename))
|
|
||||||
{
|
|
||||||
m_animationCtrl->Play();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
wxMessageBox("Sorry, this animation was not a valid animated GIF.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// MyCanvas
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
|
||||||
EVT_PAINT(MyCanvas::OnPaint)
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
// Define a constructor for my canvas
|
|
||||||
MyCanvas::MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size)
|
|
||||||
: wxScrolledWindow(parent, -1, pos, size,
|
|
||||||
wxSUNKEN_BORDER |
|
|
||||||
wxNO_FULL_REPAINT_ON_RESIZE |
|
|
||||||
wxVSCROLL | wxHSCROLL)
|
|
||||||
{
|
|
||||||
SetBackgroundColour(wxColour("YELLOW"));
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyCanvas::OnPaint(wxPaintEvent& event)
|
|
||||||
{
|
|
||||||
wxPaintDC dc(this);
|
|
||||||
#if 0
|
|
||||||
MyFrame* frame = (MyFrame*) GetParent();
|
|
||||||
if (frame->GetPlayer().IsPlaying())
|
|
||||||
{
|
|
||||||
frame->GetPlayer().Draw(dc);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
@@ -1,71 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: anitest.cpp
|
|
||||||
// Purpose: anitest sample
|
|
||||||
// Author: Julian Smart
|
|
||||||
// Modified by:
|
|
||||||
// Created: 02/07/2001
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Julian Smart
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#include "wx/animate/animate.h"
|
|
||||||
|
|
||||||
// Define a new application
|
|
||||||
class MyApp : public wxApp
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
bool OnInit();
|
|
||||||
};
|
|
||||||
|
|
||||||
class MyCanvas : public wxScrolledWindow
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size);
|
|
||||||
void OnPaint(wxPaintEvent& event);
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
// Define a new frame
|
|
||||||
class MyFrame : public wxFrame
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title,
|
|
||||||
const wxPoint& pos, const wxSize& size, const long style);
|
|
||||||
~MyFrame();
|
|
||||||
|
|
||||||
void OnAbout(wxCommandEvent& event);
|
|
||||||
void OnQuit(wxCommandEvent& event);
|
|
||||||
|
|
||||||
void OnOpen(wxCommandEvent& event);
|
|
||||||
|
|
||||||
MyCanvas* GetCanvas() const { return m_canvas; }
|
|
||||||
wxGIFAnimationCtrl* GetAnimationCtrl() const { return m_animationCtrl; }
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
wxAnimationPlayer& GetPlayer() { return m_player; }
|
|
||||||
wxAnimationBase& GetAnimation() { return m_animation; }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
|
|
||||||
protected:
|
|
||||||
MyCanvas* m_canvas;
|
|
||||||
wxGIFAnimationCtrl* m_animationCtrl;
|
|
||||||
#if 0
|
|
||||||
wxAnimationPlayer m_player;
|
|
||||||
wxGIFAnimation m_animation;
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
// menu items ids
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
ANITEST_QUIT = 100,
|
|
||||||
ANITEST_OPEN,
|
|
||||||
ANITEST_ABOUT
|
|
||||||
};
|
|
@@ -1,3 +0,0 @@
|
|||||||
mondrian ICON "mondrian.ico"
|
|
||||||
#include "wx/msw/wx.rc"
|
|
||||||
|
|
Before Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 34 KiB |
@@ -1,17 +0,0 @@
|
|||||||
#
|
|
||||||
# File: makefile.b32
|
|
||||||
# Author: Julian Smart
|
|
||||||
# Created: 1999
|
|
||||||
# Updated:
|
|
||||||
# Copyright:
|
|
||||||
#
|
|
||||||
# Makefile : Builds sample for 32-bit BC++
|
|
||||||
|
|
||||||
WXDIR = $(WXWIN)
|
|
||||||
|
|
||||||
TARGET=anitest
|
|
||||||
EXTRALIBS=$(WXDIR)\lib\anim.lib
|
|
||||||
OBJECTS = $(TARGET).obj
|
|
||||||
|
|
||||||
!include $(WXDIR)\src\makeprog.b32
|
|
||||||
|
|
@@ -1,19 +0,0 @@
|
|||||||
#
|
|
||||||
# File: makefile.g95
|
|
||||||
# Author: Julian Smart
|
|
||||||
# Created: 1999
|
|
||||||
# Updated:
|
|
||||||
# Copyright: (c) Julian Smart, 1999
|
|
||||||
#
|
|
||||||
# Makefile for wxWindows sample (Cygwin/Mingw32).
|
|
||||||
|
|
||||||
WXDIR = ../../..
|
|
||||||
|
|
||||||
TARGET=anitest
|
|
||||||
OBJECTS = $(TARGET).o
|
|
||||||
EXTRAINC = -I$(WXDIR)/contrib/include
|
|
||||||
RCEXTRAINC = --include-dir $(WXDIR)/contrib/include
|
|
||||||
EXTRALIBS = -lanim
|
|
||||||
|
|
||||||
include $(WXDIR)/src/makeprog.g95
|
|
||||||
|
|
@@ -1,36 +0,0 @@
|
|||||||
# Symantec C++ makefile
|
|
||||||
|
|
||||||
WXDIR = $(WXWIN)
|
|
||||||
WXLIB = $(WXDIR)\lib\wx.lib
|
|
||||||
INCDIR = $(WXDIR)\include
|
|
||||||
INCLUDE=$(INCDIR)
|
|
||||||
TARGET=minimal
|
|
||||||
|
|
||||||
include $(WXDIR)\src\makesc.env
|
|
||||||
|
|
||||||
minimal.exe: minimal.obj $(DEFFILE) minimal.res
|
|
||||||
*$(CC) $(LDFLAGS) -o$@ $** $(LIBS)
|
|
||||||
*$(RC) -k minimal.res
|
|
||||||
|
|
||||||
sc32.def:
|
|
||||||
echo EXETYPE NT > sc32.def
|
|
||||||
echo SUBSYSTEM WINDOWS >> sc32.def
|
|
||||||
|
|
||||||
sc16.def:
|
|
||||||
echo NAME $(TARGET) > sc16.def
|
|
||||||
echo EXETYPE WINDOWS >> sc16.def
|
|
||||||
echo STUB 'WINSTUB.EXE' >> sc16.def
|
|
||||||
echo CODE PRELOAD MOVEABLE DISCARDABLE >> sc16.def
|
|
||||||
echo DATA PRELOAD MOVEABLE MULTIPLE >> sc16.def
|
|
||||||
echo HEAPSIZE 1024 >> sc16.def
|
|
||||||
echo STACKSIZE 8192 >> sc16.def
|
|
||||||
|
|
||||||
clean:
|
|
||||||
-del *.obj
|
|
||||||
-del *.exe
|
|
||||||
-del *.res
|
|
||||||
-del *.map
|
|
||||||
-del *.rws
|
|
||||||
-del sc32.def
|
|
||||||
-del sc16.def
|
|
||||||
|
|
@@ -1,35 +0,0 @@
|
|||||||
#
|
|
||||||
# File: Makefile for samples
|
|
||||||
# Author: Robert Roebling
|
|
||||||
# Created: 1999
|
|
||||||
# Updated:
|
|
||||||
# Copyright: (c) 1998 Robert Roebling
|
|
||||||
#
|
|
||||||
# This makefile requires a Unix version of wxWindows
|
|
||||||
# to be installed on your system. This is most often
|
|
||||||
# done typing "make install" when using the complete
|
|
||||||
# sources of wxWindows or by installing the two
|
|
||||||
# RPM packages wxGTK.XXX.rpm and wxGTK-devel.XXX.rpm
|
|
||||||
# under Linux.
|
|
||||||
#
|
|
||||||
|
|
||||||
CC = gcc
|
|
||||||
|
|
||||||
PROGRAM = anitest
|
|
||||||
|
|
||||||
OBJECTS = $(PROGRAM).o animate.o
|
|
||||||
|
|
||||||
# implementation
|
|
||||||
|
|
||||||
.SUFFIXES: .o .cpp
|
|
||||||
|
|
||||||
.cpp.o :
|
|
||||||
$(CC) -c `wx-config --cflags` -o $@ $<
|
|
||||||
|
|
||||||
all: $(PROGRAM)
|
|
||||||
|
|
||||||
$(PROGRAM): $(OBJECTS)
|
|
||||||
$(CC) -o $(PROGRAM) $(OBJECTS) `wx-config --libs`
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.o $(PROGRAM)
|
|
@@ -1,44 +0,0 @@
|
|||||||
#
|
|
||||||
# File: makefile.va
|
|
||||||
# Author: David Webster
|
|
||||||
# Created: 1999
|
|
||||||
# Updated:
|
|
||||||
# Copyright: (c) David Webster
|
|
||||||
#
|
|
||||||
# Makefile : Builds sample (VisualAgeC++ V3.0, OS/2 PM)
|
|
||||||
# Use FINAL=1 argument to nmake to build final version with no debug info.
|
|
||||||
|
|
||||||
# Set WXDIR for your system
|
|
||||||
WXDIR=$(WXWIN)
|
|
||||||
|
|
||||||
!include $(WXDIR)\src\makeva.env
|
|
||||||
|
|
||||||
#
|
|
||||||
# Define which program this is and what it's path is and where to output to
|
|
||||||
#
|
|
||||||
PROGRAM=anitest
|
|
||||||
THISDIR=$(WXWIN)\samples\$(PROGRAM)
|
|
||||||
OPATH=$(THISDIR)\$D
|
|
||||||
|
|
||||||
#
|
|
||||||
# Make sure output directory is available
|
|
||||||
#
|
|
||||||
!if [md $(OPATH)]
|
|
||||||
!endif
|
|
||||||
|
|
||||||
#
|
|
||||||
# Standard definitions
|
|
||||||
#
|
|
||||||
PROGRC=$(THISDIR)\$(PROGRAM).rcO
|
|
||||||
OBJECTS=$(OPATH)\$(PROGRAM).obj $(OPATH)\animate.obj
|
|
||||||
PROGRES=$(OPATH)\$(PROGRAM).res
|
|
||||||
PROGTARGET=$(OPATH)\$(PROGRAM).exe
|
|
||||||
|
|
||||||
.cpp{$OPATH}.obj:
|
|
||||||
@echo $<
|
|
||||||
icc @<<
|
|
||||||
$(CPPFLAGS) /Fo$@ /Tp $<
|
|
||||||
<<
|
|
||||||
|
|
||||||
!include $(WXDIR)\src\makeprog.va
|
|
||||||
|
|
@@ -1,9 +0,0 @@
|
|||||||
WXDIR = $(WXWIN)
|
|
||||||
PROGRAM = anitest
|
|
||||||
|
|
||||||
OBJECTS = $(PROGRAM).obj
|
|
||||||
EXTRALIBS = $(WXDIR)\lib\anim$(LIBEXT).lib
|
|
||||||
EXTRAINC = -I$(WXDIR)\contrib\include
|
|
||||||
|
|
||||||
!include $(WXDIR)\src\makeprog.vc
|
|
||||||
|
|
@@ -1,15 +0,0 @@
|
|||||||
#
|
|
||||||
# Makefile for WATCOM
|
|
||||||
#
|
|
||||||
# Created by Julian Smart, January 1999
|
|
||||||
#
|
|
||||||
#
|
|
||||||
|
|
||||||
WXDIR = $(%WXWIN)
|
|
||||||
|
|
||||||
PROGRAM = anitest
|
|
||||||
OBJECTS = $(PROGRAM).obj animate.obj
|
|
||||||
|
|
||||||
!include $(WXDIR)\src\makeprog.wat
|
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 766 B |
Before Width: | Height: | Size: 7.1 KiB |
@@ -56,7 +56,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib png.lib zlib.lib jpeg.lib tiff.lib regex.lib canvas.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/simple.exe" /libpath:"../../../../lib"
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib png.lib zlib.lib jpeg.lib tiff.lib canvas.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/simple.exe" /libpath:"../../../../lib"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "SimpleVC - Win32 Debug"
|
!ELSEIF "$(CFG)" == "SimpleVC - Win32 Debug"
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib canvasd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/simple.exe" /pdbtype:sept /libpath:"../../../../lib"
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib canvasd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/simple.exe" /pdbtype:sept /libpath:"../../../../lib"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "SimpleVC - Win32 Debug DLL"
|
!ELSEIF "$(CFG)" == "SimpleVC - Win32 Debug DLL"
|
||||||
|
|
||||||
|
@@ -56,7 +56,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib png.lib zlib.lib jpeg.lib tiff.lib regex.lib canvas.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/test.exe" /libpath:"../../../../lib"
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib png.lib zlib.lib jpeg.lib tiff.lib canvas.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/test.exe" /libpath:"../../../../lib"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "TestVC - Win32 Debug"
|
!ELSEIF "$(CFG)" == "TestVC - Win32 Debug"
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib canvasd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/test.exe" /pdbtype:sept /libpath:"../../../../lib"
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib canvasd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/test.exe" /pdbtype:sept /libpath:"../../../../lib"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "TestVC - Win32 Debug DLL"
|
!ELSEIF "$(CFG)" == "TestVC - Win32 Debug DLL"
|
||||||
|
|
||||||
|
@@ -1,10 +0,0 @@
|
|||||||
# $Id$
|
|
||||||
|
|
||||||
CONTRIB_SAMPLES=fl_demo1 fl_demo2 fl_sample1 fl_sample2 fl_sample3
|
|
||||||
|
|
||||||
all:
|
|
||||||
@for d in $(CONTRIB_SAMPLES); do (cd $$d && $(MAKE)); done
|
|
||||||
|
|
||||||
clean:
|
|
||||||
@for d in $(CONTRIB_SAMPLES); do (cd $$d && $(MAKE) clean); done
|
|
||||||
|
|
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 822 B |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 822 B |
Before Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 1.8 KiB |
@@ -1,25 +0,0 @@
|
|||||||
#
|
|
||||||
# File: Makefile
|
|
||||||
# Author: Hans Van Leemputten
|
|
||||||
# Created: 2001
|
|
||||||
# Updated:
|
|
||||||
# Copyright: (c) wxWorkshop team, 2001
|
|
||||||
#
|
|
||||||
# "%W% %G%"
|
|
||||||
#
|
|
||||||
# Makefile : Builds sample on UNIX/Linux.
|
|
||||||
|
|
||||||
top_srcdir = @top_srcdir@/..
|
|
||||||
top_builddir = ../../../..
|
|
||||||
|
|
||||||
TARGET = fl_demo1
|
|
||||||
|
|
||||||
program_dir = contrib/samples/fl/$(TARGET)
|
|
||||||
|
|
||||||
APPEXTRADEFS = -I$(top_srcdir)/contrib/include -DBMP_DIR=\"../bitmaps/\"
|
|
||||||
APPEXTRALIBS = $(top_builddir)/lib/libfl.@WX_TARGET_LIBRARY_TYPE@
|
|
||||||
|
|
||||||
PROGRAM = $(TARGET)
|
|
||||||
OBJECTS = $(TARGET).o
|
|
||||||
|
|
||||||
include $(top_builddir)/src/makeprog.env
|
|
@@ -1,108 +0,0 @@
|
|||||||
# Microsoft Developer Studio Project File - Name="fl_demo1" - Package Owner=<4>
|
|
||||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
|
||||||
# ** DO NOT EDIT **
|
|
||||||
|
|
||||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
|
||||||
|
|
||||||
CFG=fl_demo1 - Win32 Debug
|
|
||||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
|
||||||
!MESSAGE use the Export Makefile command and run
|
|
||||||
!MESSAGE
|
|
||||||
!MESSAGE NMAKE /f "fl_demo.mak".
|
|
||||||
!MESSAGE
|
|
||||||
!MESSAGE You can specify a configuration when running NMAKE
|
|
||||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
|
||||||
!MESSAGE
|
|
||||||
!MESSAGE NMAKE /f "fl_demo.mak" CFG="fl_demo1 - Win32 Debug"
|
|
||||||
!MESSAGE
|
|
||||||
!MESSAGE Possible choices for configuration are:
|
|
||||||
!MESSAGE
|
|
||||||
!MESSAGE "fl_demo1 - Win32 Release" (based on "Win32 (x86) Application")
|
|
||||||
!MESSAGE "fl_demo1 - Win32 Debug" (based on "Win32 (x86) Application")
|
|
||||||
!MESSAGE
|
|
||||||
|
|
||||||
# Begin Project
|
|
||||||
# PROP AllowPerConfigDependencies 0
|
|
||||||
# PROP Scc_ProjName ""
|
|
||||||
# PROP Scc_LocalPath ""
|
|
||||||
CPP=cl.exe
|
|
||||||
MTL=midl.exe
|
|
||||||
RSC=rc.exe
|
|
||||||
|
|
||||||
!IF "$(CFG)" == "fl_demo1 - Win32 Release"
|
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
|
||||||
# PROP BASE Use_Debug_Libraries 0
|
|
||||||
# PROP BASE Output_Dir "Release"
|
|
||||||
# PROP BASE Intermediate_Dir "Release"
|
|
||||||
# PROP BASE Target_Dir ""
|
|
||||||
# PROP Use_MFC 0
|
|
||||||
# PROP Use_Debug_Libraries 0
|
|
||||||
# PROP Output_Dir "Release"
|
|
||||||
# PROP Intermediate_Dir "Release"
|
|
||||||
# PROP Ignore_Export_Lib 0
|
|
||||||
# PROP Target_Dir ""
|
|
||||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
|
||||||
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../../include" /I "../../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /D BMP_DIR=\"../bitmaps/\" /c
|
|
||||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
|
||||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
|
||||||
# ADD BASE RSC /l 0x809 /d "NDEBUG"
|
|
||||||
# ADD RSC /l 0x809 /d "NDEBUG"
|
|
||||||
BSC32=bscmake.exe
|
|
||||||
# ADD BASE BSC32 /nologo
|
|
||||||
# ADD BSC32 /nologo
|
|
||||||
LINK32=link.exe
|
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386
|
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib png.lib zlib.lib jpeg.lib tiff.lib regex.lib fl.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /libpath:"../../../../lib"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "fl_demo1 - Win32 Debug"
|
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
|
||||||
# PROP BASE Use_Debug_Libraries 1
|
|
||||||
# PROP BASE Output_Dir "Debug"
|
|
||||||
# PROP BASE Intermediate_Dir "Debug"
|
|
||||||
# PROP BASE Target_Dir ""
|
|
||||||
# PROP Use_MFC 0
|
|
||||||
# PROP Use_Debug_Libraries 1
|
|
||||||
# PROP Output_Dir "Debug"
|
|
||||||
# PROP Intermediate_Dir "Debug"
|
|
||||||
# PROP Ignore_Export_Lib 0
|
|
||||||
# PROP Target_Dir ""
|
|
||||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
|
||||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../../include" /I "../../../../contrib/include" /D "_DEBUG" /D DEBUG=1 /D "__WXDEBUG__" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /D BMP_DIR=\"../bitmaps/\" /c
|
|
||||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
|
||||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
|
||||||
# ADD BASE RSC /l 0x809 /d "_DEBUG"
|
|
||||||
# ADD RSC /l 0x809 /d "_DEBUG"
|
|
||||||
BSC32=bscmake.exe
|
|
||||||
# ADD BASE BSC32 /nologo
|
|
||||||
# ADD BSC32 /nologo
|
|
||||||
LINK32=link.exe
|
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib fld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /pdbtype:sept /libpath:"../../../../lib"
|
|
||||||
|
|
||||||
!ENDIF
|
|
||||||
|
|
||||||
# Begin Target
|
|
||||||
|
|
||||||
# Name "fl_demo1 - Win32 Release"
|
|
||||||
# Name "fl_demo1 - Win32 Debug"
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\fl_demo1.cpp
|
|
||||||
|
|
||||||
!IF "$(CFG)" == "fl_demo1 - Win32 Release"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "fl_demo1 - Win32 Debug"
|
|
||||||
|
|
||||||
# ADD CPP /Yc"wx/wxprec.h"
|
|
||||||
|
|
||||||
!ENDIF
|
|
||||||
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\fl_demo1.rc
|
|
||||||
# End Source File
|
|
||||||
# End Target
|
|
||||||
# End Project
|
|
@@ -1,29 +0,0 @@
|
|||||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
|
||||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
Project: "fl_demo1"=.\fl_demo.dsp - Package Owner=<4>
|
|
||||||
|
|
||||||
Package=<5>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
Package=<4>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
Global:
|
|
||||||
|
|
||||||
Package=<5>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
Package=<3>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
@@ -1,241 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: No names yet.
|
|
||||||
// Purpose: Contrib. demo
|
|
||||||
// Author: Aleksandras Gluchovas
|
|
||||||
// Modified by: Sebastian Haase (June 21, 2001)
|
|
||||||
// Created: 04/11/98
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Aleksandras Gluchovas
|
|
||||||
// Licence: wxWindows license
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma implementation "fl_demo1.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx/wx.h".
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/textctrl.h"
|
|
||||||
|
|
||||||
// fl headers
|
|
||||||
#include "wx/fl/controlbar.h" // core API
|
|
||||||
|
|
||||||
// extra plugins
|
|
||||||
#include "wx/fl/barhintspl.h" // beveal for bars with "X"s and grooves
|
|
||||||
#include "wx/fl/rowdragpl.h" // NC-look with dragable rows
|
|
||||||
#include "wx/fl/cbcustom.h" // customization plugin
|
|
||||||
#include "wx/fl/hintanimpl.h"
|
|
||||||
|
|
||||||
// beuty-care
|
|
||||||
#include "wx/fl/gcupdatesmgr.h" // smooth d&d
|
|
||||||
#include "wx/fl/antiflickpl.h" // double-buffered repaint of decorations
|
|
||||||
#include "wx/fl/dyntbar.h" // auto-layouting toolbar
|
|
||||||
#include "wx/fl/dyntbarhnd.h" // control-bar dimension handler for it
|
|
||||||
|
|
||||||
#include "fl_demo1.h"
|
|
||||||
|
|
||||||
// comment it out if it breaks, (this is my workaround for MSDev 4.0 linker)
|
|
||||||
|
|
||||||
char wxDummyChar;
|
|
||||||
|
|
||||||
|
|
||||||
IMPLEMENT_APP (MyApp)
|
|
||||||
|
|
||||||
bool MyApp::OnInit(void)
|
|
||||||
{
|
|
||||||
MyFrame *frame = new MyFrame(NULL);
|
|
||||||
|
|
||||||
frame->SetBackgroundColour( wxColour(192,192,192) );
|
|
||||||
|
|
||||||
wxMenu *file_menu = new wxMenu;
|
|
||||||
|
|
||||||
file_menu->Append( NEW_TEST_LOAD, "&Load layouts" );
|
|
||||||
file_menu->Append( NEW_TEST_SAVE, "&Store layouts" );
|
|
||||||
file_menu->Append( NEW_TEST_EXIT, "E&xit" );
|
|
||||||
|
|
||||||
wxMenuBar *menu_bar = new wxMenuBar;
|
|
||||||
|
|
||||||
menu_bar->Append(file_menu, "&File");
|
|
||||||
|
|
||||||
frame->SetMenuBar(menu_bar);
|
|
||||||
|
|
||||||
frame->CreateStatusBar(3);
|
|
||||||
|
|
||||||
frame->Show(TRUE);
|
|
||||||
|
|
||||||
frame->mpClientWnd->Refresh();
|
|
||||||
|
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
|
|
||||||
wxMessageBox("Hello, this demo has a bunch of yet-not-fixed-bugs and misssing functionality\n" \
|
|
||||||
"The ONLY purpose is to demostrate self-layouting toolbars,\nflat-bitmapped-buttons and 2-new FL-plugins" \
|
|
||||||
"(cbRowDragPlugin & cbBarHintsPlugin)\n\n" \
|
|
||||||
"BTW, disabled images and label-text are rendered at run-time" );
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Implementation for class MyFrame *****/
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE( MyFrame, wxFrame )
|
|
||||||
// EVT_CHAR_HOOK(MyFrame::OnKeyDown)
|
|
||||||
// EVT_PAINT( MyFrame::OnPaint )
|
|
||||||
EVT_MENU( NEW_TEST_SAVE, MyFrame::OnSave )
|
|
||||||
EVT_MENU( NEW_TEST_LOAD, MyFrame::OnLoad )
|
|
||||||
EVT_MENU( NEW_TEST_EXIT, MyFrame::OnExit )
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
void MyFrame::OnLoad( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
wxMessageBox("Hey - you found a BIG question-mark !!");
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::OnSave( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
wxMessageBox("Hey - you found another BIG question-mark !!");
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::OnExit( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
Destroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
wxTextCtrl* MyFrame::CreateTextCtrl( const wxString& value )
|
|
||||||
{
|
|
||||||
wxTextCtrl* pCtrl =
|
|
||||||
|
|
||||||
new wxTextCtrl( this, -1, value,
|
|
||||||
wxDefaultPosition, wxSize(0,0), wxTE_MULTILINE );
|
|
||||||
|
|
||||||
pCtrl->SetBackgroundColour( wxColour( 255,255,255 ) );
|
|
||||||
|
|
||||||
return pCtrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
MyFrame::MyFrame(wxFrame *frame)
|
|
||||||
: wxFrame( frame, -1, "wxWindows 2.0 wxFrameLayout Test Application", wxDefaultPosition,
|
|
||||||
wxSize( 700, 500 ),
|
|
||||||
wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
|
|
||||||
wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION,
|
|
||||||
"freimas" )
|
|
||||||
{
|
|
||||||
mpClientWnd = CreateTextCtrl( "Client window" );
|
|
||||||
|
|
||||||
mpLayout = new wxFrameLayout( this, mpClientWnd );
|
|
||||||
|
|
||||||
#ifdef __WXGTK__
|
|
||||||
cbCommonPaneProperties props;
|
|
||||||
mpLayout->GetPaneProperties( props );
|
|
||||||
|
|
||||||
props.mRealTimeUpdatesOn = FALSE; // real-time OFF!!!
|
|
||||||
|
|
||||||
mpLayout->SetPaneProperties( props, wxALL_PANES );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
mpLayout->SetUpdatesManager( new cbGCUpdatesMgr() );
|
|
||||||
|
|
||||||
// this is now default...
|
|
||||||
//mpLayout->SetMargins( 1,1,1,1 ); // gaps for vertical/horizontal/right/left panes
|
|
||||||
|
|
||||||
// setup plugins for testing
|
|
||||||
mpLayout->PushDefaultPlugins();
|
|
||||||
|
|
||||||
mpLayout->AddPlugin( CLASSINFO( cbBarHintsPlugin ) ); // facny "X"es and beveal for bars
|
|
||||||
mpLayout->AddPlugin( CLASSINFO( cbHintAnimationPlugin ) );
|
|
||||||
mpLayout->AddPlugin( CLASSINFO( cbRowDragPlugin ) );
|
|
||||||
mpLayout->AddPlugin( CLASSINFO( cbAntiflickerPlugin ) );
|
|
||||||
mpLayout->AddPlugin( CLASSINFO( cbSimpleCustomizationPlugin ) );
|
|
||||||
|
|
||||||
// drop in some bars
|
|
||||||
cbDimInfo sizes0( 200,45, // when docked horizontally
|
|
||||||
200,85, // when docked vertically
|
|
||||||
175,35, // when floated
|
|
||||||
FALSE, // the bar is not fixed-size
|
|
||||||
4, // vertical gap (bar border)
|
|
||||||
4 // horizontal gap (bar border)
|
|
||||||
);
|
|
||||||
|
|
||||||
cbDimInfo sizes1( 150,35, // when docked horizontally
|
|
||||||
150,85, // when docked vertically
|
|
||||||
175,35, // when floated
|
|
||||||
TRUE, // the bar is not fixed-size
|
|
||||||
4, // vertical gap (bar border)
|
|
||||||
4 // horizontal gap (bar border)
|
|
||||||
);
|
|
||||||
|
|
||||||
cbDimInfo sizes2( 175,45, // when docked horizontally
|
|
||||||
175,37, // when docked vertically
|
|
||||||
170,35, // when floated
|
|
||||||
TRUE, // the bar is not fixed-size
|
|
||||||
4, // vertical gap (bar border)
|
|
||||||
4, // horizontal gap (bar border)
|
|
||||||
new cbDynToolBarDimHandler()
|
|
||||||
);
|
|
||||||
|
|
||||||
mpLayout->AddBar( CreateTextCtrl("Hello"), // bar window
|
|
||||||
sizes0, FL_ALIGN_TOP, // alignment ( 0-top,1-bottom, etc)
|
|
||||||
0, // insert into 0th row (vert. position)
|
|
||||||
0, // offset from the start of row (in pixels)
|
|
||||||
"InfoViewer1", // name to refere in customization pop-ups
|
|
||||||
TRUE
|
|
||||||
);
|
|
||||||
|
|
||||||
mpLayout->AddBar( CreateTextCtrl("Bye"), // bar window
|
|
||||||
sizes0, FL_ALIGN_TOP, // alignment ( 0-top,1-bottom, etc)
|
|
||||||
1, // insert into 0th row (vert. position)
|
|
||||||
0, // offset from the start of row (in pixels)
|
|
||||||
"InfoViewer2", // name to refere in customization pop-ups
|
|
||||||
TRUE
|
|
||||||
);
|
|
||||||
|
|
||||||
mpLayout->AddBar( CreateTextCtrl("Fixed0"), // bar window
|
|
||||||
sizes1, FL_ALIGN_TOP, // alignment ( 0-top,1-bottom, etc)
|
|
||||||
0, // insert into 0th row (vert. position)
|
|
||||||
0, // offset from the start of row (in pixels)
|
|
||||||
"ToolBar1", // name to refere in customization pop-ups
|
|
||||||
TRUE
|
|
||||||
);
|
|
||||||
|
|
||||||
wxDynamicToolBar* pToolBar = new wxDynamicToolBar();
|
|
||||||
|
|
||||||
pToolBar->Create( this, -1 );
|
|
||||||
|
|
||||||
// 1001-1006 ids of command events fired by added tool-buttons
|
|
||||||
|
|
||||||
pToolBar->AddTool( 1001, BMP_DIR "new.bmp" );
|
|
||||||
pToolBar->AddTool( 1002, BMP_DIR "open.bmp" );
|
|
||||||
pToolBar->AddTool( 1003, BMP_DIR "save.bmp" );
|
|
||||||
|
|
||||||
pToolBar->AddTool( 1004, BMP_DIR "cut.bmp" );
|
|
||||||
pToolBar->AddTool( 1005, BMP_DIR "copy.bmp" );
|
|
||||||
pToolBar->AddTool( 1006, BMP_DIR "paste.bmp" );
|
|
||||||
|
|
||||||
|
|
||||||
mpLayout->AddBar( pToolBar, // bar window (can be NULL)
|
|
||||||
sizes2, FL_ALIGN_TOP, // alignment ( 0-top,1-bottom, etc)
|
|
||||||
0, // insert into 0th row (vert. position)
|
|
||||||
0, // offset from the start of row (in pixels)
|
|
||||||
"ToolBar2", // name to refere in customization pop-ups
|
|
||||||
FALSE
|
|
||||||
);
|
|
||||||
|
|
||||||
mpLayout->EnableFloating( TRUE ); // off, thinking bout wxGtk...
|
|
||||||
}
|
|
||||||
|
|
||||||
MyFrame::~MyFrame()
|
|
||||||
{
|
|
||||||
if ( mpLayout)
|
|
||||||
delete mpLayout; // should be destroyed manually
|
|
||||||
}
|
|
||||||
|
|
@@ -1,55 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: No names yet.
|
|
||||||
// Purpose: Contrib. demo
|
|
||||||
// Author: Aleksandras Gluchovas
|
|
||||||
// Modified by: Sebastian Haase (June 21, 2001)
|
|
||||||
// Created: 04/11/98
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Aleksandras Gluchovas
|
|
||||||
// Licence: wxWindows license
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef __NEW_TEST_G__
|
|
||||||
#define __NEW_TEST_G__
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma interface "fl_demo1.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define NEW_TEST_SAVE 1101
|
|
||||||
#define NEW_TEST_LOAD 1102
|
|
||||||
#define NEW_TEST_EXIT 1103
|
|
||||||
|
|
||||||
#include "wx/panel.h"
|
|
||||||
|
|
||||||
// Define a new application type
|
|
||||||
class MyApp: public wxApp
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
bool OnInit(void);
|
|
||||||
};
|
|
||||||
|
|
||||||
// Define a new frame type
|
|
||||||
class MyFrame: public wxFrame
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
wxFrameLayout* mpLayout;
|
|
||||||
wxTextCtrl* mpClientWnd;
|
|
||||||
|
|
||||||
wxTextCtrl* CreateTextCtrl( const wxString& value );
|
|
||||||
|
|
||||||
public:
|
|
||||||
MyFrame(wxFrame *frame);
|
|
||||||
virtual ~MyFrame();
|
|
||||||
|
|
||||||
bool OnClose(void) { Show(FALSE); return TRUE; }
|
|
||||||
|
|
||||||
void OnLoad( wxCommandEvent& event );
|
|
||||||
void OnSave( wxCommandEvent& event );
|
|
||||||
void OnExit( wxCommandEvent& event );
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@@ -1,3 +0,0 @@
|
|||||||
/* mondrian ICON "mondrian.ico" */
|
|
||||||
#include "wx/msw/wx.rc"
|
|
||||||
|
|
@@ -1,23 +0,0 @@
|
|||||||
#
|
|
||||||
# File: Makefile
|
|
||||||
# Author: Hans Van Leemputten
|
|
||||||
# Created: 2001
|
|
||||||
# Updated:
|
|
||||||
# Copyright: (c) wxWorkshop team, 2001
|
|
||||||
#
|
|
||||||
# Makefile : Builds sample for 32-bit BC++
|
|
||||||
|
|
||||||
WXDIR = ..\..\..\..
|
|
||||||
TARGET = fl_demo1
|
|
||||||
|
|
||||||
EXTRACPPFLAGS =-DBMP_DIR=\"../bitmaps/\"
|
|
||||||
!if "$(FINAL)" == "1"
|
|
||||||
EXTRALIBS = $(WSLIBDIR)\fl.lib
|
|
||||||
!else
|
|
||||||
EXTRALIBS = $(WSLIBDIR)\fld.lib
|
|
||||||
!endif
|
|
||||||
|
|
||||||
OBJECTS = $(TARGET).obj
|
|
||||||
|
|
||||||
!include $(WXDIR)\src\makeprog.b32
|
|
||||||
|
|
@@ -1,18 +0,0 @@
|
|||||||
#
|
|
||||||
# File: Makefile
|
|
||||||
# Author: Hans Van Leemputten
|
|
||||||
# Created: 2001
|
|
||||||
# Updated:
|
|
||||||
# Copyright: (c) wxWorkshop team, 2001
|
|
||||||
#
|
|
||||||
# Makefile for wxWorkshop for mingw & cygwin.
|
|
||||||
|
|
||||||
WXDIR = ../../../..
|
|
||||||
TARGET = fl_demo1
|
|
||||||
|
|
||||||
EXTRACPPFLAGS = -DBMP_DIR=\"../bitmaps/\"
|
|
||||||
EXTRALIBS = $(WXDIR)/lib/libfl.a
|
|
||||||
|
|
||||||
OBJECTS = $(TARGET).o
|
|
||||||
|
|
||||||
include $(WXDIR)/src/makeprog.g95
|
|
@@ -1,24 +0,0 @@
|
|||||||
#
|
|
||||||
# File: Makefile
|
|
||||||
# Author: Hans Van Leemputten
|
|
||||||
# Created: 2001
|
|
||||||
# Updated:
|
|
||||||
# Copyright: (c) wxWorkshop team, 2001
|
|
||||||
#
|
|
||||||
# Makefile : Builds fl sample (VC++, WIN32)
|
|
||||||
# Use FINAL=1 argument to nmake to build final version with no debug info.
|
|
||||||
|
|
||||||
WXDIR = ..\..\..\..
|
|
||||||
TARGET = fl_demo1
|
|
||||||
|
|
||||||
EXTRAINC = -DBMP_DIR=\"../bitmaps/\"
|
|
||||||
!if "$(FINAL)" == "1"
|
|
||||||
EXTRALIBS = $(WXDIR)\lib\fl.lib
|
|
||||||
!else
|
|
||||||
EXTRALIBS = $(WXDIR)\lib\fld.lib
|
|
||||||
!endif
|
|
||||||
|
|
||||||
PROGRAM = $(TARGET)
|
|
||||||
OBJECTS = $(TARGET).obj
|
|
||||||
|
|
||||||
!include $(WXDIR)\src\makeprog.vc
|
|
@@ -1,25 +0,0 @@
|
|||||||
#
|
|
||||||
# File: Makefile
|
|
||||||
# Author: Hans Van Leemputten
|
|
||||||
# Created: 2001
|
|
||||||
# Updated:
|
|
||||||
# Copyright: (c) wxWorkshop team, 2001
|
|
||||||
#
|
|
||||||
# "%W% %G%"
|
|
||||||
#
|
|
||||||
# Makefile : Builds sample on UNIX/Linux.
|
|
||||||
|
|
||||||
top_srcdir = @top_srcdir@/..
|
|
||||||
top_builddir = ../../../..
|
|
||||||
|
|
||||||
TARGET = fl_demo2
|
|
||||||
|
|
||||||
program_dir = contrib/samples/fl/$(TARGET)
|
|
||||||
|
|
||||||
APPEXTRADEFS = -I$(top_srcdir)/contrib/include -DBMP_DIR=\"../bitmaps/\"
|
|
||||||
APPEXTRALIBS = $(top_builddir)/lib/libfl.@WX_TARGET_LIBRARY_TYPE@
|
|
||||||
|
|
||||||
PROGRAM = $(TARGET)
|
|
||||||
OBJECTS = $(TARGET).o
|
|
||||||
|
|
||||||
include $(top_builddir)/src/makeprog.env
|
|
@@ -1,108 +0,0 @@
|
|||||||
# Microsoft Developer Studio Project File - Name="fl_demo2" - Package Owner=<4>
|
|
||||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
|
||||||
# ** DO NOT EDIT **
|
|
||||||
|
|
||||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
|
||||||
|
|
||||||
CFG=fl_demo2 - Win32 Debug
|
|
||||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
|
||||||
!MESSAGE use the Export Makefile command and run
|
|
||||||
!MESSAGE
|
|
||||||
!MESSAGE NMAKE /f "fl_demo.mak".
|
|
||||||
!MESSAGE
|
|
||||||
!MESSAGE You can specify a configuration when running NMAKE
|
|
||||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
|
||||||
!MESSAGE
|
|
||||||
!MESSAGE NMAKE /f "fl_demo.mak" CFG="fl_demo2 - Win32 Debug"
|
|
||||||
!MESSAGE
|
|
||||||
!MESSAGE Possible choices for configuration are:
|
|
||||||
!MESSAGE
|
|
||||||
!MESSAGE "fl_demo2 - Win32 Release" (based on "Win32 (x86) Application")
|
|
||||||
!MESSAGE "fl_demo2 - Win32 Debug" (based on "Win32 (x86) Application")
|
|
||||||
!MESSAGE
|
|
||||||
|
|
||||||
# Begin Project
|
|
||||||
# PROP AllowPerConfigDependencies 0
|
|
||||||
# PROP Scc_ProjName ""
|
|
||||||
# PROP Scc_LocalPath ""
|
|
||||||
CPP=cl.exe
|
|
||||||
MTL=midl.exe
|
|
||||||
RSC=rc.exe
|
|
||||||
|
|
||||||
!IF "$(CFG)" == "fl_demo2 - Win32 Release"
|
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
|
||||||
# PROP BASE Use_Debug_Libraries 0
|
|
||||||
# PROP BASE Output_Dir "Release"
|
|
||||||
# PROP BASE Intermediate_Dir "Release"
|
|
||||||
# PROP BASE Target_Dir ""
|
|
||||||
# PROP Use_MFC 0
|
|
||||||
# PROP Use_Debug_Libraries 0
|
|
||||||
# PROP Output_Dir "Release"
|
|
||||||
# PROP Intermediate_Dir "Release"
|
|
||||||
# PROP Ignore_Export_Lib 0
|
|
||||||
# PROP Target_Dir ""
|
|
||||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
|
||||||
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../../include" /I "../../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /D BMP_DIR=\"../bitmaps/\" /c
|
|
||||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
|
||||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
|
||||||
# ADD BASE RSC /l 0x809 /d "NDEBUG"
|
|
||||||
# ADD RSC /l 0x809 /d "NDEBUG"
|
|
||||||
BSC32=bscmake.exe
|
|
||||||
# ADD BASE BSC32 /nologo
|
|
||||||
# ADD BSC32 /nologo
|
|
||||||
LINK32=link.exe
|
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386
|
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib png.lib zlib.lib jpeg.lib tiff.lib regex.lib fl.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /libpath:"../../../../lib"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "fl_demo2 - Win32 Debug"
|
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
|
||||||
# PROP BASE Use_Debug_Libraries 1
|
|
||||||
# PROP BASE Output_Dir "Debug"
|
|
||||||
# PROP BASE Intermediate_Dir "Debug"
|
|
||||||
# PROP BASE Target_Dir ""
|
|
||||||
# PROP Use_MFC 0
|
|
||||||
# PROP Use_Debug_Libraries 1
|
|
||||||
# PROP Output_Dir "Debug"
|
|
||||||
# PROP Intermediate_Dir "Debug"
|
|
||||||
# PROP Ignore_Export_Lib 0
|
|
||||||
# PROP Target_Dir ""
|
|
||||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
|
||||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../../include" /I "../../../../contrib/include" /D "_DEBUG" /D DEBUG=1 /D "__WXDEBUG__" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /D BMP_DIR=\"../bitmaps/\" /c
|
|
||||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
|
||||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
|
||||||
# ADD BASE RSC /l 0x809 /d "_DEBUG"
|
|
||||||
# ADD RSC /l 0x809 /d "_DEBUG"
|
|
||||||
BSC32=bscmake.exe
|
|
||||||
# ADD BASE BSC32 /nologo
|
|
||||||
# ADD BSC32 /nologo
|
|
||||||
LINK32=link.exe
|
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib fld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /pdbtype:sept /libpath:"../../../../lib"
|
|
||||||
|
|
||||||
!ENDIF
|
|
||||||
|
|
||||||
# Begin Target
|
|
||||||
|
|
||||||
# Name "fl_demo2 - Win32 Release"
|
|
||||||
# Name "fl_demo2 - Win32 Debug"
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\fl_demo2.cpp
|
|
||||||
|
|
||||||
!IF "$(CFG)" == "fl_demo2 - Win32 Release"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "fl_demo2 - Win32 Debug"
|
|
||||||
|
|
||||||
# ADD CPP /Yc"wx/wxprec.h"
|
|
||||||
|
|
||||||
!ENDIF
|
|
||||||
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\fl_demo2.rc
|
|
||||||
# End Source File
|
|
||||||
# End Target
|
|
||||||
# End Project
|
|
@@ -1,29 +0,0 @@
|
|||||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
|
||||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
Project: "fl_demo2"=.\fl_demo.dsp - Package Owner=<4>
|
|
||||||
|
|
||||||
Package=<5>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
Package=<4>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
Global:
|
|
||||||
|
|
||||||
Package=<5>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
Package=<3>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
@@ -1,986 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: No names yet.
|
|
||||||
// Purpose: Contrib. demo
|
|
||||||
// Author: Aleksandras Gluchovas
|
|
||||||
// Modified by: Sebastian Haase (June 21, 2001)
|
|
||||||
// Created: 04/11/98
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Aleksandras Gluchovas
|
|
||||||
// Licence: wxWindows license
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma implementation "fl_demo2.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx/wx.h".
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// wxWindows headers.
|
|
||||||
#include "wx/treectrl.h"
|
|
||||||
#include "wx/imaglist.h"
|
|
||||||
#include "wx/notebook.h"
|
|
||||||
|
|
||||||
// fl headers.
|
|
||||||
#include "wx/fl/controlbar.h"
|
|
||||||
#include "wx/fl/rowlayoutpl.h"
|
|
||||||
#include "wx/fl/antiflickpl.h"
|
|
||||||
#include "wx/fl/bardragpl.h"
|
|
||||||
#include "wx/fl/cbcustom.h"
|
|
||||||
#include "wx/fl/rowdragpl.h"
|
|
||||||
|
|
||||||
// some extra fl plugins.
|
|
||||||
#include "wx/fl/barhintspl.h"
|
|
||||||
#include "wx/fl/hintanimpl.h"
|
|
||||||
|
|
||||||
#include "wx/fl/dyntbar.h"
|
|
||||||
#include "wx/fl/dyntbarhnd.h" // fl-dimension-handler for dynamic toolbar
|
|
||||||
|
|
||||||
#include "fl_demo2.h"
|
|
||||||
|
|
||||||
/***** Implementation for class MyApp *****/
|
|
||||||
|
|
||||||
// Create a new application object
|
|
||||||
IMPLEMENT_APP (MyApp)
|
|
||||||
|
|
||||||
// `Main program' equivalent, creating windows and returning main app frame
|
|
||||||
bool MyApp::OnInit(void)
|
|
||||||
{
|
|
||||||
// Create the main frame window
|
|
||||||
MyFrame *frame = new MyFrame(NULL, "wxWindows 2.0 wxFrameLayout demo", 50, 50, 650, 540);
|
|
||||||
|
|
||||||
// Give it an icon
|
|
||||||
#ifdef __WINDOWS__
|
|
||||||
frame->SetIcon(wxIcon("mondrian"));
|
|
||||||
#endif
|
|
||||||
#ifdef __X__
|
|
||||||
frame->SetIcon(wxIcon("aiai.xbm"));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Make a menubar
|
|
||||||
wxMenu *file_menu = new wxMenu;
|
|
||||||
wxMenu *active_menu = new wxMenu;
|
|
||||||
|
|
||||||
file_menu->Append( ID_LOAD, "&Load layouts" );
|
|
||||||
file_menu->Append( ID_STORE, "&Store layouts" );
|
|
||||||
file_menu->AppendSeparator();
|
|
||||||
|
|
||||||
file_menu->Append( ID_AUTOSAVE, "&Auto Save Layouts", "save layouts on exit", TRUE );
|
|
||||||
file_menu->AppendSeparator();
|
|
||||||
|
|
||||||
file_menu->Append(MINIMAL_ABOUT, "A&bout !");
|
|
||||||
file_menu->Append(MINIMAL_QUIT, "E&xit\tTab");
|
|
||||||
|
|
||||||
//active_menu->Append( ID_SETTINGS, "&Settings...\tCtrl" );
|
|
||||||
//active_menu->AppendSeparator();
|
|
||||||
|
|
||||||
active_menu->Append( ID_REMOVE, "&Remove Active" );
|
|
||||||
active_menu->Append( ID_REMOVEALL, "Remove &All" );
|
|
||||||
active_menu->Append( ID_RECREATE, "Re&create" );
|
|
||||||
active_menu->AppendSeparator();
|
|
||||||
|
|
||||||
active_menu->Append( ID_FIRST, "Activate f&irst layout \tF1", "activate it", TRUE );
|
|
||||||
active_menu->Append( ID_SECOND, "Activate &second layout\tF2","activate it", TRUE );
|
|
||||||
active_menu->Append( ID_THIRD, "Activate &third layout\tF3","activate it", TRUE );
|
|
||||||
|
|
||||||
wxMenuBar *menu_bar = new wxMenuBar;
|
|
||||||
|
|
||||||
menu_bar->Append(file_menu, "&File");
|
|
||||||
menu_bar->Append(active_menu, "Active &Layout");
|
|
||||||
|
|
||||||
frame->CreateStatusBar(3);
|
|
||||||
|
|
||||||
frame->SetMenuBar(menu_bar);
|
|
||||||
|
|
||||||
frame->SyncMenuBarItems();
|
|
||||||
|
|
||||||
// Show the frame
|
|
||||||
frame->Show(TRUE);
|
|
||||||
|
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
MyFrame::~MyFrame()
|
|
||||||
{
|
|
||||||
// frame-layouts is not a windows (objects), thus should
|
|
||||||
// be cleaned up manually
|
|
||||||
|
|
||||||
for( int i = 0; i != MAX_LAYOUTS; ++i )
|
|
||||||
{
|
|
||||||
if ( mLayouts[i] )
|
|
||||||
delete mLayouts[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( mpNestedLayout )
|
|
||||||
delete mpNestedLayout;
|
|
||||||
if ( mpAboutBoxLayout )
|
|
||||||
delete mpAboutBoxLayout;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Implementation for class MyFrame *****/
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|
||||||
EVT_MENU( MINIMAL_QUIT, MyFrame::OnQuit )
|
|
||||||
EVT_MENU( MINIMAL_ABOUT, MyFrame::OnAbout )
|
|
||||||
|
|
||||||
EVT_MENU( ID_LOAD, MyFrame::OnLoad )
|
|
||||||
EVT_MENU( ID_STORE, MyFrame::OnStore )
|
|
||||||
EVT_MENU( ID_AUTOSAVE, MyFrame::OnAutoSave )
|
|
||||||
//EVT_MENU( ID_SETTINGS, MyFrame::OnSettings )
|
|
||||||
EVT_MENU( ID_REMOVE, MyFrame::OnRemove )
|
|
||||||
EVT_MENU( ID_REMOVEALL, MyFrame::OnRemoveAll )
|
|
||||||
EVT_MENU( ID_RECREATE, MyFrame::OnRecreate )
|
|
||||||
EVT_MENU( ID_FIRST, MyFrame::OnFirst )
|
|
||||||
EVT_MENU( ID_SECOND, MyFrame::OnSecond )
|
|
||||||
EVT_MENU( ID_THIRD, MyFrame::OnThird )
|
|
||||||
|
|
||||||
EVT_BUTTON( ID_SAY_ITSOK, MyFrame::OnSayItsOk )
|
|
||||||
EVT_BUTTON( ID_BTN_YES, MyFrame::OnBtnYes )
|
|
||||||
EVT_BUTTON( ID_BTN_NO, MyFrame::OnBtnNo )
|
|
||||||
EVT_BUTTON( ID_BTN_ESC, MyFrame::OnBtnEsc )
|
|
||||||
|
|
||||||
EVT_CHAR_HOOK( MyFrame::OnChar )
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
// My frame constructor
|
|
||||||
|
|
||||||
MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h)
|
|
||||||
: wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)),
|
|
||||||
mpNestedLayout( NULL ),
|
|
||||||
mpAboutBoxLayout( NULL ),
|
|
||||||
|
|
||||||
mActiveLayoutNo( FIRST_LAYOUT ),
|
|
||||||
mAutoSave( TRUE ),
|
|
||||||
mSavedAlready( FALSE ),
|
|
||||||
mpClntWindow( NULL ),
|
|
||||||
|
|
||||||
mImageList( 16,16, FALSE, 2 )
|
|
||||||
{
|
|
||||||
mpInternalFrm = (wxPanel*)this;
|
|
||||||
|
|
||||||
mAboutBox.Create( this, -1, "About box in wxWindows style...",
|
|
||||||
wxDefaultPosition,
|
|
||||||
wxSize( 385,220),
|
|
||||||
wxDIALOG_MODAL | wxDEFAULT_DIALOG_STYLE | wxTAB_TRAVERSAL );
|
|
||||||
|
|
||||||
int i = 0;
|
|
||||||
for( i = 0; i != MAX_LAYOUTS; ++i )
|
|
||||||
mLayouts[i] = NULL;
|
|
||||||
|
|
||||||
// image-list is one of the few objects which
|
|
||||||
// currently cannot be serialized, create it first
|
|
||||||
// and use it as initial reference (IR)
|
|
||||||
|
|
||||||
wxBitmap bmp1,bmp2;
|
|
||||||
|
|
||||||
if ( wxFileExists( BMP_DIR "folder_icon.bmp" ) )
|
|
||||||
bmp1.LoadFile( BMP_DIR "folder_icon.bmp", wxBITMAP_TYPE_BMP );
|
|
||||||
|
|
||||||
if ( wxFileExists( BMP_DIR "class_icon1.bmp" ) )
|
|
||||||
bmp2.LoadFile( BMP_DIR "class_icon1.bmp", wxBITMAP_TYPE_BMP );
|
|
||||||
|
|
||||||
mImageList.Add( bmp1 );
|
|
||||||
mImageList.Add( bmp2 );
|
|
||||||
|
|
||||||
InitAboutBox();
|
|
||||||
|
|
||||||
// create multiple layouts
|
|
||||||
|
|
||||||
mpNestedLayout = 0;
|
|
||||||
|
|
||||||
mpClntWindow = CreateTxtCtrl("client window");
|
|
||||||
|
|
||||||
// Create all layouts
|
|
||||||
for( i = 0; i != MAX_LAYOUTS; ++i )
|
|
||||||
{
|
|
||||||
CreateLayout( i );
|
|
||||||
}
|
|
||||||
// hide others
|
|
||||||
for( i = SECOND_LAYOUT; i != MAX_LAYOUTS; ++i )
|
|
||||||
{
|
|
||||||
mLayouts[i]->HideBarWindows();
|
|
||||||
}
|
|
||||||
|
|
||||||
// activate first one
|
|
||||||
mLayouts[FIRST_LAYOUT]->Activate();
|
|
||||||
mActiveLayoutNo = FIRST_LAYOUT;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*** event handlers ***/
|
|
||||||
|
|
||||||
bool MyFrame::OnClose(void)
|
|
||||||
{
|
|
||||||
// USEFUL TRICK:: avoids flickering of application's frame
|
|
||||||
// when closing NN windows on exit:
|
|
||||||
|
|
||||||
this->Show(FALSE);
|
|
||||||
|
|
||||||
if ( (mAutoSave && mSavedAlready) || !mAutoSave )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
wxCommandEvent evt;
|
|
||||||
this->OnStore(evt);
|
|
||||||
}
|
|
||||||
|
|
||||||
mAboutBox.Destroy();
|
|
||||||
this->Destroy();
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::OnLoad( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
wxMessageBox("Hey - you found a BIG question-mark !!");
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::OnStore( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
wxMessageBox("Hey - you found another BIG question-mark !!");
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::OnAutoSave( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
mAutoSave = !mAutoSave;
|
|
||||||
|
|
||||||
wxCommandEvent evt;
|
|
||||||
this->OnStore(evt);
|
|
||||||
|
|
||||||
SyncMenuBarItems();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::OnRemove( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
RemoveLayout( mActiveLayoutNo );
|
|
||||||
|
|
||||||
Refresh();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::OnRemoveAll( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
for( int i = 0; i != MAX_LAYOUTS; ++i )
|
|
||||||
{
|
|
||||||
RemoveLayout( i );
|
|
||||||
}
|
|
||||||
|
|
||||||
Refresh();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MyFrame::OnRecreate( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
OnRemove( event ); // first destroy active layout
|
|
||||||
|
|
||||||
CreateLayout( mActiveLayoutNo );
|
|
||||||
|
|
||||||
mLayouts[mActiveLayoutNo]->Activate();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::OnFirst( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
ActivateLayout( FIRST_LAYOUT );
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::OnSecond( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
ActivateLayout( SECOND_LAYOUT );
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::OnThird( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
ActivateLayout( THIRD_LAYOUT );
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::OnQuit( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
// USEFUL TRICK:: avoids flickering of application's frame
|
|
||||||
// when closing NN windows on exit:
|
|
||||||
|
|
||||||
this->Show(FALSE);
|
|
||||||
|
|
||||||
if ( (mAutoSave && mSavedAlready) || !mAutoSave )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
wxCommandEvent evt;
|
|
||||||
this->OnStore(evt);
|
|
||||||
}
|
|
||||||
|
|
||||||
Destroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::OnAbout( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
wxFont font;
|
|
||||||
#ifdef __WXMSW__
|
|
||||||
font.SetFaceName("MS Sans Serif");
|
|
||||||
#else
|
|
||||||
font.SetFamily( wxSWISS );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
font.SetStyle( wxSLANT );
|
|
||||||
font.SetWeight( wxNORMAL );
|
|
||||||
font.SetPointSize( 8 );
|
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
|
||||||
font.RealizeResource();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
mAboutBox.Center( wxBOTH );
|
|
||||||
mAboutBox.Show(TRUE);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::OnChar( wxKeyEvent& event )
|
|
||||||
{
|
|
||||||
wxCommandEvent evt;
|
|
||||||
|
|
||||||
if ( event.m_keyCode == WXK_F1 )
|
|
||||||
{
|
|
||||||
this->OnFirst( evt );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( event.m_keyCode == WXK_F2 )
|
|
||||||
{
|
|
||||||
this->OnSecond( evt );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( event.m_keyCode == WXK_F3 )
|
|
||||||
{
|
|
||||||
this->OnThird( evt );
|
|
||||||
}
|
|
||||||
if ( event.m_keyCode == WXK_F4 && !event.AltDown() )
|
|
||||||
{
|
|
||||||
// "AI" :-)
|
|
||||||
wxMessageBox("There are only 3 layouts in this demo :-(");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( event.m_keyCode == WXK_TAB )
|
|
||||||
{
|
|
||||||
// USEFUL TRICK:: avoids flickering of application's frame
|
|
||||||
// when closing NN windows on exit:
|
|
||||||
|
|
||||||
this->Show(FALSE);
|
|
||||||
|
|
||||||
if ( (mAutoSave && mSavedAlready) || !mAutoSave )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
wxCommandEvent evt;
|
|
||||||
this->OnStore(evt);
|
|
||||||
}
|
|
||||||
|
|
||||||
Destroy();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
event.Skip();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::OnSayItsOk( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
wxMessageBox("It's OK :-)\n\n now click on the border around the button\n and try dragging it!" );
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::OnBtnYes( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
mAboutBox.Show(FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::OnBtnNo( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
mAboutBox.Show(FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::OnBtnEsc( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
mAboutBox.Show(FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*** helper methods ***/
|
|
||||||
|
|
||||||
void MyFrame::InitAboutBox()
|
|
||||||
{
|
|
||||||
wxPanel* pArea = new wxPanel();
|
|
||||||
|
|
||||||
pArea->Create( &mAboutBox, -1 );
|
|
||||||
|
|
||||||
new wxStaticText(pArea, -1, "This is wxFrameLayout contribution demo.",
|
|
||||||
wxPoint(10, 10) );
|
|
||||||
|
|
||||||
new wxStaticText(pArea, -1, "Aleksandras Gluchovas (c) 1998",
|
|
||||||
wxPoint(10, 30) );
|
|
||||||
|
|
||||||
new wxStaticText(pArea, -1, "<mailto:alex@soften.ktu.lt>",
|
|
||||||
wxPoint(10, 50) );
|
|
||||||
|
|
||||||
mpAboutBoxLayout = new wxFrameLayout( &mAboutBox, pArea, TRUE );
|
|
||||||
|
|
||||||
wxFrameLayout& layout = *mpAboutBoxLayout;
|
|
||||||
|
|
||||||
cbDimInfo sizes( 90,40, // when docked horizontally
|
|
||||||
45,55, // when docked vertically
|
|
||||||
90,40, // when floated
|
|
||||||
TRUE, 4, 4 // true - bar is fixed-size
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
wxButton* pYes = CreateButton("&Yes", &mAboutBox, ID_SAY_ITSOK );
|
|
||||||
wxButton* pNo = CreateButton("&No", &mAboutBox, ID_BTN_NO );
|
|
||||||
wxButton* pEsc = CreateButton("Cancel", &mAboutBox, ID_BTN_ESC );
|
|
||||||
|
|
||||||
layout.AddBar( pEsc, sizes, FL_ALIGN_BOTTOM, 0, 20, "cancel button");
|
|
||||||
layout.AddBar( pNo, sizes, FL_ALIGN_BOTTOM, 0, 20, "no button");
|
|
||||||
layout.AddBar( pYes, sizes, FL_ALIGN_BOTTOM, 0, 20, "yes button");
|
|
||||||
|
|
||||||
layout.mBorderPen.SetColour( 192, 192, 192 );
|
|
||||||
layout.SetMargins( 15, 15, 15, 15, wxALL_PANES );
|
|
||||||
|
|
||||||
cbCommonPaneProperties props;
|
|
||||||
|
|
||||||
layout.GetPaneProperties( props, FL_ALIGN_TOP );
|
|
||||||
|
|
||||||
props.mShow3DPaneBorderOn = FALSE;
|
|
||||||
|
|
||||||
layout.SetPaneProperties( props, wxALL_PANES );
|
|
||||||
|
|
||||||
layout.Activate();
|
|
||||||
|
|
||||||
pYes->SetDefault();
|
|
||||||
pYes->SetFocus();
|
|
||||||
}
|
|
||||||
|
|
||||||
wxTextCtrl* MyFrame::CreateTxtCtrl( const wxString& txt, wxWindow* parent )
|
|
||||||
{
|
|
||||||
return new wxTextCtrl( (parent != NULL ) ? parent : mpInternalFrm,
|
|
||||||
-1, txt, wxDefaultPosition, wxDefaultSize,
|
|
||||||
wxTE_MULTILINE );
|
|
||||||
}
|
|
||||||
|
|
||||||
wxButton* MyFrame::CreateButton( const wxString& label,
|
|
||||||
wxWindow* pParent, long id )
|
|
||||||
{
|
|
||||||
return new wxButton( (pParent)?pParent : mpInternalFrm, id,
|
|
||||||
label, wxPoint( 0,0 ), wxSize( 0,0 ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
wxTreeCtrl* MyFrame::CreateTreeCtrl( const wxString& label )
|
|
||||||
{
|
|
||||||
wxTreeCtrl* pTree = new wxTreeCtrl( mpInternalFrm, -1 );
|
|
||||||
|
|
||||||
int rootid = pTree->AppendItem( (long)0, label, 0);
|
|
||||||
|
|
||||||
if ( label[0] != 'X' )
|
|
||||||
{
|
|
||||||
pTree->AppendItem(rootid, "Leaf1", 0);
|
|
||||||
pTree->AppendItem(rootid, "Leaf2", 0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pTree->AppendItem(rootid, "Scully", 0);
|
|
||||||
pTree->AppendItem(rootid, "Mulder", 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return pTree;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxChoice* MyFrame::CreateChoice( const wxString& txt )
|
|
||||||
{
|
|
||||||
wxString choice_strings[5];
|
|
||||||
|
|
||||||
choice_strings[0] = txt;
|
|
||||||
choice_strings[1] = "Julian";
|
|
||||||
choice_strings[2] = "Hattie";
|
|
||||||
choice_strings[3] = "Ken";
|
|
||||||
choice_strings[4] = "Dick";
|
|
||||||
|
|
||||||
wxChoice *choice = new wxChoice( mpInternalFrm, 301, wxDefaultPosition,
|
|
||||||
wxDefaultSize, 5, choice_strings);
|
|
||||||
|
|
||||||
choice->SetSelection(0);
|
|
||||||
|
|
||||||
return choice;
|
|
||||||
}
|
|
||||||
|
|
||||||
// helper
|
|
||||||
|
|
||||||
void MyFrame::AddSearchToolbars( wxFrameLayout& layout, wxWindow* pParent )
|
|
||||||
{
|
|
||||||
cbDimInfo sizes2( 275,38, // when docked horizontally
|
|
||||||
45,275, // when docked vertically
|
|
||||||
80,30, // when floated
|
|
||||||
TRUE, // the bar is fixed-size
|
|
||||||
4, // vertical gap (bar border)
|
|
||||||
4, // horizontal gap (bar border)
|
|
||||||
new cbDynToolBarDimHandler()
|
|
||||||
);
|
|
||||||
|
|
||||||
cbDimInfo sizes3( 275,55, // when docked horizontally
|
|
||||||
275,60, // when docked vertically
|
|
||||||
45,130, // when floated
|
|
||||||
TRUE, // the bar is fixed-size
|
|
||||||
4, // vertical gap (bar border)
|
|
||||||
4, // horizontal gap (bar border)
|
|
||||||
new cbDynToolBarDimHandler()
|
|
||||||
);
|
|
||||||
|
|
||||||
cbDimInfo sizes4( 430,35, // when docked horizontally
|
|
||||||
44,375, // when docked vertically
|
|
||||||
80,100, // when floated
|
|
||||||
TRUE, // the bar is fixed-size
|
|
||||||
4, // vertical gap (bar border)
|
|
||||||
4, // horizontal gap (bar border)
|
|
||||||
new cbDynToolBarDimHandler()
|
|
||||||
);
|
|
||||||
|
|
||||||
wxDynamicToolBar* pTBar2 = new wxDynamicToolBar( mpInternalFrm, -1 );
|
|
||||||
|
|
||||||
wxChoice* pChoice = new wxChoice( pTBar2, -1, wxDefaultPosition, wxSize( 140,25 ) );
|
|
||||||
|
|
||||||
pTBar2->AddTool( 1, pChoice );
|
|
||||||
pTBar2->AddTool( 2, BMP_DIR "search.bmp" );
|
|
||||||
//pTBar2->AddSeparator();
|
|
||||||
pTBar2->AddTool( 3, BMP_DIR "bookmarks.bmp" );
|
|
||||||
pTBar2->AddTool( 4, BMP_DIR "nextmark.bmp" );
|
|
||||||
pTBar2->AddTool( 5, BMP_DIR "prevmark.bmp" );
|
|
||||||
|
|
||||||
wxDynamicToolBar* pTBar3 = new wxDynamicToolBar( mpInternalFrm, -1 );
|
|
||||||
|
|
||||||
pTBar3->AddTool( 1, BMP_DIR "open.bmp", wxBITMAP_TYPE_BMP, " Open " );
|
|
||||||
pTBar3->AddTool( 2, BMP_DIR "save.bmp", wxBITMAP_TYPE_BMP, " Save " );
|
|
||||||
pTBar3->AddTool( 3, BMP_DIR "saveall.bmp", wxBITMAP_TYPE_BMP, " Save All " );
|
|
||||||
//pTBar3->AddSeparator();
|
|
||||||
pTBar3->AddTool( 4, BMP_DIR "cut.bmp", wxBITMAP_TYPE_BMP, " Open " );
|
|
||||||
pTBar3->AddTool( 5, BMP_DIR "copy.bmp", wxBITMAP_TYPE_BMP, " Copy " );
|
|
||||||
pTBar3->AddTool( 6, BMP_DIR "paste.bmp", wxBITMAP_TYPE_BMP, " Paste " );
|
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
|
||||||
pTBar3->EnableTool( 2, FALSE );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxDynamicToolBar* pTBar4 = new wxDynamicToolBar( mpInternalFrm, -1 );
|
|
||||||
|
|
||||||
pTBar4->AddTool( 1, BMP_DIR "bookmarks.bmp", wxBITMAP_TYPE_BMP, "Bookmarks ", TRUE );
|
|
||||||
pTBar4->AddTool( 2, BMP_DIR "nextmark.bmp", wxBITMAP_TYPE_BMP, "Next bookmark ", TRUE );
|
|
||||||
pTBar4->AddTool( 3, BMP_DIR "prevmark.bmp", wxBITMAP_TYPE_BMP, "Prev bookmark ", TRUE );
|
|
||||||
//pTBar4->AddSeparator();
|
|
||||||
pTBar4->AddTool( 4, BMP_DIR "search.bmp", wxBITMAP_TYPE_BMP, "Search ", TRUE );
|
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
|
||||||
pTBar4->EnableTool( 4, FALSE );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
layout.AddBar( pTBar2,
|
|
||||||
sizes2, FL_ALIGN_TOP,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
"Search",
|
|
||||||
TRUE
|
|
||||||
);
|
|
||||||
|
|
||||||
layout.AddBar( pTBar3,
|
|
||||||
sizes3, FL_ALIGN_BOTTOM,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
"Titled",
|
|
||||||
TRUE
|
|
||||||
);
|
|
||||||
|
|
||||||
layout.AddBar( pTBar4,
|
|
||||||
sizes4, FL_ALIGN_BOTTOM,
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
"Bookmarks",
|
|
||||||
TRUE
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
wxWindow* MyFrame::CreateDevLayout( wxFrameLayout& layout, wxWindow* pParent )
|
|
||||||
{
|
|
||||||
bool isNested = (pParent != mpInternalFrm);
|
|
||||||
|
|
||||||
// check if we're craeting nested layout
|
|
||||||
if ( isNested )
|
|
||||||
{
|
|
||||||
layout.mBorderPen.SetColour( 128,255,128 );
|
|
||||||
|
|
||||||
// if so, than make border smaller
|
|
||||||
for( int i = 0; i != MAX_PANES; ++i )
|
|
||||||
{
|
|
||||||
cbDockPane& pane = *layout.GetPane( i );
|
|
||||||
|
|
||||||
pane.mTopMargin = 5;
|
|
||||||
pane.mBottomMargin = 5;
|
|
||||||
pane.mLeftMargin = 5;
|
|
||||||
pane.mRightMargin = 5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int cbWidth = 200;
|
|
||||||
int cbHeight = ( isNested ) ? 50 : 150;
|
|
||||||
|
|
||||||
cbDimInfo sizes4( cbWidth,cbHeight,
|
|
||||||
cbWidth,cbHeight,
|
|
||||||
cbWidth,cbHeight, FALSE );
|
|
||||||
|
|
||||||
cbWidth = 75;
|
|
||||||
cbHeight = 31;
|
|
||||||
|
|
||||||
cbDimInfo sizes5( cbWidth,cbHeight,
|
|
||||||
42,65,
|
|
||||||
cbWidth,cbHeight, TRUE,
|
|
||||||
3, // vertical gap (bar border)
|
|
||||||
3 // horizontal gap (bar border)
|
|
||||||
);
|
|
||||||
|
|
||||||
// create "workplace" window in the third layout
|
|
||||||
// SEB: originally here was a wxpp (wxWorkshop) class demotrated
|
|
||||||
// wxTabbedWindow* pMiniTabArea = new wxTabbedWindow();
|
|
||||||
// pMiniTabArea->Create( pParent, -1 );
|
|
||||||
|
|
||||||
|
|
||||||
wxTreeCtrl* pClassView = new wxTreeCtrl( pParent, -1,
|
|
||||||
wxDefaultPosition, wxDefaultSize, wxTR_HAS_BUTTONS | wxTR_EDIT_LABELS );
|
|
||||||
|
|
||||||
pClassView->SetImageList( &mImageList );
|
|
||||||
|
|
||||||
wxTreeItemId rootId = pClassView->AddRoot( "wxWindows 2.0 classes", 0 );
|
|
||||||
|
|
||||||
pClassView->AppendItem( rootId, "wxWin Dynamic classes (grabbed at run-time)", 0 );
|
|
||||||
pClassView->AppendItem( rootId, "serializer-classes (grabbed at run-time)", 0 );
|
|
||||||
|
|
||||||
// now create "output" window
|
|
||||||
wxNotebook* pTabbedArea = new wxNotebook(pParent, -1);
|
|
||||||
// SEB: originally here was a wxpp (wxWorkshop) class used
|
|
||||||
// wxPaggedWindow* pTabbedArea = new wxPaggedWindow();
|
|
||||||
// pTabbedArea->Create( pParent, -1 );
|
|
||||||
|
|
||||||
wxPanel* pSheet3 = new wxPanel();
|
|
||||||
pSheet3->Create( pTabbedArea, -1 );
|
|
||||||
pSheet3->Show(FALSE);
|
|
||||||
|
|
||||||
pTabbedArea->AddPage( CreateTxtCtrl("build", pTabbedArea), "Build");
|
|
||||||
pTabbedArea->AddPage( CreateTxtCtrl("debug", pTabbedArea), "Debug");
|
|
||||||
pTabbedArea->AddPage( pSheet3, "is THIS recursive - or what !?");
|
|
||||||
pTabbedArea->AddPage( CreateTxtCtrl("profile", pTabbedArea), "Profile");
|
|
||||||
|
|
||||||
layout.AddBar( new StartButton95(pParent), sizes5, FL_ALIGN_TOP, 0, 0, "Start..." );
|
|
||||||
layout.AddBar( pClassView, sizes4, FL_ALIGN_LEFT, 0, 0, "Project Workplace" );
|
|
||||||
layout.AddBar( pTabbedArea, sizes4, FL_ALIGN_BOTTOM, 0, 50, "Output" );
|
|
||||||
|
|
||||||
return pSheet3;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::DropInSomeBars( int layoutNo )
|
|
||||||
{
|
|
||||||
/* create once... and forget! */
|
|
||||||
|
|
||||||
// setup dimension infos for various bar shapes
|
|
||||||
|
|
||||||
int cbWidth = 90;
|
|
||||||
int cbHeight = 30;
|
|
||||||
|
|
||||||
if ( layoutNo == SECOND_LAYOUT )
|
|
||||||
cbHeight = 60;
|
|
||||||
|
|
||||||
wxFrameLayout& layout = *mLayouts[layoutNo];
|
|
||||||
|
|
||||||
cbDimInfo sizes( cbWidth,cbHeight, // when docked horizontally
|
|
||||||
cbWidth,cbHeight, // when docked vertically
|
|
||||||
cbWidth,cbHeight, // when floated
|
|
||||||
TRUE // true - bar is fixed-size
|
|
||||||
);
|
|
||||||
|
|
||||||
cbWidth = 120;
|
|
||||||
|
|
||||||
cbDimInfo sizes1( cbWidth,cbHeight,
|
|
||||||
cbWidth,cbHeight,
|
|
||||||
cbWidth,cbHeight, FALSE ); // false - bar is "flexible"
|
|
||||||
|
|
||||||
cbWidth = 120;
|
|
||||||
cbHeight = 40;
|
|
||||||
|
|
||||||
cbDimInfo sizes3( cbWidth,cbHeight,
|
|
||||||
cbWidth,cbHeight,
|
|
||||||
cbWidth,cbHeight, TRUE ); // -/-
|
|
||||||
|
|
||||||
cbWidth = 200;
|
|
||||||
cbHeight = 150;
|
|
||||||
|
|
||||||
cbDimInfo sizes4( cbWidth,cbHeight,
|
|
||||||
cbWidth,cbHeight,
|
|
||||||
cbWidth,cbHeight, FALSE ); // -/-
|
|
||||||
|
|
||||||
cbWidth = 63;
|
|
||||||
cbHeight = 31;
|
|
||||||
|
|
||||||
cbDimInfo sizes5( cbWidth,cbHeight,
|
|
||||||
cbHeight,cbWidth,
|
|
||||||
cbWidth,cbHeight, TRUE,
|
|
||||||
3, // vertical gap (bar border)
|
|
||||||
3 // horizontal gap (bar border)
|
|
||||||
); // -/-
|
|
||||||
|
|
||||||
|
|
||||||
if ( layoutNo == FIRST_LAYOUT )
|
|
||||||
{
|
|
||||||
// add 4 fixed-size bars (`sizes' dim-info) and one "flexible" (with `sizes1' dim-info)
|
|
||||||
|
|
||||||
wxWindow* pGreenOne = new MyTestPanel(mpInternalFrm);
|
|
||||||
|
|
||||||
pGreenOne->SetBackgroundColour( wxColour(128,255,128) );
|
|
||||||
|
|
||||||
layout.AddBar( pGreenOne, sizes, FL_ALIGN_TOP, 0, 50, "Bar1", TRUE );
|
|
||||||
layout.AddBar( new MyTestPanel(mpInternalFrm), sizes, FL_ALIGN_TOP, 2, 50, "Bar2", TRUE );
|
|
||||||
layout.AddBar( new MyTestPanel(mpInternalFrm), sizes, FL_ALIGN_BOTTOM, 2, 50, "Bar3", TRUE );
|
|
||||||
layout.AddBar( new MyTestPanel(mpInternalFrm), sizes, FL_ALIGN_LEFT, 2, 50, "Bar4", TRUE );
|
|
||||||
layout.AddBar( new MyTestPanel(mpInternalFrm), sizes1, wxCBAR_HIDDEN, 2, 50, "Super-Bar", TRUE );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( layoutNo == SECOND_LAYOUT )
|
|
||||||
{
|
|
||||||
// show off various wx-controls in the second layout
|
|
||||||
|
|
||||||
layout.AddBar( CreateTxtCtrl(), sizes, FL_ALIGN_TOP, 0, 50, "Fixed text Area&0" );
|
|
||||||
layout.AddBar( CreateButton("OK"), sizes, FL_ALIGN_TOP, 0, 100, "First Button" );
|
|
||||||
layout.AddBar( CreateTxtCtrl(), sizes1, FL_ALIGN_BOTTOM, 0, 50, "First Tree" );
|
|
||||||
layout.AddBar( CreateTreeCtrl("Root"), sizes1, FL_ALIGN_LEFT, 0, 0, "TreeCtrl Window" );
|
|
||||||
layout.AddBar( CreateChoice("Choice 1"), sizes3, FL_ALIGN_TOP, 0, 0, "Choice 1 (buggy)", FALSE, wxCBAR_HIDDEN );
|
|
||||||
layout.AddBar( CreateChoice("Choice 2"), sizes3, FL_ALIGN_TOP, 0, 0, "Choice 2 (buggy)", FALSE, wxCBAR_HIDDEN );
|
|
||||||
layout.AddBar( CreateTreeCtrl("X-Files"), sizes1, FL_ALIGN_RIGHT, 0, 100, "X-Files" );
|
|
||||||
layout.AddBar( CreateTxtCtrl("smaller1"), sizes3, FL_ALIGN_TOP, 0, 50, "smaller Area1" );
|
|
||||||
layout.AddBar( CreateTxtCtrl("smaller2"), sizes3, FL_ALIGN_TOP, 0, 50, "sm&ller Area2" );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( layoutNo == THIRD_LAYOUT )
|
|
||||||
{
|
|
||||||
#ifdef __WXGTK__
|
|
||||||
cbCommonPaneProperties props;
|
|
||||||
layout.GetPaneProperties( props );
|
|
||||||
props.mRealTimeUpdatesOn = FALSE; // real-time OFF for gtk!!!
|
|
||||||
layout.SetPaneProperties( props, wxALL_PANES );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
layout.AddBar( CreateTxtCtrl("Tool1"), sizes3, FL_ALIGN_TOP, 0, 50, "Fixed text Area1" );
|
|
||||||
layout.AddBar( CreateTxtCtrl("Tool2"), sizes3, FL_ALIGN_TOP, 0, 50, "Fixed text Area2" );
|
|
||||||
layout.AddBar( CreateTxtCtrl("Tool3"), sizes3, FL_ALIGN_TOP, 0, 50, "Fixed text Area3" );
|
|
||||||
layout.AddBar( CreateTxtCtrl("Tool4"), sizes3, FL_ALIGN_TOP, 1, 50, "Fixed text Area4" );
|
|
||||||
layout.AddBar( CreateTxtCtrl("Tool5"), sizes3, FL_ALIGN_TOP, 1, 50, "Fixed text Area5" );
|
|
||||||
layout.AddBar( CreateTxtCtrl("Tool6"), sizes3, FL_ALIGN_TOP, 1, 50, "Fixed text Area6" );
|
|
||||||
layout.AddBar( CreateTxtCtrl("Tool7"), sizes3, FL_ALIGN_TOP, 2,250, "Fixed text Area7" );
|
|
||||||
|
|
||||||
cbDimInfo sizes10( 175,35, // when docked horizontally
|
|
||||||
175,38, // when docked vertically
|
|
||||||
170,35, // when floated
|
|
||||||
TRUE, // the bar is not fixed-size
|
|
||||||
4, // vertical gap (bar border)
|
|
||||||
4, // horizontal gap (bar border)
|
|
||||||
new cbDynToolBarDimHandler()
|
|
||||||
);
|
|
||||||
|
|
||||||
wxDynamicToolBar* pToolBar = new wxDynamicToolBar();
|
|
||||||
|
|
||||||
pToolBar->Create( mpInternalFrm, -1 );
|
|
||||||
|
|
||||||
// 1001-1006 ids of command events fired by added tool-buttons
|
|
||||||
|
|
||||||
pToolBar->AddTool( 1001, BMP_DIR "new.bmp" );
|
|
||||||
pToolBar->AddTool( 1002, BMP_DIR "open.bmp" );
|
|
||||||
pToolBar->AddTool( 1003, BMP_DIR "save.bmp" );
|
|
||||||
|
|
||||||
pToolBar->AddTool( 1004, BMP_DIR "cut.bmp" );
|
|
||||||
pToolBar->AddTool( 1005, BMP_DIR "copy.bmp" );
|
|
||||||
pToolBar->AddTool( 1006, BMP_DIR "paste.bmp" );
|
|
||||||
|
|
||||||
layout.AddBar( pToolBar, // bar window (can be NULL)
|
|
||||||
sizes10, FL_ALIGN_TOP, // alignment ( 0-top,1-bottom, etc)
|
|
||||||
0, // insert into 0th row (vert. position)
|
|
||||||
0, // offset from the start of row (in pixels)
|
|
||||||
"Real-Toolbar", // name to refere in customization pop-ups
|
|
||||||
FALSE
|
|
||||||
);
|
|
||||||
|
|
||||||
// create first "developement" layout
|
|
||||||
AddSearchToolbars( layout, mpInternalFrm);
|
|
||||||
|
|
||||||
wxWindow* pSheet3 = CreateDevLayout( layout, mpInternalFrm);
|
|
||||||
|
|
||||||
// create another ***secreat developement*** layout inside
|
|
||||||
// the third sheet of the outter one's output bar
|
|
||||||
|
|
||||||
mpNestedLayout = new wxFrameLayout( pSheet3,
|
|
||||||
CreateTxtCtrl("\"Mobils in Mobile\" --C.Nemo",pSheet3), FALSE );
|
|
||||||
|
|
||||||
CreateDevLayout( *mpNestedLayout, pSheet3 );
|
|
||||||
|
|
||||||
mpNestedLayout->Activate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::CreateLayout( int layoutNo )
|
|
||||||
{
|
|
||||||
wxFrameLayout* pLayout = new wxFrameLayout( mpInternalFrm, mpClntWindow, FALSE );
|
|
||||||
|
|
||||||
if ( layoutNo == THIRD_LAYOUT )
|
|
||||||
{
|
|
||||||
pLayout->PushDefaultPlugins();
|
|
||||||
pLayout->AddPlugin( CLASSINFO( cbBarHintsPlugin ) ); // facny "X"es and beveal for bars
|
|
||||||
#ifdef __WXGTK__
|
|
||||||
pLayout->AddPlugin( CLASSINFO( cbHintAnimationPlugin ) );
|
|
||||||
#endif
|
|
||||||
pLayout->AddPlugin( CLASSINFO( cbRowDragPlugin ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
mLayouts[layoutNo] = pLayout;
|
|
||||||
|
|
||||||
DropInSomeBars( layoutNo );
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::RemoveLayout( int layoutNo )
|
|
||||||
{
|
|
||||||
wxFrameLayout* pLayout = mLayouts[layoutNo];
|
|
||||||
|
|
||||||
if ( !pLayout )
|
|
||||||
return;
|
|
||||||
|
|
||||||
pLayout->HideBarWindows();
|
|
||||||
|
|
||||||
// destroy nested layout first
|
|
||||||
|
|
||||||
if ( layoutNo == THIRD_LAYOUT )
|
|
||||||
{
|
|
||||||
if ( mpNestedLayout )
|
|
||||||
delete mpNestedLayout;
|
|
||||||
mpNestedLayout = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
// NOTE:: bar windows are NOT destroyed automatically by frame-layout
|
|
||||||
|
|
||||||
pLayout->DestroyBarWindows();
|
|
||||||
|
|
||||||
delete pLayout;
|
|
||||||
|
|
||||||
mLayouts[layoutNo] = NULL;
|
|
||||||
|
|
||||||
Refresh();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::SyncMenuBarItems()
|
|
||||||
{
|
|
||||||
for( int i = 0; i != MAX_LAYOUTS; ++i )
|
|
||||||
{
|
|
||||||
GetMenuBar()->Check( ID_FIRST+i, mActiveLayoutNo == FIRST_LAYOUT+i );
|
|
||||||
}
|
|
||||||
|
|
||||||
GetMenuBar()->Check( ID_AUTOSAVE, mAutoSave );
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::ActivateLayout( int layoutNo )
|
|
||||||
{
|
|
||||||
if ( layoutNo == mActiveLayoutNo )
|
|
||||||
return;
|
|
||||||
|
|
||||||
if ( mLayouts[mActiveLayoutNo] )
|
|
||||||
mLayouts[mActiveLayoutNo]->Deactivate();
|
|
||||||
|
|
||||||
mActiveLayoutNo = layoutNo;
|
|
||||||
|
|
||||||
if ( mLayouts[mActiveLayoutNo] )
|
|
||||||
mLayouts[mActiveLayoutNo]->Activate();
|
|
||||||
else
|
|
||||||
Refresh();
|
|
||||||
|
|
||||||
SyncMenuBarItems();
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Implementation for class StartButton95 (just for fun) *****/
|
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS( StartButton95, wxPanel )
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE( StartButton95, wxPanel )
|
|
||||||
EVT_LEFT_DOWN( StartButton95::OnMouseDown )
|
|
||||||
EVT_LEFT_UP ( StartButton95::OnMouseUp )
|
|
||||||
EVT_PAINT ( StartButton95::OnPaint )
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
void StartButton95::OnMouseDown( wxMouseEvent& event )
|
|
||||||
{
|
|
||||||
m_bPressed = TRUE;
|
|
||||||
Refresh();
|
|
||||||
CaptureMouse();
|
|
||||||
}
|
|
||||||
|
|
||||||
void StartButton95::OnMouseUp( wxMouseEvent& event )
|
|
||||||
{
|
|
||||||
// "this is not a bug"
|
|
||||||
|
|
||||||
SetCursor( wxCURSOR_WAIT );
|
|
||||||
GetParent()->SetCursor( wxCURSOR_WAIT );
|
|
||||||
::wxSetCursor( wxCURSOR_WAIT );
|
|
||||||
wxSleep(1);
|
|
||||||
|
|
||||||
int i = 0;
|
|
||||||
for( i = 1; i != 6; ++i )
|
|
||||||
{
|
|
||||||
m_bPressed = (i % 2) != 0;
|
|
||||||
Refresh();
|
|
||||||
wxSleep(1);
|
|
||||||
}
|
|
||||||
GetParent()->Close();
|
|
||||||
//*((char*)(i)-3) = 'X'; // Aleks what's the meaning of this???
|
|
||||||
}
|
|
||||||
|
|
||||||
void StartButton95::OnPaint( wxPaintEvent& event )
|
|
||||||
{
|
|
||||||
wxBitmap* pBmp = 0;
|
|
||||||
|
|
||||||
if ( m_bPressed )
|
|
||||||
{
|
|
||||||
if ( !m_PBmp.Ok() && wxFileExists( BMP_DIR "start95_pr.bmp" ) )
|
|
||||||
|
|
||||||
m_PBmp.LoadFile( BMP_DIR "start95_pr.bmp", wxBITMAP_TYPE_BMP );
|
|
||||||
|
|
||||||
pBmp = &m_PBmp;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( !m_DBmp.Ok() && wxFileExists( BMP_DIR "start95_dp.bmp" ) )
|
|
||||||
|
|
||||||
m_DBmp.LoadFile( BMP_DIR "start95_dp.bmp", wxBITMAP_TYPE_BMP );
|
|
||||||
|
|
||||||
pBmp = &m_DBmp;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!pBmp) return;
|
|
||||||
wxMemoryDC mdc;
|
|
||||||
wxPaintDC dc(this);
|
|
||||||
mdc.SelectObject( *pBmp );
|
|
||||||
|
|
||||||
dc.Blit( 0,0, pBmp->GetWidth(), pBmp->GetHeight(), &mdc, 0,0, wxCOPY );
|
|
||||||
|
|
||||||
mdc.SelectObject( wxNullBitmap );
|
|
||||||
}
|
|
@@ -1,160 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: No names yet.
|
|
||||||
// Purpose: Contrib. demo
|
|
||||||
// Author: Aleksandras Gluchovas
|
|
||||||
// Modified by:
|
|
||||||
// Created: 04/11/98
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Aleksandras Gluchovas
|
|
||||||
// Licence: wxWindows license
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef __FLDEMO_G__
|
|
||||||
#define __FLDEMO_G__
|
|
||||||
|
|
||||||
// ID for the menu commands
|
|
||||||
|
|
||||||
#define MINIMAL_QUIT 1
|
|
||||||
#define MINIMAL_ABOUT 102
|
|
||||||
|
|
||||||
#define ID_LOAD 103
|
|
||||||
#define ID_STORE 104
|
|
||||||
#define ID_AUTOSAVE 105
|
|
||||||
//#define ID_SETTINGS 106
|
|
||||||
#define ID_REMOVE 107
|
|
||||||
#define ID_REMOVEALL 108
|
|
||||||
#define ID_RECREATE 109
|
|
||||||
#define ID_ACTIVATE 110
|
|
||||||
#define ID_FIRST 111
|
|
||||||
#define ID_SECOND 112
|
|
||||||
#define ID_THIRD 113
|
|
||||||
|
|
||||||
#define ID_SAY_ITSOK 114
|
|
||||||
#define ID_BTN_YES 115
|
|
||||||
#define ID_BTN_NO 116
|
|
||||||
#define ID_BTN_ESC 117
|
|
||||||
|
|
||||||
#define MAX_LAYOUTS 3
|
|
||||||
|
|
||||||
#define FIRST_LAYOUT 0
|
|
||||||
#define SECOND_LAYOUT 1
|
|
||||||
#define THIRD_LAYOUT 2
|
|
||||||
|
|
||||||
class wxFrameLayout;
|
|
||||||
class wxObjectStorage;
|
|
||||||
|
|
||||||
// FOR NOW::
|
|
||||||
typedef wxPanel MyTestPanel;
|
|
||||||
|
|
||||||
// Define a new application type
|
|
||||||
|
|
||||||
class MyApp: public wxApp
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
bool OnInit(void);
|
|
||||||
};
|
|
||||||
|
|
||||||
// Define a new frame type
|
|
||||||
|
|
||||||
class MyFrame: public wxFrame
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
|
|
||||||
wxFrameLayout* mLayouts[MAX_LAYOUTS];
|
|
||||||
|
|
||||||
wxFrameLayout* mpNestedLayout;
|
|
||||||
wxFrameLayout* mpAboutBoxLayout;
|
|
||||||
|
|
||||||
int mActiveLayoutNo;
|
|
||||||
bool mAutoSave;
|
|
||||||
bool mSavedAlready;
|
|
||||||
|
|
||||||
// container windows:
|
|
||||||
|
|
||||||
wxTextCtrl* mpClntWindow;
|
|
||||||
wxPanel* mpInternalFrm;
|
|
||||||
|
|
||||||
wxImageList mImageList;
|
|
||||||
|
|
||||||
wxFrame mAboutBox;
|
|
||||||
|
|
||||||
// helpers for control-creation
|
|
||||||
|
|
||||||
wxTextCtrl* CreateTxtCtrl ( const wxString& txt = "wxTextCtrl", wxWindow* parent = NULL );
|
|
||||||
wxTreeCtrl* CreateTreeCtrl( const wxString& label = "TreeCtrl" );
|
|
||||||
wxChoice* CreateChoice ( const wxString& txt = "Choice1" );
|
|
||||||
wxButton* CreateButton ( const wxString& label = "wxButton", wxWindow* pParent = NULL, long id = ID_SAY_ITSOK );
|
|
||||||
|
|
||||||
// helpers for layout-creation
|
|
||||||
|
|
||||||
void AddSearchToolbars( wxFrameLayout& layout, wxWindow* pParent );
|
|
||||||
wxWindow* CreateDevLayout( wxFrameLayout& layout, wxWindow* pParent );
|
|
||||||
|
|
||||||
void DropInSomeBars( int layoutNo );
|
|
||||||
void CreateLayout( int layoutNo );
|
|
||||||
void RemoveLayout( int layoutNo );
|
|
||||||
|
|
||||||
void InitAboutBox();
|
|
||||||
|
|
||||||
void ActivateLayout( int layoutNo );
|
|
||||||
|
|
||||||
public: /* public */
|
|
||||||
|
|
||||||
MyFrame( wxFrame *frame, char *title, int x, int y, int w, int h);
|
|
||||||
|
|
||||||
~MyFrame();
|
|
||||||
|
|
||||||
void SyncMenuBarItems();
|
|
||||||
|
|
||||||
// event handlers
|
|
||||||
|
|
||||||
bool OnClose(void);
|
|
||||||
|
|
||||||
void OnLoad( wxCommandEvent& event );
|
|
||||||
void OnStore( wxCommandEvent& event );
|
|
||||||
void OnAutoSave( wxCommandEvent& event );
|
|
||||||
void OnQuit(wxCommandEvent& event);
|
|
||||||
void OnAbout(wxCommandEvent& event);
|
|
||||||
//void OnSettings( wxCommandEvent& event );
|
|
||||||
void OnRemove( wxCommandEvent& event );
|
|
||||||
void OnRemoveAll( wxCommandEvent& event );
|
|
||||||
void OnRecreate( wxCommandEvent& event );
|
|
||||||
void OnFirst( wxCommandEvent& event );
|
|
||||||
void OnSecond( wxCommandEvent& event );
|
|
||||||
void OnThird( wxCommandEvent& event );
|
|
||||||
|
|
||||||
void OnSayItsOk( wxCommandEvent& event );
|
|
||||||
void OnBtnYes( wxCommandEvent& event );
|
|
||||||
void OnBtnNo( wxCommandEvent& event );
|
|
||||||
void OnBtnEsc( wxCommandEvent& event );
|
|
||||||
|
|
||||||
void OnChar( wxKeyEvent& event );
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
// Define a new button type, StartButton95 (Just for fun)
|
|
||||||
|
|
||||||
class StartButton95 : public wxPanel
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS( StartButton95 )
|
|
||||||
|
|
||||||
bool m_bPressed;
|
|
||||||
wxBitmap m_PBmp;
|
|
||||||
wxBitmap m_DBmp;
|
|
||||||
|
|
||||||
public:
|
|
||||||
StartButton95(void) : m_bPressed(FALSE) {}
|
|
||||||
|
|
||||||
StartButton95(wxWindow* parent)
|
|
||||||
: m_bPressed(FALSE) { wxPanel::Create(parent,-1); }
|
|
||||||
|
|
||||||
void OnMouseDown( wxMouseEvent& event );
|
|
||||||
void OnMouseUp( wxMouseEvent& event );
|
|
||||||
void OnPaint( wxPaintEvent& event );
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@@ -1,3 +0,0 @@
|
|||||||
/* mondrian ICON "mondrian.ico" */
|
|
||||||
#include "wx/msw/wx.rc"
|
|
||||||
|
|
@@ -1,23 +0,0 @@
|
|||||||
#
|
|
||||||
# File: Makefile
|
|
||||||
# Author: Hans Van Leemputten
|
|
||||||
# Created: 2001
|
|
||||||
# Updated:
|
|
||||||
# Copyright: (c) wxWorkshop team, 2001
|
|
||||||
#
|
|
||||||
# Makefile : Builds sample for 32-bit BC++
|
|
||||||
|
|
||||||
WXDIR = ..\..\..\..
|
|
||||||
TARGET = fl_demo2
|
|
||||||
|
|
||||||
EXTRACPPFLAGS =-DBMP_DIR=\"../bitmaps/\"
|
|
||||||
!if "$(FINAL)" == "1"
|
|
||||||
EXTRALIBS = $(WSLIBDIR)\fl.lib
|
|
||||||
!else
|
|
||||||
EXTRALIBS = $(WSLIBDIR)\fld.lib
|
|
||||||
!endif
|
|
||||||
|
|
||||||
OBJECTS = $(TARGET).obj
|
|
||||||
|
|
||||||
!include $(WXDIR)\src\makeprog.b32
|
|
||||||
|
|
@@ -1,18 +0,0 @@
|
|||||||
#
|
|
||||||
# File: Makefile
|
|
||||||
# Author: Hans Van Leemputten
|
|
||||||
# Created: 2001
|
|
||||||
# Updated:
|
|
||||||
# Copyright: (c) wxWorkshop team, 2001
|
|
||||||
#
|
|
||||||
# Makefile for wxWorkshop for mingw & cygwin.
|
|
||||||
|
|
||||||
WXDIR = ../../../..
|
|
||||||
TARGET = fl_demo2
|
|
||||||
|
|
||||||
EXTRACPPFLAGS = -DBMP_DIR=\"../bitmaps/\"
|
|
||||||
EXTRALIBS = $(WXDIR)/lib/libfl.a
|
|
||||||
|
|
||||||
OBJECTS = $(TARGET).o
|
|
||||||
|
|
||||||
include $(WXDIR)/src/makeprog.g95
|
|
@@ -1,24 +0,0 @@
|
|||||||
#
|
|
||||||
# File: Makefile
|
|
||||||
# Author: Hans Van Leemputten
|
|
||||||
# Created: 2001
|
|
||||||
# Updated:
|
|
||||||
# Copyright: (c) wxWorkshop team, 2001
|
|
||||||
#
|
|
||||||
# Makefile : Builds fl sample (VC++, WIN32)
|
|
||||||
# Use FINAL=1 argument to nmake to build final version with no debug info.
|
|
||||||
|
|
||||||
WXDIR = ..\..\..\..
|
|
||||||
TARGET = fl_demo2
|
|
||||||
|
|
||||||
EXTRAINC = -DBMP_DIR=\"../bitmaps/\"
|
|
||||||
!if "$(FINAL)" == "1"
|
|
||||||
EXTRALIBS = $(WXDIR)\lib\fl.lib
|
|
||||||
!else
|
|
||||||
EXTRALIBS = $(WXDIR)\lib\fld.lib
|
|
||||||
!endif
|
|
||||||
|
|
||||||
PROGRAM = $(TARGET)
|
|
||||||
OBJECTS = $(TARGET).obj
|
|
||||||
|
|
||||||
!include $(WXDIR)\src\makeprog.vc
|
|
@@ -1,25 +0,0 @@
|
|||||||
#
|
|
||||||
# File: Makefile
|
|
||||||
# Author: Hans Van Leemputten
|
|
||||||
# Created: 2001
|
|
||||||
# Updated:
|
|
||||||
# Copyright: (c) wxWorkshop team, 2001
|
|
||||||
#
|
|
||||||
# "%W% %G%"
|
|
||||||
#
|
|
||||||
# Makefile : Builds sample on UNIX/Linux.
|
|
||||||
|
|
||||||
top_srcdir = @top_srcdir@/..
|
|
||||||
top_builddir = ../../../..
|
|
||||||
|
|
||||||
TARGET = fl_sample1
|
|
||||||
|
|
||||||
program_dir = contrib/samples/fl/$(TARGET)
|
|
||||||
|
|
||||||
APPEXTRADEFS = -I$(top_srcdir)/contrib/include -DBMP_DIR=\"../bitmaps/\"
|
|
||||||
APPEXTRALIBS = $(top_builddir)/lib/libfl.@WX_TARGET_LIBRARY_TYPE@
|
|
||||||
|
|
||||||
PROGRAM = $(TARGET)
|
|
||||||
OBJECTS = $(TARGET).o
|
|
||||||
|
|
||||||
include $(top_builddir)/src/makeprog.env
|
|