new makefiles (part I)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2613 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
257
src/Makefile.am
Normal file
257
src/Makefile.am
Normal file
@@ -0,0 +1,257 @@
|
||||
SUFFIXES = .cpp
|
||||
|
||||
DEFS = $(TOOLKIT_DEF) $(WXDEBUG_DEFINE)
|
||||
LIBS = $(GUILIBS)
|
||||
|
||||
VPATH = .:$(srcdir)/common:$(srcdir)/@TOOLKIT_DIR@:$(srcdir)/generic:$(EXTRA_VPATH)
|
||||
|
||||
lib_LTLIBRARIES = libwx_@WX_LIBRARY@.la
|
||||
|
||||
# these are the common files which always make part of the library
|
||||
libwx__WX_LIBRARY__la_SOURCES = \
|
||||
cmndata.cpp \
|
||||
dynarray.cpp \
|
||||
filefn.cpp \
|
||||
hash.cpp \
|
||||
list.cpp \
|
||||
matrix.cpp \
|
||||
memory.cpp \
|
||||
module.cpp \
|
||||
object.cpp \
|
||||
string.cpp \
|
||||
timercmn.cpp \
|
||||
utilscmn.cpp \
|
||||
tokenzr.cpp \
|
||||
variant.cpp \
|
||||
wxchar.cpp
|
||||
|
||||
# these are the sources which we build by our own rules
|
||||
#
|
||||
# TODO: parser.y can be included into SOURCES, but for the sake of my life I
|
||||
# don't know where to put lexer.l - if I put it in the sources too,
|
||||
# automake tries to build lexer.lo... and fails, of course. (VZ)
|
||||
BUILT_SOURCES = parser.c lexer.c
|
||||
parser.c: $(srcdir)/common/parser.y lexer.c
|
||||
$(YACC) $(srcdir)/common/parser.y
|
||||
@sed -e "s;$(srcdir)/common/y.tab.c;parser.y;g" < y.tab.c | \
|
||||
sed -e "s/BUFSIZ/5000/g" | \
|
||||
sed -e "s/YYLMAX 200/YYLMAX 5000/g" | \
|
||||
sed -e "s/yy/PROIO_yy/g" | \
|
||||
sed -e "s/input/PROIO_input/g" | \
|
||||
sed -e "s/unput/PROIO_unput/g" > parser.c
|
||||
@$(RM) y.tab.c
|
||||
|
||||
lexer.c: $(srcdir)/common/lexer.l
|
||||
$(LEX) $(srcdir)/common/lexer.l
|
||||
@sed -e "s;$(srcdir)/common/lex.yy.c;lexer.l;g" < lex.yy.c | \
|
||||
sed -e "s/yy/PROIO_yy/g" | \
|
||||
sed -e "s/input/PROIO_input/g" | \
|
||||
sed -e "s/unput/PROIO_unput/g" > lexer.c
|
||||
@$(RM) lex.yy.c
|
||||
|
||||
# these are the files which are only sometimes linked into the library - they
|
||||
# still *must* be all enumerated here to satisfy automake requirments!
|
||||
#
|
||||
# NB: the files are listed in directory/alphabetical order: first the files
|
||||
# from common, then from generic, then from unix, then from gtk.
|
||||
EXTRA_libwx__WX_LIBRARY__la_SOURCES = \
|
||||
config.cpp \
|
||||
date.cpp \
|
||||
datetime.cpp \
|
||||
datstrm.cpp \
|
||||
db.cpp \
|
||||
dbtable.cpp \
|
||||
dcbase.cpp \
|
||||
docmdi.cpp \
|
||||
docview.cpp \
|
||||
dynlib.cpp \
|
||||
event.cpp \
|
||||
file.cpp \
|
||||
fileconf.cpp \
|
||||
framecmn.cpp \
|
||||
ftp.cpp \
|
||||
gdicmn.cpp \
|
||||
helpbase.cpp \
|
||||
http.cpp \
|
||||
image.cpp \
|
||||
imaggif.cpp \
|
||||
imagjpeg.cpp \
|
||||
imagpng.cpp \
|
||||
intl.cpp \
|
||||
ipcbase.cpp \
|
||||
layout.cpp \
|
||||
log.cpp \
|
||||
longlong.cpp \
|
||||
mimetype.cpp \
|
||||
mstream.cpp \
|
||||
objstrm.cpp \
|
||||
odbc.cpp \
|
||||
paper.cpp \
|
||||
prntbase.cpp \
|
||||
process.cpp \
|
||||
protocol.cpp \
|
||||
resourc2.cpp \
|
||||
resource.cpp \
|
||||
sckaddr.cpp \
|
||||
sckfile.cpp \
|
||||
sckint.cpp \
|
||||
sckipc.cpp \
|
||||
sckstrm.cpp \
|
||||
serbase.cpp \
|
||||
socket.cpp \
|
||||
stream.cpp \
|
||||
tbarbase.cpp \
|
||||
tbarsmpl.cpp \
|
||||
textfile.cpp \
|
||||
time.cpp \
|
||||
url.cpp \
|
||||
valgen.cpp \
|
||||
validate.cpp \
|
||||
valtext.cpp \
|
||||
wfstream.cpp \
|
||||
wincmn.cpp \
|
||||
wxexpr.cpp \
|
||||
zstream.cpp \
|
||||
\
|
||||
caret.cpp \
|
||||
choicdgg.cpp \
|
||||
colrdlgg.cpp \
|
||||
dcpsg.cpp \
|
||||
dirdlgg.cpp \
|
||||
fontdlgg.cpp \
|
||||
gridg.cpp \
|
||||
helpext.cpp \
|
||||
helphtml.cpp \
|
||||
helpxlp.cpp \
|
||||
imaglist.cpp \
|
||||
laywin.cpp \
|
||||
listctrl.cpp \
|
||||
msgdlgg.cpp \
|
||||
notebook.cpp \
|
||||
panelg.cpp \
|
||||
printps.cpp \
|
||||
prntdlgg.cpp \
|
||||
progdlgg.cpp \
|
||||
prop.cpp \
|
||||
propform.cpp \
|
||||
proplist.cpp \
|
||||
sashwin.cpp \
|
||||
scrolwin.cpp \
|
||||
splitter.cpp \
|
||||
statusbr.cpp \
|
||||
tabg.cpp \
|
||||
textdlgg.cpp \
|
||||
treectrl.cpp \
|
||||
\
|
||||
threadpsx.cpp \
|
||||
utilsunx.cpp \
|
||||
\
|
||||
accel.cpp \
|
||||
app.cpp \
|
||||
bitmap.cpp \
|
||||
bmpbuttn.cpp \
|
||||
brush.cpp \
|
||||
button.cpp \
|
||||
checkbox.cpp \
|
||||
checklst.cpp \
|
||||
choice.cpp \
|
||||
clipbrd.cpp \
|
||||
colour.cpp \
|
||||
combobox.cpp \
|
||||
control.cpp \
|
||||
cursor.cpp \
|
||||
data.cpp \
|
||||
dataobj.cpp \
|
||||
dc.cpp \
|
||||
dcclient.cpp \
|
||||
dcmemory.cpp \
|
||||
dcscreen.cpp \
|
||||
dialog.cpp \
|
||||
dnd.cpp \
|
||||
filedlg.cpp \
|
||||
font.cpp \
|
||||
frame.cpp \
|
||||
gauge.cpp \
|
||||
gdiobj.cpp \
|
||||
icon.cpp \
|
||||
joystick.cpp \
|
||||
listbox.cpp \
|
||||
main.cpp \
|
||||
mdi.cpp \
|
||||
menu.cpp \
|
||||
minifram.cpp \
|
||||
notebook.cpp \
|
||||
palette.cpp \
|
||||
pen.cpp \
|
||||
radiobox.cpp \
|
||||
radiobut.cpp \
|
||||
region.cpp \
|
||||
scrolbar.cpp \
|
||||
settings.cpp \
|
||||
slider.cpp \
|
||||
spinbutt.cpp \
|
||||
statbmp.cpp \
|
||||
statbox.cpp \
|
||||
statline.cpp \
|
||||
stattext.cpp \
|
||||
tbargtk.cpp \
|
||||
textctrl.cpp \
|
||||
threadno.cpp \
|
||||
threadsgi.cpp \
|
||||
timer.cpp \
|
||||
tooltip.cpp \
|
||||
treectrl.cpp \
|
||||
utilsgtk.cpp \
|
||||
utilsres.cpp \
|
||||
wave.cpp \
|
||||
window.cpp
|
||||
|
||||
libwx__WX_LIBRARY__la_LDFLAGS = -release @WX_MINOR_VERSION_NUMBER@.@WX_RELEASE_NUMBER@
|
||||
libwx__WX_LIBRARY__la_LIBADD = $(LTLIBOBJS)
|
||||
libwx__WX_LIBRARY__la_DEPENDENCIES = $(libwx__WX_LIBRARY__la_LIBADD) lexer.l
|
||||
|
||||
libwx_@WX_LIBRARY@.la: $(libwx__WX_LIBRARY__la_OBJECTS) $(libwx__WX_LIBRARY__la_DEPENDENCIES)
|
||||
$(CXXLINK) -rpath $(libdir) $(libwx__WX_LIBRARY__la_LDFLAGS) $(libwx__WX_LIBRARY__la_OBJECTS) $(libwx__WX_LIBRARY__la_LIBADD) $(LIBS)
|
||||
|
||||
# the files which we install manually (the rest is done by automake)
|
||||
install-data-local:
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(includedir)/wx
|
||||
$(mkinstalldirs) $(DESTDIR)$(includedir)/wx/generic
|
||||
$(mkinstalldirs) $(DESTDIR)$(includedir)/wx/@TOOLKIT_DIR@
|
||||
$(mkinstalldirs) $(DESTDIR)$(includedir)/wx/protocol
|
||||
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/include/wx
|
||||
@for p in $(top_srcdir)/include/wx/*.h $(top_srcdir)/include/wx/*.cpp; do \
|
||||
h=`basename $$p`; (set -x; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(includedir)/wx/$$h ); \
|
||||
done
|
||||
@for p in $(top_srcdir)/include/wx/generic/*.h ; do \
|
||||
h=`basename $$p`; (set -x; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(includedir)/wx/generic/$$h ); \
|
||||
done
|
||||
@for p in $(top_srcdir)/include/wx/@TOOLKIT_DIR@/*.h ; do \
|
||||
h=`basename $$p`; (set -x; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(includedir)/wx/@TOOLKIT_DIR@/$$h ); \
|
||||
done
|
||||
@if [ @TOOLKIT_DIR@ = msw ]; then \
|
||||
for p in $(top_srcdir)/include/wx/@TOOLKIT_DIR@/*.cur \
|
||||
$(top_srcdir)/include/wx/@TOOLKIT_DIR@/*.ico \
|
||||
$(top_srcdir)/include/wx/@TOOLKIT_DIR@/*.bmp \
|
||||
$(top_srcdir)/include/wx/@TOOLKIT_DIR@/*.rc ; do \
|
||||
h=`basename $$p`; (set -x; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(includedir)/wx/@TOOLKIT_DIR@/$$h ); \
|
||||
done; \
|
||||
for p in $(top_srcdir)/include/wx/@TOOLKIT_DIR@/ctl3d/*.h ; do \
|
||||
h=`basename $$p`; (set -x; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(includedir)/wx/@TOOLKIT_DIR@/ctl3d/$$h ); \
|
||||
done; \
|
||||
for p in $(top_srcdir)/include/wx/@TOOLKIT_DIR@/gnuwin32/*.h ; do \
|
||||
h=`basename $$p`; (set -x; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(includedir)/wx/@TOOLKIT_DIR@/gnuwin32/$$h ); \
|
||||
done; \
|
||||
fi
|
||||
@for p in $(top_srcdir)/include/wx/protocol/*.h ; do \
|
||||
h=`basename $$p`; (set -x; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(includedir)/wx/protocol/$$h ); \
|
||||
done
|
||||
$(INSTALL_DATA) ../include/wx/@TOOLKIT_DIR@/setup.h $(DESTDIR)$(pkgdatadir)/include/wx/setup.h
|
751
src/Makefile.in
751
src/Makefile.in
@@ -1,294 +1,523 @@
|
||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DOCS_SUBDIRS = @DOCS_SUBDIRS@
|
||||
EXTRA_LIBS = @EXTRA_LIBS@
|
||||
EXTRA_VPATH = @EXTRA_VPATH@
|
||||
GTK_CFLAGS = @GTK_CFLAGS@
|
||||
GTK_CONFIG = @GTK_CONFIG@
|
||||
GTK_LIBS = @GTK_LIBS@
|
||||
LD = @LD@
|
||||
LEX = @LEX@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
NM = @NM@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
SAMPLES_SUBDIRS = @SAMPLES_SUBDIRS@
|
||||
STRIP = @STRIP@
|
||||
TOOLKIT = @TOOLKIT@
|
||||
TOOLKIT_DEF = @TOOLKIT_DEF@
|
||||
TOOLKIT_DIR = @TOOLKIT_DIR@
|
||||
TOOLKIT_INCLUDE = @TOOLKIT_INCLUDE@
|
||||
USER_SUBDIRS = @USER_SUBDIRS@
|
||||
UTILS_SUBDIRS = @UTILS_SUBDIRS@
|
||||
VERSION = @VERSION@
|
||||
WXDEBUG_DEFINE = @WXDEBUG_DEFINE@
|
||||
WX_LIBRARY = @WX_LIBRARY@
|
||||
WX_MAJOR_VERSION_NUMBER = @WX_MAJOR_VERSION_NUMBER@
|
||||
WX_MINOR_VERSION_NUMBER = @WX_MINOR_VERSION_NUMBER@
|
||||
WX_RELEASE_NUMBER = @WX_RELEASE_NUMBER@
|
||||
YACC = @YACC@
|
||||
|
||||
SUFFIXES = .cpp
|
||||
|
||||
DEFS = $(TOOLKIT_DEF) $(WXDEBUG_DEFINE)
|
||||
LIBS = $(GUILIBS)
|
||||
|
||||
VPATH = .:$(srcdir)/common:$(srcdir)/@TOOLKIT_DIR@:$(srcdir)/generic:$(EXTRA_VPATH)
|
||||
|
||||
lib_LTLIBRARIES = libwx_@WX_LIBRARY@.la
|
||||
|
||||
# these are the common files which always make part of the library
|
||||
libwx__WX_LIBRARY__la_SOURCES = cmndata.cpp dynarray.cpp filefn.cpp hash.cpp list.cpp matrix.cpp memory.cpp module.cpp object.cpp string.cpp timercmn.cpp utilscmn.cpp tokenzr.cpp variant.cpp wxchar.cpp
|
||||
|
||||
|
||||
# these are the sources which we build by our own rules
|
||||
#
|
||||
# wxWindows/Unix main source makefile
|
||||
#
|
||||
# Copyright 1998, Markus Holzhem and Robert Roebling
|
||||
# TODO: parser.y can be included into SOURCES, but for the sake of my life I
|
||||
# don't know where to put lexer.l - if I put it in the sources too,
|
||||
# automake tries to build lexer.lo... and fails, of course. (VZ)
|
||||
BUILT_SOURCES = parser.c lexer.c
|
||||
|
||||
# these are the files which are only sometimes linked into the library - they
|
||||
# still *must* be all enumerated here to satisfy automake requirments!
|
||||
#
|
||||
# NB: the files are listed in directory/alphabetical order: first the files
|
||||
# from common, then from generic, then from unix, then from gtk.
|
||||
EXTRA_libwx__WX_LIBRARY__la_SOURCES = config.cpp date.cpp datetime.cpp datstrm.cpp db.cpp dbtable.cpp dcbase.cpp docmdi.cpp docview.cpp dynlib.cpp event.cpp file.cpp fileconf.cpp framecmn.cpp ftp.cpp gdicmn.cpp helpbase.cpp http.cpp image.cpp imaggif.cpp imagjpeg.cpp imagpng.cpp intl.cpp ipcbase.cpp layout.cpp log.cpp longlong.cpp mimetype.cpp mstream.cpp objstrm.cpp odbc.cpp paper.cpp prntbase.cpp process.cpp protocol.cpp resourc2.cpp resource.cpp sckaddr.cpp sckfile.cpp sckint.cpp sckipc.cpp sckstrm.cpp serbase.cpp socket.cpp stream.cpp tbarbase.cpp tbarsmpl.cpp textfile.cpp time.cpp url.cpp valgen.cpp validate.cpp valtext.cpp wfstream.cpp wincmn.cpp wxexpr.cpp zstream.cpp caret.cpp choicdgg.cpp colrdlgg.cpp dcpsg.cpp dirdlgg.cpp fontdlgg.cpp gridg.cpp helpext.cpp helphtml.cpp helpxlp.cpp imaglist.cpp laywin.cpp listctrl.cpp msgdlgg.cpp notebook.cpp panelg.cpp printps.cpp prntdlgg.cpp progdlgg.cpp prop.cpp propform.cpp proplist.cpp sashwin.cpp scrolwin.cpp splitter.cpp statusbr.cpp tabg.cpp textdlgg.cpp treectrl.cpp threadpsx.cpp utilsunx.cpp accel.cpp app.cpp bitmap.cpp bmpbuttn.cpp brush.cpp button.cpp checkbox.cpp checklst.cpp choice.cpp clipbrd.cpp colour.cpp combobox.cpp control.cpp cursor.cpp data.cpp dataobj.cpp dc.cpp dcclient.cpp dcmemory.cpp dcscreen.cpp dialog.cpp dnd.cpp filedlg.cpp font.cpp frame.cpp gauge.cpp gdiobj.cpp icon.cpp joystick.cpp listbox.cpp main.cpp mdi.cpp menu.cpp minifram.cpp notebook.cpp palette.cpp pen.cpp radiobox.cpp radiobut.cpp region.cpp scrolbar.cpp settings.cpp slider.cpp spinbutt.cpp statbmp.cpp statbox.cpp statline.cpp stattext.cpp tbargtk.cpp textctrl.cpp threadno.cpp threadsgi.cpp timer.cpp tooltip.cpp treectrl.cpp utilsgtk.cpp utilsres.cpp wave.cpp window.cpp
|
||||
|
||||
# wxWindows base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
libwx__WX_LIBRARY__la_LDFLAGS = -release @WX_MINOR_VERSION_NUMBER@.@WX_RELEASE_NUMBER@
|
||||
libwx__WX_LIBRARY__la_LIBADD = $(LTLIBOBJS)
|
||||
libwx__WX_LIBRARY__la_DEPENDENCIES = $(libwx__WX_LIBRARY__la_LIBADD) lexer.l
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../${SETUPH_DIR}/setup.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
|
||||
# compile a library only
|
||||
RULE=gslib
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
X_CFLAGS = @X_CFLAGS@
|
||||
X_LIBS = @X_LIBS@
|
||||
X_EXTRA_LIBS = @X_EXTRA_LIBS@
|
||||
X_PRE_LIBS = @X_PRE_LIBS@
|
||||
libwx__WX_LIBRARY__la_OBJECTS = cmndata.lo dynarray.lo filefn.lo \
|
||||
hash.lo list.lo matrix.lo memory.lo module.lo object.lo string.lo \
|
||||
timercmn.lo utilscmn.lo tokenzr.lo variant.lo wxchar.lo
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
DIST_COMMON = Makefile.am Makefile.in common/extended.c
|
||||
|
||||
# define source file for odbc
|
||||
IODBC_C_SRC=\
|
||||
iodbc/catalog.c \
|
||||
iodbc/connect.c \
|
||||
iodbc/dlf.c \
|
||||
iodbc/dlproc.c \
|
||||
iodbc/execute.c \
|
||||
iodbc/fetch.c \
|
||||
iodbc/hdbc.c \
|
||||
iodbc/henv.c \
|
||||
iodbc/herr.c \
|
||||
iodbc/hstmt.c \
|
||||
iodbc/info.c \
|
||||
iodbc/itrace.c \
|
||||
iodbc/misc.c \
|
||||
iodbc/prepare.c \
|
||||
iodbc/result.c
|
||||
|
||||
# define source file for jpeg
|
||||
JPEG_C_SRC=\
|
||||
jpeg/jcapimin.c \
|
||||
jpeg/jcapistd.c \
|
||||
jpeg/jccoefct.c \
|
||||
jpeg/jccolor.c \
|
||||
jpeg/jcdctmgr.c \
|
||||
jpeg/jchuff.c \
|
||||
jpeg/jcinit.c \
|
||||
jpeg/jcmainct.c \
|
||||
jpeg/jcmarker.c \
|
||||
jpeg/jcmaster.c \
|
||||
jpeg/jcomapi.c \
|
||||
jpeg/jcparam.c \
|
||||
jpeg/jcphuff.c \
|
||||
jpeg/jcprepct.c \
|
||||
jpeg/jcsample.c \
|
||||
jpeg/jctrans.c \
|
||||
jpeg/jdapimin.c \
|
||||
jpeg/jdapistd.c \
|
||||
jpeg/jdatadst.c \
|
||||
jpeg/jdatasrc.c \
|
||||
jpeg/jdcoefct.c \
|
||||
jpeg/jdcolor.c \
|
||||
jpeg/jddctmgr.c \
|
||||
jpeg/jdhuff.c \
|
||||
jpeg/jdinput.c \
|
||||
jpeg/jdmainct.c \
|
||||
jpeg/jdmarker.c \
|
||||
jpeg/jdmaster.c \
|
||||
jpeg/jdmerge.c \
|
||||
jpeg/jdphuff.c \
|
||||
jpeg/jdpostct.c \
|
||||
jpeg/jdsample.c \
|
||||
jpeg/jdtrans.c \
|
||||
jpeg/jerror.c \
|
||||
jpeg/jfdctflt.c \
|
||||
jpeg/jfdctfst.c \
|
||||
jpeg/jfdctint.c \
|
||||
jpeg/jidctflt.c \
|
||||
jpeg/jidctfst.c \
|
||||
jpeg/jidctint.c \
|
||||
jpeg/jidctred.c \
|
||||
jpeg/jquant1.c \
|
||||
jpeg/jquant2.c \
|
||||
jpeg/jutils.c \
|
||||
jpeg/jmemmgr.c \
|
||||
jpeg/jmemnobs.c
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
# define source file for png
|
||||
PNG_C_SRC=\
|
||||
png/png.c \
|
||||
png/pngset.c \
|
||||
png/pngget.c \
|
||||
png/pngrutil.c \
|
||||
png/pngtrans.c \
|
||||
png/pngwutil.c \
|
||||
png/pngread.c \
|
||||
png/pngrio.c \
|
||||
png/pngwio.c \
|
||||
png/pngwrite.c \
|
||||
png/pngrtran.c \
|
||||
png/pngwtran.c \
|
||||
png/pngmem.c \
|
||||
png/pngerror.c \
|
||||
png/pngpread.c
|
||||
|
||||
# define source file for zlib
|
||||
Z_C_SRC=\
|
||||
zlib/adler32.c \
|
||||
zlib/compress.c \
|
||||
zlib/crc32.c \
|
||||
zlib/gzio.c \
|
||||
zlib/uncompr.c \
|
||||
zlib/deflate.c \
|
||||
zlib/trees.c \
|
||||
zlib/zutil.c \
|
||||
zlib/inflate.c \
|
||||
zlib/infblock.c \
|
||||
zlib/inftrees.c \
|
||||
zlib/infcodes.c \
|
||||
zlib/infutil.c \
|
||||
zlib/inffast.c
|
||||
|
||||
# include gtk.inc, qt.inc or motif.inc here
|
||||
include @MAKEINCLUDE@
|
||||
TAR = gtar
|
||||
GZIP_ENV = --best
|
||||
DEP_FILES = .deps/accel.P .deps/app.P .deps/bitmap.P .deps/bmpbuttn.P \
|
||||
.deps/brush.P .deps/button.P .deps/caret.P .deps/checkbox.P \
|
||||
.deps/checklst.P .deps/choicdgg.P .deps/choice.P .deps/clipbrd.P \
|
||||
.deps/cmndata.P .deps/colour.P .deps/colrdlgg.P .deps/combobox.P \
|
||||
.deps/common/extended.P .deps/config.P .deps/control.P .deps/cursor.P \
|
||||
.deps/data.P .deps/dataobj.P .deps/date.P .deps/datetime.P \
|
||||
.deps/datstrm.P .deps/db.P .deps/dbtable.P .deps/dc.P .deps/dcbase.P \
|
||||
.deps/dcclient.P .deps/dcmemory.P .deps/dcpsg.P .deps/dcscreen.P \
|
||||
.deps/dialog.P .deps/dirdlgg.P .deps/dnd.P .deps/docmdi.P \
|
||||
.deps/docview.P .deps/dynarray.P .deps/dynlib.P .deps/event.P \
|
||||
.deps/file.P .deps/fileconf.P .deps/filedlg.P .deps/filefn.P \
|
||||
.deps/font.P .deps/fontdlgg.P .deps/frame.P .deps/framecmn.P \
|
||||
.deps/ftp.P .deps/gauge.P .deps/gdicmn.P .deps/gdiobj.P .deps/gridg.P \
|
||||
.deps/hash.P .deps/helpbase.P .deps/helpext.P .deps/helphtml.P \
|
||||
.deps/helpxlp.P .deps/http.P .deps/icon.P .deps/image.P .deps/imaggif.P \
|
||||
.deps/imagjpeg.P .deps/imaglist.P .deps/imagpng.P .deps/intl.P \
|
||||
.deps/ipcbase.P .deps/joystick.P .deps/layout.P .deps/laywin.P \
|
||||
.deps/lexer.P .deps/list.P .deps/listbox.P .deps/listctrl.P .deps/log.P \
|
||||
.deps/longlong.P .deps/main.P .deps/matrix.P .deps/mdi.P .deps/memory.P \
|
||||
.deps/menu.P .deps/mimetype.P .deps/minifram.P .deps/module.P \
|
||||
.deps/msgdlgg.P .deps/mstream.P .deps/notebook.P .deps/object.P \
|
||||
.deps/objstrm.P .deps/odbc.P .deps/palette.P .deps/panelg.P \
|
||||
.deps/paper.P .deps/parser.P .deps/pen.P .deps/printps.P \
|
||||
.deps/prntbase.P .deps/prntdlgg.P .deps/process.P .deps/progdlgg.P \
|
||||
.deps/prop.P .deps/propform.P .deps/proplist.P .deps/protocol.P \
|
||||
.deps/radiobox.P .deps/radiobut.P .deps/region.P .deps/resourc2.P \
|
||||
.deps/resource.P .deps/sashwin.P .deps/sckaddr.P .deps/sckfile.P \
|
||||
.deps/sckint.P .deps/sckipc.P .deps/sckstrm.P .deps/scrolbar.P \
|
||||
.deps/scrolwin.P .deps/serbase.P .deps/settings.P .deps/slider.P \
|
||||
.deps/socket.P .deps/spinbutt.P .deps/splitter.P .deps/statbmp.P \
|
||||
.deps/statbox.P .deps/statline.P .deps/stattext.P .deps/statusbr.P \
|
||||
.deps/stream.P .deps/string.P .deps/tabg.P .deps/tbarbase.P \
|
||||
.deps/tbargtk.P .deps/tbarsmpl.P .deps/textctrl.P .deps/textdlgg.P \
|
||||
.deps/textfile.P .deps/threadno.P .deps/threadpsx.P .deps/threadsgi.P \
|
||||
.deps/time.P .deps/timer.P .deps/timercmn.P .deps/tokenzr.P \
|
||||
.deps/tooltip.P .deps/treectrl.P .deps/url.P .deps/utilscmn.P \
|
||||
.deps/utilsgtk.P .deps/utilsres.P .deps/utilsunx.P .deps/valgen.P \
|
||||
.deps/validate.P .deps/valtext.P .deps/variant.P .deps/wave.P \
|
||||
.deps/wfstream.P .deps/wincmn.P .deps/window.P .deps/wxchar.P \
|
||||
.deps/wxexpr.P .deps/zstream.P
|
||||
SOURCES = $(libwx__WX_LIBRARY__la_SOURCES) $(EXTRA_libwx__WX_LIBRARY__la_SOURCES)
|
||||
OBJECTS = $(libwx__WX_LIBRARY__la_OBJECTS)
|
||||
|
||||
# determine library names
|
||||
STATIC_LIBRARY=lib$(LIB_TARGET).a
|
||||
SHARED_LIBRARY=lib$(LIB_TARGET).so.$(LIB_MAJOR).$(LIB_MINOR)
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .cpp .lo .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile
|
||||
|
||||
LIB_CPP_ALL_SRC=$(LIB_CPP_SRC) @UNIX_THREAD@
|
||||
# @GTK_JOYSTICK@
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
LIB_C_ALL_SRC=$(LIB_C_SRC) @IODBC_C_SRC@ @PNG_C_SRC@ @Z_C_SRC@ @JPEG_C_SRC@ parser.c
|
||||
|
||||
#define library objects
|
||||
LIB_OBJ=\
|
||||
$(LIB_CPP_ALL_SRC:.cpp=.o) \
|
||||
$(LIB_C_ALL_SRC:.c=.o)
|
||||
mostlyclean-libLTLIBRARIES:
|
||||
|
||||
all::
|
||||
@if test ! -d gtk; then mkdir gtk; fi
|
||||
@if test ! -d qt; then mkdir qt; fi
|
||||
@if test ! -d motif; then mkdir motif; fi
|
||||
@if test ! -d motif/xmcombo; then mkdir motif/xmcombo; fi
|
||||
@if test ! -d common; then mkdir common; fi
|
||||
@if test ! -d unix; then mkdir unix; fi
|
||||
@if test ! -d generic; then mkdir generic; fi
|
||||
@if test ! -d png; then mkdir png; fi
|
||||
@if test ! -d jpeg; then mkdir jpeg; fi
|
||||
@if test ! -d zlib; then mkdir zlib; fi
|
||||
@if test ! -d iodbc; then mkdir iodbc; fi
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
|
||||
install::
|
||||
@echo " "
|
||||
@echo "Installing library files and headers.."
|
||||
@echo " "
|
||||
@echo " Creating directories.."
|
||||
@$(WXBASEDIR)/mkinstalldirs \
|
||||
$(includedir)/wx \
|
||||
$(includedir)/wx/gtk \
|
||||
$(includedir)/wx/motif \
|
||||
$(includedir)/wx/unix \
|
||||
$(includedir)/wx/generic \
|
||||
$(includedir)/wx/protocol \
|
||||
$(libdir)/wx/include/wx/gtk \
|
||||
$(libdir) \
|
||||
$(bindir)
|
||||
@echo " Copying headers from /include/wx"
|
||||
@cd $(WXBASEDIR)/include/wx ; \
|
||||
$(INSTALL) -d $(includedir)/wx ; \
|
||||
for f in *.h ; do \
|
||||
rm -f $(includedir)/wx/$$f ; \
|
||||
$(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \
|
||||
done ; \
|
||||
for f in *.cpp ; do \
|
||||
rm -f $(includedir)/wx/$$f ; \
|
||||
$(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \
|
||||
distclean-libLTLIBRARIES:
|
||||
|
||||
maintainer-clean-libLTLIBRARIES:
|
||||
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \
|
||||
$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \
|
||||
else :; fi; \
|
||||
done
|
||||
@if test "@TOOLKIT@" = "GTK" ; then \
|
||||
echo " Copying headers from /include/wx/gtk" ; \
|
||||
cd $(WXBASEDIR)/include/wx/gtk ; \
|
||||
$(INSTALL) -d $(includedir)/wx/gtk ; \
|
||||
for f in *.h ; do \
|
||||
rm -f $(includedir)/wx/gtk/$$f ; \
|
||||
$(INSTALL_DATA) $$f $(includedir)/wx/gtk/$$f ; \
|
||||
done ; \
|
||||
fi
|
||||
@if test "@TOOLKIT@" = "MOTIF" ; then \
|
||||
echo " Copying headers from /include/wx/motif" ; \
|
||||
cd $(WXBASEDIR)/include/wx/motif ; \
|
||||
$(INSTALL) -d $(includedir)/wx/motif ; \
|
||||
for f in *.h ; do \
|
||||
rm -f $(includedir)/wx/motif/$$f ; \
|
||||
$(INSTALL_DATA) $$f $(includedir)/wx/motif/$$f ; \
|
||||
done ; \
|
||||
fi
|
||||
@echo " Copying headers from /include/wx/generic"
|
||||
@cd $(WXBASEDIR)/include/wx/generic ; \
|
||||
$(INSTALL) -d $(includedir)/wx/generic ; \
|
||||
for f in *.h ; do \
|
||||
rm -f $(includedir)/wx/generic/$$f ; \
|
||||
$(INSTALL_DATA) $$f $(includedir)/wx/generic/$$f ; \
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
|
||||
done
|
||||
@echo " Copying headers from /include/wx/protocol"
|
||||
@cd $(WXBASEDIR)/include/wx/protocol ; \
|
||||
for f in *.h ; do \
|
||||
rm -f $(includedir)/wx/protocol/$$f ; \
|
||||
$(INSTALL_DATA) $$f $(includedir)/wx/protocol/$$f ; \
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
.s.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
.S.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
|
||||
maintainer-clean-libtool:
|
||||
|
||||
libwx_@.la: $(libwx__WX_LIBRARY__la_OBJECTS) $(libwx__WX_LIBRARY__la_DEPENDENCIES)
|
||||
$(CXXLINK) -rpath $(libdir) $(libwx__WX_LIBRARY__la_LDFLAGS) $(libwx__WX_LIBRARY__la_OBJECTS) $(libwx__WX_LIBRARY__la_LIBADD) $(LIBS)
|
||||
.cpp.o:
|
||||
$(CXXCOMPILE) -c $<
|
||||
.cpp.lo:
|
||||
$(LTCXXCOMPILE) -c $<
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = src
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign src/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
@echo " Copying headers from /include/wx/unix"
|
||||
@cd $(WXBASEDIR)/include/wx/unix ; \
|
||||
for f in *.h ; do \
|
||||
rm -f $(includedir)/wx/unix/$$f ; \
|
||||
$(INSTALL_DATA) $$f $(includedir)/wx/unix/$$f ; \
|
||||
done
|
||||
@echo " Moving setup.h to library path"
|
||||
@if test "@TOOLKIT@" = "GTK" ; then \
|
||||
cd $(WXBASEDIR)/src ; \
|
||||
$(INSTALL) -d $(libdir)/wx/include/wx/gtk ; \
|
||||
mv $(includedir)/wx/gtk/setup.h $(libdir)/wx/include/wx/gtk/setup.h ; \
|
||||
fi
|
||||
@if test "@TOOLKIT@" = "MOTIF" ; then \
|
||||
cd $(WXBASEDIR)/src ; \
|
||||
$(INSTALL) -d $(libdir)/wx/include/wx/motif ; \
|
||||
mv $(includedir)/wx/motif/setup.h $(libdir)/wx/include/wx/motif/setup.h ; \
|
||||
fi
|
||||
@echo " Copying wx-config"
|
||||
@cd $(WXBASEDIR)/src ; \
|
||||
$(INSTALL) -d $(bindir) ; \
|
||||
rm -f $(bindir)/wx-config ; \
|
||||
$(INSTALL_PROGRAM) $(WXBASEDIR)/wx-config $(bindir)/wx-config
|
||||
@echo " Copying static library"
|
||||
@cd $(WXBASEDIR)/src ; \
|
||||
rm -f $(libdir)/$(STATIC_LIBRARY) ; \
|
||||
$(INSTALL_DATA) $(WXBASEDIR)/lib/$(OS)/$(STATIC_LIBRARY) $(libdir)/$(STATIC_LIBRARY)
|
||||
@if test -f $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) ; then \
|
||||
echo " Copying shared library" ; \
|
||||
rm -f $(libdir)/lib$(LIB_TARGET).so* ; \
|
||||
$(INSTALL_PROGRAM) $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) $(libdir)/$(SHARED_LIBRARY) ; \
|
||||
$(STRIP) $(libdir)/$(SHARED_LIBRARY) ; \
|
||||
$(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so.$(LIB_MAJOR) ; \
|
||||
$(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so ; \
|
||||
echo " " ; \
|
||||
echo " You may have to run ldconfig!" ; \
|
||||
echo " " ; \
|
||||
fi
|
||||
@echo " "
|
||||
@echo "Installation complete."
|
||||
@echo " "
|
||||
|
||||
clean::
|
||||
$(RM) -rf gtk
|
||||
$(RM) -rf qt
|
||||
$(RM) -rf motif
|
||||
$(RM) -rf common
|
||||
$(RM) -rf unix
|
||||
$(RM) -rf generic
|
||||
$(RM) -rf png
|
||||
$(RM) -rf jpeg
|
||||
$(RM) -rf zlib
|
||||
$(RM) -rf iodbc
|
||||
@$(RM) lexer.c parser.c
|
||||
|
||||
#additional things needed for compile
|
||||
ADD_COMPILE=
|
||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||
|
||||
# include the definitions now
|
||||
include ../../template.mak
|
||||
-include $(DEP_FILES)
|
||||
|
||||
# things for the prolog stuff
|
||||
mostlyclean-depend:
|
||||
|
||||
parser.c: ../common/parser.y lexer.c
|
||||
@if test ! -f parser.y; then \
|
||||
cp -f ../common/parser.y . ; \
|
||||
fi
|
||||
@$(YACC) parser.y
|
||||
@sed -e "s/y.tab.c/parser.y/g" < y.tab.c | \
|
||||
clean-depend:
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
maintainer-clean-depend:
|
||||
|
||||
%.o: %.c
|
||||
@echo '$(COMPILE) -c $<'; \
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm .deps/$(*F).pp
|
||||
|
||||
%.lo: %.c
|
||||
@echo '$(LTCOMPILE) -c $<'; \
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
|
||||
< .deps/$(*F).pp > .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm -f .deps/$(*F).pp
|
||||
|
||||
%.o: %.cpp
|
||||
@echo '$(CXXCOMPILE) -c $<'; \
|
||||
$(CXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm .deps/$(*F).pp
|
||||
|
||||
%.lo: %.cpp
|
||||
@echo '$(LTCXXCOMPILE) -c $<'; \
|
||||
$(LTCXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
|
||||
< .deps/$(*F).pp > .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm -f .deps/$(*F).pp
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am: install-data-local
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-libLTLIBRARIES
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(LTLIBRARIES)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean-am: mostlyclean-libLTLIBRARIES mostlyclean-compile \
|
||||
mostlyclean-libtool mostlyclean-tags mostlyclean-depend \
|
||||
mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-libLTLIBRARIES clean-compile clean-libtool clean-tags \
|
||||
clean-depend clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-libLTLIBRARIES distclean-compile \
|
||||
distclean-libtool distclean-tags distclean-depend \
|
||||
distclean-generic clean-am
|
||||
-rm -f libtool
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-libLTLIBRARIES \
|
||||
maintainer-clean-compile maintainer-clean-libtool \
|
||||
maintainer-clean-tags maintainer-clean-depend \
|
||||
maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
|
||||
clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
|
||||
uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \
|
||||
distclean-compile clean-compile maintainer-clean-compile \
|
||||
mostlyclean-libtool distclean-libtool clean-libtool \
|
||||
maintainer-clean-libtool tags mostlyclean-tags distclean-tags \
|
||||
clean-tags maintainer-clean-tags distdir mostlyclean-depend \
|
||||
distclean-depend clean-depend maintainer-clean-depend info-am info \
|
||||
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
|
||||
install-exec install-data-local install-data-am install-data install-am \
|
||||
install uninstall-am uninstall all-redirect all-am all installdirs \
|
||||
mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
parser.c: $(srcdir)/common/parser.y lexer.c
|
||||
$(YACC) $(srcdir)/common/parser.y
|
||||
@sed -e "s;$(srcdir)/common/y.tab.c;parser.y;g" < y.tab.c | \
|
||||
sed -e "s/BUFSIZ/5000/g" | \
|
||||
sed -e "s/YYLMAX 200/YYLMAX 5000/g" | \
|
||||
sed -e "s/yy/PROIO_yy/g" | \
|
||||
sed -e "s/input/PROIO_input/g" | \
|
||||
sed -e "s/unput/PROIO_unput/g" > parser.c
|
||||
@$(RM) y.tab.c
|
||||
@$(RM) parser.y
|
||||
|
||||
lexer.c: ../common/lexer.l
|
||||
@if test ! -f lexer.l; then \
|
||||
cp -f ../common/lexer.l . ;\
|
||||
fi
|
||||
@$(LEX) lexer.l
|
||||
@sed -e "s/lex.yy.c/lexer.l/g" < lex.yy.c | \
|
||||
lexer.c: $(srcdir)/common/lexer.l
|
||||
$(LEX) $(srcdir)/common/lexer.l
|
||||
@sed -e "s;$(srcdir)/common/lex.yy.c;lexer.l;g" < lex.yy.c | \
|
||||
sed -e "s/yy/PROIO_yy/g" | \
|
||||
sed -e "s/input/PROIO_input/g" | \
|
||||
sed -e "s/unput/PROIO_unput/g" > lexer.c
|
||||
@$(RM) lex.yy.c
|
||||
@$(RM) lexer.l
|
||||
|
||||
clean::
|
||||
|
||||
libwx_@WX_LIBRARY@.la: $(libwx__WX_LIBRARY__la_OBJECTS) $(libwx__WX_LIBRARY__la_DEPENDENCIES)
|
||||
$(CXXLINK) -rpath $(libdir) $(libwx__WX_LIBRARY__la_LDFLAGS) $(libwx__WX_LIBRARY__la_OBJECTS) $(libwx__WX_LIBRARY__la_LIBADD) $(LIBS)
|
||||
|
||||
# the files which we install manually (the rest is done by automake)
|
||||
install-data-local:
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(includedir)/wx
|
||||
$(mkinstalldirs) $(DESTDIR)$(includedir)/wx/generic
|
||||
$(mkinstalldirs) $(DESTDIR)$(includedir)/wx/@TOOLKIT_DIR@
|
||||
$(mkinstalldirs) $(DESTDIR)$(includedir)/wx/protocol
|
||||
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/include/wx
|
||||
@for p in $(top_srcdir)/include/wx/*.h $(top_srcdir)/include/wx/*.cpp; do \
|
||||
h=`basename $$p`; (set -x; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(includedir)/wx/$$h ); \
|
||||
done
|
||||
@for p in $(top_srcdir)/include/wx/generic/*.h ; do \
|
||||
h=`basename $$p`; (set -x; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(includedir)/wx/generic/$$h ); \
|
||||
done
|
||||
@for p in $(top_srcdir)/include/wx/@TOOLKIT_DIR@/*.h ; do \
|
||||
h=`basename $$p`; (set -x; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(includedir)/wx/@TOOLKIT_DIR@/$$h ); \
|
||||
done
|
||||
@if [ @TOOLKIT_DIR@ = msw ]; then \
|
||||
for p in $(top_srcdir)/include/wx/@TOOLKIT_DIR@/*.cur \
|
||||
$(top_srcdir)/include/wx/@TOOLKIT_DIR@/*.ico \
|
||||
$(top_srcdir)/include/wx/@TOOLKIT_DIR@/*.bmp \
|
||||
$(top_srcdir)/include/wx/@TOOLKIT_DIR@/*.rc ; do \
|
||||
h=`basename $$p`; (set -x; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(includedir)/wx/@TOOLKIT_DIR@/$$h ); \
|
||||
done; \
|
||||
for p in $(top_srcdir)/include/wx/@TOOLKIT_DIR@/ctl3d/*.h ; do \
|
||||
h=`basename $$p`; (set -x; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(includedir)/wx/@TOOLKIT_DIR@/ctl3d/$$h ); \
|
||||
done; \
|
||||
for p in $(top_srcdir)/include/wx/@TOOLKIT_DIR@/gnuwin32/*.h ; do \
|
||||
h=`basename $$p`; (set -x; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(includedir)/wx/@TOOLKIT_DIR@/gnuwin32/$$h ); \
|
||||
done; \
|
||||
fi
|
||||
@for p in $(top_srcdir)/include/wx/protocol/*.h ; do \
|
||||
h=`basename $$p`; (set -x; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(includedir)/wx/protocol/$$h ); \
|
||||
done
|
||||
$(INSTALL_DATA) ../include/wx/@TOOLKIT_DIR@/setup.h $(DESTDIR)$(pkgdatadir)/include/wx/setup.h
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
@@ -39,16 +39,18 @@
|
||||
#include "wx/cmndata.h"
|
||||
#include "wx/log.h"
|
||||
|
||||
#include "wx/paper.h"
|
||||
|
||||
// For compatibility
|
||||
#if (defined(__WXMOTIF__) || defined(__WXGTK__)) && wxUSE_POSTSCRIPT
|
||||
#define wxCOMPATIBILITY_WITH_PRINTSETUPDATA 1
|
||||
#endif
|
||||
|
||||
#if wxCOMPATIBILITY_WITH_PRINTSETUPDATA
|
||||
#include "wx/generic/dcpsg.h"
|
||||
#endif
|
||||
#if wxUSE_PRINTING_ARCHITECTURE
|
||||
#include "wx/paper.h"
|
||||
|
||||
#if wxCOMPATIBILITY_WITH_PRINTSETUPDATA
|
||||
#include "wx/generic/dcpsg.h"
|
||||
#endif
|
||||
#endif // wxUSE_PRINTING_ARCHITECTURE
|
||||
|
||||
#ifdef __WXMSW__
|
||||
#include <windows.h>
|
||||
@@ -66,9 +68,11 @@
|
||||
#endif // MSW
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPrintData, wxObject)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPrintDialogData, wxObject)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPageSetupDialogData, wxObject)
|
||||
#if wxUSE_PRINTING_ARCHITECTURE
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPrintData, wxObject)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPrintDialogData, wxObject)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPageSetupDialogData, wxObject)
|
||||
#endif // wxUSE_PRINTING_ARCHITECTURE
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxFontData, wxObject)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxColourData, wxObject)
|
||||
#endif
|
||||
@@ -163,6 +167,7 @@ void wxFontData::operator=(const wxFontData& data)
|
||||
maxSize = data.maxSize;
|
||||
}
|
||||
|
||||
#if wxUSE_PRINTING_ARCHITECTURE
|
||||
// ----------------------------------------------------------------------------
|
||||
// Print data
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -1166,3 +1171,4 @@ void wxPageSetupDialogData::CalculatePaperSizeFromId()
|
||||
}
|
||||
}
|
||||
|
||||
#endif // wxUSE_PRINTING_ARCHITECTURE
|
||||
|
@@ -66,7 +66,7 @@ void wxDCBase::DrawPolygon(const wxList *list,
|
||||
}
|
||||
|
||||
|
||||
#ifdef wxUSE_SPLINES
|
||||
#if wxUSE_SPLINES
|
||||
|
||||
// TODO: this API needs fixing (wxPointList, why (!const) "wxList *"?)
|
||||
void wxDCBase::DrawSpline(long x1, long y1, long x2, long y2, long x3, long y3)
|
||||
@@ -105,4 +105,4 @@ void wxDCBase::DrawSpline(int n, wxPoint points[])
|
||||
DrawSpline(&list);
|
||||
}
|
||||
|
||||
#endif // wxUSE_SPLINES
|
||||
#endif // wxUSE_SPLINES
|
||||
|
@@ -53,6 +53,7 @@
|
||||
#include "wx/msgdlg.h"
|
||||
#include "wx/choicdlg.h"
|
||||
#include "wx/docview.h"
|
||||
#include "wx/prntbase.h"
|
||||
#include "wx/printdlg.h"
|
||||
#include "wx/confbase.h"
|
||||
|
||||
@@ -240,9 +241,7 @@ bool wxDocument::SaveAs()
|
||||
return FALSE;
|
||||
|
||||
wxString fileName(tmp);
|
||||
wxString path("");
|
||||
wxString name("");
|
||||
wxString ext("");
|
||||
wxString path, name, ext;
|
||||
wxSplitPath(fileName, & path, & name, & ext);
|
||||
|
||||
if (ext.IsEmpty() || ext == _T(""))
|
||||
@@ -787,6 +786,7 @@ void wxDocManager::OnFileSaveAs(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
void wxDocManager::OnPrint(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
#if wxUSE_PRINTING_ARCHITECTURE
|
||||
wxView *view = GetCurrentView();
|
||||
if (!view)
|
||||
return;
|
||||
@@ -799,6 +799,7 @@ void wxDocManager::OnPrint(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
delete printout;
|
||||
}
|
||||
#endif // wxUSE_PRINTING_ARCHITECTURE
|
||||
}
|
||||
|
||||
void wxDocManager::OnPrintSetup(wxCommandEvent& WXUNUSED(event))
|
||||
@@ -817,6 +818,7 @@ void wxDocManager::OnPrintSetup(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
void wxDocManager::OnPreview(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
#if wxUSE_PRINTING_ARCHITECTURE
|
||||
wxView *view = GetCurrentView();
|
||||
if (!view)
|
||||
return;
|
||||
@@ -834,6 +836,7 @@ void wxDocManager::OnPreview(wxCommandEvent& WXUNUSED(event))
|
||||
frame->Initialize();
|
||||
frame->Show(TRUE);
|
||||
}
|
||||
#endif // wxUSE_PRINTING_ARCHITECTURE
|
||||
}
|
||||
|
||||
void wxDocManager::OnUndo(wxCommandEvent& WXUNUSED(event))
|
||||
|
@@ -25,9 +25,6 @@ WORDCHAR [^'\\]
|
||||
|
||||
#include "wx/expr.h"
|
||||
|
||||
#ifdef wx_x
|
||||
extern char *malloc();
|
||||
#endif
|
||||
#define Return(x) return x;
|
||||
|
||||
#if defined(VMS) && !defined(strdup)
|
||||
@@ -40,10 +37,9 @@ static size_t lex_string_ptr = 0;
|
||||
static int lex_read_from_string = 0;
|
||||
|
||||
static int my_input(void);
|
||||
static int my_unput(char);
|
||||
|
||||
#ifdef FLEX_SCANNER
|
||||
#undef YY_INPUT
|
||||
# undef YY_INPUT
|
||||
# define YY_INPUT(buf,result,max_size) \
|
||||
if (lex_read_from_string) \
|
||||
{ int c = my_input(); result = (c == 0) ? YY_NULL : ((buf)[0]=(c), 1); } \
|
||||
@@ -53,6 +49,7 @@ static int my_unput(char);
|
||||
#else
|
||||
# undef unput
|
||||
# define unput(_c) my_unput(_c)
|
||||
static int my_unput(char);
|
||||
#endif
|
||||
|
||||
%}
|
||||
@@ -121,9 +118,6 @@ static int lex_input() {
|
||||
static int lex_input() {
|
||||
return input();
|
||||
}
|
||||
/* # undef unput
|
||||
# define unput(_c) my_unput(_c)
|
||||
*/
|
||||
|
||||
# undef input
|
||||
# define input() my_input()
|
||||
|
@@ -505,6 +505,7 @@ void wxLogGui::DoLog(wxLogLevel level, const wxChar *szString, time_t t)
|
||||
break;
|
||||
|
||||
case wxLOG_Status:
|
||||
#if wxUSE_STATUSBAR
|
||||
{
|
||||
// find the top window and set it's status text if it has any
|
||||
wxFrame *pFrame = gs_pFrame;
|
||||
@@ -518,6 +519,7 @@ void wxLogGui::DoLog(wxLogLevel level, const wxChar *szString, time_t t)
|
||||
if ( pFrame != NULL )
|
||||
pFrame->SetStatusText(szString);
|
||||
}
|
||||
#endif // wxUSE_STATUSBAR
|
||||
break;
|
||||
|
||||
case wxLOG_Trace:
|
||||
@@ -584,7 +586,9 @@ public:
|
||||
// menu callbacks
|
||||
void OnClose(wxCommandEvent& event);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
#if wxUSE_FILE
|
||||
void OnSave (wxCommandEvent& event);
|
||||
#endif // wxUSE_FILE
|
||||
void OnClear(wxCommandEvent& event);
|
||||
|
||||
void OnIdle(wxIdleEvent&);
|
||||
@@ -612,7 +616,9 @@ private:
|
||||
BEGIN_EVENT_TABLE(wxLogFrame, wxFrame)
|
||||
// wxLogWindow menu events
|
||||
EVT_MENU(Menu_Close, wxLogFrame::OnClose)
|
||||
#if wxUSE_FILE
|
||||
EVT_MENU(Menu_Save, wxLogFrame::OnSave)
|
||||
#endif // wxUSE_FILE
|
||||
EVT_MENU(Menu_Clear, wxLogFrame::OnClear)
|
||||
|
||||
EVT_CLOSE(wxLogFrame::OnCloseWindow)
|
||||
@@ -632,15 +638,19 @@ wxLogFrame::wxLogFrame(wxFrame *pParent, wxLogWindow *log, const wxChar *szTitle
|
||||
// create menu
|
||||
wxMenuBar *pMenuBar = new wxMenuBar;
|
||||
wxMenu *pMenu = new wxMenu;
|
||||
#if wxUSE_FILE
|
||||
pMenu->Append(Menu_Save, _("&Save..."), _("Save log contents to file"));
|
||||
#endif // wxUSE_FILE
|
||||
pMenu->Append(Menu_Clear, _("C&lear"), _("Clear the log contents"));
|
||||
pMenu->AppendSeparator();
|
||||
pMenu->Append(Menu_Close, _("&Close"), _("Close this window"));
|
||||
pMenuBar->Append(pMenu, _("&Log"));
|
||||
SetMenuBar(pMenuBar);
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
// status bar for menu prompts
|
||||
CreateStatusBar();
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
m_log->OnFrameCreate(this);
|
||||
}
|
||||
@@ -655,6 +665,7 @@ void wxLogFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
|
||||
DoClose();
|
||||
}
|
||||
|
||||
#if wxUSE_FILE
|
||||
void wxLogFrame::OnSave(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
// get the file name
|
||||
@@ -725,6 +736,7 @@ void wxLogFrame::OnSave(wxCommandEvent& WXUNUSED(event))
|
||||
wxLogStatus(this, _("Log saved to the file '%s'."), szFileName);
|
||||
}
|
||||
}
|
||||
#endif // wxUSE_FILE
|
||||
|
||||
void wxLogFrame::OnClear(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
@@ -739,9 +751,9 @@ wxLogFrame::~wxLogFrame()
|
||||
// wxLogWindow
|
||||
// -----------
|
||||
wxLogWindow::wxLogWindow(wxFrame *pParent,
|
||||
const wxChar *szTitle,
|
||||
bool bShow,
|
||||
bool bDoPass)
|
||||
const wxChar *szTitle,
|
||||
bool bShow,
|
||||
bool bDoPass)
|
||||
{
|
||||
m_bPassMessages = bDoPass;
|
||||
|
||||
|
@@ -27,12 +27,7 @@ void yyerror(char *);
|
||||
/* You may need to put /DLEX_SCANNER in your makefile
|
||||
* if you're using LEX!
|
||||
*/
|
||||
#ifdef LEX_SCANNER
|
||||
/* int yyoutput(int); */
|
||||
void yyoutput(int);
|
||||
#else
|
||||
void yyoutput(int);
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) || defined(__STDC__)
|
||||
#if defined(__cplusplus) && defined(__EXTERN_C__)
|
||||
|
@@ -2128,7 +2128,7 @@ static void wxLoadCharacterSets(void)
|
||||
if (already_loaded) return;
|
||||
|
||||
already_loaded = TRUE;
|
||||
#if defined(__UNIX__)
|
||||
#if defined(__UNIX__) && wxUSE_TEXTFILE
|
||||
// search through files in /usr/share/i18n/charmaps
|
||||
wxString fname;
|
||||
for (fname = ::wxFindFirstFile(_T("/usr/share/i18n/charmaps/*"));
|
||||
|
@@ -792,6 +792,7 @@ int wxMessageBox(const wxString& message, const wxString& caption, long style,
|
||||
return ans;
|
||||
}
|
||||
|
||||
#if wxUSE_TEXTDLG
|
||||
wxString wxGetTextFromUser(const wxString& message, const wxString& caption,
|
||||
const wxString& defaultValue, wxWindow *parent,
|
||||
int x, int y, bool WXUNUSED(centre) )
|
||||
@@ -802,6 +803,7 @@ wxString wxGetTextFromUser(const wxString& message, const wxString& caption,
|
||||
else
|
||||
return wxString("");
|
||||
}
|
||||
#endif // wxUSE_TEXTDLG
|
||||
|
||||
#ifdef __MWERKS__
|
||||
char *strdup(const char *s)
|
||||
|
@@ -107,8 +107,10 @@ void wxWindowBase::InitBase()
|
||||
// the default event handler is just this window
|
||||
m_eventHandler = this;
|
||||
|
||||
#if wxUSE_VALIDATORS
|
||||
// no validator
|
||||
m_windowValidator = (wxValidator *) NULL;
|
||||
#endif // wxUSE_VALIDATORS
|
||||
|
||||
// use the system default colours
|
||||
wxSystemSettings settings;
|
||||
@@ -194,8 +196,10 @@ wxWindowBase::~wxWindowBase()
|
||||
delete m_caret;
|
||||
#endif // wxUSE_CARET
|
||||
|
||||
#if wxUSE_VALIDATORS
|
||||
if ( m_windowValidator )
|
||||
delete m_windowValidator;
|
||||
#endif // wxUSE_VALIDATORS
|
||||
|
||||
if ( m_clientObject )
|
||||
delete m_clientObject;
|
||||
@@ -543,6 +547,7 @@ void wxWindowBase::SetCaret(wxCaret *caret)
|
||||
}
|
||||
#endif // wxUSE_CARET
|
||||
|
||||
#if wxUSE_VALIDATORS
|
||||
// ----------------------------------------------------------------------------
|
||||
// validators
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -557,6 +562,7 @@ void wxWindowBase::SetValidator(const wxValidator& validator)
|
||||
if ( m_windowValidator )
|
||||
m_windowValidator->SetWindow(this) ;
|
||||
}
|
||||
#endif // wxUSE_VALIDATORS
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// update region testing
|
||||
@@ -619,6 +625,7 @@ void wxWindowBase::MakeModal(bool WXUNUSED(modal))
|
||||
|
||||
bool wxWindowBase::Validate()
|
||||
{
|
||||
#if wxUSE_VALIDATORS
|
||||
wxWindowList::Node *node;
|
||||
for ( node = m_children.GetFirst(); node; node = node->GetNext() )
|
||||
{
|
||||
@@ -629,12 +636,14 @@ bool wxWindowBase::Validate()
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
#endif // wxUSE_VALIDATORS
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxWindowBase::TransferDataToWindow()
|
||||
{
|
||||
#if wxUSE_VALIDATORS
|
||||
wxWindowList::Node *node;
|
||||
for ( node = m_children.GetFirst(); node; node = node->GetNext() )
|
||||
{
|
||||
@@ -652,12 +661,14 @@ bool wxWindowBase::TransferDataToWindow()
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
#endif // wxUSE_VALIDATORS
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxWindowBase::TransferDataFromWindow()
|
||||
{
|
||||
#if wxUSE_VALIDATORS
|
||||
wxWindowList::Node *node;
|
||||
for ( node = m_children.GetFirst(); node; node = node->GetNext() )
|
||||
{
|
||||
@@ -668,6 +679,7 @@ bool wxWindowBase::TransferDataFromWindow()
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
#endif // wxUSE_VALIDATORS
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1150,16 +1162,21 @@ void wxWindowBase::UpdateWindowUI()
|
||||
if ( event.GetSetText() && IsKindOf(CLASSINFO(wxControl)) )
|
||||
((wxControl*)this)->SetLabel(event.GetText());
|
||||
|
||||
#if wxUSE_CHECKBOX
|
||||
if ( IsKindOf(CLASSINFO(wxCheckBox)) )
|
||||
{
|
||||
if ( event.GetSetChecked() )
|
||||
((wxCheckBox *)this)->SetValue(event.GetChecked());
|
||||
}
|
||||
else if ( IsKindOf(CLASSINFO(wxRadioButton)) )
|
||||
#endif // wxUSE_CHECKBOX
|
||||
|
||||
#if wxUSE_RADIOBUTTON
|
||||
if ( IsKindOf(CLASSINFO(wxRadioButton)) )
|
||||
{
|
||||
if ( event.GetSetChecked() )
|
||||
((wxRadioButton *) this)->SetValue(event.GetChecked());
|
||||
}
|
||||
#endif // wxUSE_RADIOBUTTON
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@
|
||||
// Created: 04/01/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
@@ -33,6 +33,7 @@
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxQueryLayoutInfoEvent, wxEvent)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxCalculateLayoutEvent, wxEvent)
|
||||
|
||||
#if wxUSE_SASH
|
||||
IMPLEMENT_CLASS(wxSashLayoutWindow, wxSashWindow)
|
||||
|
||||
BEGIN_EVENT_TABLE(wxSashLayoutWindow, wxSashWindow)
|
||||
@@ -143,7 +144,7 @@ void wxSashLayoutWindow::OnCalculateLayout(wxCalculateLayoutEvent& event)
|
||||
}
|
||||
case wxLAYOUT_NONE:
|
||||
{
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -157,6 +158,7 @@ void wxSashLayoutWindow::OnCalculateLayout(wxCalculateLayoutEvent& event)
|
||||
|
||||
event.SetRect(clientSize);
|
||||
}
|
||||
#endif // wxUSE_SASH
|
||||
|
||||
/*
|
||||
* wxLayoutAlgorithm
|
||||
@@ -206,6 +208,7 @@ bool wxLayoutAlgorithm::LayoutWindow(wxWindow* parent, wxWindow* mainWindow)
|
||||
// reduce the available space to allow space for any active edges.
|
||||
|
||||
int leftMargin = 0, rightMargin = 0, topMargin = 0, bottomMargin = 0;
|
||||
#if wxUSE_SASH
|
||||
if (parent->IsKindOf(CLASSINFO(wxSashWindow)))
|
||||
{
|
||||
wxSashWindow* sashWindow = (wxSashWindow*) parent;
|
||||
@@ -224,6 +227,7 @@ bool wxLayoutAlgorithm::LayoutWindow(wxWindow* parent, wxWindow* mainWindow)
|
||||
if (sashWindow->GetSashVisible(wxSASH_BOTTOM))
|
||||
bottomMargin += sashWindow->GetDefaultBorderSize();
|
||||
}
|
||||
#endif // wxUSE_SASH
|
||||
|
||||
int cw, ch;
|
||||
parent->GetClientSize(& cw, & ch);
|
||||
|
@@ -150,7 +150,7 @@ wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent, const wxString
|
||||
n++;
|
||||
}
|
||||
|
||||
#ifdef __WXGTK__
|
||||
#if wxUSE_STATICLINE
|
||||
(void) new wxStaticLine( this, -1, wxPoint(0,y-20), wxSize(w+30, 5) );
|
||||
#endif
|
||||
|
||||
|
@@ -8,7 +8,7 @@
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows license
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
@@ -26,6 +26,10 @@
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#if !wxUSE_SASH
|
||||
#error "Thisfile requires wxUSE_SASH to be defined."
|
||||
#endif // wxUSE_SASH
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@@ -83,7 +83,7 @@ public:
|
||||
int GetX() const { return m_x; }
|
||||
int GetY() const { return m_y; }
|
||||
|
||||
void SetHeight(int h) { m_height = h; }
|
||||
void SetHeight(int h) { m_text_height = h; }
|
||||
|
||||
void SetX(int x) { m_x = x; }
|
||||
void SetY(int y) { m_y = y; }
|
||||
@@ -139,7 +139,7 @@ private:
|
||||
int m_isBold :1; // render the label in bold font
|
||||
|
||||
int m_x, m_y;
|
||||
long m_height, m_width;
|
||||
long m_text_height, m_text_width;
|
||||
int m_xCross, m_yCross;
|
||||
int m_level;
|
||||
wxArrayTreeItems m_children;
|
||||
@@ -189,7 +189,7 @@ wxGenericTreeItem::wxGenericTreeItem(wxGenericTreeItem *parent,
|
||||
|
||||
m_parent = parent;
|
||||
|
||||
dc.GetTextExtent( m_text, &m_width, &m_height );
|
||||
dc.GetTextExtent( m_text, &m_text_width, &m_text_height );
|
||||
}
|
||||
|
||||
wxGenericTreeItem::~wxGenericTreeItem()
|
||||
@@ -222,7 +222,7 @@ void wxGenericTreeItem::SetText( const wxString &text, wxDC& dc )
|
||||
{
|
||||
m_text = text;
|
||||
|
||||
dc.GetTextExtent( m_text, &m_width, &m_height );
|
||||
dc.GetTextExtent( m_text, &m_text_width, &m_text_height );
|
||||
}
|
||||
|
||||
void wxGenericTreeItem::Reset()
|
||||
@@ -232,7 +232,7 @@ void wxGenericTreeItem::Reset()
|
||||
m_selImage = -1;
|
||||
m_data = NULL;
|
||||
m_x = m_y =
|
||||
m_height = m_width = 0;
|
||||
m_text_height = m_text_width = 0;
|
||||
m_xCross =
|
||||
m_yCross = 0;
|
||||
|
||||
@@ -268,7 +268,7 @@ void wxGenericTreeItem::SetCross( int x, int y )
|
||||
void wxGenericTreeItem::GetSize( int &x, int &y )
|
||||
{
|
||||
if ( y < m_y ) y = m_y;
|
||||
int width = m_x + m_width;
|
||||
int width = m_x + m_text_width;
|
||||
if (width > x) x = width;
|
||||
|
||||
if (IsExpanded())
|
||||
@@ -284,7 +284,7 @@ void wxGenericTreeItem::GetSize( int &x, int &y )
|
||||
wxGenericTreeItem *wxGenericTreeItem::HitTest( const wxPoint& point,
|
||||
bool &onButton )
|
||||
{
|
||||
if ((point.y > m_y) && (point.y < m_y + m_height))
|
||||
if ((point.y > m_y) && (point.y < m_y + m_text_height))
|
||||
{
|
||||
// FIXME why +5?
|
||||
// Because that is the size of the plus sign, RR
|
||||
@@ -298,7 +298,7 @@ wxGenericTreeItem *wxGenericTreeItem::HitTest( const wxPoint& point,
|
||||
|
||||
/* TODO: we should do a query here like
|
||||
m_imageListNormal->GetSize( item->GetImage(), image_w, image_h ); */
|
||||
int w = m_width;
|
||||
int w = m_text_width;
|
||||
if (m_image != -1) w += 24;
|
||||
|
||||
if ((point.x > m_x) && (point.x < m_x+w))
|
||||
@@ -888,32 +888,154 @@ void wxTreeCtrl::Unselect()
|
||||
}
|
||||
}
|
||||
|
||||
void wxTreeCtrl::SelectItem(const wxTreeItemId& itemId)
|
||||
void wxTreeCtrl::UnselectAllChildren(wxGenericTreeItem *item)
|
||||
{
|
||||
wxGenericTreeItem *item = itemId.m_pItem;
|
||||
item->SetHilight(FALSE);
|
||||
RefreshLine(item);
|
||||
|
||||
if (item->HasChildren())
|
||||
{
|
||||
wxArrayTreeItems& children = item->GetChildren();
|
||||
size_t count = children.Count();
|
||||
for ( size_t n = 0; n < count; ++n )
|
||||
UnselectAllChildren(children[n]);
|
||||
}
|
||||
}
|
||||
|
||||
if ( m_current != item )
|
||||
{
|
||||
void wxTreeCtrl::UnselectAll()
|
||||
{
|
||||
UnselectAllChildren(GetRootItem().m_pItem);
|
||||
}
|
||||
|
||||
// Recursive function !
|
||||
// To stop we must have crt_item<last_item
|
||||
// Algorithm =
|
||||
// Tag all next children, when no more children,
|
||||
// Move to parent (not to tag)
|
||||
// Keep going, if we found last_item, we stop
|
||||
bool wxTreeCtrl::TagNextChildren(wxGenericTreeItem *crt_item, wxGenericTreeItem *last_item, bool select)
|
||||
{
|
||||
wxGenericTreeItem *parent = crt_item->GetParent();
|
||||
|
||||
if ( parent == NULL ) // This is root item
|
||||
return TagAllChildrenUntilLast(crt_item, last_item, select);
|
||||
|
||||
wxArrayTreeItems& children = parent->GetChildren();
|
||||
int index = children.Index(crt_item);
|
||||
wxASSERT( index != wxNOT_FOUND ); // I'm not a child of my parent?
|
||||
|
||||
size_t count = children.Count();
|
||||
for (size_t n=(size_t)(index+1); n<count; ++n)
|
||||
if (TagAllChildrenUntilLast(children[n], last_item, select)) return true;
|
||||
|
||||
return TagNextChildren(parent, last_item, select);
|
||||
}
|
||||
|
||||
bool wxTreeCtrl::TagAllChildrenUntilLast(wxGenericTreeItem *crt_item, wxGenericTreeItem *last_item, bool select)
|
||||
{
|
||||
crt_item->SetHilight(select);
|
||||
RefreshLine(crt_item);
|
||||
|
||||
if (crt_item==last_item) return true;
|
||||
|
||||
if (crt_item->HasChildren())
|
||||
{
|
||||
wxArrayTreeItems& children = crt_item->GetChildren();
|
||||
size_t count = children.Count();
|
||||
for ( size_t n = 0; n < count; ++n )
|
||||
if (TagAllChildrenUntilLast(children[n], last_item, select)) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void wxTreeCtrl::SelectItemRange(wxGenericTreeItem *item1, wxGenericTreeItem *item2)
|
||||
{
|
||||
// item2 is not necessary after item1
|
||||
wxGenericTreeItem *first=NULL, *last=NULL;
|
||||
|
||||
// choice first' and 'last' between item1 and item2
|
||||
if (item1->GetY()<item2->GetY())
|
||||
{
|
||||
first=item1;
|
||||
last=item2;
|
||||
}
|
||||
else
|
||||
{
|
||||
first=item2;
|
||||
last=item1;
|
||||
}
|
||||
|
||||
bool select=m_current->HasHilight();
|
||||
|
||||
if (TagAllChildrenUntilLast(first,last,select)) return;
|
||||
|
||||
cout << first->GetText() << " " << last->GetText() << " " << (int) select << endl;
|
||||
TagNextChildren(first,last,select);
|
||||
}
|
||||
|
||||
void wxTreeCtrl::SelectItem(const wxTreeItemId& itemId,
|
||||
bool unselect_others,
|
||||
bool extended_select)
|
||||
{
|
||||
bool is_single=!(GetWindowStyleFlag() & wxTR_MULTIPLE);
|
||||
|
||||
//wxCHECK_RET( ( (!unselect_others) && is_single),
|
||||
// _T("this is a single selection tree") );
|
||||
|
||||
// to keep going anyhow !!!
|
||||
if (is_single)
|
||||
{
|
||||
unselect_others=true;
|
||||
extended_select=false;
|
||||
}
|
||||
|
||||
wxGenericTreeItem *item = itemId.m_pItem;
|
||||
|
||||
wxTreeEvent event( wxEVT_COMMAND_TREE_SEL_CHANGING, GetId() );
|
||||
event.m_item = item;
|
||||
event.m_itemOld = m_current;
|
||||
event.SetEventObject( this );
|
||||
// Here we don't send any selection mode yet ! TO SEE
|
||||
|
||||
if (m_current)
|
||||
cout << m_current->GetText() << " " << (int)m_current->HasHilight() << endl;
|
||||
|
||||
if ( GetEventHandler()->ProcessEvent( event ) && event.WasVetoed() )
|
||||
return;
|
||||
|
||||
if ( m_current )
|
||||
if (m_current)
|
||||
cout << m_current->GetText() << " " << (int)m_current->HasHilight() << endl;
|
||||
|
||||
// ctrl press
|
||||
if (unselect_others)
|
||||
{
|
||||
m_current->SetHilight( FALSE );
|
||||
RefreshLine( m_current );
|
||||
if (is_single) Unselect(); // to speed up thing
|
||||
else UnselectAll();
|
||||
}
|
||||
|
||||
m_current = item;
|
||||
m_current->SetHilight( TRUE );
|
||||
RefreshLine( m_current );
|
||||
// shift press
|
||||
if (extended_select)
|
||||
{
|
||||
if (m_current == NULL) m_current=GetRootItem().m_pItem;
|
||||
// don't change the mark (m_current)
|
||||
SelectItemRange(m_current, item);
|
||||
}
|
||||
else
|
||||
{
|
||||
bool select=true; // the default
|
||||
|
||||
// Check if we need to toggle hilight (ctrl mode)
|
||||
if (!unselect_others)
|
||||
select=!item->HasHilight();
|
||||
|
||||
m_current = item;
|
||||
m_current->SetHilight(select);
|
||||
RefreshLine( m_current );
|
||||
}
|
||||
|
||||
event.SetEventType(wxEVT_COMMAND_TREE_SEL_CHANGED);
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
void wxTreeCtrl::EnsureVisible(const wxTreeItemId& item)
|
||||
@@ -950,7 +1072,7 @@ void wxTreeCtrl::EnsureVisible(const wxTreeItemId& item)
|
||||
int x_pos = GetScrollPos( wxHORIZONTAL );
|
||||
SetScrollbars( 10, 10, x/10, y/10, x_pos, (item_y-client_h/2)/10 );
|
||||
}
|
||||
else if (item_y > start_y+client_h-20)
|
||||
else if (item_y > start_y+client_h-16)
|
||||
{
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
@@ -1295,6 +1417,10 @@ void wxTreeCtrl::OnChar( wxKeyEvent &event )
|
||||
return;
|
||||
}
|
||||
|
||||
bool is_multiple=(GetWindowStyleFlag() & wxTR_MULTIPLE);
|
||||
bool extended_select=(event.ShiftDown() && is_multiple);
|
||||
bool unselect_others=!(extended_select || (event.ControlDown() && is_multiple));
|
||||
|
||||
switch (event.KeyCode())
|
||||
{
|
||||
case '+':
|
||||
@@ -1344,7 +1470,7 @@ void wxTreeCtrl::OnChar( wxKeyEvent &event )
|
||||
if (current == GetFirstChild( prev, cockie ))
|
||||
{
|
||||
// otherwise we return to where we came from
|
||||
SelectItem( prev );
|
||||
SelectItem( prev, unselect_others, extended_select );
|
||||
EnsureVisible( prev );
|
||||
break;
|
||||
}
|
||||
@@ -1361,7 +1487,7 @@ void wxTreeCtrl::OnChar( wxKeyEvent &event )
|
||||
}
|
||||
}
|
||||
|
||||
SelectItem( prev );
|
||||
SelectItem( prev, unselect_others, extended_select );
|
||||
EnsureVisible( prev );
|
||||
}
|
||||
}
|
||||
@@ -1374,7 +1500,7 @@ void wxTreeCtrl::OnChar( wxKeyEvent &event )
|
||||
if (prev)
|
||||
{
|
||||
EnsureVisible( prev );
|
||||
SelectItem( prev );
|
||||
SelectItem( prev, unselect_others, extended_select );
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1391,7 +1517,7 @@ void wxTreeCtrl::OnChar( wxKeyEvent &event )
|
||||
{
|
||||
long cookie = 0;
|
||||
wxTreeItemId child = GetFirstChild( m_current, cookie );
|
||||
SelectItem( child );
|
||||
SelectItem( child, unselect_others, extended_select );
|
||||
EnsureVisible( child );
|
||||
}
|
||||
else
|
||||
@@ -1408,7 +1534,7 @@ void wxTreeCtrl::OnChar( wxKeyEvent &event )
|
||||
}
|
||||
if (next != 0)
|
||||
{
|
||||
SelectItem( next );
|
||||
SelectItem( next, unselect_others, extended_select );
|
||||
EnsureVisible( next );
|
||||
}
|
||||
}
|
||||
@@ -1436,7 +1562,7 @@ void wxTreeCtrl::OnChar( wxKeyEvent &event )
|
||||
if ( last.IsOk() )
|
||||
{
|
||||
EnsureVisible( last );
|
||||
SelectItem( last );
|
||||
SelectItem( last, unselect_others, extended_select );
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1448,7 +1574,7 @@ void wxTreeCtrl::OnChar( wxKeyEvent &event )
|
||||
if (prev)
|
||||
{
|
||||
EnsureVisible( prev );
|
||||
SelectItem( prev );
|
||||
SelectItem( prev, unselect_others, extended_select );
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1505,8 +1631,11 @@ void wxTreeCtrl::OnMouse( wxMouseEvent &event )
|
||||
return;
|
||||
}
|
||||
|
||||
if (!IsSelected(item))
|
||||
SelectItem(item); /* we dont support multiple selections, BTW */
|
||||
bool is_multiple=(GetWindowStyleFlag() & wxTR_MULTIPLE);
|
||||
bool extended_select=(event.ShiftDown() && is_multiple);
|
||||
bool unselect_others=!(extended_select || (event.ControlDown() && is_multiple));
|
||||
|
||||
SelectItem(item, unselect_others, extended_select);
|
||||
|
||||
if (event.LeftDClick())
|
||||
{
|
||||
|
@@ -406,9 +406,11 @@ void wxApp::OnIdle( wxIdleEvent &event )
|
||||
DeletePendingObjects();
|
||||
|
||||
/* flush the logged messages if any */
|
||||
#if wxUSE_LOG
|
||||
wxLog *log = wxLog::GetActiveTarget();
|
||||
if (log != NULL && log->HasPendingMessages())
|
||||
log->Flush();
|
||||
#endif // wxUSE_LOG
|
||||
|
||||
/* Send OnIdle events to all windows */
|
||||
bool needMore = SendIdleEvents();
|
||||
@@ -635,6 +637,7 @@ void wxApp::CleanUp()
|
||||
}
|
||||
#endif // Debug
|
||||
|
||||
#if wxUSE_LOG
|
||||
// do this as the very last thing because everything else can log messages
|
||||
wxLog::DontCreateOnDemand();
|
||||
|
||||
@@ -647,6 +650,7 @@ wxLog *wxApp::CreateLogTarget()
|
||||
{
|
||||
return new wxLogGui;
|
||||
}
|
||||
#endif // wxUSE_LOG
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxEntry
|
||||
@@ -730,6 +734,7 @@ int wxEntry( int argc, char *argv[] )
|
||||
}
|
||||
}
|
||||
|
||||
#if wxUSE_LOG
|
||||
// flush the logged messages if any
|
||||
wxLog *log = wxLog::GetActiveTarget();
|
||||
if (log != NULL && log->HasPendingMessages())
|
||||
@@ -741,6 +746,7 @@ int wxEntry( int argc, char *argv[] )
|
||||
wxLog *oldlog = wxLog::SetActiveTarget(new wxLogStderr);
|
||||
if ( oldlog )
|
||||
delete oldlog;
|
||||
#endif // wxUSE_LOG
|
||||
|
||||
wxApp::CleanUp();
|
||||
|
||||
|
@@ -79,7 +79,9 @@ bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label,
|
||||
|
||||
PreCreation( parent, id, pos, newSize, style, name );
|
||||
|
||||
#if wxUSE_VALIDATORS
|
||||
SetValidator( validator );
|
||||
#endif // wxUSE_VALIDATORS
|
||||
|
||||
m_widget = gtk_button_new_with_label( "" );
|
||||
|
||||
|
@@ -22,8 +22,7 @@
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxCheckListBox,wxListBox)
|
||||
|
||||
wxCheckListBox::wxCheckListBox() :
|
||||
wxListBox()
|
||||
wxCheckListBox::wxCheckListBox() : wxListBox()
|
||||
{
|
||||
m_hasCheckBoxes = TRUE;
|
||||
}
|
||||
|
@@ -18,6 +18,7 @@
|
||||
#include "wx/dc.h"
|
||||
#include "wx/accel.h"
|
||||
#include "wx/dcps.h"
|
||||
#include "wx/icon.h"
|
||||
|
||||
#define _MAXPATHLEN 500
|
||||
|
||||
@@ -127,7 +128,10 @@ wxCursor *wxHOURGLASS_CURSOR = (wxCursor *) NULL;
|
||||
wxCursor *wxCROSS_CURSOR = (wxCursor *) NULL;
|
||||
|
||||
/* 'Null' objects */
|
||||
wxAcceleratorTable wxNullAcceleratorTable;
|
||||
#if wxUSE_ACCEL
|
||||
wxAcceleratorTable wxNullAcceleratorTable;
|
||||
#endif // wxUSE_ACCEL
|
||||
|
||||
wxBitmap wxNullBitmap;
|
||||
wxIcon wxNullIcon;
|
||||
wxCursor wxNullCursor;
|
||||
|
@@ -393,11 +393,13 @@ void wxDialog::OnSize( wxSizeEvent &WXUNUSED(event) )
|
||||
{
|
||||
wxASSERT_MSG( (m_widget != NULL), _T("invalid dialog") );
|
||||
|
||||
#if wxUSE_CONSTRAINTS
|
||||
if (GetAutoLayout())
|
||||
{
|
||||
Layout();
|
||||
}
|
||||
else
|
||||
#endif // wxUSE_CONSTRAINTS
|
||||
{
|
||||
/* no child: go out ! */
|
||||
if (!GetChildren().First()) return;
|
||||
|
@@ -63,7 +63,7 @@ extern void debug_focus_in( GtkWidget* widget, const wxChar* name, const wxChar
|
||||
|
||||
static void gtk_frame_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxFrame *win )
|
||||
{
|
||||
if (g_isIdle)
|
||||
if (g_isIdle)
|
||||
wxapp_install_idle_handler();
|
||||
|
||||
if (!win->m_hasVMT) return;
|
||||
@@ -82,7 +82,7 @@ static void gtk_frame_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation*
|
||||
|
||||
static gint gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxFrame *win )
|
||||
{
|
||||
if (g_isIdle)
|
||||
if (g_isIdle)
|
||||
wxapp_install_idle_handler();
|
||||
|
||||
win->Close();
|
||||
@@ -97,7 +97,7 @@ static gint gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WX
|
||||
static void gtk_menu_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
|
||||
{
|
||||
if (!win->m_hasVMT) return;
|
||||
|
||||
|
||||
win->m_menuBarDetached = FALSE;
|
||||
win->UpdateSize();
|
||||
}
|
||||
@@ -109,11 +109,12 @@ static void gtk_menu_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *
|
||||
static void gtk_menu_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
|
||||
{
|
||||
if (!win->m_hasVMT) return;
|
||||
|
||||
|
||||
win->m_menuBarDetached = TRUE;
|
||||
win->UpdateSize();
|
||||
}
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
//-----------------------------------------------------------------------------
|
||||
// "child_attached" of tool bar
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -121,9 +122,9 @@ static void gtk_menu_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *
|
||||
static void gtk_toolbar_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
|
||||
{
|
||||
if (!win->m_hasVMT) return;
|
||||
|
||||
|
||||
win->m_toolBarDetached = FALSE;
|
||||
|
||||
|
||||
win->UpdateSize();
|
||||
}
|
||||
|
||||
@@ -133,14 +134,15 @@ static void gtk_toolbar_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidge
|
||||
|
||||
static void gtk_toolbar_detached_callback( GtkWidget *widget, GtkWidget *WXUNUSED(child), wxFrame *win )
|
||||
{
|
||||
if (g_isIdle)
|
||||
if (g_isIdle)
|
||||
wxapp_install_idle_handler();
|
||||
|
||||
if (!win->m_hasVMT) return;
|
||||
|
||||
|
||||
win->m_toolBarDetached = TRUE;
|
||||
win->UpdateSize();
|
||||
}
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// "configure_event"
|
||||
@@ -148,15 +150,15 @@ static void gtk_toolbar_detached_callback( GtkWidget *widget, GtkWidget *WXUNUSE
|
||||
|
||||
static gint gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *WXUNUSED(event), wxFrame *win )
|
||||
{
|
||||
if (g_isIdle)
|
||||
if (g_isIdle)
|
||||
wxapp_install_idle_handler();
|
||||
|
||||
if (!win->m_hasVMT) return FALSE;
|
||||
|
||||
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
gdk_window_get_root_origin( win->m_widget->window, &x, &y );
|
||||
|
||||
|
||||
win->m_x = x;
|
||||
win->m_y = y;
|
||||
|
||||
@@ -171,20 +173,20 @@ static gint gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventC
|
||||
// "realize" from m_widget
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/* we cannot MWM hints and icons before the widget has been realized,
|
||||
/* we cannot MWM hints and icons before the widget has been realized,
|
||||
so we do this directly after realization */
|
||||
|
||||
static gint
|
||||
static gint
|
||||
gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win )
|
||||
{
|
||||
if (g_isIdle)
|
||||
if (g_isIdle)
|
||||
wxapp_install_idle_handler();
|
||||
|
||||
/* all this is for Motif Window Manager "hints" and is supposed to be
|
||||
recognized by other WM as well. not tested. */
|
||||
long decor = (long) GDK_DECOR_BORDER;
|
||||
long func = (long) GDK_FUNC_MOVE;
|
||||
|
||||
|
||||
if ((win->GetWindowStyle() & wxCAPTION) != 0)
|
||||
decor |= GDK_DECOR_TITLE;
|
||||
if ((win->GetWindowStyle() & wxSYSTEM_MENU) != 0)
|
||||
@@ -208,16 +210,16 @@ gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win )
|
||||
decor |= GDK_DECOR_RESIZEH;
|
||||
}
|
||||
|
||||
|
||||
|
||||
gdk_window_set_decorations( win->m_widget->window, (GdkWMDecoration)decor);
|
||||
gdk_window_set_functions( win->m_widget->window, (GdkWMFunction)func);
|
||||
|
||||
|
||||
/* GTK's shrinking/growing policy */
|
||||
if ((win->GetWindowStyle() & wxRESIZE_BORDER) == 0)
|
||||
gtk_window_set_policy(GTK_WINDOW(win->m_widget), 0, 0, 1);
|
||||
else
|
||||
gtk_window_set_policy(GTK_WINDOW(win->m_widget), 1, 1, 1);
|
||||
|
||||
|
||||
/* reset the icon */
|
||||
if (win->m_icon != wxNullIcon)
|
||||
{
|
||||
@@ -225,7 +227,7 @@ gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win )
|
||||
win->m_icon = wxNullIcon;
|
||||
win->SetIcon( icon );
|
||||
}
|
||||
|
||||
|
||||
/* we set the focus to the child that accepts the focus. this
|
||||
doesn't really have to be done in "realize" but why not? */
|
||||
wxWindowList::Node *node = win->GetChildren().GetFirst();
|
||||
@@ -237,13 +239,13 @@ gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win )
|
||||
child->SetFocus();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
node = node->GetNext();
|
||||
}
|
||||
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// InsertChild for wxFrame
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -265,7 +267,8 @@ static void wxInsertChildInFrame( wxFrame* parent, wxWindow* child )
|
||||
child->m_y,
|
||||
child->m_width,
|
||||
child->m_height );
|
||||
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
/* we connect to these events for recalculating the client area
|
||||
space when the toolbar is floating */
|
||||
if (wxIS_KIND_OF(child,wxToolBar))
|
||||
@@ -275,11 +278,12 @@ static void wxInsertChildInFrame( wxFrame* parent, wxWindow* child )
|
||||
{
|
||||
gtk_signal_connect( GTK_OBJECT(toolBar->m_widget), "child_attached",
|
||||
GTK_SIGNAL_FUNC(gtk_toolbar_attached_callback), (gpointer)parent );
|
||||
|
||||
|
||||
gtk_signal_connect( GTK_OBJECT(toolBar->m_widget), "child_detached",
|
||||
GTK_SIGNAL_FUNC(gtk_toolbar_detached_callback), (gpointer)parent );
|
||||
}
|
||||
}
|
||||
#endif // wxUSE_TOOLBAR
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -311,8 +315,12 @@ IMPLEMENT_DYNAMIC_CLASS(wxFrame,wxWindow)
|
||||
void wxFrame::Init()
|
||||
{
|
||||
m_frameMenuBar = (wxMenuBar *) NULL;
|
||||
#if wxUSE_STATUSBAR
|
||||
m_frameStatusBar = (wxStatusBar *) NULL;
|
||||
#endif // wxUSE_STATUSBAR
|
||||
#if wxUSE_TOOLBAR
|
||||
m_frameToolBar = (wxToolBar *) NULL;
|
||||
#endif // wxUSE_TOOLBAR
|
||||
m_sizeSet = FALSE;
|
||||
m_miniEdge = 0;
|
||||
m_miniTitle = 0;
|
||||
@@ -327,7 +335,7 @@ wxFrame::wxFrame( wxWindow *parent, wxWindowID id, const wxString &title,
|
||||
long style, const wxString &name )
|
||||
{
|
||||
Init();
|
||||
|
||||
|
||||
Create( parent, id, title, pos, size, style, name );
|
||||
}
|
||||
|
||||
@@ -342,14 +350,14 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
|
||||
PreCreation( parent, id, pos, size, style, name );
|
||||
|
||||
m_title = title;
|
||||
|
||||
|
||||
m_insertCallback = (wxInsertChildFunction) wxInsertChildInFrame;
|
||||
|
||||
GtkWindowType win_type = GTK_WINDOW_TOPLEVEL;
|
||||
if (style & wxSIMPLE_BORDER) win_type = GTK_WINDOW_POPUP;
|
||||
|
||||
m_widget = gtk_window_new( win_type );
|
||||
|
||||
|
||||
if (!name.IsEmpty())
|
||||
gtk_window_set_wmclass( GTK_WINDOW(m_widget), name.mb_str(), name.mb_str() );
|
||||
|
||||
@@ -368,7 +376,7 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
|
||||
gtk_widget_show( m_mainWidget );
|
||||
GTK_WIDGET_UNSET_FLAGS( m_mainWidget, GTK_CAN_FOCUS );
|
||||
gtk_container_add( GTK_CONTAINER(m_widget), m_mainWidget );
|
||||
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
debug_focus_in( m_mainWidget, _T("wxFrame::m_mainWidget"), name );
|
||||
#endif
|
||||
@@ -377,7 +385,7 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
|
||||
m_wxwindow = gtk_myfixed_new();
|
||||
gtk_widget_show( m_wxwindow );
|
||||
gtk_container_add( GTK_CONTAINER(m_mainWidget), m_wxwindow );
|
||||
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
debug_focus_in( m_wxwindow, _T("wxFrame::m_wxwindow"), name );
|
||||
#endif
|
||||
@@ -394,7 +402,7 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
|
||||
been realized, so we do this directly after realization */
|
||||
gtk_signal_connect( GTK_OBJECT(m_widget), "realize",
|
||||
GTK_SIGNAL_FUNC(gtk_frame_realized_callback), (gpointer) this );
|
||||
|
||||
|
||||
/* the user resized the frame by dragging etc. */
|
||||
gtk_signal_connect( GTK_OBJECT(m_widget), "size_allocate",
|
||||
GTK_SIGNAL_FUNC(gtk_frame_size_callback), (gpointer)this );
|
||||
@@ -409,15 +417,19 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
|
||||
wxFrame::~wxFrame()
|
||||
{
|
||||
m_isBeingDeleted = TRUE;
|
||||
|
||||
|
||||
if (m_frameMenuBar) delete m_frameMenuBar;
|
||||
m_frameMenuBar = (wxMenuBar *) NULL;
|
||||
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
if (m_frameStatusBar) delete m_frameStatusBar;
|
||||
m_frameStatusBar = (wxStatusBar *) NULL;
|
||||
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
if (m_frameToolBar) delete m_frameToolBar;
|
||||
m_frameToolBar = (wxToolBar *) NULL;
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
wxTopLevelWindows.DeleteObject( this );
|
||||
|
||||
@@ -460,9 +472,9 @@ void wxFrame::DoSetSize( int x, int y, int width, int height, int sizeFlags )
|
||||
|
||||
/* this shouldn't happen: wxFrame, wxMDIParentFrame and wxMDIChildFrame have m_wxwindow */
|
||||
wxASSERT_MSG( (m_wxwindow != NULL), _T("invalid frame") );
|
||||
|
||||
|
||||
/* avoid recursions */
|
||||
if (m_resizing) return;
|
||||
if (m_resizing) return;
|
||||
m_resizing = TRUE;
|
||||
|
||||
int old_x = m_x;
|
||||
@@ -542,15 +554,15 @@ void wxFrame::DoGetClientSize( int *width, int *height ) const
|
||||
/* menu bar */
|
||||
if (m_frameMenuBar)
|
||||
{
|
||||
if (!m_menuBarDetached)
|
||||
if (!m_menuBarDetached)
|
||||
(*height) -= wxMENU_HEIGHT;
|
||||
else
|
||||
(*height) -= wxPLACE_HOLDER;
|
||||
}
|
||||
|
||||
|
||||
/* status bar */
|
||||
if (m_frameStatusBar) (*height) -= wxSTATUS_HEIGHT;
|
||||
|
||||
|
||||
/* tool bar */
|
||||
if (m_frameToolBar)
|
||||
{
|
||||
@@ -563,7 +575,7 @@ void wxFrame::DoGetClientSize( int *width, int *height ) const
|
||||
else
|
||||
(*height) -= wxPLACE_HOLDER;
|
||||
}
|
||||
|
||||
|
||||
/* mini edge */
|
||||
(*height) -= m_miniEdge*2 + m_miniTitle;
|
||||
}
|
||||
@@ -580,15 +592,15 @@ void wxFrame::DoSetClientSize( int width, int height )
|
||||
/* menu bar */
|
||||
if (m_frameMenuBar)
|
||||
{
|
||||
if (!m_menuBarDetached)
|
||||
if (!m_menuBarDetached)
|
||||
height += wxMENU_HEIGHT;
|
||||
else
|
||||
height += wxPLACE_HOLDER;
|
||||
}
|
||||
|
||||
|
||||
/* status bar */
|
||||
if (m_frameStatusBar) height += wxSTATUS_HEIGHT;
|
||||
|
||||
|
||||
/* tool bar */
|
||||
if (m_frameToolBar)
|
||||
{
|
||||
@@ -601,7 +613,7 @@ void wxFrame::DoSetClientSize( int width, int height )
|
||||
else
|
||||
height += wxPLACE_HOLDER;
|
||||
}
|
||||
|
||||
|
||||
wxWindow::DoSetClientSize( width + m_miniEdge*2, height + m_miniEdge*2 + m_miniTitle );
|
||||
}
|
||||
|
||||
@@ -617,12 +629,12 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
|
||||
|
||||
/* this shouldn't happen: wxFrame, wxMDIParentFrame and wxMDIChildFrame have m_wxwindow */
|
||||
wxASSERT_MSG( (m_wxwindow != NULL), _T("invalid frame") );
|
||||
|
||||
|
||||
m_width = width;
|
||||
m_height = height;
|
||||
|
||||
/* space occupied by m_frameToolBar and m_frameMenuBar */
|
||||
int client_area_y_offset = 0;
|
||||
int client_area_y_offset = 0;
|
||||
|
||||
/* wxMDIChildFrame derives from wxFrame but it _is_ a wxWindow as it uses
|
||||
wxWindow::Create to create it's GTK equivalent. m_mainWidget is only
|
||||
@@ -630,7 +642,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
|
||||
have here. if m_mainWidget is NULL it is a wxMDIChildFrame and so we
|
||||
skip the part which handles m_frameMenuBar, m_frameToolBar and (most
|
||||
importantly) m_mainWidget */
|
||||
|
||||
|
||||
if (m_mainWidget)
|
||||
{
|
||||
/* check if size is in legal range */
|
||||
@@ -644,7 +656,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
|
||||
* m_wxwindow.
|
||||
* this hurts in the eye, but I don't want to call SetSize()
|
||||
* because I don't want to call any non-native functions here. */
|
||||
|
||||
|
||||
if (m_frameMenuBar)
|
||||
{
|
||||
int xx = m_miniEdge;
|
||||
@@ -656,42 +668,42 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
|
||||
m_frameMenuBar->m_y = yy;
|
||||
m_frameMenuBar->m_width = ww;
|
||||
m_frameMenuBar->m_height = hh;
|
||||
gtk_myfixed_set_size( GTK_MYFIXED(m_mainWidget),
|
||||
m_frameMenuBar->m_widget,
|
||||
gtk_myfixed_set_size( GTK_MYFIXED(m_mainWidget),
|
||||
m_frameMenuBar->m_widget,
|
||||
xx, yy, ww, hh );
|
||||
client_area_y_offset += hh;
|
||||
}
|
||||
|
||||
|
||||
if (m_frameToolBar)
|
||||
{
|
||||
int xx = m_miniEdge;
|
||||
int yy = m_miniEdge + m_miniTitle;
|
||||
if (m_frameMenuBar)
|
||||
{
|
||||
if (!m_menuBarDetached)
|
||||
yy += wxMENU_HEIGHT;
|
||||
else
|
||||
if (!m_menuBarDetached)
|
||||
yy += wxMENU_HEIGHT;
|
||||
else
|
||||
yy += wxPLACE_HOLDER;
|
||||
}
|
||||
int ww = m_width - 2*m_miniEdge;
|
||||
int hh = m_frameToolBar->m_height;
|
||||
if (m_toolBarDetached) hh = wxPLACE_HOLDER;
|
||||
if (m_toolBarDetached) hh = wxPLACE_HOLDER;
|
||||
m_frameToolBar->m_x = xx;
|
||||
m_frameToolBar->m_y = yy;
|
||||
/* m_frameToolBar->m_height = hh; don't change the toolbar's height */
|
||||
m_frameToolBar->m_width = ww;
|
||||
gtk_myfixed_set_size( GTK_MYFIXED(m_mainWidget),
|
||||
m_frameToolBar->m_widget,
|
||||
gtk_myfixed_set_size( GTK_MYFIXED(m_mainWidget),
|
||||
m_frameToolBar->m_widget,
|
||||
xx, yy, ww, hh );
|
||||
client_area_y_offset += hh;
|
||||
}
|
||||
|
||||
|
||||
int client_x = m_miniEdge;
|
||||
int client_y = client_area_y_offset + m_miniEdge + m_miniTitle;
|
||||
int client_w = m_width - 2*m_miniEdge;
|
||||
int client_h = m_height - client_area_y_offset- 2*m_miniEdge - m_miniTitle;
|
||||
gtk_myfixed_set_size( GTK_MYFIXED(m_mainWidget),
|
||||
m_wxwindow,
|
||||
gtk_myfixed_set_size( GTK_MYFIXED(m_mainWidget),
|
||||
m_wxwindow,
|
||||
client_x, client_y, client_w, client_h );
|
||||
}
|
||||
else
|
||||
@@ -699,7 +711,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
|
||||
/* if there is no m_mainWidget between m_widget and m_wxwindow there
|
||||
is no need to set the size or position of m_wxwindow. */
|
||||
}
|
||||
|
||||
|
||||
if (m_frameStatusBar)
|
||||
{
|
||||
int xx = 0 + m_miniEdge;
|
||||
@@ -710,14 +722,14 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
|
||||
m_frameStatusBar->m_y = yy;
|
||||
m_frameStatusBar->m_width = ww;
|
||||
m_frameStatusBar->m_height = hh;
|
||||
gtk_myfixed_set_size( GTK_MYFIXED(m_wxwindow),
|
||||
m_frameStatusBar->m_widget,
|
||||
gtk_myfixed_set_size( GTK_MYFIXED(m_wxwindow),
|
||||
m_frameStatusBar->m_widget,
|
||||
xx, yy, ww, hh );
|
||||
}
|
||||
|
||||
/* we actually set the size of a frame here and no-where else */
|
||||
gtk_widget_set_usize( m_widget, m_width, m_height );
|
||||
|
||||
|
||||
m_sizeSet = TRUE;
|
||||
|
||||
/* send size event to frame */
|
||||
@@ -750,7 +762,7 @@ void wxFrame::OnInternalIdle()
|
||||
GtkOnSize( m_x, m_y, m_width, m_height );
|
||||
|
||||
DoMenuUpdates();
|
||||
|
||||
|
||||
if (m_frameMenuBar) m_frameMenuBar->OnInternalIdle();
|
||||
if (m_frameToolBar) m_frameToolBar->OnInternalIdle();
|
||||
if (m_frameStatusBar) m_frameStatusBar->OnInternalIdle();
|
||||
@@ -765,11 +777,13 @@ void wxFrame::OnSize( wxSizeEvent &WXUNUSED(event) )
|
||||
{
|
||||
wxASSERT_MSG( (m_widget != NULL), _T("invalid frame") );
|
||||
|
||||
#if wxUSE_CONSTRAINTS
|
||||
if (GetAutoLayout())
|
||||
{
|
||||
Layout();
|
||||
}
|
||||
else
|
||||
#endif // wxUSE_CONSTRAINTS
|
||||
{
|
||||
/* do we have exactly one child? */
|
||||
wxWindow *child = (wxWindow *)NULL;
|
||||
@@ -802,7 +816,7 @@ void wxFrame::OnSize( wxSizeEvent &WXUNUSED(event) )
|
||||
static void SetInvokingWindow( wxMenu *menu, wxWindow *win )
|
||||
{
|
||||
menu->SetInvokingWindow( win );
|
||||
|
||||
|
||||
#if (GTK_MINOR_VERSION > 0)
|
||||
/* support for native hot keys */
|
||||
gtk_accel_group_attach( menu->m_accel, GTK_OBJECT(win->m_widget));
|
||||
@@ -844,17 +858,17 @@ void wxFrame::SetMenuBar( wxMenuBar *menuBar )
|
||||
{
|
||||
m_frameMenuBar->SetParent(this);
|
||||
gtk_myfixed_put( GTK_MYFIXED(m_mainWidget),
|
||||
m_frameMenuBar->m_widget,
|
||||
m_frameMenuBar->m_x,
|
||||
m_frameMenuBar->m_widget,
|
||||
m_frameMenuBar->m_x,
|
||||
m_frameMenuBar->m_y,
|
||||
m_frameMenuBar->m_width,
|
||||
m_frameMenuBar->m_height );
|
||||
|
||||
|
||||
if (menuBar->GetWindowStyle() & wxMB_DOCKABLE)
|
||||
{
|
||||
gtk_signal_connect( GTK_OBJECT(menuBar->m_widget), "child_attached",
|
||||
GTK_SIGNAL_FUNC(gtk_menu_attached_callback), (gpointer)this );
|
||||
|
||||
|
||||
gtk_signal_connect( GTK_OBJECT(menuBar->m_widget), "child_detached",
|
||||
GTK_SIGNAL_FUNC(gtk_menu_detached_callback), (gpointer)this );
|
||||
}
|
||||
@@ -872,6 +886,7 @@ wxMenuBar *wxFrame::GetMenuBar() const
|
||||
|
||||
void wxFrame::OnMenuHighlight(wxMenuEvent& event)
|
||||
{
|
||||
#if wxUSE_STATUSBAR
|
||||
if (GetStatusBar())
|
||||
{
|
||||
// if no help string found, we will clear the status bar text
|
||||
@@ -889,8 +904,10 @@ void wxFrame::OnMenuHighlight(wxMenuEvent& event)
|
||||
|
||||
SetStatusText(helpString);
|
||||
}
|
||||
#endif // wxUSE_STATUSBAR
|
||||
}
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
wxToolBar* wxFrame::CreateToolBar( long style, wxWindowID id, const wxString& name )
|
||||
{
|
||||
wxASSERT_MSG( (m_widget != NULL), _T("invalid frame") );
|
||||
@@ -898,11 +915,11 @@ wxToolBar* wxFrame::CreateToolBar( long style, wxWindowID id, const wxString& na
|
||||
wxCHECK_MSG( m_frameToolBar == NULL, FALSE, _T("recreating toolbar in wxFrame") );
|
||||
|
||||
m_insertInClientArea = FALSE;
|
||||
|
||||
|
||||
m_frameToolBar = OnCreateToolBar( style, id, name );
|
||||
|
||||
if (m_frameToolBar) GetChildren().DeleteObject( m_frameToolBar );
|
||||
|
||||
|
||||
m_insertInClientArea = TRUE;
|
||||
|
||||
m_sizeSet = FALSE;
|
||||
@@ -919,7 +936,9 @@ wxToolBar *wxFrame::GetToolBar() const
|
||||
{
|
||||
return m_frameToolBar;
|
||||
}
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
wxStatusBar* wxFrame::CreateStatusBar( int number, long style, wxWindowID id, const wxString& name )
|
||||
{
|
||||
wxASSERT_MSG( (m_widget != NULL), _T("invalid frame") );
|
||||
@@ -954,24 +973,9 @@ wxStatusBar *wxFrame::OnCreateStatusBar( int number, long style, wxWindowID id,
|
||||
return statusBar;
|
||||
}
|
||||
|
||||
void wxFrame::Command( int id )
|
||||
wxStatusBar *wxFrame::GetStatusBar() const
|
||||
{
|
||||
wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, id);
|
||||
commandEvent.SetInt( id );
|
||||
commandEvent.SetEventObject( this );
|
||||
|
||||
wxMenuBar *bar = GetMenuBar();
|
||||
if (!bar) return;
|
||||
|
||||
wxMenuItem *item = bar->FindItemForId(id) ;
|
||||
if (item && item->IsCheckable())
|
||||
{
|
||||
bar->Check(id,!bar->Checked(id)) ;
|
||||
}
|
||||
|
||||
wxEvtHandler* evtHandler = GetEventHandler();
|
||||
|
||||
evtHandler->ProcessEvent(commandEvent);
|
||||
return m_frameStatusBar;
|
||||
}
|
||||
|
||||
void wxFrame::SetStatusText(const wxString& text, int number)
|
||||
@@ -991,10 +995,26 @@ void wxFrame::SetStatusWidths(int n, const int widths_field[] )
|
||||
|
||||
m_frameStatusBar->SetStatusWidths(n, widths_field);
|
||||
}
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
wxStatusBar *wxFrame::GetStatusBar() const
|
||||
void wxFrame::Command( int id )
|
||||
{
|
||||
return m_frameStatusBar;
|
||||
wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, id);
|
||||
commandEvent.SetInt( id );
|
||||
commandEvent.SetEventObject( this );
|
||||
|
||||
wxMenuBar *bar = GetMenuBar();
|
||||
if (!bar) return;
|
||||
|
||||
wxMenuItem *item = bar->FindItemForId(id) ;
|
||||
if (item && item->IsCheckable())
|
||||
{
|
||||
bar->Check(id,!bar->Checked(id)) ;
|
||||
}
|
||||
|
||||
wxEvtHandler* evtHandler = GetEventHandler();
|
||||
|
||||
evtHandler->ProcessEvent(commandEvent);
|
||||
}
|
||||
|
||||
void wxFrame::SetTitle( const wxString &title )
|
||||
|
@@ -54,7 +54,6 @@ void *wxJoystick::Entry(void)
|
||||
struct timeval time_out = {0, 0};
|
||||
|
||||
FD_ZERO(&read_fds);
|
||||
DeferDestroy(TRUE);
|
||||
while (1) {
|
||||
TestDestroy();
|
||||
|
||||
|
@@ -42,13 +42,15 @@ extern bool g_isIdle;
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#if (GTK_MINOR_VERSION > 0)
|
||||
#define NEW_GTK_SCROLL_CODE
|
||||
#define NEW_GTK_SCROLL_CODE
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// private functions
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
|
||||
#define CHECKBOX_STRING "[-] "
|
||||
|
||||
// checklistboxes have "[<5B>] " prepended to their lables, this macro removes it
|
||||
@@ -57,6 +59,12 @@ extern bool g_isIdle;
|
||||
// the argument to it is a "const char *" pointer
|
||||
#define GET_REAL_LABEL(label) ((m_hasCheckBoxes)?(label)+4 : (label))
|
||||
|
||||
#else // !wxUSE_CHECKLISTBOX
|
||||
|
||||
#define GET_REAL_LABEL(label) (label)
|
||||
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// data
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -127,6 +135,7 @@ gtk_listbox_button_press_callback( GtkWidget *widget, GdkEventButton *gdk_event,
|
||||
|
||||
int sel = listbox->GetIndex( widget );
|
||||
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
if ((listbox->m_hasCheckBoxes) && (gdk_event->x < 15) && (gdk_event->type != GDK_2BUTTON_PRESS))
|
||||
{
|
||||
wxCheckListBox *clb = (wxCheckListBox *)listbox;
|
||||
@@ -138,6 +147,7 @@ gtk_listbox_button_press_callback( GtkWidget *widget, GdkEventButton *gdk_event,
|
||||
event.SetInt( sel );
|
||||
listbox->GetEventHandler()->ProcessEvent( event );
|
||||
}
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
|
||||
/* emit wxEVT_COMMAND_LISTBOX_DOUBLECLICKED later */
|
||||
g_hasDoubleClicked = (gdk_event->type == GDK_2BUTTON_PRESS);
|
||||
@@ -160,6 +170,7 @@ gtk_listbox_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxLis
|
||||
|
||||
if (gdk_event->keyval != ' ') return FALSE;
|
||||
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
int sel = listbox->GetIndex( widget );
|
||||
|
||||
wxCheckListBox *clb = (wxCheckListBox *)listbox;
|
||||
@@ -170,6 +181,7 @@ gtk_listbox_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxLis
|
||||
event.SetEventObject( listbox );
|
||||
event.SetInt( sel );
|
||||
listbox->GetEventHandler()->ProcessEvent( event );
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -216,7 +228,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxListBox,wxControl)
|
||||
wxListBox::wxListBox()
|
||||
{
|
||||
m_list = (GtkList *) NULL;
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
m_hasCheckBoxes = FALSE;
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
}
|
||||
|
||||
bool wxListBox::Create( wxWindow *parent, wxWindowID id,
|
||||
@@ -274,10 +288,12 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
|
||||
GtkWidget *list_item;
|
||||
|
||||
wxString str(choices[i]);
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
if (m_hasCheckBoxes)
|
||||
{
|
||||
str.Prepend(CHECKBOX_STRING);
|
||||
}
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
|
||||
list_item = gtk_list_item_new_with_label( str.mbc_str() );
|
||||
|
||||
@@ -300,6 +316,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
|
||||
(GtkSignalFunc)gtk_listbox_button_release_callback,
|
||||
(gpointer) this );
|
||||
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
if (m_hasCheckBoxes)
|
||||
{
|
||||
gtk_signal_connect( GTK_OBJECT(list_item),
|
||||
@@ -307,6 +324,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
|
||||
(GtkSignalFunc)gtk_listbox_key_press_callback,
|
||||
(gpointer)this );
|
||||
}
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
|
||||
ConnectWidget( list_item );
|
||||
|
||||
@@ -399,11 +417,13 @@ void wxListBox::InsertItems(int nItems, const wxString items[], int pos)
|
||||
|
||||
deletedData.Add(clientData);
|
||||
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
// save check state
|
||||
if ( m_hasCheckBoxes )
|
||||
{
|
||||
deletedChecks.Add(((wxCheckListBox *)this)->IsChecked(pos + n));
|
||||
}
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
}
|
||||
|
||||
int nDeletedCount = n;
|
||||
@@ -422,10 +442,12 @@ void wxListBox::InsertItems(int nItems, const wxString items[], int pos)
|
||||
{
|
||||
Append(deletedLabels[n], deletedData[n]);
|
||||
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
if ( m_hasCheckBoxes )
|
||||
{
|
||||
((wxCheckListBox *)this)->Check(pos + n, (bool)deletedChecks[n]);
|
||||
}
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
}
|
||||
}
|
||||
|
||||
@@ -436,10 +458,12 @@ void wxListBox::AppendCommon( const wxString &item )
|
||||
GtkWidget *list_item;
|
||||
|
||||
wxString label(item);
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
if (m_hasCheckBoxes)
|
||||
{
|
||||
label.Prepend(CHECKBOX_STRING);
|
||||
}
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
|
||||
list_item = gtk_list_item_new_with_label( label.mbc_str() );
|
||||
|
||||
@@ -462,6 +486,7 @@ void wxListBox::AppendCommon( const wxString &item )
|
||||
(GtkSignalFunc)gtk_listbox_button_release_callback,
|
||||
(gpointer) this );
|
||||
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
if (m_hasCheckBoxes)
|
||||
{
|
||||
gtk_signal_connect( GTK_OBJECT(list_item),
|
||||
@@ -469,6 +494,7 @@ void wxListBox::AppendCommon( const wxString &item )
|
||||
(GtkSignalFunc)gtk_listbox_key_press_callback,
|
||||
(gpointer)this );
|
||||
}
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
|
||||
gtk_widget_show( list_item );
|
||||
|
||||
@@ -785,8 +811,10 @@ void wxListBox::SetString( int n, const wxString &string )
|
||||
GtkLabel *label = GTK_LABEL( bin->child );
|
||||
|
||||
wxString str;
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
if (m_hasCheckBoxes)
|
||||
str += CHECKBOX_STRING;
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
str += string;
|
||||
|
||||
gtk_label_set( label, str.mbc_str() );
|
||||
|
@@ -137,7 +137,9 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
|
||||
|
||||
PreCreation( parent, id, pos, size, style, name );
|
||||
|
||||
#if wxUSE_VALIDATORS
|
||||
SetValidator( validator );
|
||||
#endif // wxUSE_VALIDATORS
|
||||
|
||||
m_vScrollbarVisible = FALSE;
|
||||
|
||||
|
@@ -35,7 +35,14 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <gtk/gtkfeatures.h>
|
||||
#include <gdk/gdkx.h>
|
||||
#include "X11/XKBlib.h"
|
||||
|
||||
#ifdef __HPUX__
|
||||
// under HP-UX XKBlib.h defines structures with field named "explicit" -
|
||||
// which is, of course, an error for a C++ compiler
|
||||
#define explicit __wx_explicit
|
||||
#include "X11/XKBlib.h"
|
||||
#undef explicit
|
||||
#endif // __HPUX__
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// misc.
|
||||
|
@@ -650,6 +650,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
|
||||
ret = (ret || win->GetEventHandler()->ProcessEvent( event2 ));
|
||||
}
|
||||
|
||||
#if wxUSE_ACCEL
|
||||
if (!ret)
|
||||
{
|
||||
wxWindow *ancestor = win;
|
||||
@@ -665,6 +666,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
|
||||
ancestor = ancestor->GetParent();
|
||||
}
|
||||
}
|
||||
#endif // wxUSE_ACCEL
|
||||
|
||||
/* win is a control: tab can be propagated up */
|
||||
if ( (!ret) &&
|
||||
@@ -706,8 +708,8 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
|
||||
wxNode *node = menubar->GetMenus().First();
|
||||
if (node)
|
||||
{
|
||||
wxMenu *firstMenu = (wxMenu*) node->Data();
|
||||
// doesn't work correctly
|
||||
// wxMenu *firstMenu = (wxMenu*) node->Data();
|
||||
// gtk_menu_item_select( GTK_MENU_ITEM(firstMenu->m_owner) );
|
||||
// ret = TRUE;
|
||||
break;
|
||||
|
@@ -406,9 +406,11 @@ void wxApp::OnIdle( wxIdleEvent &event )
|
||||
DeletePendingObjects();
|
||||
|
||||
/* flush the logged messages if any */
|
||||
#if wxUSE_LOG
|
||||
wxLog *log = wxLog::GetActiveTarget();
|
||||
if (log != NULL && log->HasPendingMessages())
|
||||
log->Flush();
|
||||
#endif // wxUSE_LOG
|
||||
|
||||
/* Send OnIdle events to all windows */
|
||||
bool needMore = SendIdleEvents();
|
||||
@@ -635,6 +637,7 @@ void wxApp::CleanUp()
|
||||
}
|
||||
#endif // Debug
|
||||
|
||||
#if wxUSE_LOG
|
||||
// do this as the very last thing because everything else can log messages
|
||||
wxLog::DontCreateOnDemand();
|
||||
|
||||
@@ -647,6 +650,7 @@ wxLog *wxApp::CreateLogTarget()
|
||||
{
|
||||
return new wxLogGui;
|
||||
}
|
||||
#endif // wxUSE_LOG
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxEntry
|
||||
@@ -730,6 +734,7 @@ int wxEntry( int argc, char *argv[] )
|
||||
}
|
||||
}
|
||||
|
||||
#if wxUSE_LOG
|
||||
// flush the logged messages if any
|
||||
wxLog *log = wxLog::GetActiveTarget();
|
||||
if (log != NULL && log->HasPendingMessages())
|
||||
@@ -741,6 +746,7 @@ int wxEntry( int argc, char *argv[] )
|
||||
wxLog *oldlog = wxLog::SetActiveTarget(new wxLogStderr);
|
||||
if ( oldlog )
|
||||
delete oldlog;
|
||||
#endif // wxUSE_LOG
|
||||
|
||||
wxApp::CleanUp();
|
||||
|
||||
|
@@ -79,7 +79,9 @@ bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label,
|
||||
|
||||
PreCreation( parent, id, pos, newSize, style, name );
|
||||
|
||||
#if wxUSE_VALIDATORS
|
||||
SetValidator( validator );
|
||||
#endif // wxUSE_VALIDATORS
|
||||
|
||||
m_widget = gtk_button_new_with_label( "" );
|
||||
|
||||
|
@@ -22,8 +22,7 @@
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxCheckListBox,wxListBox)
|
||||
|
||||
wxCheckListBox::wxCheckListBox() :
|
||||
wxListBox()
|
||||
wxCheckListBox::wxCheckListBox() : wxListBox()
|
||||
{
|
||||
m_hasCheckBoxes = TRUE;
|
||||
}
|
||||
|
@@ -18,6 +18,7 @@
|
||||
#include "wx/dc.h"
|
||||
#include "wx/accel.h"
|
||||
#include "wx/dcps.h"
|
||||
#include "wx/icon.h"
|
||||
|
||||
#define _MAXPATHLEN 500
|
||||
|
||||
@@ -127,7 +128,10 @@ wxCursor *wxHOURGLASS_CURSOR = (wxCursor *) NULL;
|
||||
wxCursor *wxCROSS_CURSOR = (wxCursor *) NULL;
|
||||
|
||||
/* 'Null' objects */
|
||||
wxAcceleratorTable wxNullAcceleratorTable;
|
||||
#if wxUSE_ACCEL
|
||||
wxAcceleratorTable wxNullAcceleratorTable;
|
||||
#endif // wxUSE_ACCEL
|
||||
|
||||
wxBitmap wxNullBitmap;
|
||||
wxIcon wxNullIcon;
|
||||
wxCursor wxNullCursor;
|
||||
|
@@ -393,11 +393,13 @@ void wxDialog::OnSize( wxSizeEvent &WXUNUSED(event) )
|
||||
{
|
||||
wxASSERT_MSG( (m_widget != NULL), _T("invalid dialog") );
|
||||
|
||||
#if wxUSE_CONSTRAINTS
|
||||
if (GetAutoLayout())
|
||||
{
|
||||
Layout();
|
||||
}
|
||||
else
|
||||
#endif // wxUSE_CONSTRAINTS
|
||||
{
|
||||
/* no child: go out ! */
|
||||
if (!GetChildren().First()) return;
|
||||
|
@@ -63,7 +63,7 @@ extern void debug_focus_in( GtkWidget* widget, const wxChar* name, const wxChar
|
||||
|
||||
static void gtk_frame_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxFrame *win )
|
||||
{
|
||||
if (g_isIdle)
|
||||
if (g_isIdle)
|
||||
wxapp_install_idle_handler();
|
||||
|
||||
if (!win->m_hasVMT) return;
|
||||
@@ -82,7 +82,7 @@ static void gtk_frame_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation*
|
||||
|
||||
static gint gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxFrame *win )
|
||||
{
|
||||
if (g_isIdle)
|
||||
if (g_isIdle)
|
||||
wxapp_install_idle_handler();
|
||||
|
||||
win->Close();
|
||||
@@ -97,7 +97,7 @@ static gint gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WX
|
||||
static void gtk_menu_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
|
||||
{
|
||||
if (!win->m_hasVMT) return;
|
||||
|
||||
|
||||
win->m_menuBarDetached = FALSE;
|
||||
win->UpdateSize();
|
||||
}
|
||||
@@ -109,11 +109,12 @@ static void gtk_menu_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *
|
||||
static void gtk_menu_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
|
||||
{
|
||||
if (!win->m_hasVMT) return;
|
||||
|
||||
|
||||
win->m_menuBarDetached = TRUE;
|
||||
win->UpdateSize();
|
||||
}
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
//-----------------------------------------------------------------------------
|
||||
// "child_attached" of tool bar
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -121,9 +122,9 @@ static void gtk_menu_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *
|
||||
static void gtk_toolbar_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
|
||||
{
|
||||
if (!win->m_hasVMT) return;
|
||||
|
||||
|
||||
win->m_toolBarDetached = FALSE;
|
||||
|
||||
|
||||
win->UpdateSize();
|
||||
}
|
||||
|
||||
@@ -133,14 +134,15 @@ static void gtk_toolbar_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidge
|
||||
|
||||
static void gtk_toolbar_detached_callback( GtkWidget *widget, GtkWidget *WXUNUSED(child), wxFrame *win )
|
||||
{
|
||||
if (g_isIdle)
|
||||
if (g_isIdle)
|
||||
wxapp_install_idle_handler();
|
||||
|
||||
if (!win->m_hasVMT) return;
|
||||
|
||||
|
||||
win->m_toolBarDetached = TRUE;
|
||||
win->UpdateSize();
|
||||
}
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// "configure_event"
|
||||
@@ -148,15 +150,15 @@ static void gtk_toolbar_detached_callback( GtkWidget *widget, GtkWidget *WXUNUSE
|
||||
|
||||
static gint gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *WXUNUSED(event), wxFrame *win )
|
||||
{
|
||||
if (g_isIdle)
|
||||
if (g_isIdle)
|
||||
wxapp_install_idle_handler();
|
||||
|
||||
if (!win->m_hasVMT) return FALSE;
|
||||
|
||||
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
gdk_window_get_root_origin( win->m_widget->window, &x, &y );
|
||||
|
||||
|
||||
win->m_x = x;
|
||||
win->m_y = y;
|
||||
|
||||
@@ -171,20 +173,20 @@ static gint gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventC
|
||||
// "realize" from m_widget
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/* we cannot MWM hints and icons before the widget has been realized,
|
||||
/* we cannot MWM hints and icons before the widget has been realized,
|
||||
so we do this directly after realization */
|
||||
|
||||
static gint
|
||||
static gint
|
||||
gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win )
|
||||
{
|
||||
if (g_isIdle)
|
||||
if (g_isIdle)
|
||||
wxapp_install_idle_handler();
|
||||
|
||||
/* all this is for Motif Window Manager "hints" and is supposed to be
|
||||
recognized by other WM as well. not tested. */
|
||||
long decor = (long) GDK_DECOR_BORDER;
|
||||
long func = (long) GDK_FUNC_MOVE;
|
||||
|
||||
|
||||
if ((win->GetWindowStyle() & wxCAPTION) != 0)
|
||||
decor |= GDK_DECOR_TITLE;
|
||||
if ((win->GetWindowStyle() & wxSYSTEM_MENU) != 0)
|
||||
@@ -208,16 +210,16 @@ gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win )
|
||||
decor |= GDK_DECOR_RESIZEH;
|
||||
}
|
||||
|
||||
|
||||
|
||||
gdk_window_set_decorations( win->m_widget->window, (GdkWMDecoration)decor);
|
||||
gdk_window_set_functions( win->m_widget->window, (GdkWMFunction)func);
|
||||
|
||||
|
||||
/* GTK's shrinking/growing policy */
|
||||
if ((win->GetWindowStyle() & wxRESIZE_BORDER) == 0)
|
||||
gtk_window_set_policy(GTK_WINDOW(win->m_widget), 0, 0, 1);
|
||||
else
|
||||
gtk_window_set_policy(GTK_WINDOW(win->m_widget), 1, 1, 1);
|
||||
|
||||
|
||||
/* reset the icon */
|
||||
if (win->m_icon != wxNullIcon)
|
||||
{
|
||||
@@ -225,7 +227,7 @@ gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win )
|
||||
win->m_icon = wxNullIcon;
|
||||
win->SetIcon( icon );
|
||||
}
|
||||
|
||||
|
||||
/* we set the focus to the child that accepts the focus. this
|
||||
doesn't really have to be done in "realize" but why not? */
|
||||
wxWindowList::Node *node = win->GetChildren().GetFirst();
|
||||
@@ -237,13 +239,13 @@ gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win )
|
||||
child->SetFocus();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
node = node->GetNext();
|
||||
}
|
||||
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// InsertChild for wxFrame
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -265,7 +267,8 @@ static void wxInsertChildInFrame( wxFrame* parent, wxWindow* child )
|
||||
child->m_y,
|
||||
child->m_width,
|
||||
child->m_height );
|
||||
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
/* we connect to these events for recalculating the client area
|
||||
space when the toolbar is floating */
|
||||
if (wxIS_KIND_OF(child,wxToolBar))
|
||||
@@ -275,11 +278,12 @@ static void wxInsertChildInFrame( wxFrame* parent, wxWindow* child )
|
||||
{
|
||||
gtk_signal_connect( GTK_OBJECT(toolBar->m_widget), "child_attached",
|
||||
GTK_SIGNAL_FUNC(gtk_toolbar_attached_callback), (gpointer)parent );
|
||||
|
||||
|
||||
gtk_signal_connect( GTK_OBJECT(toolBar->m_widget), "child_detached",
|
||||
GTK_SIGNAL_FUNC(gtk_toolbar_detached_callback), (gpointer)parent );
|
||||
}
|
||||
}
|
||||
#endif // wxUSE_TOOLBAR
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -311,8 +315,12 @@ IMPLEMENT_DYNAMIC_CLASS(wxFrame,wxWindow)
|
||||
void wxFrame::Init()
|
||||
{
|
||||
m_frameMenuBar = (wxMenuBar *) NULL;
|
||||
#if wxUSE_STATUSBAR
|
||||
m_frameStatusBar = (wxStatusBar *) NULL;
|
||||
#endif // wxUSE_STATUSBAR
|
||||
#if wxUSE_TOOLBAR
|
||||
m_frameToolBar = (wxToolBar *) NULL;
|
||||
#endif // wxUSE_TOOLBAR
|
||||
m_sizeSet = FALSE;
|
||||
m_miniEdge = 0;
|
||||
m_miniTitle = 0;
|
||||
@@ -327,7 +335,7 @@ wxFrame::wxFrame( wxWindow *parent, wxWindowID id, const wxString &title,
|
||||
long style, const wxString &name )
|
||||
{
|
||||
Init();
|
||||
|
||||
|
||||
Create( parent, id, title, pos, size, style, name );
|
||||
}
|
||||
|
||||
@@ -342,14 +350,14 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
|
||||
PreCreation( parent, id, pos, size, style, name );
|
||||
|
||||
m_title = title;
|
||||
|
||||
|
||||
m_insertCallback = (wxInsertChildFunction) wxInsertChildInFrame;
|
||||
|
||||
GtkWindowType win_type = GTK_WINDOW_TOPLEVEL;
|
||||
if (style & wxSIMPLE_BORDER) win_type = GTK_WINDOW_POPUP;
|
||||
|
||||
m_widget = gtk_window_new( win_type );
|
||||
|
||||
|
||||
if (!name.IsEmpty())
|
||||
gtk_window_set_wmclass( GTK_WINDOW(m_widget), name.mb_str(), name.mb_str() );
|
||||
|
||||
@@ -368,7 +376,7 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
|
||||
gtk_widget_show( m_mainWidget );
|
||||
GTK_WIDGET_UNSET_FLAGS( m_mainWidget, GTK_CAN_FOCUS );
|
||||
gtk_container_add( GTK_CONTAINER(m_widget), m_mainWidget );
|
||||
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
debug_focus_in( m_mainWidget, _T("wxFrame::m_mainWidget"), name );
|
||||
#endif
|
||||
@@ -377,7 +385,7 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
|
||||
m_wxwindow = gtk_myfixed_new();
|
||||
gtk_widget_show( m_wxwindow );
|
||||
gtk_container_add( GTK_CONTAINER(m_mainWidget), m_wxwindow );
|
||||
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
debug_focus_in( m_wxwindow, _T("wxFrame::m_wxwindow"), name );
|
||||
#endif
|
||||
@@ -394,7 +402,7 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
|
||||
been realized, so we do this directly after realization */
|
||||
gtk_signal_connect( GTK_OBJECT(m_widget), "realize",
|
||||
GTK_SIGNAL_FUNC(gtk_frame_realized_callback), (gpointer) this );
|
||||
|
||||
|
||||
/* the user resized the frame by dragging etc. */
|
||||
gtk_signal_connect( GTK_OBJECT(m_widget), "size_allocate",
|
||||
GTK_SIGNAL_FUNC(gtk_frame_size_callback), (gpointer)this );
|
||||
@@ -409,15 +417,19 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
|
||||
wxFrame::~wxFrame()
|
||||
{
|
||||
m_isBeingDeleted = TRUE;
|
||||
|
||||
|
||||
if (m_frameMenuBar) delete m_frameMenuBar;
|
||||
m_frameMenuBar = (wxMenuBar *) NULL;
|
||||
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
if (m_frameStatusBar) delete m_frameStatusBar;
|
||||
m_frameStatusBar = (wxStatusBar *) NULL;
|
||||
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
if (m_frameToolBar) delete m_frameToolBar;
|
||||
m_frameToolBar = (wxToolBar *) NULL;
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
wxTopLevelWindows.DeleteObject( this );
|
||||
|
||||
@@ -460,9 +472,9 @@ void wxFrame::DoSetSize( int x, int y, int width, int height, int sizeFlags )
|
||||
|
||||
/* this shouldn't happen: wxFrame, wxMDIParentFrame and wxMDIChildFrame have m_wxwindow */
|
||||
wxASSERT_MSG( (m_wxwindow != NULL), _T("invalid frame") );
|
||||
|
||||
|
||||
/* avoid recursions */
|
||||
if (m_resizing) return;
|
||||
if (m_resizing) return;
|
||||
m_resizing = TRUE;
|
||||
|
||||
int old_x = m_x;
|
||||
@@ -542,15 +554,15 @@ void wxFrame::DoGetClientSize( int *width, int *height ) const
|
||||
/* menu bar */
|
||||
if (m_frameMenuBar)
|
||||
{
|
||||
if (!m_menuBarDetached)
|
||||
if (!m_menuBarDetached)
|
||||
(*height) -= wxMENU_HEIGHT;
|
||||
else
|
||||
(*height) -= wxPLACE_HOLDER;
|
||||
}
|
||||
|
||||
|
||||
/* status bar */
|
||||
if (m_frameStatusBar) (*height) -= wxSTATUS_HEIGHT;
|
||||
|
||||
|
||||
/* tool bar */
|
||||
if (m_frameToolBar)
|
||||
{
|
||||
@@ -563,7 +575,7 @@ void wxFrame::DoGetClientSize( int *width, int *height ) const
|
||||
else
|
||||
(*height) -= wxPLACE_HOLDER;
|
||||
}
|
||||
|
||||
|
||||
/* mini edge */
|
||||
(*height) -= m_miniEdge*2 + m_miniTitle;
|
||||
}
|
||||
@@ -580,15 +592,15 @@ void wxFrame::DoSetClientSize( int width, int height )
|
||||
/* menu bar */
|
||||
if (m_frameMenuBar)
|
||||
{
|
||||
if (!m_menuBarDetached)
|
||||
if (!m_menuBarDetached)
|
||||
height += wxMENU_HEIGHT;
|
||||
else
|
||||
height += wxPLACE_HOLDER;
|
||||
}
|
||||
|
||||
|
||||
/* status bar */
|
||||
if (m_frameStatusBar) height += wxSTATUS_HEIGHT;
|
||||
|
||||
|
||||
/* tool bar */
|
||||
if (m_frameToolBar)
|
||||
{
|
||||
@@ -601,7 +613,7 @@ void wxFrame::DoSetClientSize( int width, int height )
|
||||
else
|
||||
height += wxPLACE_HOLDER;
|
||||
}
|
||||
|
||||
|
||||
wxWindow::DoSetClientSize( width + m_miniEdge*2, height + m_miniEdge*2 + m_miniTitle );
|
||||
}
|
||||
|
||||
@@ -617,12 +629,12 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
|
||||
|
||||
/* this shouldn't happen: wxFrame, wxMDIParentFrame and wxMDIChildFrame have m_wxwindow */
|
||||
wxASSERT_MSG( (m_wxwindow != NULL), _T("invalid frame") );
|
||||
|
||||
|
||||
m_width = width;
|
||||
m_height = height;
|
||||
|
||||
/* space occupied by m_frameToolBar and m_frameMenuBar */
|
||||
int client_area_y_offset = 0;
|
||||
int client_area_y_offset = 0;
|
||||
|
||||
/* wxMDIChildFrame derives from wxFrame but it _is_ a wxWindow as it uses
|
||||
wxWindow::Create to create it's GTK equivalent. m_mainWidget is only
|
||||
@@ -630,7 +642,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
|
||||
have here. if m_mainWidget is NULL it is a wxMDIChildFrame and so we
|
||||
skip the part which handles m_frameMenuBar, m_frameToolBar and (most
|
||||
importantly) m_mainWidget */
|
||||
|
||||
|
||||
if (m_mainWidget)
|
||||
{
|
||||
/* check if size is in legal range */
|
||||
@@ -644,7 +656,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
|
||||
* m_wxwindow.
|
||||
* this hurts in the eye, but I don't want to call SetSize()
|
||||
* because I don't want to call any non-native functions here. */
|
||||
|
||||
|
||||
if (m_frameMenuBar)
|
||||
{
|
||||
int xx = m_miniEdge;
|
||||
@@ -656,42 +668,42 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
|
||||
m_frameMenuBar->m_y = yy;
|
||||
m_frameMenuBar->m_width = ww;
|
||||
m_frameMenuBar->m_height = hh;
|
||||
gtk_myfixed_set_size( GTK_MYFIXED(m_mainWidget),
|
||||
m_frameMenuBar->m_widget,
|
||||
gtk_myfixed_set_size( GTK_MYFIXED(m_mainWidget),
|
||||
m_frameMenuBar->m_widget,
|
||||
xx, yy, ww, hh );
|
||||
client_area_y_offset += hh;
|
||||
}
|
||||
|
||||
|
||||
if (m_frameToolBar)
|
||||
{
|
||||
int xx = m_miniEdge;
|
||||
int yy = m_miniEdge + m_miniTitle;
|
||||
if (m_frameMenuBar)
|
||||
{
|
||||
if (!m_menuBarDetached)
|
||||
yy += wxMENU_HEIGHT;
|
||||
else
|
||||
if (!m_menuBarDetached)
|
||||
yy += wxMENU_HEIGHT;
|
||||
else
|
||||
yy += wxPLACE_HOLDER;
|
||||
}
|
||||
int ww = m_width - 2*m_miniEdge;
|
||||
int hh = m_frameToolBar->m_height;
|
||||
if (m_toolBarDetached) hh = wxPLACE_HOLDER;
|
||||
if (m_toolBarDetached) hh = wxPLACE_HOLDER;
|
||||
m_frameToolBar->m_x = xx;
|
||||
m_frameToolBar->m_y = yy;
|
||||
/* m_frameToolBar->m_height = hh; don't change the toolbar's height */
|
||||
m_frameToolBar->m_width = ww;
|
||||
gtk_myfixed_set_size( GTK_MYFIXED(m_mainWidget),
|
||||
m_frameToolBar->m_widget,
|
||||
gtk_myfixed_set_size( GTK_MYFIXED(m_mainWidget),
|
||||
m_frameToolBar->m_widget,
|
||||
xx, yy, ww, hh );
|
||||
client_area_y_offset += hh;
|
||||
}
|
||||
|
||||
|
||||
int client_x = m_miniEdge;
|
||||
int client_y = client_area_y_offset + m_miniEdge + m_miniTitle;
|
||||
int client_w = m_width - 2*m_miniEdge;
|
||||
int client_h = m_height - client_area_y_offset- 2*m_miniEdge - m_miniTitle;
|
||||
gtk_myfixed_set_size( GTK_MYFIXED(m_mainWidget),
|
||||
m_wxwindow,
|
||||
gtk_myfixed_set_size( GTK_MYFIXED(m_mainWidget),
|
||||
m_wxwindow,
|
||||
client_x, client_y, client_w, client_h );
|
||||
}
|
||||
else
|
||||
@@ -699,7 +711,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
|
||||
/* if there is no m_mainWidget between m_widget and m_wxwindow there
|
||||
is no need to set the size or position of m_wxwindow. */
|
||||
}
|
||||
|
||||
|
||||
if (m_frameStatusBar)
|
||||
{
|
||||
int xx = 0 + m_miniEdge;
|
||||
@@ -710,14 +722,14 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
|
||||
m_frameStatusBar->m_y = yy;
|
||||
m_frameStatusBar->m_width = ww;
|
||||
m_frameStatusBar->m_height = hh;
|
||||
gtk_myfixed_set_size( GTK_MYFIXED(m_wxwindow),
|
||||
m_frameStatusBar->m_widget,
|
||||
gtk_myfixed_set_size( GTK_MYFIXED(m_wxwindow),
|
||||
m_frameStatusBar->m_widget,
|
||||
xx, yy, ww, hh );
|
||||
}
|
||||
|
||||
/* we actually set the size of a frame here and no-where else */
|
||||
gtk_widget_set_usize( m_widget, m_width, m_height );
|
||||
|
||||
|
||||
m_sizeSet = TRUE;
|
||||
|
||||
/* send size event to frame */
|
||||
@@ -750,7 +762,7 @@ void wxFrame::OnInternalIdle()
|
||||
GtkOnSize( m_x, m_y, m_width, m_height );
|
||||
|
||||
DoMenuUpdates();
|
||||
|
||||
|
||||
if (m_frameMenuBar) m_frameMenuBar->OnInternalIdle();
|
||||
if (m_frameToolBar) m_frameToolBar->OnInternalIdle();
|
||||
if (m_frameStatusBar) m_frameStatusBar->OnInternalIdle();
|
||||
@@ -765,11 +777,13 @@ void wxFrame::OnSize( wxSizeEvent &WXUNUSED(event) )
|
||||
{
|
||||
wxASSERT_MSG( (m_widget != NULL), _T("invalid frame") );
|
||||
|
||||
#if wxUSE_CONSTRAINTS
|
||||
if (GetAutoLayout())
|
||||
{
|
||||
Layout();
|
||||
}
|
||||
else
|
||||
#endif // wxUSE_CONSTRAINTS
|
||||
{
|
||||
/* do we have exactly one child? */
|
||||
wxWindow *child = (wxWindow *)NULL;
|
||||
@@ -802,7 +816,7 @@ void wxFrame::OnSize( wxSizeEvent &WXUNUSED(event) )
|
||||
static void SetInvokingWindow( wxMenu *menu, wxWindow *win )
|
||||
{
|
||||
menu->SetInvokingWindow( win );
|
||||
|
||||
|
||||
#if (GTK_MINOR_VERSION > 0)
|
||||
/* support for native hot keys */
|
||||
gtk_accel_group_attach( menu->m_accel, GTK_OBJECT(win->m_widget));
|
||||
@@ -844,17 +858,17 @@ void wxFrame::SetMenuBar( wxMenuBar *menuBar )
|
||||
{
|
||||
m_frameMenuBar->SetParent(this);
|
||||
gtk_myfixed_put( GTK_MYFIXED(m_mainWidget),
|
||||
m_frameMenuBar->m_widget,
|
||||
m_frameMenuBar->m_x,
|
||||
m_frameMenuBar->m_widget,
|
||||
m_frameMenuBar->m_x,
|
||||
m_frameMenuBar->m_y,
|
||||
m_frameMenuBar->m_width,
|
||||
m_frameMenuBar->m_height );
|
||||
|
||||
|
||||
if (menuBar->GetWindowStyle() & wxMB_DOCKABLE)
|
||||
{
|
||||
gtk_signal_connect( GTK_OBJECT(menuBar->m_widget), "child_attached",
|
||||
GTK_SIGNAL_FUNC(gtk_menu_attached_callback), (gpointer)this );
|
||||
|
||||
|
||||
gtk_signal_connect( GTK_OBJECT(menuBar->m_widget), "child_detached",
|
||||
GTK_SIGNAL_FUNC(gtk_menu_detached_callback), (gpointer)this );
|
||||
}
|
||||
@@ -872,6 +886,7 @@ wxMenuBar *wxFrame::GetMenuBar() const
|
||||
|
||||
void wxFrame::OnMenuHighlight(wxMenuEvent& event)
|
||||
{
|
||||
#if wxUSE_STATUSBAR
|
||||
if (GetStatusBar())
|
||||
{
|
||||
// if no help string found, we will clear the status bar text
|
||||
@@ -889,8 +904,10 @@ void wxFrame::OnMenuHighlight(wxMenuEvent& event)
|
||||
|
||||
SetStatusText(helpString);
|
||||
}
|
||||
#endif // wxUSE_STATUSBAR
|
||||
}
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
wxToolBar* wxFrame::CreateToolBar( long style, wxWindowID id, const wxString& name )
|
||||
{
|
||||
wxASSERT_MSG( (m_widget != NULL), _T("invalid frame") );
|
||||
@@ -898,11 +915,11 @@ wxToolBar* wxFrame::CreateToolBar( long style, wxWindowID id, const wxString& na
|
||||
wxCHECK_MSG( m_frameToolBar == NULL, FALSE, _T("recreating toolbar in wxFrame") );
|
||||
|
||||
m_insertInClientArea = FALSE;
|
||||
|
||||
|
||||
m_frameToolBar = OnCreateToolBar( style, id, name );
|
||||
|
||||
if (m_frameToolBar) GetChildren().DeleteObject( m_frameToolBar );
|
||||
|
||||
|
||||
m_insertInClientArea = TRUE;
|
||||
|
||||
m_sizeSet = FALSE;
|
||||
@@ -919,7 +936,9 @@ wxToolBar *wxFrame::GetToolBar() const
|
||||
{
|
||||
return m_frameToolBar;
|
||||
}
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
wxStatusBar* wxFrame::CreateStatusBar( int number, long style, wxWindowID id, const wxString& name )
|
||||
{
|
||||
wxASSERT_MSG( (m_widget != NULL), _T("invalid frame") );
|
||||
@@ -954,24 +973,9 @@ wxStatusBar *wxFrame::OnCreateStatusBar( int number, long style, wxWindowID id,
|
||||
return statusBar;
|
||||
}
|
||||
|
||||
void wxFrame::Command( int id )
|
||||
wxStatusBar *wxFrame::GetStatusBar() const
|
||||
{
|
||||
wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, id);
|
||||
commandEvent.SetInt( id );
|
||||
commandEvent.SetEventObject( this );
|
||||
|
||||
wxMenuBar *bar = GetMenuBar();
|
||||
if (!bar) return;
|
||||
|
||||
wxMenuItem *item = bar->FindItemForId(id) ;
|
||||
if (item && item->IsCheckable())
|
||||
{
|
||||
bar->Check(id,!bar->Checked(id)) ;
|
||||
}
|
||||
|
||||
wxEvtHandler* evtHandler = GetEventHandler();
|
||||
|
||||
evtHandler->ProcessEvent(commandEvent);
|
||||
return m_frameStatusBar;
|
||||
}
|
||||
|
||||
void wxFrame::SetStatusText(const wxString& text, int number)
|
||||
@@ -991,10 +995,26 @@ void wxFrame::SetStatusWidths(int n, const int widths_field[] )
|
||||
|
||||
m_frameStatusBar->SetStatusWidths(n, widths_field);
|
||||
}
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
wxStatusBar *wxFrame::GetStatusBar() const
|
||||
void wxFrame::Command( int id )
|
||||
{
|
||||
return m_frameStatusBar;
|
||||
wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, id);
|
||||
commandEvent.SetInt( id );
|
||||
commandEvent.SetEventObject( this );
|
||||
|
||||
wxMenuBar *bar = GetMenuBar();
|
||||
if (!bar) return;
|
||||
|
||||
wxMenuItem *item = bar->FindItemForId(id) ;
|
||||
if (item && item->IsCheckable())
|
||||
{
|
||||
bar->Check(id,!bar->Checked(id)) ;
|
||||
}
|
||||
|
||||
wxEvtHandler* evtHandler = GetEventHandler();
|
||||
|
||||
evtHandler->ProcessEvent(commandEvent);
|
||||
}
|
||||
|
||||
void wxFrame::SetTitle( const wxString &title )
|
||||
|
@@ -54,7 +54,6 @@ void *wxJoystick::Entry(void)
|
||||
struct timeval time_out = {0, 0};
|
||||
|
||||
FD_ZERO(&read_fds);
|
||||
DeferDestroy(TRUE);
|
||||
while (1) {
|
||||
TestDestroy();
|
||||
|
||||
|
@@ -42,13 +42,15 @@ extern bool g_isIdle;
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#if (GTK_MINOR_VERSION > 0)
|
||||
#define NEW_GTK_SCROLL_CODE
|
||||
#define NEW_GTK_SCROLL_CODE
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// private functions
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
|
||||
#define CHECKBOX_STRING "[-] "
|
||||
|
||||
// checklistboxes have "[<5B>] " prepended to their lables, this macro removes it
|
||||
@@ -57,6 +59,12 @@ extern bool g_isIdle;
|
||||
// the argument to it is a "const char *" pointer
|
||||
#define GET_REAL_LABEL(label) ((m_hasCheckBoxes)?(label)+4 : (label))
|
||||
|
||||
#else // !wxUSE_CHECKLISTBOX
|
||||
|
||||
#define GET_REAL_LABEL(label) (label)
|
||||
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// data
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -127,6 +135,7 @@ gtk_listbox_button_press_callback( GtkWidget *widget, GdkEventButton *gdk_event,
|
||||
|
||||
int sel = listbox->GetIndex( widget );
|
||||
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
if ((listbox->m_hasCheckBoxes) && (gdk_event->x < 15) && (gdk_event->type != GDK_2BUTTON_PRESS))
|
||||
{
|
||||
wxCheckListBox *clb = (wxCheckListBox *)listbox;
|
||||
@@ -138,6 +147,7 @@ gtk_listbox_button_press_callback( GtkWidget *widget, GdkEventButton *gdk_event,
|
||||
event.SetInt( sel );
|
||||
listbox->GetEventHandler()->ProcessEvent( event );
|
||||
}
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
|
||||
/* emit wxEVT_COMMAND_LISTBOX_DOUBLECLICKED later */
|
||||
g_hasDoubleClicked = (gdk_event->type == GDK_2BUTTON_PRESS);
|
||||
@@ -160,6 +170,7 @@ gtk_listbox_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxLis
|
||||
|
||||
if (gdk_event->keyval != ' ') return FALSE;
|
||||
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
int sel = listbox->GetIndex( widget );
|
||||
|
||||
wxCheckListBox *clb = (wxCheckListBox *)listbox;
|
||||
@@ -170,6 +181,7 @@ gtk_listbox_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxLis
|
||||
event.SetEventObject( listbox );
|
||||
event.SetInt( sel );
|
||||
listbox->GetEventHandler()->ProcessEvent( event );
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -216,7 +228,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxListBox,wxControl)
|
||||
wxListBox::wxListBox()
|
||||
{
|
||||
m_list = (GtkList *) NULL;
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
m_hasCheckBoxes = FALSE;
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
}
|
||||
|
||||
bool wxListBox::Create( wxWindow *parent, wxWindowID id,
|
||||
@@ -274,10 +288,12 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
|
||||
GtkWidget *list_item;
|
||||
|
||||
wxString str(choices[i]);
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
if (m_hasCheckBoxes)
|
||||
{
|
||||
str.Prepend(CHECKBOX_STRING);
|
||||
}
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
|
||||
list_item = gtk_list_item_new_with_label( str.mbc_str() );
|
||||
|
||||
@@ -300,6 +316,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
|
||||
(GtkSignalFunc)gtk_listbox_button_release_callback,
|
||||
(gpointer) this );
|
||||
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
if (m_hasCheckBoxes)
|
||||
{
|
||||
gtk_signal_connect( GTK_OBJECT(list_item),
|
||||
@@ -307,6 +324,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
|
||||
(GtkSignalFunc)gtk_listbox_key_press_callback,
|
||||
(gpointer)this );
|
||||
}
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
|
||||
ConnectWidget( list_item );
|
||||
|
||||
@@ -399,11 +417,13 @@ void wxListBox::InsertItems(int nItems, const wxString items[], int pos)
|
||||
|
||||
deletedData.Add(clientData);
|
||||
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
// save check state
|
||||
if ( m_hasCheckBoxes )
|
||||
{
|
||||
deletedChecks.Add(((wxCheckListBox *)this)->IsChecked(pos + n));
|
||||
}
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
}
|
||||
|
||||
int nDeletedCount = n;
|
||||
@@ -422,10 +442,12 @@ void wxListBox::InsertItems(int nItems, const wxString items[], int pos)
|
||||
{
|
||||
Append(deletedLabels[n], deletedData[n]);
|
||||
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
if ( m_hasCheckBoxes )
|
||||
{
|
||||
((wxCheckListBox *)this)->Check(pos + n, (bool)deletedChecks[n]);
|
||||
}
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
}
|
||||
}
|
||||
|
||||
@@ -436,10 +458,12 @@ void wxListBox::AppendCommon( const wxString &item )
|
||||
GtkWidget *list_item;
|
||||
|
||||
wxString label(item);
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
if (m_hasCheckBoxes)
|
||||
{
|
||||
label.Prepend(CHECKBOX_STRING);
|
||||
}
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
|
||||
list_item = gtk_list_item_new_with_label( label.mbc_str() );
|
||||
|
||||
@@ -462,6 +486,7 @@ void wxListBox::AppendCommon( const wxString &item )
|
||||
(GtkSignalFunc)gtk_listbox_button_release_callback,
|
||||
(gpointer) this );
|
||||
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
if (m_hasCheckBoxes)
|
||||
{
|
||||
gtk_signal_connect( GTK_OBJECT(list_item),
|
||||
@@ -469,6 +494,7 @@ void wxListBox::AppendCommon( const wxString &item )
|
||||
(GtkSignalFunc)gtk_listbox_key_press_callback,
|
||||
(gpointer)this );
|
||||
}
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
|
||||
gtk_widget_show( list_item );
|
||||
|
||||
@@ -785,8 +811,10 @@ void wxListBox::SetString( int n, const wxString &string )
|
||||
GtkLabel *label = GTK_LABEL( bin->child );
|
||||
|
||||
wxString str;
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
if (m_hasCheckBoxes)
|
||||
str += CHECKBOX_STRING;
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
str += string;
|
||||
|
||||
gtk_label_set( label, str.mbc_str() );
|
||||
|
@@ -137,7 +137,9 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
|
||||
|
||||
PreCreation( parent, id, pos, size, style, name );
|
||||
|
||||
#if wxUSE_VALIDATORS
|
||||
SetValidator( validator );
|
||||
#endif // wxUSE_VALIDATORS
|
||||
|
||||
m_vScrollbarVisible = FALSE;
|
||||
|
||||
|
@@ -35,7 +35,14 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <gtk/gtkfeatures.h>
|
||||
#include <gdk/gdkx.h>
|
||||
#include "X11/XKBlib.h"
|
||||
|
||||
#ifdef __HPUX__
|
||||
// under HP-UX XKBlib.h defines structures with field named "explicit" -
|
||||
// which is, of course, an error for a C++ compiler
|
||||
#define explicit __wx_explicit
|
||||
#include "X11/XKBlib.h"
|
||||
#undef explicit
|
||||
#endif // __HPUX__
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// misc.
|
||||
|
@@ -650,6 +650,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
|
||||
ret = (ret || win->GetEventHandler()->ProcessEvent( event2 ));
|
||||
}
|
||||
|
||||
#if wxUSE_ACCEL
|
||||
if (!ret)
|
||||
{
|
||||
wxWindow *ancestor = win;
|
||||
@@ -665,6 +666,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
|
||||
ancestor = ancestor->GetParent();
|
||||
}
|
||||
}
|
||||
#endif // wxUSE_ACCEL
|
||||
|
||||
/* win is a control: tab can be propagated up */
|
||||
if ( (!ret) &&
|
||||
@@ -706,8 +708,8 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
|
||||
wxNode *node = menubar->GetMenus().First();
|
||||
if (node)
|
||||
{
|
||||
wxMenu *firstMenu = (wxMenu*) node->Data();
|
||||
// doesn't work correctly
|
||||
// wxMenu *firstMenu = (wxMenu*) node->Data();
|
||||
// gtk_menu_item_select( GTK_MENU_ITEM(firstMenu->m_owner) );
|
||||
// ret = TRUE;
|
||||
break;
|
||||
|
@@ -24,19 +24,19 @@
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
|
||||
#include <isql.h>
|
||||
#include <isqlext.h>
|
||||
#include "isql.h"
|
||||
#include "isqlext.h"
|
||||
|
||||
#include <dlproc.h>
|
||||
#include "dlproc.h"
|
||||
|
||||
#include <herr.h>
|
||||
#include <henv.h>
|
||||
#include <hdbc.h>
|
||||
#include <hstmt.h>
|
||||
#include "herr.h"
|
||||
#include "henv.h"
|
||||
#include "hdbc.h"
|
||||
#include "hstmt.h"
|
||||
|
||||
#include <itrace.h>
|
||||
#include "itrace.h"
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
|
@@ -32,6 +32,13 @@
|
||||
|
||||
#include "wx/setup.h"
|
||||
|
||||
/* we have these definitions from configure */
|
||||
#if defined(HAVE_DLOPEN)
|
||||
#define DLDAPI_SVR4_DLFCN
|
||||
#elif define(HAVE_SHL_LOAD)
|
||||
#define DLDAPI_HP_SHL
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
|
@@ -24,19 +24,19 @@
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
|
||||
#include <isql.h>
|
||||
#include <isqlext.h>
|
||||
#include "isql.h"
|
||||
#include "isqlext.h"
|
||||
|
||||
#include <dlproc.h>
|
||||
#include "dlproc.h"
|
||||
|
||||
#include <herr.h>
|
||||
#include <henv.h>
|
||||
#include <hdbc.h>
|
||||
#include <hstmt.h>
|
||||
#include "herr.h"
|
||||
#include "henv.h"
|
||||
#include "hdbc.h"
|
||||
#include "hstmt.h"
|
||||
|
||||
#include <itrace.h>
|
||||
#include "itrace.h"
|
||||
|
||||
extern char* _iodbcdm_getkeyvalbydsn();
|
||||
extern char* _iodbcdm_getkeyvalinstr();
|
||||
@@ -308,7 +308,6 @@ _iodbcdm_driverunload (HDBC hdbc)
|
||||
GENV_t FAR *genv;
|
||||
HPROC hproc;
|
||||
RETCODE retcode = SQL_SUCCESS;
|
||||
int sqlstat = en_00000;
|
||||
|
||||
if (hdbc == SQL_NULL_HDBC)
|
||||
{
|
||||
@@ -964,17 +963,13 @@ SQLBrowseConnect (
|
||||
SWORD FAR * pcbConnStrOut)
|
||||
{
|
||||
DBC_t FAR *pdbc = (DBC_t FAR *) hdbc;
|
||||
HDLL hdll;
|
||||
char FAR *drv;
|
||||
char drvbuf[1024];
|
||||
char FAR *dsn;
|
||||
char dsnbuf[SQL_MAX_DSN_LENGTH + 1];
|
||||
UCHAR cnstr2drv[1024];
|
||||
|
||||
HPROC hproc;
|
||||
HPROC dialproc;
|
||||
|
||||
int sqlstat = en_00000;
|
||||
RETCODE retcode = SQL_SUCCESS;
|
||||
RETCODE setopterr = SQL_SUCCESS;
|
||||
|
||||
|
@@ -24,7 +24,7 @@
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <dlf.h>
|
||||
#include "dlf.h"
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef DLDAPI_DEFINED
|
||||
|
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
#ifndef _DLF_H
|
||||
#define _DLF_H
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
|
||||
#if defined(HAVE_LIBDL)
|
||||
#define DLDAPI_SVR4_DLFCN
|
||||
|
@@ -24,18 +24,18 @@
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
|
||||
#include <isql.h>
|
||||
#include <isqlext.h>
|
||||
#include "isql.h"
|
||||
#include "isqlext.h"
|
||||
|
||||
#include <dlproc.h>
|
||||
#include "dlproc.h"
|
||||
|
||||
#include <herr.h>
|
||||
#include <henv.h>
|
||||
#include <hdbc.h>
|
||||
#include "herr.h"
|
||||
#include "henv.h"
|
||||
#include "hdbc.h"
|
||||
|
||||
#include <itrace.h>
|
||||
#include "itrace.h"
|
||||
|
||||
#include "henv.ci"
|
||||
|
||||
@@ -44,7 +44,6 @@ _iodbcdm_getproc (HDBC hdbc, int idx)
|
||||
{
|
||||
DBC_t FAR *pdbc = (DBC_t FAR *) hdbc;
|
||||
ENV_t FAR *penv;
|
||||
HDLL hdll;
|
||||
HPROC FAR *phproc;
|
||||
|
||||
if (idx <= 0 || idx > SQL_EXT_API_LAST)
|
||||
|
@@ -26,7 +26,7 @@
|
||||
#ifndef _DLPROC_H
|
||||
#define _DLPROC_H
|
||||
|
||||
#include <dlf.h>
|
||||
#include "dlf.h"
|
||||
|
||||
typedef RETCODE (FAR * HPROC) ();
|
||||
|
||||
|
@@ -24,19 +24,19 @@
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
|
||||
#include <isql.h>
|
||||
#include <isqlext.h>
|
||||
#include "isql.h"
|
||||
#include "isqlext.h"
|
||||
|
||||
#include <dlproc.h>
|
||||
#include "dlproc.h"
|
||||
|
||||
#include <herr.h>
|
||||
#include <henv.h>
|
||||
#include <hdbc.h>
|
||||
#include <hstmt.h>
|
||||
#include "herr.h"
|
||||
#include "henv.h"
|
||||
#include "hdbc.h"
|
||||
#include "hstmt.h"
|
||||
|
||||
#include <itrace.h>
|
||||
#include "itrace.h"
|
||||
|
||||
static void
|
||||
do_cursoropen (STMT_t FAR * pstmt)
|
||||
|
@@ -24,19 +24,19 @@
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
|
||||
#include <isql.h>
|
||||
#include <isqlext.h>
|
||||
#include "isql.h"
|
||||
#include "isqlext.h"
|
||||
|
||||
#include <dlproc.h>
|
||||
#include "dlproc.h"
|
||||
|
||||
#include <herr.h>
|
||||
#include <henv.h>
|
||||
#include <hdbc.h>
|
||||
#include <hstmt.h>
|
||||
#include "herr.h"
|
||||
#include "henv.h"
|
||||
#include "hdbc.h"
|
||||
#include "hstmt.h"
|
||||
|
||||
#include <itrace.h>
|
||||
#include "itrace.h"
|
||||
|
||||
RETCODE SQL_API
|
||||
SQLFetch (HSTMT hstmt)
|
||||
|
@@ -24,20 +24,20 @@
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
|
||||
#include <isql.h>
|
||||
#include <isqlext.h>
|
||||
#include "isql.h"
|
||||
#include "isqlext.h"
|
||||
|
||||
#include <dlproc.h>
|
||||
#include "dlproc.h"
|
||||
|
||||
#include <herr.h>
|
||||
#include <henv.h>
|
||||
#include <hdbc.h>
|
||||
#include <hstmt.h>
|
||||
#include "herr.h"
|
||||
#include "henv.h"
|
||||
#include "hdbc.h"
|
||||
#include "hstmt.h"
|
||||
|
||||
#include <itrace.h>
|
||||
#include <stdio.h>
|
||||
#include "itrace.h"
|
||||
#include "stdio.h"
|
||||
|
||||
extern RETCODE _iodbcdm_driverunload();
|
||||
|
||||
@@ -176,7 +176,6 @@ SQLSetConnectOption (
|
||||
UWORD fOption,
|
||||
UDWORD vParam)
|
||||
{
|
||||
GENV_t FAR *genv;
|
||||
DBC_t FAR *pdbc = (DBC_t FAR *) hdbc;
|
||||
STMT_t FAR *pstmt;
|
||||
HPROC hproc = SQL_NULL_HPROC;
|
||||
@@ -511,7 +510,6 @@ SQLGetConnectOption (
|
||||
UWORD fOption,
|
||||
PTR pvParam)
|
||||
{
|
||||
GENV_t FAR *genv;
|
||||
DBC_t FAR *pdbc = (DBC_t FAR *) hdbc;
|
||||
int sqlstat = en_00000;
|
||||
HPROC hproc = SQL_NULL_HPROC;
|
||||
@@ -764,7 +762,7 @@ SQLTransact (
|
||||
GENV_t FAR *genv = (GENV_t FAR *) henv;
|
||||
DBC_t FAR *pdbc = (DBC_t FAR *) hdbc;
|
||||
HERR herr;
|
||||
RETCODE retcode;
|
||||
RETCODE retcode = 0;
|
||||
|
||||
if (hdbc != SQL_NULL_HDBC)
|
||||
{
|
||||
|
@@ -24,17 +24,17 @@
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
|
||||
#include <isql.h>
|
||||
#include <isqlext.h>
|
||||
#include "isql.h"
|
||||
#include "isqlext.h"
|
||||
|
||||
#include <dlproc.h>
|
||||
#include "dlproc.h"
|
||||
|
||||
#include <herr.h>
|
||||
#include <henv.h>
|
||||
#include "herr.h"
|
||||
#include "henv.h"
|
||||
|
||||
#include <itrace.h>
|
||||
#include "itrace.h"
|
||||
|
||||
RETCODE SQL_API
|
||||
SQLAllocEnv (HENV FAR * phenv)
|
||||
|
@@ -26,11 +26,11 @@
|
||||
#ifndef _HENV_H
|
||||
#define _HENV_H
|
||||
|
||||
#include <config.h>
|
||||
#include <dlproc.h>
|
||||
#include "config.h"
|
||||
#include "dlproc.h"
|
||||
|
||||
#include <isql.h>
|
||||
#include <isqlext.h>
|
||||
#include "isql.h"
|
||||
#include "isqlext.h"
|
||||
|
||||
#ifndef SYSERR
|
||||
#define SYSERR -1
|
||||
|
@@ -24,19 +24,19 @@
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
|
||||
#include <isql.h>
|
||||
#include <isqlext.h>
|
||||
#include "isql.h"
|
||||
#include "isqlext.h"
|
||||
|
||||
#include <dlproc.h>
|
||||
#include "dlproc.h"
|
||||
|
||||
#include <herr.h>
|
||||
#include <henv.h>
|
||||
#include <hdbc.h>
|
||||
#include <hstmt.h>
|
||||
#include "herr.h"
|
||||
#include "henv.h"
|
||||
#include "hdbc.h"
|
||||
#include "hstmt.h"
|
||||
|
||||
#include <itrace.h>
|
||||
#include "itrace.h"
|
||||
|
||||
#include "herr.ci"
|
||||
|
||||
|
@@ -24,19 +24,19 @@
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
|
||||
#include <isql.h>
|
||||
#include <isqlext.h>
|
||||
#include "isql.h"
|
||||
#include "isqlext.h"
|
||||
|
||||
#include <dlproc.h>
|
||||
#include "dlproc.h"
|
||||
|
||||
#include <herr.h>
|
||||
#include <henv.h>
|
||||
#include <hdbc.h>
|
||||
#include <hstmt.h>
|
||||
#include "herr.h"
|
||||
#include "henv.h"
|
||||
#include "hdbc.h"
|
||||
#include "hstmt.h"
|
||||
|
||||
#include <itrace.h>
|
||||
#include "itrace.h"
|
||||
|
||||
RETCODE SQL_API
|
||||
SQLAllocStmt (
|
||||
|
@@ -26,10 +26,10 @@
|
||||
#ifndef _HSTMT_H
|
||||
#define _HSTMT_H
|
||||
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
|
||||
#include <isql.h>
|
||||
#include <isqlext.h>
|
||||
#include "isql.h"
|
||||
#include "isqlext.h"
|
||||
|
||||
typedef struct STMT
|
||||
{
|
||||
|
@@ -24,19 +24,19 @@
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
|
||||
#include <isql.h>
|
||||
#include <isqlext.h>
|
||||
#include "isql.h"
|
||||
#include "isqlext.h"
|
||||
|
||||
#include <dlproc.h>
|
||||
#include "dlproc.h"
|
||||
|
||||
#include <herr.h>
|
||||
#include <henv.h>
|
||||
#include <hdbc.h>
|
||||
#include <hstmt.h>
|
||||
#include "herr.h"
|
||||
#include "henv.h"
|
||||
#include "hdbc.h"
|
||||
#include "hstmt.h"
|
||||
|
||||
#include <itrace.h>
|
||||
#include "itrace.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
@@ -27,7 +27,7 @@
|
||||
#ifndef _ISQLEXT_H
|
||||
# define _ISQLEXT_H
|
||||
|
||||
#include <isql.h>
|
||||
#include "isql.h"
|
||||
|
||||
/*
|
||||
* Generic constants
|
||||
|
@@ -24,17 +24,17 @@
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
|
||||
#include <isql.h>
|
||||
#include <isqlext.h>
|
||||
#include "isql.h"
|
||||
#include "isqlext.h"
|
||||
|
||||
#include <dlproc.h>
|
||||
#include "dlproc.h"
|
||||
|
||||
#include <itrace.h>
|
||||
#include "itrace.h"
|
||||
|
||||
#include <herr.h>
|
||||
#include <henv.h>
|
||||
#include "herr.h"
|
||||
#include "henv.h"
|
||||
#include "henv.ci"
|
||||
|
||||
#include <stdio.h>
|
||||
|
@@ -24,10 +24,10 @@
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
|
||||
#include <isql.h>
|
||||
#include <isqlext.h>
|
||||
#include "isql.h"
|
||||
#include "isqlext.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
@@ -24,19 +24,19 @@
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
|
||||
#include <isql.h>
|
||||
#include <isqlext.h>
|
||||
#include "isql.h"
|
||||
#include "isqlext.h"
|
||||
|
||||
#include <dlproc.h>
|
||||
#include "dlproc.h"
|
||||
|
||||
#include <herr.h>
|
||||
#include <henv.h>
|
||||
#include <hdbc.h>
|
||||
#include <hstmt.h>
|
||||
#include "herr.h"
|
||||
#include "henv.h"
|
||||
#include "hdbc.h"
|
||||
#include "hstmt.h"
|
||||
|
||||
#include <itrace.h>
|
||||
#include "itrace.h"
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
|
@@ -24,19 +24,19 @@
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
|
||||
#include <isql.h>
|
||||
#include <isqlext.h>
|
||||
#include "isql.h"
|
||||
#include "isqlext.h"
|
||||
|
||||
#include <dlproc.h>
|
||||
#include "dlproc.h"
|
||||
|
||||
#include <herr.h>
|
||||
#include <henv.h>
|
||||
#include <hdbc.h>
|
||||
#include <hstmt.h>
|
||||
#include "herr.h"
|
||||
#include "henv.h"
|
||||
#include "hdbc.h"
|
||||
#include "hstmt.h"
|
||||
|
||||
#include <itrace.h>
|
||||
#include "itrace.h"
|
||||
|
||||
RETCODE SQL_API
|
||||
SQLBindCol (
|
||||
|
Reference in New Issue
Block a user