mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-06 00:10:59 +00:00
Switch from SigC signals to boost::signals
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4281 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6a0b1fe001
commit
1e39473100
@ -1,3 +1,8 @@
|
||||
2002-05-29 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* Switch from SigC to boost::signals, SigC is now not used in any
|
||||
files anymore.
|
||||
|
||||
2002-05-29 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* INSTALL: document that --program-* and frontends
|
||||
@ -11,7 +16,7 @@
|
||||
|
||||
* configure.in: move Aiksaurus configure to catch
|
||||
extra-lib/inc (bug 383)
|
||||
|
||||
|
||||
2002-05-27 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* autogen.sh (ACINCLUDE_FILES): add pkg.m4
|
||||
|
@ -7,7 +7,7 @@ MAINTAINERCLEANFILES += $(srcdir)/aclocal.m4 \
|
||||
$(srcdir)/configure $(srcdir)/development/lyx.spec \
|
||||
$(srcdir)/acinclude.m4
|
||||
|
||||
SUBDIRS = config intl po sigc++ boost src lib
|
||||
SUBDIRS = config intl po boost src lib
|
||||
|
||||
EXTRA_DIST = ANNOUNCE INSTALL.OS2 INSTALL.autoconf README.OS2 \
|
||||
UPGRADING lyx.man acconfig.h autogen.sh \
|
||||
|
27
acconfig.h
27
acconfig.h
@ -1,8 +1,8 @@
|
||||
/* -*- C++ -*- */
|
||||
/* This is the compilation configuration file for LyX. It was generated by
|
||||
autoconf's configure. You might want to change some of the defaults if
|
||||
/* This is the compilation configuration file for LyX. It was generated by
|
||||
autoconf's configure. You might want to change some of the defaults if
|
||||
something goes wrong during the compilation
|
||||
|
||||
|
||||
* This file is part of
|
||||
* ======================================================
|
||||
*
|
||||
@ -41,9 +41,9 @@
|
||||
<iterator> */
|
||||
#undef HAVE_DECL_ISTREAMBUF_ITERATOR
|
||||
|
||||
@BOTTOM@
|
||||
@BOTTOM@
|
||||
|
||||
/************************************************************
|
||||
/************************************************************
|
||||
** You should not need to change anything beyond this point */
|
||||
|
||||
#ifndef HAVE_STRCHR
|
||||
@ -104,13 +104,14 @@ int mkstemp(char*);
|
||||
#endif
|
||||
|
||||
/* Some support for the boost library. */
|
||||
#ifndef HAVE_LIMITS
|
||||
#define BOOST_NO_LIMITS
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SSTREAM
|
||||
#define BOOST_NO_STRINGSTREAM
|
||||
#endif
|
||||
/*
|
||||
* #ifndef HAVE_LIMITS
|
||||
* #define BOOST_NO_LIMITS
|
||||
* #endif
|
||||
*
|
||||
* #ifndef HAVE_SSTREAM
|
||||
* #define BOOST_NO_STRINGSTREAM
|
||||
* #endif
|
||||
*/
|
||||
|
||||
#endif /* _CONFIG_H */
|
||||
|
||||
|
13
autogen.sh
13
autogen.sh
@ -6,7 +6,7 @@ AUTOMAKE="automake -a -c --foreign"
|
||||
AUTOCONF=autoconf
|
||||
GNUM4=
|
||||
|
||||
ACINCLUDE_FILES="lyxinclude.m4 libtool.m4 codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4 progtest.m4 sigc++.m4 qt2.m4 gtk--.m4 gnome--.m4 gnome.m4 pspell.m4 pkg.m4"
|
||||
ACINCLUDE_FILES="lyxinclude.m4 libtool.m4 codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4 progtest.m4 qt2.m4 gtk--.m4 gnome--.m4 gnome.m4 pspell.m4 pkg.m4"
|
||||
SIGCPP_ACINCLUDE_FILES="libtool.m4"
|
||||
|
||||
echo -n "Locating GNU m4... "
|
||||
@ -25,15 +25,14 @@ fi
|
||||
|
||||
# Generate acinclude.m4
|
||||
echo -n "Generate acinclude.m4... "
|
||||
rm -f acinclude.m4 sigc++/acinclude.m4
|
||||
rm -f acinclude.m4
|
||||
(cd config ; cat ${ACINCLUDE_FILES} >../acinclude.m4)
|
||||
(cd config ; cat ${SIGCPP_ACINCLUDE_FILES} >../sigc++/acinclude.m4)
|
||||
echo "done."
|
||||
|
||||
# Generate the Makefiles and configure files
|
||||
if ( aclocal --version ) </dev/null > /dev/null 2>&1; then
|
||||
echo "Building macros..."
|
||||
for dir in . lib/reLyX sigc++ ; do
|
||||
for dir in . lib/reLyX ; do
|
||||
echo " $dir"
|
||||
( cd $dir ; $ACLOCAL )
|
||||
done
|
||||
@ -45,7 +44,7 @@ fi
|
||||
|
||||
if ( autoheader --version ) </dev/null > /dev/null 2>&1; then
|
||||
echo "Building config header template..."
|
||||
for dir in . sigc++ ; do
|
||||
for dir in . ; do
|
||||
echo " $dir"
|
||||
( cd $dir ; $AUTOHEADER )
|
||||
done
|
||||
@ -57,7 +56,7 @@ fi
|
||||
|
||||
if ( $AUTOMAKE --version ) </dev/null > /dev/null 2>&1; then
|
||||
echo "Building Makefile templates..."
|
||||
for dir in . lib/reLyX sigc++ ; do
|
||||
for dir in . lib/reLyX ; do
|
||||
echo " $dir"
|
||||
( cd $dir ; $AUTOMAKE )
|
||||
done
|
||||
@ -69,7 +68,7 @@ fi
|
||||
|
||||
if ( $AUTOCONF --version ) </dev/null > /dev/null 2>&1; then
|
||||
echo "Building configure..."
|
||||
for dir in . lib/reLyX sigc++ ; do
|
||||
for dir in . lib/reLyX ; do
|
||||
echo " $dir"
|
||||
( cd $dir ; $AUTOCONF )
|
||||
done
|
||||
|
@ -212,6 +212,7 @@ if test x$GXX = xyes; then
|
||||
2.96*) CXXFLAGS="$lyx_opt";;
|
||||
3.0*) CXXFLAGS="$lyx_opt";;
|
||||
3.1*) CXXFLAGS="$lyx_opt";;
|
||||
3.2*) CXXFLAGS="$lyx_opt";;
|
||||
*) CXXFLAGS="$lyx_opt";;
|
||||
esac
|
||||
if test x$enable_debug = xyes ; then
|
||||
@ -228,7 +229,7 @@ if test x$GXX = xyes; then
|
||||
case $gxx_version in
|
||||
2.95.*) ;;
|
||||
2.96*) ;;
|
||||
*) ;;
|
||||
*) CXXFLAGS="$CXXFLAGS -Winline";;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
@ -437,10 +438,10 @@ AC_DEFUN(LYX_CXX_GOOD_STD_STRING,[
|
||||
dnl Usage: LYX_REGEX : checks if the header regex.h is available
|
||||
dnl if it is not available the automake variable USE_REGEX will be
|
||||
dnl defined and the regex.h and regex.c that we provide will be used.
|
||||
AC_DEFUN(LYX_REGEX,[
|
||||
AC_CHECK_HEADERS(regex.h, lyx_regex=no, lyx_regex=yes)
|
||||
AM_CONDITIONAL(USE_REGEX, test x$lyx_regex = xyes)
|
||||
])
|
||||
dnl AC_DEFUN(LYX_REGEX,[
|
||||
dnl AC_CHECK_HEADERS(regex.h, lyx_regex=no, lyx_regex=yes)
|
||||
dnl AM_CONDITIONAL(USE_REGEX, test x$lyx_regex = xyes)
|
||||
dnl ])
|
||||
|
||||
dnl NOT USED CURRENTLY*************************************
|
||||
dnl LYX_CXX_PARTIAL
|
||||
@ -763,58 +764,6 @@ dnl Usage: LYX_ADD_INC_DIR(var-name,dir) Adds a -I directive to variable
|
||||
dnl var-name.
|
||||
AC_DEFUN(LYX_ADD_INC_DIR,[$1="${$1} -I$2 "])
|
||||
|
||||
### Check which libsigc++ we're using and make sure any external one works
|
||||
### Check for libsigc++ library
|
||||
AC_DEFUN(LYX_WITH_SIGC,
|
||||
[AC_MSG_CHECKING(whether the included libsigc++ should be used)
|
||||
AC_ARG_WITH([included-libsigc],
|
||||
[ --without-included-libsigc
|
||||
Use the libsigc++ installed on the system],
|
||||
[lyx_use_included_libsigc=$withval],
|
||||
[lyx_use_included_libsigc=yes])
|
||||
AC_MSG_RESULT([$lyx_use_included_libsigc])
|
||||
if test x$lyx_use_included_libsigc = xno; then
|
||||
### Check for libsigc++
|
||||
## can't use AC_SUBST right here!
|
||||
AM_PATH_SIGC(0.8.7,
|
||||
[ INCLUDED_SIGC=
|
||||
],
|
||||
[LYX_ERROR(dnl
|
||||
[Cannot find libsigc++ library or headers at least as recent as 0.8.7.
|
||||
Check your installation. Have you installed the development package?])
|
||||
])
|
||||
else
|
||||
### Use the included libsigc++
|
||||
### sigc-config hasn't been created yet so we can't just do the same as above
|
||||
### unless of course someone gets keen and merges the sigc++ configure.in
|
||||
### with this one. We don't really gain much by doing that though except
|
||||
### a considerably smaller dist and more difficult maintenance.
|
||||
### It'd also mean we'd have the equivalent of config/gettext.m4
|
||||
lyx_flags="$lyx_flags included-libsigc"
|
||||
SIGC_LIBS="\`\${top_builddir}/sigc++/sigc-config --libs-names | sed -e 's/-lsigc//'\`"
|
||||
# Libsigc++ always installs into a subdirectory called sigc++. Therefore we
|
||||
# have to always use #include <sigc++/signal_system.h> in our code.
|
||||
# Remember if you decide to do anything to the sigc++ code to do your mods on
|
||||
# the makeLyXsigc.sh script in development/tools using a current cvs checkout
|
||||
# of libsigc++. A tarball distribution doesn't have everything in it that we
|
||||
# need.
|
||||
# We need both these -I entries to build when builddir != srcdir
|
||||
if test "x$srcdir" = "x." ; then
|
||||
SIGC_CFLAGS="-I\${top_srcdir}"
|
||||
else
|
||||
SIGC_CFLAGS="-I\${top_builddir} -I\${top_srcdir}"
|
||||
fi
|
||||
INCLUDED_SIGC="\${top_builddir}/sigc++/libsigc.la"
|
||||
## can't substitute these here like this otherwise all remaining tests fail
|
||||
## instead we SUBST directly into the Makefiles
|
||||
##LIBS="$LIBS \$SIGC_LIBS"
|
||||
##CPPFLAGS="$CPPFLAGS \$SIGC_CFLAGS"
|
||||
AC_SUBST(SIGC_LIBS)
|
||||
AC_SUBST(SIGC_CFLAGS)
|
||||
fi
|
||||
AC_SUBST(INCLUDED_SIGC)
|
||||
])
|
||||
|
||||
### Check for a headers existence and location iff it exists
|
||||
## This is supposed to be a generalised version of LYX_STL_STRING_FWD
|
||||
## It almost works. I've tried a few variations but they give errors
|
||||
|
@ -150,9 +150,6 @@ AC_LIBTOOL_WIN32_DLL
|
||||
#AM_PROG_LIBTOOL
|
||||
LYX_PROG_LIBTOOL
|
||||
|
||||
### Check which libsigc++ we're using
|
||||
LYX_WITH_SIGC
|
||||
|
||||
### Check if we want pspell libraries
|
||||
CHECK_WITH_PSPELL
|
||||
|
||||
@ -337,7 +334,7 @@ ${FRONTEND_INFO}\
|
||||
AC_SUBST(VERSION_INFO)
|
||||
|
||||
### Finish the work.
|
||||
AC_CONFIG_SUBDIRS(sigc++ lib lib/reLyX)
|
||||
AC_CONFIG_SUBDIRS(lib lib/reLyX)
|
||||
AC_OUTPUT([Makefile \
|
||||
boost/Makefile \
|
||||
boost/libs/Makefile \
|
||||
|
@ -66,6 +66,8 @@
|
||||
#include "support/filetools.h"
|
||||
#include "support/lyxfunctional.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <ctime>
|
||||
#include <unistd.h>
|
||||
#include <sys/wait.h>
|
||||
@ -81,7 +83,6 @@ using std::pair;
|
||||
using std::endl;
|
||||
using std::make_pair;
|
||||
using std::min;
|
||||
using SigC::slot;
|
||||
|
||||
using lyx::pos_type;
|
||||
using lyx::textclass_type;
|
||||
@ -131,33 +132,31 @@ BufferView::Pimpl::Pimpl(BufferView * b, LyXView * o,
|
||||
inset_slept(false)
|
||||
{
|
||||
// Setup the signals
|
||||
workarea_.scrollCB.connect(slot(this, &BufferView::Pimpl::scrollCB));
|
||||
workarea_.scrollCB.connect(boost::bind(&BufferView::Pimpl::scrollCB, this, _1));
|
||||
workarea_.workAreaExpose
|
||||
.connect(slot(this, &BufferView::Pimpl::workAreaExpose));
|
||||
.connect(boost::bind(&BufferView::Pimpl::workAreaExpose, this));
|
||||
workarea_.workAreaEnter
|
||||
.connect(slot(this, &BufferView::Pimpl::enterView));
|
||||
.connect(boost::bind(&BufferView::Pimpl::enterView, this));
|
||||
workarea_.workAreaLeave
|
||||
.connect(slot(this, &BufferView::Pimpl::leaveView));
|
||||
.connect(boost::bind(&BufferView::Pimpl::leaveView, this));
|
||||
workarea_.workAreaButtonPress
|
||||
.connect(slot(this, &BufferView::Pimpl::workAreaButtonPress));
|
||||
.connect(boost::bind(&BufferView::Pimpl::workAreaButtonPress, this, _1, _2, _3));
|
||||
workarea_.workAreaButtonRelease
|
||||
.connect(slot(this,
|
||||
&BufferView::Pimpl::workAreaButtonRelease));
|
||||
.connect(boost::bind(&BufferView::Pimpl::workAreaButtonRelease, this, _1, _2, _3));
|
||||
workarea_.workAreaMotionNotify
|
||||
.connect(slot(this, &BufferView::Pimpl::workAreaMotionNotify));
|
||||
.connect(boost::bind(&BufferView::Pimpl::workAreaMotionNotify, this, _1, _2, _3));
|
||||
workarea_.workAreaDoubleClick
|
||||
.connect(slot(this, &BufferView::Pimpl::doubleClick));
|
||||
.connect(boost::bind(&BufferView::Pimpl::doubleClick, this, _1, _2, _3));
|
||||
workarea_.workAreaTripleClick
|
||||
.connect(slot(this, &BufferView::Pimpl::tripleClick));
|
||||
.connect(boost::bind(&BufferView::Pimpl::tripleClick, this, _1, _2, _3));
|
||||
workarea_.workAreaKeyPress
|
||||
.connect(slot(this, &BufferView::Pimpl::workAreaKeyPress));
|
||||
.connect(boost::bind(&BufferView::Pimpl::workAreaKeyPress, this, _1, _2));
|
||||
workarea_.selectionRequested
|
||||
.connect(slot(this, &BufferView::Pimpl::selectionRequested));
|
||||
.connect(boost::bind(&BufferView::Pimpl::selectionRequested, this));
|
||||
workarea_.selectionLost
|
||||
.connect(slot(this, &BufferView::Pimpl::selectionLost));
|
||||
.connect(boost::bind(&BufferView::Pimpl::selectionLost, this));
|
||||
|
||||
cursor_timeout.timeout.connect(slot(this,
|
||||
&BufferView::Pimpl::cursorToggle));
|
||||
cursor_timeout.timeout.connect(boost::bind(&BufferView::Pimpl::cursorToggle, this));
|
||||
cursor_timeout.start();
|
||||
workarea_.setFocus();
|
||||
saved_positions.resize(saved_positions_num);
|
||||
@ -619,7 +618,7 @@ void BufferView::Pimpl::workAreaButtonPress(int xpos, int ypos,
|
||||
return;
|
||||
|
||||
// ok ok, this is a hack.
|
||||
|
||||
|
||||
if (button == mouse_button::button4) {
|
||||
scrollUp(lyxrc.wheel_jump);
|
||||
// We shouldn't go further down as we really should only do the
|
||||
@ -633,7 +632,7 @@ void BufferView::Pimpl::workAreaButtonPress(int xpos, int ypos,
|
||||
// dialogs (Jug 20020424).
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Inset * inset_hit = checkInsetHit(bv_->text, xpos, ypos);
|
||||
|
||||
// Middle button press pastes if we have a selection
|
||||
|
@ -6,14 +6,16 @@
|
||||
#include "BufferView.h"
|
||||
#include "commandtags.h"
|
||||
#include "frontends/mouse_state.h"
|
||||
#include "frontends/key_state.h"
|
||||
#include "frontends/Timeout.h"
|
||||
// FIXME remove me
|
||||
// FIXME remove me
|
||||
#include "frontends/WorkArea.h"
|
||||
#include "box.h"
|
||||
#include "insets/insetspecialchar.h"
|
||||
#include "support/types.h"
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <boost/signals/trackable.hpp>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
@ -24,7 +26,7 @@ class WorkArea;
|
||||
class LyXScreen;
|
||||
|
||||
///
|
||||
struct BufferView::Pimpl : public SigC::Object {
|
||||
struct BufferView::Pimpl : public boost::signals::trackable {
|
||||
///
|
||||
Pimpl(BufferView * i, LyXView * o,
|
||||
int xpos, int ypos, int width, int height);
|
||||
|
@ -1,3 +1,6 @@
|
||||
2002-05-29 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* switch from SigC signals to boost::signals
|
||||
|
||||
2002-05-29 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
@ -31,11 +34,11 @@
|
||||
* trans.C:
|
||||
* lyxfont.C:
|
||||
* lyxvc.C: remove unused headers
|
||||
|
||||
|
||||
2002-05-26 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* Makefile.am:
|
||||
* buffer.h:
|
||||
* buffer.h:
|
||||
* undostack.h:
|
||||
* undostack.C:
|
||||
* undo_funcs.h:
|
||||
@ -53,7 +56,7 @@
|
||||
* lyxfunc.h:
|
||||
* lyxfunc.C:
|
||||
* text2.C: use key_state/mouse_state
|
||||
|
||||
|
||||
2002-05-25 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* vc-backend.C (scanMaster): use boost regex and get rid of LRegex
|
||||
|
@ -15,13 +15,17 @@ LYX_CONV_LIBS = mathed/libmathed.la insets/libinsets.la \
|
||||
graphics/libgraphics.la \
|
||||
support/libsupport.la
|
||||
|
||||
BOOST_LIBS = ../boost/libs/regex/src/libboostregex.la
|
||||
BOOST_LIBS = ../boost/libs/regex/src/libboostregex.la \
|
||||
../boost/libs/signals/src/libboostsignals.la
|
||||
|
||||
#lyx_DEPENDENCIES = $(LYX_CONV_LIBS) $(INCLUDED_SIGC)
|
||||
|
||||
lyx_LDADD = $(LYX_CONV_LIBS) $(SIGC_LIBS) $(BOOST_LIBS) $(INCLUDED_SIGC) @INTLLIBS@ \
|
||||
lyx_LDADD = $(LYX_CONV_LIBS) $(BOOST_LIBS) @INTLLIBS@ \
|
||||
$(PSPELL_LIBS) @AIKSAURUS_LIBS@
|
||||
|
||||
#lyx_LDADD = $(LYX_CONV_LIBS) $(SIGC_LIBS) $(BOOST_LIBS) $(INCLUDED_SIGC) @INTLLIBS@ \
|
||||
# $(PSPELL_LIBS) @AIKSAURUS_LIBS@
|
||||
|
||||
# @FRONTEND_LDFLAGS@ @FRONTEND_LIBS@
|
||||
|
||||
#lyx_LDFLAGS=-Wl,-O1
|
||||
@ -37,6 +41,7 @@ EXTRA_DIST = config.h.in stamp-h.in cheaders ext_l10n.h version.C.in \
|
||||
tracer.h
|
||||
|
||||
INCLUDES = $(SIGC_CFLAGS) $(BOOST_INCLUDES) $(PSPELL_INCLUDES)
|
||||
#INCLUDES = $(BOOST_INCLUDES) $(PSPELL_INCLUDES)
|
||||
|
||||
localedir = $(datadir)/locale
|
||||
|
||||
|
@ -18,12 +18,15 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include <map>
|
||||
#include <sigc++/signal_system.h>
|
||||
#include "LString.h"
|
||||
|
||||
#include <boost/signals/signal0.hpp>
|
||||
#include <boost/signals/trackable.hpp>
|
||||
|
||||
#include <map>
|
||||
|
||||
///
|
||||
class Counter : public SigC::Object {
|
||||
class Counter : public boost::trackable {
|
||||
public:
|
||||
///
|
||||
Counter();
|
||||
@ -38,7 +41,7 @@ public:
|
||||
///
|
||||
void reset();
|
||||
///
|
||||
SigC::Signal0<void> onstep;
|
||||
boost::signal0<void> onstep;
|
||||
private:
|
||||
///
|
||||
int value_;
|
||||
|
@ -1,9 +1,13 @@
|
||||
2002-05-29 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* switch from SigC signals to boost::signals
|
||||
|
||||
2002-05-26 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* Makefile.am:
|
||||
* WorkArea.h:
|
||||
* WorkArea.C: move to xforms/ for better diff
|
||||
|
||||
|
||||
2002-05-26 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* key_state.h:
|
||||
@ -12,35 +16,35 @@
|
||||
* Makefile.am:
|
||||
* WorkArea.h:
|
||||
* WorkArea.C: use above
|
||||
|
||||
|
||||
2002-05-24 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* Makefile.am:
|
||||
* font_loader.h: placeholder
|
||||
|
||||
|
||||
* screen.C: use placeholder
|
||||
|
||||
|
||||
2002-05-23 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* Makefile.am:
|
||||
* font_metrics.h: add placeholder
|
||||
|
||||
|
||||
* Painter.C:
|
||||
* screen.C: use placeholder
|
||||
|
||||
|
||||
2002-05-23 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* WorkArea.h:
|
||||
* WorkArea.C:
|
||||
* Makefile.am: move here
|
||||
|
||||
|
||||
* screen.h:
|
||||
* screen.C: move here
|
||||
|
||||
|
||||
2002-05-23 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* Liason.C:
|
||||
* LyXView.h:
|
||||
* LyXView.h:
|
||||
* LyXView.C:
|
||||
* Makefile.am: move LyXView here
|
||||
|
||||
@ -49,7 +53,7 @@
|
||||
* Makefile.am:
|
||||
* Painter.h:
|
||||
* Painter.C: add PainterBase here
|
||||
|
||||
|
||||
2002-05-22 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* Dialogs.h: use more specific smart_ptr header
|
||||
|
@ -17,7 +17,7 @@
|
||||
#ifndef DIALOGBASE_H
|
||||
#define DIALOGBASE_H
|
||||
|
||||
#include <sigc++/signal_system.h>
|
||||
#include <boost/signals/trackable.hpp>
|
||||
#include <boost/utility.hpp>
|
||||
|
||||
/** Abstract base class of all dialogs.
|
||||
@ -26,7 +26,7 @@
|
||||
satisfy that request. Thus a dialog will have to "pull" the necessary
|
||||
details from the core of the program.
|
||||
*/
|
||||
class DialogBase : public SigC::Object, boost::noncopyable
|
||||
class DialogBase : public boost::signals::trackable, boost::noncopyable
|
||||
{
|
||||
public:
|
||||
/**@name Constructors and Deconstructors */
|
||||
|
@ -25,11 +25,11 @@
|
||||
|
||||
// Signal enabling all visible dialogs to be redrawn if so desired.
|
||||
// E.g., when the GUI colours have been remapped.
|
||||
SigC::Signal0<void> Dialogs::redrawGUI;
|
||||
boost::signal0<void> Dialogs::redrawGUI;
|
||||
|
||||
|
||||
// toggle tooltips on/off in all dialogs.
|
||||
SigC::Signal0<void> Dialogs::toggleTooltips;
|
||||
boost::signal0<void> Dialogs::toggleTooltips;
|
||||
|
||||
void Dialogs::add(DialogBase * ptr)
|
||||
{
|
||||
|
@ -22,8 +22,9 @@
|
||||
|
||||
#include <boost/utility.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include <sigc++/signal_system.h>
|
||||
#include <boost/signals/signal0.hpp>
|
||||
#include <boost/signals/signal1.hpp>
|
||||
#include <boost/function.hpp>
|
||||
|
||||
#include <vector>
|
||||
|
||||
@ -67,10 +68,10 @@ public:
|
||||
|
||||
/** Redraw all visible dialogs because, for example, the GUI colours
|
||||
have been re-mapped. */
|
||||
static SigC::Signal0<void> redrawGUI;
|
||||
static boost::signal0<void> redrawGUI;
|
||||
|
||||
/// Toggle tooltips on/off in all dialogs.
|
||||
static SigC::Signal0<void> toggleTooltips;
|
||||
static boost::signal0<void> toggleTooltips;
|
||||
|
||||
/// Are the tooltips on or off?
|
||||
static bool tooltipsEnabled();
|
||||
@ -78,113 +79,111 @@ public:
|
||||
/**@name Global Hide and Update Signals */
|
||||
//@{
|
||||
/// Hide all visible dialogs
|
||||
SigC::Signal0<void> hideAll;
|
||||
boost::signal0<void> hideAll;
|
||||
|
||||
/// Hide any dialogs that require a buffer for them to operate
|
||||
SigC::Signal0<void> hideBufferDependent;
|
||||
boost::signal0<void> hideBufferDependent;
|
||||
|
||||
/** Update visible, buffer-dependent dialogs
|
||||
If the bool is true then a buffer change has occurred
|
||||
else its still the same buffer.
|
||||
*/
|
||||
SigC::Signal1<void, bool> updateBufferDependent;
|
||||
boost::signal1<void, bool> updateBufferDependent;
|
||||
//@}
|
||||
|
||||
/**@name Dialog Access Signals.
|
||||
Put into some sort of alphabetical order */
|
||||
//@{
|
||||
/// Do we really have to push this?
|
||||
SigC::Signal1<void, std::vector<string> const &> SetDocumentClassChoice;
|
||||
///
|
||||
SigC::Signal0<void> showAboutlyx;
|
||||
boost::function<void> showAboutlyx;
|
||||
/// show the key and label of a bibliography entry
|
||||
SigC::Signal1<void, InsetCommand *> showBibitem;
|
||||
boost::function<void, InsetCommand *> showBibitem;
|
||||
/// show the bibtex dialog
|
||||
SigC::Signal1<void, InsetCommand *> showBibtex;
|
||||
boost::function<void, InsetCommand *> showBibtex;
|
||||
///
|
||||
SigC::Signal0<void> showCharacter;
|
||||
boost::function<void> showCharacter;
|
||||
/// connected to the character dialog also
|
||||
SigC::Signal0<void> setUserFreeFont;
|
||||
boost::function<void> setUserFreeFont;
|
||||
///
|
||||
SigC::Signal1<void, InsetCommand *> showCitation;
|
||||
boost::function<void, InsetCommand *> showCitation;
|
||||
///
|
||||
SigC::Signal1<void, string const &> createCitation;
|
||||
boost::function<void, string const &> createCitation;
|
||||
///
|
||||
SigC::Signal0<void> showDocument;
|
||||
boost::function<void> showDocument;
|
||||
///
|
||||
SigC::Signal1<void, InsetError *> showError;
|
||||
boost::function<void, InsetError *> showError;
|
||||
/// show the external inset dialog
|
||||
SigC::Signal1<void, InsetExternal *> showExternal;
|
||||
boost::function<void, InsetExternal *> showExternal;
|
||||
/// show the contents of a file.
|
||||
SigC::Signal1<void, string const &> showFile;
|
||||
boost::function<void, string const &> showFile;
|
||||
/// show all forked child processes
|
||||
SigC::Signal0<void> showForks;
|
||||
boost::function<void> showForks;
|
||||
///
|
||||
SigC::Signal1<void, InsetGraphics *> showGraphics;
|
||||
boost::function<void, InsetGraphics *> showGraphics;
|
||||
/// show the details of a LyX file include inset
|
||||
SigC::Signal1<void, InsetInclude *> showInclude;
|
||||
boost::function<void, InsetInclude *> showInclude;
|
||||
///
|
||||
SigC::Signal1<void, InsetCommand *> showIndex;
|
||||
boost::function<void, InsetCommand *> showIndex;
|
||||
///
|
||||
SigC::Signal1<void, string const &> createIndex;
|
||||
boost::function<void, string const &> createIndex;
|
||||
///
|
||||
SigC::Signal1<void, InsetInfo *> showInfo;
|
||||
boost::function<void, InsetInfo *> showInfo;
|
||||
/// show the LaTeX log or build file
|
||||
SigC::Signal0<void> showLogFile;
|
||||
boost::function<void> showLogFile;
|
||||
/// display the top-level maths panel
|
||||
SigC::Signal0<void> showMathPanel;
|
||||
boost::function<void> showMathPanel;
|
||||
///
|
||||
SigC::Signal1<void, InsetMinipage *> showMinipage;
|
||||
boost::function<void, InsetMinipage *> showMinipage;
|
||||
///
|
||||
SigC::Signal1<void, InsetMinipage *> updateMinipage;
|
||||
boost::function<void, InsetMinipage *> updateMinipage;
|
||||
///
|
||||
SigC::Signal1<void, InsetERT *> showERT;
|
||||
boost::function<void, InsetERT *> showERT;
|
||||
///
|
||||
SigC::Signal1<void, InsetERT *> updateERT;
|
||||
boost::function<void, InsetERT *> updateERT;
|
||||
///
|
||||
SigC::Signal1<void, InsetFloat *> showFloat;
|
||||
boost::function<void, InsetFloat *> showFloat;
|
||||
///
|
||||
SigC::Signal0<void> showParagraph;
|
||||
boost::function<void> showParagraph;
|
||||
///
|
||||
SigC::Signal0<void> updateParagraph;
|
||||
boost::signal0<void> updateParagraph;
|
||||
///
|
||||
SigC::Signal0<void> showPreamble;
|
||||
boost::function<void> showPreamble;
|
||||
///
|
||||
SigC::Signal0<void> showPreferences;
|
||||
boost::function<void> showPreferences;
|
||||
///
|
||||
SigC::Signal0<void> showPrint;
|
||||
boost::function<void> showPrint;
|
||||
///
|
||||
SigC::Signal1<void, InsetCommand *> showRef;
|
||||
boost::function<void, InsetCommand *> showRef;
|
||||
///
|
||||
SigC::Signal1<void, string const &> createRef;
|
||||
boost::function<void, string const &> createRef;
|
||||
///
|
||||
SigC::Signal0<void> showSearch;
|
||||
boost::function<void> showSearch;
|
||||
///
|
||||
SigC::Signal0<void> showSendto;
|
||||
boost::function<void> showSendto;
|
||||
/// bring up the spellchecker
|
||||
SigC::Signal0<void> showSpellchecker;
|
||||
boost::function<void> showSpellchecker;
|
||||
/// bring up the spellchecker tab in preferences
|
||||
SigC::Signal0<void> showSpellcheckerPreferences;
|
||||
boost::function<void> showSpellcheckerPreferences;
|
||||
///
|
||||
SigC::Signal1<void, InsetTabular *> showTabular;
|
||||
boost::function<void, InsetTabular *> showTabular;
|
||||
///
|
||||
SigC::Signal1<void, InsetTabular *> updateTabular;
|
||||
boost::function<void, InsetTabular *> updateTabular;
|
||||
///
|
||||
SigC::Signal0<void> showTabularCreate;
|
||||
boost::function<void> showTabularCreate;
|
||||
/// show the TexInfo
|
||||
SigC::Signal0<void> showTexinfo;
|
||||
boost::function<void> showTexinfo;
|
||||
/// show the thesaurus dialog
|
||||
SigC::Signal1<void, string const &> showThesaurus;
|
||||
boost::function<void, string const &> showThesaurus;
|
||||
///
|
||||
SigC::Signal1<void, InsetCommand *> showTOC;
|
||||
boost::function<void, InsetCommand *> showTOC;
|
||||
///
|
||||
SigC::Signal1<void, string const &> createTOC;
|
||||
boost::function<void, string const &> createTOC;
|
||||
///
|
||||
SigC::Signal1<void, InsetCommand *> showUrl;
|
||||
boost::function<void, InsetCommand *> showUrl;
|
||||
///
|
||||
SigC::Signal1<void, string const &> createUrl;
|
||||
boost::function<void, string const &> createUrl;
|
||||
/// show the version control log
|
||||
SigC::Signal0<void> showVCLogFile;
|
||||
boost::function<void> showVCLogFile;
|
||||
//@}
|
||||
private:
|
||||
/// Add a dialog to the vector of dialogs.
|
||||
|
@ -35,6 +35,8 @@
|
||||
|
||||
#include "support/filetools.h" // OnlyFilename()
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@ -57,7 +59,7 @@ LyXView::LyXView()
|
||||
autosave_timeout = new Timeout(5000);
|
||||
|
||||
dialogs_ = new Dialogs(this);
|
||||
Dialogs::redrawGUI.connect(SigC::slot(this, &LyXView::redraw));
|
||||
Dialogs::redrawGUI.connect(boost::bind(&LyXView::redraw, this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -7,12 +7,13 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include <boost/utility.hpp>
|
||||
#include <sigc++/signal_system.h>
|
||||
|
||||
#include "LString.h"
|
||||
|
||||
#include "support/types.h"
|
||||
|
||||
#include <boost/utility.hpp>
|
||||
#include <boost/signals/trackable.hpp>
|
||||
|
||||
class Buffer;
|
||||
class Toolbar;
|
||||
class MiniBuffer;
|
||||
@ -25,7 +26,7 @@ class LyXFunc;
|
||||
class Timeout;
|
||||
|
||||
///
|
||||
class LyXView : public SigC::Object, boost::noncopyable {
|
||||
class LyXView : public boost::signals::trackable, boost::noncopyable {
|
||||
public:
|
||||
///
|
||||
LyXView();
|
||||
|
@ -174,5 +174,5 @@ protected:
|
||||
|
||||
// VERY temporary
|
||||
#include "xforms/XPainter.h"
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -57,7 +57,7 @@ void Timeout::restart()
|
||||
void Timeout::emit()
|
||||
{
|
||||
pimpl_->reset();
|
||||
timeout.emit();
|
||||
timeout();
|
||||
if (type == CONTINUOUS)
|
||||
pimpl_->start();
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include <sigc++/signal_system.h>
|
||||
#include <boost/signals/signal0.hpp>
|
||||
|
||||
/**
|
||||
* This class executes the callback when the timeout expires.
|
||||
@ -41,7 +41,7 @@ public:
|
||||
/// restart the timer
|
||||
void restart();
|
||||
/// signal emitted on timer expiry
|
||||
SigC::Signal0<void> timeout;
|
||||
boost::signal0<void> timeout;
|
||||
/// emit the signal
|
||||
void emit();
|
||||
/// set the timer type
|
||||
|
@ -1,2 +1,169 @@
|
||||
// very temporary
|
||||
#include "xforms/XWorkArea.h"
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
* Copyright 1995 Matthias Ettrich
|
||||
* Copyright 1995-2001 The LyX Team.
|
||||
*
|
||||
* ======================================================*/
|
||||
|
||||
#ifndef WORKAREA_H
|
||||
#define WORKAREA_H
|
||||
|
||||
#if 1
|
||||
#include "frontends/xforms/XWorkArea.h"
|
||||
#else
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "frontends/Painter.h"
|
||||
|
||||
#include FORMS_H_LOCATION
|
||||
|
||||
#include <boost/signals/signal0.hpp>
|
||||
#include <boost/signals/signal1.hpp>
|
||||
#include <boost/signals/signal2.hpp>
|
||||
#include <boost/signals/signal3.hpp>
|
||||
|
||||
#include <utility>
|
||||
|
||||
|
||||
///
|
||||
class WorkArea {
|
||||
public:
|
||||
///
|
||||
WorkArea(int xpos, int ypos, int width, int height);
|
||||
///
|
||||
~WorkArea();
|
||||
///
|
||||
Painter & getPainter() { return painter_; }
|
||||
///
|
||||
int workWidth() const { return work_area->w; }
|
||||
///
|
||||
unsigned int width() const { return work_area->w + scrollbar->w; }
|
||||
//unsigned int width() const { return backgroundbox->w + 15; }
|
||||
///
|
||||
unsigned int height() const { return work_area->h; }
|
||||
//unsigned int height() const { return backgroundbox->h; }
|
||||
///
|
||||
int xpos() const { return work_area->x; }
|
||||
//int xpos() const { return backgroundbox->x; }
|
||||
///
|
||||
int ypos() const { return work_area->y; }
|
||||
//int ypos() const { return backgroundbox->y; }
|
||||
///
|
||||
void resize(int xpos, int ypos, int width, int height);
|
||||
///
|
||||
void redraw() const {
|
||||
fl_redraw_object(work_area);
|
||||
fl_redraw_object(scrollbar);
|
||||
}
|
||||
///
|
||||
void setFocus() const;
|
||||
///
|
||||
Window getWin() const { return work_area->form->window; }
|
||||
///
|
||||
bool hasFocus() const { return work_area->focus; }
|
||||
///
|
||||
bool active() const { return work_area->active; }
|
||||
///
|
||||
bool belowMouse() const;
|
||||
///
|
||||
bool visible() const { return work_area->form->visible; }
|
||||
///
|
||||
void greyOut() const;
|
||||
///
|
||||
void setScrollbar(double pos, double length_fraction) const;
|
||||
///
|
||||
void setScrollbarValue(double y) const {
|
||||
fl_set_scrollbar_value(scrollbar, y);
|
||||
}
|
||||
///
|
||||
void setScrollbarBounds(double, double) const;
|
||||
///
|
||||
void setScrollbarIncrements(double inc) const;
|
||||
///
|
||||
double getScrollbarValue() const {
|
||||
return fl_get_scrollbar_value(scrollbar);
|
||||
}
|
||||
///
|
||||
std::pair<float, float> const getScrollbarBounds() const {
|
||||
std::pair<float, float> p;
|
||||
fl_get_scrollbar_bounds(scrollbar, &p.first, &p.second);
|
||||
return p;
|
||||
}
|
||||
///
|
||||
Pixmap getPixmap() const { return workareapixmap; }
|
||||
/// xforms callback
|
||||
static int work_area_handler(FL_OBJECT *, int event,
|
||||
FL_Coord, FL_Coord,
|
||||
int /*key*/, void * xev);
|
||||
/// xforms callback
|
||||
static void scroll_cb(FL_OBJECT *, long);
|
||||
/// a selection exists
|
||||
void haveSelection(bool) const;
|
||||
///
|
||||
string const getClipboard() const;
|
||||
///
|
||||
void putClipboard(string const &) const;
|
||||
// Signals
|
||||
///
|
||||
boost::signal0<void> workAreaExpose;
|
||||
///
|
||||
boost::signal1<void, double> scrollCB;
|
||||
///
|
||||
boost::signal2<void, KeySym, unsigned int> workAreaKeyPress;
|
||||
///
|
||||
boost::signal3<void, int, int, unsigned int> workAreaButtonPress;
|
||||
///
|
||||
boost::signal3<void, int, int, unsigned int> workAreaButtonRelease;
|
||||
///
|
||||
boost::signal3<void, int, int, unsigned int> workAreaMotionNotify;
|
||||
///
|
||||
boost::signal0<void> workAreaFocus;
|
||||
///
|
||||
boost::signal0<void> workAreaUnfocus;
|
||||
///
|
||||
boost::signal0<void> workAreaEnter;
|
||||
///
|
||||
boost::signal0<void> workAreaLeave;
|
||||
///
|
||||
boost::signal3<void, int, int, unsigned int> workAreaDoubleClick;
|
||||
///
|
||||
boost::signal3<void, int, int, unsigned int> workAreaTripleClick;
|
||||
/// emitted when an X client has requested our selection
|
||||
boost::signal0<void> selectionRequested;
|
||||
/// emitted when another X client has stolen our selection
|
||||
boost::signal0<void> selectionLost;
|
||||
|
||||
/// handles SelectionRequest X Event, to fill the clipboard
|
||||
int event_cb(XEvent * xev);
|
||||
private:
|
||||
///
|
||||
void createPixmap(int, int);
|
||||
|
||||
///
|
||||
FL_OBJECT * backgroundbox;
|
||||
///
|
||||
FL_OBJECT * work_area;
|
||||
///
|
||||
FL_OBJECT * scrollbar;
|
||||
///
|
||||
mutable FL_OBJECT * splash_;
|
||||
///
|
||||
mutable FL_OBJECT * splash_text_;
|
||||
/// The pixmap overlay on the workarea
|
||||
Pixmap workareapixmap;
|
||||
///
|
||||
Painter painter_;
|
||||
/// if we call redraw with true needed for locking-insets
|
||||
bool screen_cleared;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,3 +1,7 @@
|
||||
2002-05-29 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* switch from SigC signals to boost::signals
|
||||
|
||||
2002-05-25 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* biblio.h: include vector
|
||||
|
@ -25,6 +25,8 @@
|
||||
#include "support/filetools.h" // FileSearch
|
||||
#include "version.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
// needed for the browser
|
||||
extern string system_lyxdir;
|
||||
extern string user_lyxdir;
|
||||
@ -32,7 +34,7 @@ extern string user_lyxdir;
|
||||
ControlAboutlyx::ControlAboutlyx(LyXView & lv, Dialogs & d)
|
||||
: ControlDialogBI(lv, d)
|
||||
{
|
||||
d_.showAboutlyx.connect(SigC::slot(this, &ControlAboutlyx::show));
|
||||
d_.showAboutlyx = boost::bind(&ControlAboutlyx::show, this);
|
||||
}
|
||||
|
||||
|
||||
|
@ -12,27 +12,29 @@
|
||||
* \author Angus Leeming <a.leeming@ic.ac.uk>
|
||||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include <config.h>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include <config.h>
|
||||
#include "ControlBibitem.h"
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlBibitem.h"
|
||||
#include "Dialogs.h"
|
||||
#include "frontends/LyXView.h"
|
||||
#include "buffer.h"
|
||||
#include "BufferView.h"
|
||||
|
||||
using SigC::slot;
|
||||
#include "frontends/LyXView.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
ControlBibitem::ControlBibitem(LyXView & lv, Dialogs & d)
|
||||
: ControlCommand(lv, d)
|
||||
{
|
||||
d_.showBibitem.connect(slot(this, &ControlBibitem::showInset));
|
||||
d_.showBibitem = boost::bind(&ControlBibitem::showInset, this, _1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -13,32 +13,35 @@
|
||||
* \author Herbert Voss <voss@lyx.org>
|
||||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include <config.h>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include <config.h>
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlBibtex.h"
|
||||
#include "Dialogs.h"
|
||||
#include "frontends/LyXView.h"
|
||||
#include "buffer.h"
|
||||
#include "BufferView.h"
|
||||
#include "lyxrc.h"
|
||||
#include "helper_funcs.h"
|
||||
#include "gettext.h"
|
||||
|
||||
using SigC::slot;
|
||||
#include "frontends/LyXView.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
using std::pair;
|
||||
using std::make_pair;
|
||||
|
||||
ControlBibtex::ControlBibtex(LyXView & lv, Dialogs & d)
|
||||
: ControlCommand(lv, d)
|
||||
{
|
||||
d_.showBibtex.connect(slot(this, &ControlBibtex::showInset));
|
||||
d_.showBibtex = boost::bind(&ControlBibtex::showInset, this, _1);
|
||||
}
|
||||
|
||||
void ControlBibtex::applyParamsToInset()
|
||||
|
@ -6,28 +6,30 @@
|
||||
* \author Angus Leeming, a.leeming@ic.ac.uk
|
||||
*/
|
||||
|
||||
#include <vector>
|
||||
#include <config.h>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "ControlCharacter.h"
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlCharacter.h"
|
||||
#include "buffer.h"
|
||||
#include "Dialogs.h"
|
||||
#include "Liason.h"
|
||||
#include "frontends/LyXView.h"
|
||||
#include "bufferview_funcs.h" // ToggleAndShow
|
||||
#include "gettext.h"
|
||||
#include "language.h"
|
||||
#include "BufferView.h"
|
||||
|
||||
#include "frontends/LyXView.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <vector>
|
||||
|
||||
using Liason::setMinibuffer;
|
||||
using SigC::slot;
|
||||
using std::vector;
|
||||
|
||||
|
||||
@ -35,8 +37,8 @@ ControlCharacter::ControlCharacter(LyXView & lv, Dialogs & d)
|
||||
: ControlDialogBD(lv, d),
|
||||
font_(0), toggleall_(false)
|
||||
{
|
||||
d_.showCharacter.connect(slot(this, &ControlCharacter::show));
|
||||
d_.setUserFreeFont.connect(slot(this, &ControlCharacter::apply));
|
||||
d_.showCharacter = boost::bind(&ControlCharacter::show, this);
|
||||
d_.setUserFreeFont = boost::bind(&ControlCharacter::apply, this);
|
||||
}
|
||||
|
||||
|
||||
|
@ -12,19 +12,23 @@
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include "ControlCitation.h"
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlCitation.h"
|
||||
#include "buffer.h"
|
||||
#include "Dialogs.h"
|
||||
|
||||
#include "frontends/LyXView.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
// need to #include this in _one_ of the ControlCommand-derived classses in
|
||||
// order to instantiate
|
||||
// ControlInset<InsetCommand, InsetCommandParams>::showInset
|
||||
@ -34,7 +38,6 @@
|
||||
|
||||
using std::pair;
|
||||
using std::vector;
|
||||
using SigC::slot;
|
||||
|
||||
vector<biblio::CiteStyle> ControlCitation::citeStyles_;
|
||||
|
||||
@ -43,8 +46,8 @@ ControlCitation::ControlCitation(LyXView & lv, Dialogs & d)
|
||||
{
|
||||
// These are permanent connections so we won't bother
|
||||
// storing a copy because we won't be disconnecting.
|
||||
d_.showCitation.connect(slot(this, &ControlCitation::showInset));
|
||||
d_.createCitation.connect(slot(this, &ControlCitation::createInset));
|
||||
d_.showCitation = boost::bind(&ControlCitation::showInset, this, _1);
|
||||
d_.createCitation = boost::bind(&ControlCitation::createInset, this, _1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -11,12 +11,12 @@
|
||||
* \author Angus Leeming <a.leeming@ic.ac.uk>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlCommand.h"
|
||||
|
@ -11,29 +11,30 @@
|
||||
* \author Angus Leeming <a.leeming@ic.ac.uk>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "ViewBase.h"
|
||||
#include "ControlConnections.h"
|
||||
#include "ViewBase.h"
|
||||
#include "Dialogs.h"
|
||||
#include "frontends/LyXView.h"
|
||||
#include "buffer.h"
|
||||
|
||||
using SigC::slot;
|
||||
#include "frontends/LyXView.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
ControlConnectBase::ControlConnectBase(LyXView & lv, Dialogs & d)
|
||||
: lv_(lv), d_(d), h_(0), r_(0)
|
||||
: lv_(lv), d_(d)
|
||||
{}
|
||||
|
||||
|
||||
void ControlConnectBase::connect()
|
||||
{
|
||||
r_ = Dialogs::redrawGUI.
|
||||
connect(slot(this, &ControlConnectBase::redraw));
|
||||
connect(boost::bind(&ControlConnectBase::redraw, this));
|
||||
}
|
||||
|
||||
void ControlConnectBase::disconnect()
|
||||
@ -81,22 +82,21 @@ ControlConnectBI::ControlConnectBI(LyXView & lv, Dialogs & d)
|
||||
|
||||
void ControlConnectBI::connect()
|
||||
{
|
||||
h_ = d_.hideAll.connect(slot(this, &ControlConnectBI::hide));
|
||||
h_ = d_.hideAll.connect(boost::bind(&ControlConnectBI::hide, this));
|
||||
ControlConnectBase::connect();
|
||||
}
|
||||
|
||||
ControlConnectBD::ControlConnectBD(LyXView & lv, Dialogs & d)
|
||||
: ControlConnectBase(lv, d),
|
||||
u_(0)
|
||||
: ControlConnectBase(lv, d)
|
||||
{}
|
||||
|
||||
|
||||
void ControlConnectBD::connect()
|
||||
{
|
||||
u_ = d_.updateBufferDependent.
|
||||
connect(slot(this, &ControlConnectBD::updateSlot));
|
||||
connect(boost::bind(&ControlConnectBD::updateSlot, this, _1));
|
||||
h_ = d_.hideBufferDependent.
|
||||
connect(slot(this, &ControlConnectBD::hide));
|
||||
connect(boost::bind(&ControlConnectBD::hide, this));
|
||||
ControlConnectBase::connect();
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,8 @@
|
||||
|
||||
#include "ControlButtons.h"
|
||||
|
||||
#include <boost/signals/connection.hpp>
|
||||
|
||||
class Dialogs;
|
||||
class LyXView;
|
||||
|
||||
@ -84,9 +86,9 @@ protected:
|
||||
/// Contains the signals we have to connect to.
|
||||
Dialogs & d_;
|
||||
/// Hide connection.
|
||||
SigC::Connection h_;
|
||||
boost::signals::connection h_;
|
||||
/// Redraw connection.
|
||||
SigC::Connection r_;
|
||||
boost::signals::connection r_;
|
||||
};
|
||||
|
||||
|
||||
@ -134,7 +136,7 @@ private:
|
||||
*/
|
||||
virtual void updateSlot(bool) { update(); }
|
||||
/// Update connection.
|
||||
SigC::Connection u_;
|
||||
boost::signals::connection u_;
|
||||
};
|
||||
|
||||
#endif // CONTROLCONNECTIONS_H
|
||||
|
@ -26,8 +26,9 @@
|
||||
#include "buffer.h"
|
||||
#include "BufferView.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
using std::vector;
|
||||
using SigC::slot;
|
||||
|
||||
// sorry this is just a temporary hack we should include vspace.h! (Jug)
|
||||
extern const char * stringFromUnit(int);
|
||||
@ -35,12 +36,12 @@ extern const char * stringFromUnit(int);
|
||||
ControlERT::ControlERT(LyXView & lv, Dialogs & d)
|
||||
: ControlInset<InsetERT, ERTParams>(lv, d)
|
||||
{
|
||||
d_.showERT.connect(slot(this, &ControlERT::showInset));
|
||||
d_.showERT = boost::bind(&ControlERT::showInset, this, _1);
|
||||
|
||||
// We could have an extra method updateInset that calls
|
||||
// view().update() rather than view().show(), but I don't see why
|
||||
// it is really needed.
|
||||
d_.updateERT.connect(slot(this, &ControlERT::showInset));
|
||||
d_.updateERT = boost::bind(&ControlERT::showInset, this, _1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -11,26 +11,28 @@
|
||||
* \author Angus Leeming <a.leeming@ic.ac.uk>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "ControlError.h"
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlError.h"
|
||||
#include "ControlInset.tmpl"
|
||||
#include "Dialogs.h"
|
||||
#include "frontends/LyXView.h"
|
||||
#include "buffer.h"
|
||||
#include "insets/inseterror.h"
|
||||
|
||||
#include "frontends/LyXView.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
ControlError::ControlError(LyXView & lv, Dialogs & d)
|
||||
: ControlInset<InsetError, string>(lv, d)
|
||||
{
|
||||
d_.showError.connect(SigC::slot(this, &ControlError::showInset));
|
||||
d_.showError = boost::bind(&ControlError::showInset, this, _1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "support/lstrings.h"
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
@ -46,7 +47,7 @@ using std::vector;
|
||||
ControlExternal::ControlExternal(LyXView & lv, Dialogs & d)
|
||||
: ControlInset<InsetExternal, InsetExternal::Params>(lv, d)
|
||||
{
|
||||
d_.showExternal.connect(SigC::slot(this, &ControlExternal::showInset));
|
||||
d_.showExternal = boost::bind(&ControlExternal::showInset, this, _1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -15,24 +15,27 @@
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include "ControlFloat.h"
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlFloat.h"
|
||||
#include "ControlInset.tmpl"
|
||||
#include "Dialogs.h"
|
||||
#include "frontends/LyXView.h"
|
||||
#include "buffer.h"
|
||||
#include "BufferView.h"
|
||||
|
||||
#include "insets/insetfloat.h"
|
||||
#include "frontends/LyXView.h"
|
||||
|
||||
#include "ControlInset.tmpl"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
using std::vector;
|
||||
using SigC::slot;
|
||||
|
||||
|
||||
ControlFloat::ControlFloat(LyXView & lv, Dialogs & d)
|
||||
: ControlInset<InsetFloat, FloatParams>(lv, d)
|
||||
{
|
||||
d_.showFloat.connect(slot(this, &ControlFloat::showInset));
|
||||
d_.showFloat = boost::bind(&ControlFloat::showInset, this, _1);
|
||||
|
||||
// We could have an extra method updateInset that calls
|
||||
// view().update() rather than view().show(), but I don't see why
|
||||
|
@ -25,13 +25,15 @@
|
||||
#include "support/forkedcontr.h"
|
||||
#include "support/lstrings.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
using std::vector;
|
||||
using SigC::slot;
|
||||
|
||||
|
||||
ControlForks::ControlForks(LyXView & lv, Dialogs & d)
|
||||
: ControlDialogBI(lv, d)
|
||||
{
|
||||
d_.showForks.connect(slot(this, &ControlForks::show));
|
||||
d_.showForks = boost::bind(&ControlForks::show, this);
|
||||
}
|
||||
|
||||
|
||||
@ -84,7 +86,7 @@ void ControlForks::setParams()
|
||||
|
||||
ForkedcallsController & fcc = ForkedcallsController::get();
|
||||
childrenChanged_ =
|
||||
fcc.childrenChanged.connect(slot(this, &ControlForks::update));
|
||||
fcc.childrenChanged.connect(boost::bind(&ControlForks::update, this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -16,6 +16,9 @@
|
||||
|
||||
#include "ControlDialog_impl.h"
|
||||
#include "LString.h"
|
||||
|
||||
#include <boost/signals/connection.hpp>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <vector>
|
||||
|
||||
@ -41,7 +44,7 @@ private:
|
||||
/// connect to the ForkedcallsController
|
||||
virtual void setParams();
|
||||
/// Connection to the ForkedcallsController signal
|
||||
SigC::Connection childrenChanged_;
|
||||
boost::signals::connection childrenChanged_;
|
||||
/// The list of PIDs to kill
|
||||
std::vector<string> pids_;
|
||||
};
|
||||
|
@ -13,7 +13,6 @@
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <fstream>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation
|
||||
@ -44,6 +43,9 @@
|
||||
#include "support/filetools.h"
|
||||
#include "support/FileInfo.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <fstream>
|
||||
|
||||
using std::pair;
|
||||
using std::make_pair;
|
||||
@ -55,25 +57,25 @@ namespace {
|
||||
// FIXME: currently we need the second '|' to prevent mis-interpretation!
|
||||
// All supported graphic formats with their file-extension and the
|
||||
// gzip-ext for zipped (e)ps-files.
|
||||
// string const grfx_pattern =
|
||||
// "*.(agr|bmp|eps|epsi|fits|gif|jpg|obj|pdf|pbm|pgm|png|"
|
||||
// "ppm|ps|tif|tiff|xbm|xpm|xwd|gz)|";
|
||||
// string const grfx_pattern =
|
||||
// "*.(agr|bmp|eps|epsi|fits|gif|jpg|obj|pdf|pbm|pgm|png|"
|
||||
// "ppm|ps|tif|tiff|xbm|xpm|xwd|gz)|";
|
||||
vector<string> const grfx_formats()
|
||||
{
|
||||
vector<string> native_formats = grfx::GCache::get().loadableFormats();
|
||||
// We can load any format that can be loaded natively together with
|
||||
// those that can be converted to one of these native formats.
|
||||
vector<string> browsable_formats = native_formats;
|
||||
|
||||
|
||||
grfx::GConverter const & gconverter = grfx::GConverter::get();
|
||||
|
||||
|
||||
vector<string>::const_iterator to_end = native_formats.end();
|
||||
|
||||
Formats::const_iterator from_it = formats.begin();
|
||||
Formats::const_iterator from_end = formats.end();
|
||||
for (; from_it != from_end; ++from_it) {
|
||||
string const from = from_it->name();
|
||||
|
||||
|
||||
vector<string>::const_iterator to_it = native_formats.begin();
|
||||
for (; to_it != to_end; ++to_it) {
|
||||
if (gconverter.isReachable(from, *to_it)) {
|
||||
@ -92,18 +94,18 @@ vector<string> const grfx_formats()
|
||||
string const xforms_pattern()
|
||||
{
|
||||
vector<string> const browsable_formats = grfx_formats();
|
||||
string const answer =
|
||||
string const answer =
|
||||
"*.(" + getStringFromVector(browsable_formats, "|") +")|";
|
||||
return answer;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
ControlGraphics::ControlGraphics(LyXView & lv, Dialogs & d)
|
||||
: ControlInset<InsetGraphics, InsetGraphicsParams>(lv, d)
|
||||
{
|
||||
d_.showGraphics.connect(SigC::slot(this, &ControlGraphics::showInset));
|
||||
d_.showGraphics = boost::bind(&ControlGraphics::showInset, this, _1);
|
||||
}
|
||||
|
||||
|
||||
@ -162,15 +164,15 @@ string const ControlGraphics::readBB(string const & file)
|
||||
{
|
||||
string const abs_file = MakeAbsPath(file, lv_.buffer()->filePath());
|
||||
|
||||
string const from = getExtFromContents(abs_file);
|
||||
string const from = getExtFromContents(abs_file);
|
||||
// Check if we have a Postscript file, then it's easy
|
||||
if (contains(from, "ps"))
|
||||
return readBB_from_PSFile(abs_file);
|
||||
|
||||
// we don't, so ask the Graphics Cache if it has loaded the file
|
||||
grfx::GCache & gc = grfx::GCache::get();
|
||||
return ("0 0 " +
|
||||
tostr(gc.raw_width(abs_file)) + ' ' +
|
||||
return ("0 0 " +
|
||||
tostr(gc.raw_width(abs_file)) + ' ' +
|
||||
tostr(gc.raw_height(abs_file)));
|
||||
}
|
||||
|
||||
@ -224,4 +226,3 @@ vector<RotationOriginPair> getRotationOriginData()
|
||||
}
|
||||
|
||||
} // namespace frnt
|
||||
|
||||
|
@ -15,29 +15,33 @@
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include "ControlInclude.h"
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlInclude.h"
|
||||
#include "ControlInset.tmpl"
|
||||
#include "buffer.h"
|
||||
#include "Alert.h"
|
||||
#include "BufferView.h"
|
||||
#include "Dialogs.h"
|
||||
#include "frontends/LyXView.h"
|
||||
#include "lyxfunc.h"
|
||||
#include "gettext.h"
|
||||
#include "helper_funcs.h"
|
||||
#include "lyxrc.h"
|
||||
|
||||
#include "support/filetools.h"
|
||||
|
||||
#include "frontends/LyXView.h"
|
||||
|
||||
#include "ControlInset.tmpl"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
using std::pair;
|
||||
using std::make_pair;
|
||||
using SigC::slot;
|
||||
|
||||
ControlInclude::ControlInclude(LyXView & lv, Dialogs & d)
|
||||
: ControlInset<InsetInclude, InsetInclude::Params>(lv, d)
|
||||
{
|
||||
d_.showInclude.connect(slot(this, &ControlInclude::showInset));
|
||||
d_.showInclude = boost::bind(&ControlInclude::showInset, this, _1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -17,18 +17,19 @@
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include "ControlIndex.h"
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlIndex.h"
|
||||
#include "buffer.h"
|
||||
#include "Dialogs.h"
|
||||
|
||||
#include "frontends/LyXView.h"
|
||||
|
||||
using SigC::slot;
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
ControlIndex::ControlIndex(LyXView & lv, Dialogs & d)
|
||||
: ControlCommand(lv, d, LFUN_INDEX_INSERT)
|
||||
{
|
||||
d_.showIndex.connect(slot(this, &ControlIndex::showInset));
|
||||
d_.createIndex.connect(slot(this, &ControlIndex::createInset));
|
||||
d_.showIndex = boost::bind(&ControlIndex::showInset, this, _1);
|
||||
d_.createIndex = boost::bind(&ControlIndex::createInset, this, _1);
|
||||
}
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include "ControlConnections.h"
|
||||
#include "LString.h"
|
||||
|
||||
#include <boost/signals/connection.hpp>
|
||||
|
||||
class Inset;
|
||||
|
||||
template <class Inset, class Params>
|
||||
@ -94,7 +96,7 @@ private:
|
||||
/// pointer to the inset passed through connectInset
|
||||
Inset * inset_;
|
||||
/// inset::hide connection.
|
||||
SigC::Connection ih_;
|
||||
boost::signals::connection ih_;
|
||||
/** A local copy of the inset's params.
|
||||
Memory is allocated only whilst the dialog is visible.
|
||||
*/
|
||||
|
@ -11,14 +11,15 @@
|
||||
*/
|
||||
|
||||
#include "ControlInset.h"
|
||||
#include "debug.h"
|
||||
|
||||
#include "support/LAssert.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
ControlInset<Inset, Params>::ControlInset(LyXView & lv, Dialogs & d)
|
||||
: ControlConnectBD(lv, d),
|
||||
inset_(0), ih_(0), params_(0), dialog_built_(false)
|
||||
inset_(0), params_(0), dialog_built_(false)
|
||||
{}
|
||||
|
||||
|
||||
@ -179,7 +180,7 @@ void ControlInset<Inset, Params>::connectInset(Inset * inset)
|
||||
if (inset) {
|
||||
inset_ = inset;
|
||||
ih_ = inset->hideDialog.connect(
|
||||
SigC::slot(this, &ControlInset::hide));
|
||||
boost::bind(&ControlInset::hide, this));
|
||||
}
|
||||
connect();
|
||||
}
|
||||
|
@ -18,20 +18,21 @@
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include "ControlLog.h"
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlLog.h"
|
||||
#include "frontends/LyXView.h"
|
||||
#include "Dialogs.h"
|
||||
#include "lyxrc.h"
|
||||
#include "BufferView.h"
|
||||
|
||||
using SigC::slot;
|
||||
#include "frontends/LyXView.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
ControlLog::ControlLog(LyXView & lv, Dialogs & d)
|
||||
: ControlDialogBD(lv, d)
|
||||
{
|
||||
d_.showLogFile.connect(slot(this, &ControlLog::show));
|
||||
d_.showLogFile = boost::bind(&ControlLog::show, this);
|
||||
}
|
||||
|
||||
|
||||
|
@ -17,9 +17,9 @@
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include "ControlMinipage.h"
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlMinipage.h"
|
||||
#include "ControlInset.tmpl"
|
||||
#include "Dialogs.h"
|
||||
#include "frontends/LyXView.h"
|
||||
@ -27,19 +27,20 @@
|
||||
#include "BufferView.h"
|
||||
#include "helper_funcs.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
using std::vector;
|
||||
using SigC::slot;
|
||||
|
||||
|
||||
ControlMinipage::ControlMinipage(LyXView & lv, Dialogs & d)
|
||||
: ControlInset<InsetMinipage, MinipageParams>(lv, d)
|
||||
{
|
||||
d_.showMinipage.connect(slot(this, &ControlMinipage::showInset));
|
||||
d_.showMinipage = boost::bind(&ControlMinipage::showInset, this, _1);
|
||||
|
||||
// We could have an extra method updateInset that calls
|
||||
// view().update() rather than view().show(), but I don't see why
|
||||
// it is really needed.
|
||||
d_.updateMinipage.connect(slot(this, &ControlMinipage::showInset));
|
||||
d_.updateMinipage = boost::bind(&ControlMinipage::showInset, this, _1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -24,11 +24,13 @@
|
||||
#include "BufferView.h"
|
||||
#include "support/LAssert.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
ControlPreamble::ControlPreamble(LyXView & lv, Dialogs & d)
|
||||
: ControlDialogBD(lv, d),
|
||||
params_(0)
|
||||
{
|
||||
d_.showPreamble.connect(SigC::slot(this, &ControlPreamble::show));
|
||||
d_.showPreamble = boost::bind(&ControlPreamble::show, this);
|
||||
}
|
||||
|
||||
|
||||
|
@ -32,6 +32,8 @@
|
||||
#include "BufferView.h"
|
||||
#include "support/LAssert.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
using Liason::printBuffer;
|
||||
using Liason::getPrinterParams;
|
||||
using std::make_pair;
|
||||
@ -40,7 +42,7 @@ ControlPrint::ControlPrint(LyXView & lv, Dialogs & d)
|
||||
: ControlDialogBD(lv, d),
|
||||
params_(0)
|
||||
{
|
||||
d_.showPrint.connect(SigC::slot(this, &ControlPrint::show));
|
||||
d_.showPrint = boost::bind(&ControlPrint::show, this);
|
||||
}
|
||||
|
||||
|
||||
|
@ -12,24 +12,28 @@
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include "ControlRef.h"
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlRef.h"
|
||||
#include "Dialogs.h"
|
||||
#include "frontends/LyXView.h"
|
||||
#include "buffer.h"
|
||||
#include "lyxfunc.h"
|
||||
#include "bufferlist.h"
|
||||
#include "support/filetools.h" // MakeAbsPath, MakeDisplayPath
|
||||
#include "debug.h"
|
||||
|
||||
using SigC::slot;
|
||||
#include "frontends/LyXView.h"
|
||||
|
||||
#include "support/filetools.h" // MakeAbsPath, MakeDisplayPath
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
using std::vector;
|
||||
using std::find;
|
||||
|
||||
@ -38,8 +42,8 @@ extern BufferList bufferlist;
|
||||
ControlRef::ControlRef(LyXView & lv, Dialogs & d)
|
||||
: ControlCommand(lv, d, LFUN_REF_INSERT)
|
||||
{
|
||||
d_.showRef.connect(slot(this, &ControlRef::showInset));
|
||||
d_.createRef.connect(slot(this, &ControlRef::createInset));
|
||||
d_.showRef = boost::bind(&ControlRef::showInset, this, _1);
|
||||
d_.createRef = boost::bind(&ControlRef::createInset, this, _1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -17,26 +17,29 @@
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include "ControlSearch.h"
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlSearch.h"
|
||||
#include "Dialogs.h"
|
||||
#include "Liason.h"
|
||||
#include "frontends/LyXView.h"
|
||||
#include "buffer.h"
|
||||
#include "lyxfind.h"
|
||||
#include "debug.h"
|
||||
#include "gettext.h"
|
||||
#include "BufferView.h"
|
||||
|
||||
#include "frontends/LyXView.h"
|
||||
|
||||
#include "support/lstrings.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
using Liason::setMinibuffer;
|
||||
using SigC::slot;
|
||||
|
||||
ControlSearch::ControlSearch(LyXView & lv, Dialogs & d)
|
||||
: ControlDialogBD(lv, d)
|
||||
{
|
||||
d_.showSearch.connect(SigC::slot(this, &ControlSearch::show));
|
||||
d_.showSearch = boost::bind(&ControlSearch::show, this);
|
||||
|
||||
// perhaps in the future we'd like a
|
||||
// "search again" button/keybinding
|
||||
|
@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <fstream>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation
|
||||
@ -24,10 +23,14 @@
|
||||
#include "exporter.h"
|
||||
#include "gettext.h"
|
||||
#include "lyxrc.h"
|
||||
|
||||
#include "support/filetools.h"
|
||||
#include "support/lstrings.h"
|
||||
#include "support/systemcall.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <fstream>
|
||||
|
||||
using std::vector;
|
||||
|
||||
@ -36,7 +39,7 @@ ControlSendto::ControlSendto(LyXView & lv, Dialogs & d)
|
||||
format_(0),
|
||||
command_(lyxrc.custom_export_command)
|
||||
{
|
||||
d_.showSendto.connect(SigC::slot(this, &ControlSendto::show));
|
||||
d_.showSendto = boost::bind(&ControlSendto::show, this);
|
||||
}
|
||||
|
||||
|
||||
|
@ -7,38 +7,45 @@
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <fstream>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include "ControlShowFile.h"
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlShowFile.h"
|
||||
#include "Dialogs.h"
|
||||
#include "frontends/LyXView.h"
|
||||
#include "BufferView.h"
|
||||
#include "gettext.h"
|
||||
|
||||
#include "support/filetools.h" // FileSearch
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <fstream>
|
||||
|
||||
ControlShowFile::ControlShowFile(LyXView & lv, Dialogs & d)
|
||||
: ControlDialogBI(lv, d)
|
||||
{
|
||||
d_.showFile.connect(SigC::slot(this, &ControlShowFile::showFile));
|
||||
d_.showFile = boost::bind(&ControlShowFile::showFile, this, _1);
|
||||
}
|
||||
|
||||
|
||||
void ControlShowFile::showFile(string const & file)
|
||||
{
|
||||
filename_ = file;
|
||||
show();
|
||||
}
|
||||
|
||||
|
||||
string ControlShowFile::getFileContents()
|
||||
{
|
||||
return GetFileContents(filename_);
|
||||
}
|
||||
|
||||
|
||||
string ControlShowFile::getFileName()
|
||||
{
|
||||
return OnlyFilename(filename_);
|
||||
|
@ -17,6 +17,32 @@
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include "ControlSpellchecker.h"
|
||||
#include "buffer.h"
|
||||
#include "lyxrc.h"
|
||||
#include "BufferView.h"
|
||||
#include "lyxtext.h"
|
||||
#include "gettext.h"
|
||||
#include "language.h"
|
||||
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "Dialogs.h"
|
||||
#include "Liason.h"
|
||||
|
||||
#include "frontends/LyXView.h"
|
||||
|
||||
#include "support/lstrings.h"
|
||||
|
||||
# include "sp_ispell.h"
|
||||
#ifdef USE_PSPELL
|
||||
# include "sp_pspell.h"
|
||||
#endif
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <sys/types.h> // needed by <sys/select.h> at least on freebsd
|
||||
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
@ -30,36 +56,12 @@
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#include "buffer.h"
|
||||
#include "lyxrc.h"
|
||||
#include "BufferView.h"
|
||||
#include "frontends/LyXView.h"
|
||||
#include "lyxtext.h"
|
||||
#include "gettext.h"
|
||||
#include "support/lstrings.h"
|
||||
#include "language.h"
|
||||
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlSpellchecker.h"
|
||||
#include "Dialogs.h"
|
||||
#include "Liason.h"
|
||||
|
||||
# include "sp_ispell.h"
|
||||
#ifdef USE_PSPELL
|
||||
# include "sp_pspell.h"
|
||||
#endif
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
using SigC::slot;
|
||||
|
||||
ControlSpellchecker::ControlSpellchecker(LyXView & lv, Dialogs & d)
|
||||
: ControlDialogBD(lv, d),
|
||||
rtl_(false), newval_(0.0), oldval_(0), newvalue_(0), count_(0),
|
||||
stop_(false), result_(SpellBase::ISP_OK), speller_(0)
|
||||
{
|
||||
d_.showSpellchecker.connect(SigC::slot(this, &ControlSpellchecker::show));
|
||||
d_.showSpellchecker = boost::bind(&ControlSpellchecker::show, this);
|
||||
}
|
||||
|
||||
|
||||
|
@ -16,20 +16,23 @@
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include "ControlTabularCreate.h"
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlTabularCreate.h"
|
||||
#include "BufferView.h"
|
||||
#include "Dialogs.h"
|
||||
#include "frontends/LyXView.h"
|
||||
#include "lyxfunc.h"
|
||||
|
||||
#include "frontends/LyXView.h"
|
||||
|
||||
#include "support/lstrings.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
ControlTabularCreate::ControlTabularCreate(LyXView & lv, Dialogs & d)
|
||||
: ControlDialogBD(lv, d)
|
||||
{
|
||||
d_.showTabularCreate.connect(SigC::slot(this,
|
||||
&ControlTabularCreate::show));
|
||||
d_.showTabularCreate = boost::bind(&ControlTabularCreate::show, this);
|
||||
}
|
||||
|
||||
|
||||
|
@ -17,26 +17,30 @@
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include "ControlTexinfo.h"
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlTexinfo.h"
|
||||
#include "Dialogs.h"
|
||||
#include "frontends/LyXView.h"
|
||||
#include "BufferView.h"
|
||||
#include "gettext.h"
|
||||
#include "helper_funcs.h"
|
||||
|
||||
#include "frontends/LyXView.h"
|
||||
|
||||
#include "support/filetools.h" // FileSearch
|
||||
#include "support/systemcall.h"
|
||||
#include "support/path.h"
|
||||
#include "helper_funcs.h"
|
||||
#include "support/lstrings.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
extern string user_lyxdir; // home of *Files.lst
|
||||
|
||||
|
||||
ControlTexinfo::ControlTexinfo(LyXView & lv, Dialogs & d)
|
||||
: ControlDialogBI(lv, d)
|
||||
{
|
||||
d_.showTexinfo.connect(SigC::slot(this, &ControlTexinfo::show));
|
||||
d_.showTexinfo = boost::bind(&ControlTexinfo::show, this);
|
||||
}
|
||||
|
||||
|
||||
|
@ -12,25 +12,27 @@
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include "ControlThesaurus.h"
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlThesaurus.h"
|
||||
#include "Dialogs.h"
|
||||
#include "Liason.h"
|
||||
#include "frontends/LyXView.h"
|
||||
#include "lyxfind.h"
|
||||
#include "buffer.h"
|
||||
#include "debug.h"
|
||||
#include "gettext.h"
|
||||
#include "BufferView.h"
|
||||
|
||||
#include "frontends/LyXView.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
using Liason::setMinibuffer;
|
||||
using SigC::slot;
|
||||
|
||||
ControlThesaurus::ControlThesaurus(LyXView & lv, Dialogs & d)
|
||||
: ControlDialogBD(lv, d)
|
||||
{
|
||||
d_.showThesaurus.connect(SigC::slot(this, &ControlThesaurus::showEntry));
|
||||
d_.showThesaurus = boost::bind(&ControlThesaurus::showEntry, this, _1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -17,25 +17,28 @@
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include "ControlToc.h"
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlToc.h"
|
||||
#include "buffer.h"
|
||||
#include "Dialogs.h"
|
||||
#include "frontends/LyXView.h"
|
||||
#include "lyxfunc.h"
|
||||
#include "support/lstrings.h" // tostr
|
||||
#include "gettext.h"
|
||||
#include "BufferView.h"
|
||||
|
||||
#include "frontends/LyXView.h"
|
||||
|
||||
#include "support/lstrings.h" // tostr
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
using std::vector;
|
||||
using SigC::slot;
|
||||
|
||||
ControlToc::ControlToc(LyXView & lv, Dialogs & d)
|
||||
: ControlCommand(lv, d, LFUN_TOC_INSERT)
|
||||
{
|
||||
d_.showTOC.connect(slot(this, &ControlToc::showInset));
|
||||
d_.createTOC.connect(slot(this, &ControlToc::createInset));
|
||||
d_.showTOC = boost::bind(&ControlToc::showInset, this, _1);
|
||||
d_.createTOC = boost::bind(&ControlToc::createInset, this, _1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -17,18 +17,19 @@
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include "ControlUrl.h"
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlUrl.h"
|
||||
#include "Dialogs.h"
|
||||
#include "frontends/LyXView.h"
|
||||
#include "buffer.h"
|
||||
|
||||
using SigC::slot;
|
||||
#include "frontends/LyXView.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
ControlUrl::ControlUrl(LyXView & lv, Dialogs & d)
|
||||
: ControlCommand(lv, d, LFUN_INSERT_URL)
|
||||
{
|
||||
d_.showUrl.connect(slot(this, &ControlUrl::showInset));
|
||||
d_.createUrl.connect(slot(this, &ControlUrl::createInset));
|
||||
d_.showUrl = boost::bind(&ControlUrl::showInset, this, _1);
|
||||
d_.createUrl = boost::bind(&ControlUrl::createInset, this, _1);
|
||||
}
|
||||
|
@ -13,31 +13,35 @@
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <fstream>
|
||||
#include "Lsstream.h"
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include "ControlVCLog.h"
|
||||
#include "Lsstream.h"
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlVCLog.h"
|
||||
#include "buffer.h"
|
||||
#include "BufferView.h"
|
||||
#include "frontends/LyXView.h"
|
||||
#include "Dialogs.h"
|
||||
#include "lyxrc.h"
|
||||
#include "support/lyxlib.h"
|
||||
#include "gettext.h"
|
||||
|
||||
using SigC::slot;
|
||||
#include "frontends/LyXView.h"
|
||||
|
||||
#include "support/lyxlib.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <fstream>
|
||||
|
||||
using std::endl;
|
||||
|
||||
ControlVCLog::ControlVCLog(LyXView & lv, Dialogs & d)
|
||||
: ControlDialogBD(lv, d)
|
||||
{
|
||||
d_.showVCLogFile.connect(slot(this, &ControlVCLog::show));
|
||||
d_.showVCLogFile = boost::bind(&ControlVCLog::show, this);
|
||||
}
|
||||
|
||||
string const ControlVCLog::getBufferFileName() const
|
||||
|
@ -64,6 +64,7 @@ private:
|
||||
GUIview view_;
|
||||
};
|
||||
|
||||
#if 0
|
||||
/** Specialization for About LyX dialog
|
||||
*/
|
||||
template <class GUIview, class GUIbc>
|
||||
@ -402,5 +403,6 @@ public:
|
||||
: GUI<ControlVCLog, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // GUI_H
|
||||
|
@ -1,5 +1,7 @@
|
||||
2002-05-29 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* switch from SigC signals to boost::signals.
|
||||
|
||||
* Dialogs.C (Dialogs): simplify creation of dialog objects a bit.
|
||||
|
||||
2002-05-28 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
|
||||
|
@ -159,5 +159,5 @@ Dialogs::Dialogs(LyXView * lv)
|
||||
|
||||
// reduce the number of connections needed in
|
||||
// dialogs by a simple connection here.
|
||||
hideAll.connect(hideBufferDependent.slot());
|
||||
hideAll.connect(hideBufferDependent);
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ void DropDown::completed()
|
||||
{
|
||||
XUngrabPointer(fl_get_display(), CurrentTime);
|
||||
fl_hide_form(form_);
|
||||
result.emit(getSelectedStringFromBrowser(browser_));
|
||||
result(getSelectedStringFromBrowser(browser_));
|
||||
}
|
||||
|
||||
|
||||
@ -172,5 +172,5 @@ void DropDown::key_pressed(char c)
|
||||
{
|
||||
XUngrabPointer(fl_get_display(), CurrentTime);
|
||||
fl_hide_form(form_);
|
||||
keypress.emit(c);
|
||||
keypress(c);
|
||||
}
|
||||
|
@ -15,9 +15,12 @@
|
||||
#endif
|
||||
|
||||
#include "frontends/LyXView.h"
|
||||
#include <sigc++/signal_system.h>
|
||||
#include "LString.h"
|
||||
|
||||
#include FORMS_H_LOCATION
|
||||
|
||||
#include <boost/signals/signal1.hpp>
|
||||
|
||||
#include <vector>
|
||||
|
||||
class DropDown {
|
||||
@ -37,10 +40,10 @@ public:
|
||||
void key_pressed(char c);
|
||||
|
||||
/// signal for completion
|
||||
SigC::Signal1<void, string const &> result;
|
||||
boost::signal1<void, string const &> result;
|
||||
|
||||
/// signal that a key was pressed
|
||||
SigC::Signal1<void, char> keypress;
|
||||
boost::signal1<void, char> keypress;
|
||||
|
||||
/// X event
|
||||
int peek(XEvent *);
|
||||
|
@ -18,11 +18,13 @@
|
||||
#include "xforms_resize.h"
|
||||
#include "GUIRunTime.h"
|
||||
#include "Tooltips.h"
|
||||
#include "frontends/LyXView.h"
|
||||
#include "lyxrc.h"
|
||||
|
||||
#include "frontends/LyXView.h"
|
||||
|
||||
#include "support/LAssert.h"
|
||||
|
||||
using SigC::slot;
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
extern "C" {
|
||||
|
||||
@ -38,7 +40,7 @@ static int C_PrehandlerCB(FL_OBJECT *, int, FL_Coord, FL_Coord, int, void *);
|
||||
|
||||
FormBaseDeprecated::FormBaseDeprecated(LyXView * lv, Dialogs * d,
|
||||
string const & t, bool allowResize)
|
||||
: lv_(lv), d_(d), h_(0), r_(0), title_(t),
|
||||
: lv_(lv), d_(d), title_(t),
|
||||
minw_(0), minh_(0), allow_resize_(allowResize),
|
||||
tooltips_(new Tooltips)
|
||||
{
|
||||
@ -68,7 +70,7 @@ void FormBaseDeprecated::redraw()
|
||||
void FormBaseDeprecated::connect()
|
||||
{
|
||||
fl_set_form_minsize(form(), minw_, minh_);
|
||||
r_ = Dialogs::redrawGUI.connect(slot(this,&FormBaseDeprecated::redraw));
|
||||
r_ = Dialogs::redrawGUI.connect(boost::bind(&FormBaseDeprecated::redraw, this));
|
||||
}
|
||||
|
||||
|
||||
@ -211,24 +213,23 @@ FormBaseBI::FormBaseBI(LyXView * lv, Dialogs * d, string const & t,
|
||||
|
||||
void FormBaseBI::connect()
|
||||
{
|
||||
h_ = d_->hideAll.connect(slot(this, &FormBaseBI::hide));
|
||||
h_ = d_->hideAll.connect(boost::bind(&FormBaseBI::hide, this));
|
||||
FormBaseDeprecated::connect();
|
||||
}
|
||||
|
||||
|
||||
FormBaseBD::FormBaseBD(LyXView * lv, Dialogs * d, string const & t,
|
||||
bool allowResize)
|
||||
: FormBaseDeprecated(lv, d, t, allowResize),
|
||||
u_(0)
|
||||
: FormBaseDeprecated(lv, d, t, allowResize)
|
||||
{}
|
||||
|
||||
|
||||
void FormBaseBD::connect()
|
||||
{
|
||||
u_ = d_->updateBufferDependent.
|
||||
connect(slot(this, &FormBaseBD::updateSlot));
|
||||
connect(boost::bind(&FormBaseBD::updateSlot, this, _1));
|
||||
h_ = d_->hideBufferDependent.
|
||||
connect(slot(this, &FormBaseBD::hide));
|
||||
connect(boost::bind(&FormBaseBD::hide, this));
|
||||
FormBaseDeprecated::connect();
|
||||
}
|
||||
|
||||
|
@ -16,9 +16,6 @@
|
||||
#ifndef FORMBASEDEPRECATED_H
|
||||
#define FORMBASEDEPRECATED_H
|
||||
|
||||
#include FORMS_H_LOCATION
|
||||
#include <sigc++/signal_system.h>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
@ -28,6 +25,10 @@
|
||||
#include "xformsBC.h"
|
||||
#include "FeedbackController.h"
|
||||
|
||||
#include FORMS_H_LOCATION
|
||||
|
||||
#include <boost/signals/trackable.hpp>
|
||||
|
||||
class Buffer;
|
||||
class Dialogs;
|
||||
class LyXView;
|
||||
@ -120,9 +121,9 @@ protected: // methods
|
||||
/// Used so we can get at the signals we have to connect to.
|
||||
Dialogs * d_;
|
||||
/// Hide connection.
|
||||
SigC::Connection h_;
|
||||
boost::signals::connection h_;
|
||||
/// Redraw connection.
|
||||
SigC::Connection r_;
|
||||
boost::signals::connection r_;
|
||||
/// dialog title, displayed by WM.
|
||||
string title_;
|
||||
|
||||
@ -145,7 +146,8 @@ private:
|
||||
class FormBaseBI : public FormBaseDeprecated {
|
||||
protected:
|
||||
/// Constructor
|
||||
FormBaseBI(LyXView *, Dialogs *, string const &, bool allowResize=true);
|
||||
FormBaseBI(LyXView *, Dialogs *, string const &,
|
||||
bool allowResize = true);
|
||||
|
||||
/// Connect signals
|
||||
virtual void connect();
|
||||
@ -157,7 +159,8 @@ protected:
|
||||
class FormBaseBD : public FormBaseDeprecated {
|
||||
protected:
|
||||
/// Constructor
|
||||
FormBaseBD(LyXView *, Dialogs *, string const &, bool allowResize=true);
|
||||
FormBaseBD(LyXView *, Dialogs *, string const &,
|
||||
bool allowResize = true);
|
||||
|
||||
/// Connect signals
|
||||
virtual void connect();
|
||||
@ -167,7 +170,7 @@ protected:
|
||||
virtual void updateSlot(bool) { update(); }
|
||||
|
||||
/// Update connection.
|
||||
SigC::Connection u_;
|
||||
boost::signals::connection u_;
|
||||
};
|
||||
|
||||
|
||||
|
@ -46,12 +46,13 @@
|
||||
#include "support/filetools.h"
|
||||
#include "support/lstrings.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <functional>
|
||||
|
||||
using std::bind2nd;
|
||||
|
||||
using Liason::setMinibuffer;
|
||||
using SigC::slot;
|
||||
using std::vector;
|
||||
|
||||
FormDocument::FormDocument(LyXView * lv, Dialogs * d)
|
||||
@ -62,7 +63,7 @@ FormDocument::FormDocument(LyXView * lv, Dialogs * d)
|
||||
// let the dialog be shown
|
||||
// This is a permanent connection so we won't bother
|
||||
// storing a copy because we won't be disconnecting.
|
||||
d->showDocument.connect(slot(this, &FormDocument::show));
|
||||
d->showDocument = boost::bind(&FormDocument::show, this);
|
||||
}
|
||||
|
||||
|
||||
|
@ -29,6 +29,7 @@ using std::sort;
|
||||
#include "frontends/Dialogs.h"
|
||||
#include "xforms_helpers.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#ifdef HAVE_ERRNO_H
|
||||
#include <cerrno>
|
||||
@ -456,7 +457,7 @@ FileDialog::Private::Private()
|
||||
fl_hide_object(pFileDlgForm->User1);
|
||||
fl_hide_object(pFileDlgForm->User2);
|
||||
|
||||
r_ = Dialogs::redrawGUI.connect(SigC::slot(this, &FileDialog::Private::redraw));
|
||||
r_ = Dialogs::redrawGUI.connect(boost::bind(&FileDialog::Private::redraw, this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -11,19 +11,23 @@
|
||||
#ifndef FORMFILEDIALOG_H
|
||||
#define FORMFILEDIALOG_H
|
||||
|
||||
#include <vector>
|
||||
#include <sigc++/signal_system.h>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "LString.h"
|
||||
|
||||
#include FORMS_H_LOCATION
|
||||
#include "form_filedialog.h"
|
||||
|
||||
#include "frontends/FileDialog.h"
|
||||
|
||||
#include <boost/signals/connection.hpp>
|
||||
#include <boost/signals/trackable.hpp>
|
||||
|
||||
#include <vector>
|
||||
|
||||
/// DirEntry internal structure definition
|
||||
class DirEntry {
|
||||
public:
|
||||
@ -43,7 +47,7 @@ public:
|
||||
//}
|
||||
|
||||
|
||||
class FileDialog::Private : public SigC::Object {
|
||||
class FileDialog::Private : public boost::signals::trackable {
|
||||
public:
|
||||
///
|
||||
Private();
|
||||
@ -125,7 +129,7 @@ private:
|
||||
/// Simulates a click on OK/Cancel
|
||||
void Force(bool);
|
||||
/// Redraw connection.
|
||||
SigC::Connection r_;
|
||||
boost::signals::connection r_;
|
||||
};
|
||||
|
||||
#endif // FORMFILEDIALOG_H
|
||||
|
@ -19,19 +19,19 @@
|
||||
#include "FormInset.h"
|
||||
#include "xformsBC.h"
|
||||
|
||||
using SigC::slot;
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
FormInset::FormInset(LyXView * lv, Dialogs * d, string const & t)
|
||||
: FormBaseBD(lv, d, t), ih_(0)
|
||||
: FormBaseBD(lv, d, t)
|
||||
{}
|
||||
|
||||
|
||||
void FormInset::connect()
|
||||
{
|
||||
u_ = d_->updateBufferDependent.
|
||||
connect(slot(this, &FormInset::updateSlot));
|
||||
connect(boost::bind(&FormInset::updateSlot, this, _1));
|
||||
h_ = d_->hideBufferDependent.
|
||||
connect(slot(this, &FormInset::hide));
|
||||
connect(boost::bind(&FormInset::hide, this));
|
||||
FormBaseDeprecated::connect();
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ void FormCommand::showInset(InsetCommand * inset)
|
||||
|
||||
inset_ = inset;
|
||||
params = inset->params();
|
||||
ih_ = inset->hideDialog.connect(slot(this, &FormCommand::hide));
|
||||
ih_ = inset->hideDialog.connect(boost::bind(&FormCommand::hide, this));
|
||||
show();
|
||||
}
|
||||
|
||||
|
@ -15,8 +15,11 @@
|
||||
#define FORMCOMMAND_H
|
||||
|
||||
#include "FormBaseDeprecated.h"
|
||||
|
||||
#include "insets/insetcommand.h"
|
||||
|
||||
#include <boost/signals/connection.hpp>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
@ -38,7 +41,7 @@ protected:
|
||||
virtual void updateSlot(bool);
|
||||
|
||||
/// inset::hide connection.
|
||||
SigC::Connection ih_;
|
||||
boost::signals::connection ih_;
|
||||
};
|
||||
|
||||
|
||||
|
@ -63,8 +63,9 @@
|
||||
#include "ams_nrel.xbm"
|
||||
#include "ams_ops.xbm"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
using std::vector;
|
||||
using SigC::slot;
|
||||
|
||||
FormMathsPanel::FormMathsPanel(LyXView * lv, Dialogs * d)
|
||||
: FormBaseBD(lv, d, _("Maths Panel"), false),
|
||||
@ -152,7 +153,7 @@ FormMathsPanel::FormMathsPanel(LyXView * lv, Dialogs * d)
|
||||
ams_ops_.reset(new FormMathsBitmap(lv, d, *this, _("AMS Operators"), latex));
|
||||
|
||||
//showUnderMouse(false);
|
||||
d->showMathPanel.connect(slot(this, &FormMathsPanel::show));
|
||||
d->showMathPanel = boost::bind(&FormMathsPanel::show, this);
|
||||
}
|
||||
|
||||
|
||||
|
@ -33,10 +33,11 @@
|
||||
#include "support/lstrings.h"
|
||||
#include "support/LAssert.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <functional>
|
||||
|
||||
using Liason::setMinibuffer;
|
||||
using SigC::slot;
|
||||
using std::vector;
|
||||
using std::bind2nd;
|
||||
using std::remove_if;
|
||||
@ -48,14 +49,14 @@ FormParagraph::FormParagraph(LyXView * lv, Dialogs * d)
|
||||
// let the dialog be shown
|
||||
// This is a permanent connection so we won't bother
|
||||
// storing a copy because we won't be disconnecting.
|
||||
d->showParagraph.connect(slot(this, &FormParagraph::show));
|
||||
d->showParagraph = boost::bind(&FormParagraph::show, this);
|
||||
}
|
||||
|
||||
|
||||
void FormParagraph::connect()
|
||||
{
|
||||
cp_ = d_->updateParagraph
|
||||
.connect(slot(this, &FormParagraph::changedParagraph));
|
||||
.connect(boost::bind(&FormParagraph::changedParagraph, this));
|
||||
FormBaseBD::connect();
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "FormBaseDeprecated.h"
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <boost/signals/connection.hpp>
|
||||
|
||||
class Paragraph;
|
||||
struct FD_form_paragraph;
|
||||
@ -62,7 +63,7 @@ private:
|
||||
ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
|
||||
|
||||
/// Changed Paragraph connection.
|
||||
SigC::Connection cp_;
|
||||
boost::signals::connection cp_;
|
||||
|
||||
/// The current Paragraph
|
||||
Paragraph const * par_;
|
||||
|
@ -42,6 +42,8 @@
|
||||
|
||||
#include "graphics/GraphicsCache.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <utility>
|
||||
#include <iomanip>
|
||||
#include <X11/Xlib.h>
|
||||
@ -55,8 +57,6 @@ using std::vector;
|
||||
using std::setw;
|
||||
using std::setfill;
|
||||
|
||||
using SigC::slot;
|
||||
|
||||
extern string system_lyxdir;
|
||||
extern string user_lyxdir;
|
||||
|
||||
@ -79,8 +79,8 @@ FormPreferences::FormPreferences(LyXView * lv, Dialogs * d)
|
||||
// let the dialog be shown
|
||||
// This is a permanent connection so we won't bother
|
||||
// storing a copy because we won't be disconnecting.
|
||||
d->showPreferences.connect(slot(this, &FormPreferences::show));
|
||||
d->showSpellcheckerPreferences.connect(slot(this, &FormPreferences::showSpellPref));
|
||||
d->showPreferences = boost::bind(&FormPreferences::show, this);
|
||||
d->showSpellcheckerPreferences = boost::bind(&FormPreferences::showSpellPref, this);
|
||||
}
|
||||
|
||||
|
||||
|
@ -28,10 +28,11 @@
|
||||
|
||||
#include "support/lstrings.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <functional>
|
||||
|
||||
|
||||
using SigC::slot;
|
||||
using std::vector;
|
||||
using std::bind2nd;
|
||||
using std::remove_if;
|
||||
@ -44,8 +45,8 @@ FormTabular::FormTabular(LyXView * lv, Dialogs * d)
|
||||
// let the dialog be shown
|
||||
// This is a permanent connection so we won't bother
|
||||
// storing a copy because we won't be disconnecting.
|
||||
d->showTabular.connect(slot(this, &FormTabular::showInset));
|
||||
d->updateTabular.connect(slot(this, &FormTabular::updateInset));
|
||||
d->showTabular = boost::bind(&FormTabular::showInset, this, _1);
|
||||
d->updateTabular = boost::bind(&FormTabular::updateInset, this, _1);
|
||||
}
|
||||
|
||||
|
||||
@ -84,7 +85,7 @@ void FormTabular::showInset(InsetTabular * inset)
|
||||
// If connected to another inset, disconnect from it.
|
||||
if (inset_ != inset) {
|
||||
ih_.disconnect();
|
||||
ih_ = inset->hideDialog.connect(slot(this, &FormTabular::hide));
|
||||
ih_ = inset->hideDialog.connect(boost::bind(&FormTabular::hide, this));
|
||||
inset_ = inset;
|
||||
}
|
||||
|
||||
@ -99,7 +100,7 @@ void FormTabular::updateInset(InsetTabular * inset)
|
||||
// If connected to another inset, disconnect from it.
|
||||
if (inset_ != inset) {
|
||||
ih_.disconnect();
|
||||
ih_ = inset->hideDialog.connect(slot(this, &FormTabular::hide));
|
||||
ih_ = inset->hideDialog.connect(boost::bind(&FormTabular::hide, this));
|
||||
inset_ = inset;
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,8 @@
|
||||
#include "graphics/GraphicsImageXPM.h"
|
||||
#endif
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
// I keep these here so that it will be processed as early in
|
||||
// the compilation process as possible.
|
||||
#if !defined(FL_REVISION) || FL_REVISION < 88 || FL_VERSION != 0
|
||||
@ -136,16 +138,15 @@ LyXView * GUIRunTime::createMainView(int w, int h)
|
||||
void GUIRunTime::initialiseGraphics()
|
||||
{
|
||||
using namespace grfx;
|
||||
using SigC::slot;
|
||||
|
||||
#if defined(HAVE_FLIMAGE_DUP) && defined(HAVE_FLIMAGE_TO_PIXMAP)
|
||||
// connect the image loader based on the xforms library
|
||||
GImage::newImage.connect(slot(&xformsGImage::newImage));
|
||||
GImage::loadableFormats.connect(slot(&xformsGImage::loadableFormats));
|
||||
GImage::newImage.connect(boost::bind(&xformsGImage::newImage));
|
||||
GImage::loadableFormats.connect(boost::bind(&xformsGImage::loadableFormats));
|
||||
#else
|
||||
// connect the image loader based on the XPM library
|
||||
GImage::newImage.connect(slot(&GImageXPM::newImage));
|
||||
GImage::loadableFormats.connect(slot(&GImageXPM::loadableFormats));
|
||||
GImage::newImage.connect(boost::bind(&GImageXPM::newImage));
|
||||
GImage::loadableFormats.connect(boost::bind(&GImageXPM::loadableFormats));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -12,8 +12,6 @@
|
||||
|
||||
#include "frontends/Timeout.h"
|
||||
|
||||
#include <sigc++/signal_system.h>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
@ -25,12 +25,11 @@
|
||||
#include "support/lstrings.h"
|
||||
#include "support/LAssert.h"
|
||||
|
||||
using SigC::slot;
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
bool Tooltips::enabled_ = true;
|
||||
|
||||
SigC::Signal0<void> Tooltips::toggled;
|
||||
boost::signal0<void> Tooltips::toggled;
|
||||
|
||||
|
||||
#if FL_REVISION >= 89
|
||||
@ -40,9 +39,9 @@ Tooltips::Tooltips()
|
||||
static bool first = true;
|
||||
if (first) {
|
||||
first = false;
|
||||
Dialogs::toggleTooltips.connect(slot(&Tooltips::toggleEnabled));
|
||||
Dialogs::toggleTooltips.connect(boost::bind(&Tooltips::toggleEnabled));
|
||||
}
|
||||
toggled.connect(slot(this, &Tooltips::set));
|
||||
toggled.connect(boost::bind(&Tooltips::set, this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -17,16 +17,21 @@
|
||||
#define TOOLTIPS_H
|
||||
|
||||
#include "LString.h"
|
||||
|
||||
#include <boost/utility.hpp>
|
||||
#include <sigc++/signal_system.h>
|
||||
#include <map>
|
||||
#include <boost/signals/signal0.hpp>
|
||||
#include <boost/signals/trackable.hpp>
|
||||
|
||||
#include FORMS_H_LOCATION // Can't forward-declare FL_OBJECT
|
||||
|
||||
#include <map>
|
||||
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
class Tooltips : boost::noncopyable, public SigC::Object {
|
||||
class Tooltips : boost::noncopyable, public boost::signals::trackable {
|
||||
public:
|
||||
Tooltips();
|
||||
|
||||
@ -61,7 +66,7 @@ private:
|
||||
/** Once enabled_ is changed, then this signal is emitted to update
|
||||
* all the tooltips.
|
||||
*/
|
||||
static SigC::Signal0<void> toggled;
|
||||
static boost::signal0<void> toggled;
|
||||
|
||||
/// The tooltips are stored so that they can be turned on and off.
|
||||
typedef std::map<FL_OBJECT *, string> TooltipsMap;
|
||||
|
@ -31,6 +31,8 @@
|
||||
#include "lyxfunc.h"
|
||||
#include "BufferView.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
using std::endl;
|
||||
|
||||
//extern void AutoSave(BufferView *);
|
||||
@ -57,10 +59,8 @@ XFormsView::XFormsView(int width, int height)
|
||||
fl_set_form_atclose(form_, C_XFormsView_atCloseMainFormCB, 0);
|
||||
|
||||
// Connect the minibuffer signals
|
||||
minibuffer->stringReady.connect(SigC::slot(getLyXFunc(),
|
||||
&LyXFunc::miniDispatch));
|
||||
minibuffer->timeout.connect(SigC::slot(getLyXFunc(),
|
||||
&LyXFunc::initMiniBuffer));
|
||||
minibuffer->stringReady.connect(boost::bind(&LyXFunc::miniDispatch, getLyXFunc(), _1));
|
||||
minibuffer->timeout.connect(boost::bind(&LyXFunc::initMiniBuffer, getLyXFunc()));
|
||||
|
||||
// Make sure the buttons are disabled if needed.
|
||||
updateToolbar();
|
||||
@ -164,7 +164,7 @@ void XFormsView::create_form_form_main(int width, int height)
|
||||
// TIMERS
|
||||
//
|
||||
|
||||
autosave_timeout->timeout.connect(SigC::slot(this, &XFormsView::AutoSave));
|
||||
autosave_timeout->timeout.connect(boost::bind(&XFormsView::AutoSave, this));
|
||||
|
||||
//
|
||||
// Misc
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "LString.h"
|
||||
#include "debug.h"
|
||||
#include "lyxfont.h"
|
||||
#include "WorkArea.h"
|
||||
#include "frontends/xforms/XWorkArea.h"
|
||||
#include "xfont_metrics.h"
|
||||
#include "ColorHandler.h"
|
||||
#include "lyxrc.h"
|
||||
|
@ -14,7 +14,7 @@
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include "WorkArea.h"
|
||||
#include "XWorkArea.h"
|
||||
#include "debug.h"
|
||||
#include "frontends/LyXView.h"
|
||||
#include "lyxrc.h" // lyxrc.show_banner
|
||||
@ -72,8 +72,8 @@ mouse_button::state x_button_state(unsigned int button)
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// FIXME
|
||||
mouse_button::state x_motion_state(unsigned int state)
|
||||
{
|
||||
@ -90,21 +90,21 @@ mouse_button::state x_motion_state(unsigned int state)
|
||||
b |= mouse_button::button5;
|
||||
return b;
|
||||
}
|
||||
|
||||
|
||||
|
||||
key_modifier::state x_key_state(unsigned int state)
|
||||
{
|
||||
key_modifier::state k = key_modifier::none;
|
||||
if (state & ControlMask)
|
||||
key_modifier::state k = key_modifier::none;
|
||||
if (state & ControlMask)
|
||||
k |= key_modifier::ctrl;
|
||||
if (state & ShiftMask)
|
||||
if (state & ShiftMask)
|
||||
k |= key_modifier::shift;
|
||||
if (state & Mod1Mask)
|
||||
if (state & Mod1Mask)
|
||||
k |= key_modifier::alt;
|
||||
return k;
|
||||
return k;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // anon namespace
|
||||
|
||||
|
||||
@ -630,11 +630,11 @@ int WorkArea::event_cb(XEvent * xev)
|
||||
switch (xev->type) {
|
||||
case SelectionRequest:
|
||||
lyxerr[Debug::GUI] << "X requested selection." << endl;
|
||||
selectionRequested.emit();
|
||||
selectionRequested();
|
||||
break;
|
||||
case SelectionClear:
|
||||
lyxerr[Debug::GUI] << "Lost selection." << endl;
|
||||
selectionLost.emit();
|
||||
selectionLost();
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
|
@ -9,22 +9,25 @@
|
||||
*
|
||||
* ======================================================*/
|
||||
|
||||
#ifndef WORKAREA_H
|
||||
#define WORKAREA_H
|
||||
#ifndef XWORKAREA_H
|
||||
#define XWORKAREA_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include <sigc++/signal_system.h>
|
||||
|
||||
#include FORMS_H_LOCATION
|
||||
#include "frontends/Painter.h"
|
||||
#include "frontends/mouse_state.h"
|
||||
#include "frontends/key_state.h"
|
||||
|
||||
#include <boost/signals/signal0.hpp>
|
||||
#include <boost/signals/signal1.hpp>
|
||||
#include <boost/signals/signal2.hpp>
|
||||
#include <boost/signals/signal3.hpp>
|
||||
|
||||
#include <utility>
|
||||
|
||||
///
|
||||
class WorkArea {
|
||||
public:
|
||||
@ -105,33 +108,33 @@ public:
|
||||
void putClipboard(string const &) const;
|
||||
// Signals
|
||||
///
|
||||
SigC::Signal0<void> workAreaExpose;
|
||||
boost::signal0<void> workAreaExpose;
|
||||
///
|
||||
SigC::Signal1<void, double> scrollCB;
|
||||
boost::signal1<void, double> scrollCB;
|
||||
///
|
||||
SigC::Signal2<void, KeySym, key_modifier::state> workAreaKeyPress;
|
||||
boost::signal2<void, KeySym, key_modifier::state> workAreaKeyPress;
|
||||
///
|
||||
SigC::Signal3<void, int, int, mouse_button::state> workAreaButtonPress;
|
||||
boost::signal3<void, int, int, mouse_button::state> workAreaButtonPress;
|
||||
///
|
||||
SigC::Signal3<void, int, int, mouse_button::state> workAreaButtonRelease;
|
||||
boost::signal3<void, int, int, mouse_button::state> workAreaButtonRelease;
|
||||
///
|
||||
SigC::Signal3<void, int, int, mouse_button::state> workAreaMotionNotify;
|
||||
boost::signal3<void, int, int, mouse_button::state> workAreaMotionNotify;
|
||||
///
|
||||
SigC::Signal0<void> workAreaFocus;
|
||||
boost::signal0<void> workAreaFocus;
|
||||
///
|
||||
SigC::Signal0<void> workAreaUnfocus;
|
||||
boost::signal0<void> workAreaUnfocus;
|
||||
///
|
||||
SigC::Signal0<void> workAreaEnter;
|
||||
boost::signal0<void> workAreaEnter;
|
||||
///
|
||||
SigC::Signal0<void> workAreaLeave;
|
||||
boost::signal0<void> workAreaLeave;
|
||||
///
|
||||
SigC::Signal3<void, int, int, mouse_button::state> workAreaDoubleClick;
|
||||
boost::signal3<void, int, int, mouse_button::state> workAreaDoubleClick;
|
||||
///
|
||||
SigC::Signal3<void, int, int, mouse_button::state> workAreaTripleClick;
|
||||
boost::signal3<void, int, int, mouse_button::state> workAreaTripleClick;
|
||||
/// emitted when an X client has requested our selection
|
||||
SigC::Signal0<void> selectionRequested;
|
||||
boost::signal0<void> selectionRequested;
|
||||
/// emitted when another X client has stolen our selection
|
||||
SigC::Signal0<void> selectionLost;
|
||||
boost::signal0<void> selectionLost;
|
||||
|
||||
/// handles SelectionRequest X Event, to fill the clipboard
|
||||
int event_cb(XEvent * xev);
|
||||
|
@ -166,7 +166,7 @@ void xformsGImage::load(string const & filename, SignalTypePtr on_finish)
|
||||
if (image_) {
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
<< "Image is loaded already!" << std::endl;
|
||||
on_finish->emit(false);
|
||||
on_finish->operator()(false);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -174,7 +174,7 @@ void xformsGImage::load(string const & filename, SignalTypePtr on_finish)
|
||||
if (!image_) {
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
<< "Unable to open image" << std::endl;
|
||||
on_finish->emit(false);
|
||||
on_finish->operator()(false);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -324,7 +324,7 @@ void xformsGImage::statusCB(string const & status_message)
|
||||
}
|
||||
|
||||
if (on_finish_.get()) {
|
||||
on_finish_->emit(true);
|
||||
on_finish_->operator()(true);
|
||||
on_finish_.reset();
|
||||
}
|
||||
}
|
||||
@ -341,7 +341,7 @@ void xformsGImage::errorCB(string const & error_message)
|
||||
}
|
||||
|
||||
if (on_finish_.get()) {
|
||||
on_finish_->emit(false);
|
||||
on_finish_->operator()(false);
|
||||
on_finish_.reset();
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,10 @@
|
||||
2002-05-29 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* switch from SigC signals to boost::signals.
|
||||
|
||||
2002-05-29 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
* GraphicsParam.C: remove unneeded #include, move vomment
|
||||
* GraphicsParam.C: remove unneeded #include, move vomment
|
||||
|
||||
2002-05-28 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
@ -10,10 +13,10 @@
|
||||
2002-05-24 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* GraphicsImageXPM.C: ColorHandler moved
|
||||
|
||||
|
||||
2002-05-24 Juergen Vigna <jug@sad.it>
|
||||
|
||||
* GraphicsCache.h:
|
||||
* GraphicsCache.h:
|
||||
* GraphicsImage.h: include LString.h first.
|
||||
|
||||
2002-05-22 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
@ -19,14 +19,19 @@
|
||||
#include "graphics/GraphicsImage.h"
|
||||
#include "graphics/GraphicsParams.h"
|
||||
#include "graphics/GraphicsConverter.h"
|
||||
|
||||
#include "insets/insetgraphics.h"
|
||||
|
||||
#include "BufferView.h"
|
||||
#include "debug.h"
|
||||
#include "gettext.h"
|
||||
#include "lyx_main.h" // for global dispatch method
|
||||
|
||||
#include "support/LAssert.h"
|
||||
#include "support/filetools.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
// Very, Very UGLY!
|
||||
extern BufferView * current_view;
|
||||
|
||||
@ -354,7 +359,7 @@ void GCacheItem::loadImage()
|
||||
// GImage::loadImage.
|
||||
SignalLoadTypePtr on_finish;
|
||||
on_finish.reset(new SignalLoadType);
|
||||
cl_ = on_finish->connect(SigC::slot(this, &GCacheItem::imageLoaded));
|
||||
cl_ = on_finish->connect(boost::bind(&GCacheItem::imageLoaded, this, _1));
|
||||
|
||||
image_ = GImage::newImage();
|
||||
image_->load(file_to_load_, on_finish);
|
||||
@ -514,7 +519,7 @@ void GCacheItem::convertToDisplayFormat()
|
||||
// on completion of the conversion process.
|
||||
SignalConvertTypePtr on_finish;
|
||||
on_finish.reset(new SignalConvertType);
|
||||
cc_ = on_finish->connect(SigC::slot(this, &GCacheItem::imageConverted));
|
||||
cc_ = on_finish->connect(boost::bind(&GCacheItem::imageConverted, this, _1));
|
||||
|
||||
GConverter & graphics_converter = GConverter::get();
|
||||
graphics_converter.convert(filename, to_file_base, from, to, on_finish);
|
||||
|
@ -39,7 +39,9 @@
|
||||
#include <boost/utility.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include <sigc++/signal_system.h>
|
||||
#include <boost/signals/signal1.hpp>
|
||||
#include <boost/signals/connection.hpp>
|
||||
#include <boost/signals/trackable.hpp>
|
||||
|
||||
#include <list>
|
||||
|
||||
@ -51,7 +53,7 @@ class GParams;
|
||||
class ModifiedItem;
|
||||
|
||||
/// A grfx::GCache item holder.
|
||||
class GCacheItem : boost::noncopyable, public SigC::Object {
|
||||
class GCacheItem : boost::noncopyable, public boost::signals::trackable {
|
||||
public:
|
||||
/// the GCacheItem contains data of this type.
|
||||
typedef boost::shared_ptr<ModifiedItem> ModifiedItemPtr;
|
||||
@ -165,12 +167,12 @@ private:
|
||||
* the signal must remain in scope. It doesn't matter if the slot
|
||||
* disappears, SigC takes care of that.
|
||||
*/
|
||||
typedef SigC::Signal1<void, bool> SignalLoadType;
|
||||
typedef boost::signal1<void, bool> SignalLoadType;
|
||||
///
|
||||
typedef boost::shared_ptr<SignalLoadType> SignalLoadTypePtr;
|
||||
|
||||
/// The connection of the signal passed to ImagePtr::loadImage.
|
||||
SigC::Connection cl_;
|
||||
boost::signals::connection cl_;
|
||||
|
||||
/** A SignalConvertTypePtr is connected to this->imageConverted and
|
||||
* then passed to GConverter::convert.
|
||||
@ -178,12 +180,12 @@ private:
|
||||
* is emitted, returning the name of the loadable file to
|
||||
* imageConverted.
|
||||
*/
|
||||
typedef SigC::Signal1<void, string const &> SignalConvertType;
|
||||
typedef boost::signal1<void, string const &> SignalConvertType;
|
||||
///
|
||||
typedef boost::shared_ptr<SignalConvertType> SignalConvertTypePtr;
|
||||
|
||||
/// The connection of the signal passed to GConverter::convert.
|
||||
SigC::Connection cc_;
|
||||
boost::signals::connection cc_;
|
||||
|
||||
/// The list of all modified images.
|
||||
typedef std::list<ModifiedItemPtr> ListType;
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include "support/forkedcall.h"
|
||||
#include "support/path.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <fstream>
|
||||
|
||||
namespace {
|
||||
@ -79,7 +81,7 @@ void GConverter::convert(string const & from_file, string const & to_file_base,
|
||||
if (!success) {
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
<< "Unable to build the conversion script" << std::endl;
|
||||
on_finish->emit(string());
|
||||
on_finish->operator()(string());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -94,7 +96,7 @@ void GConverter::convert(string const & from_file, string const & to_file_base,
|
||||
std::ofstream fs(script_file.c_str());
|
||||
if (!fs.good()) {
|
||||
// Unable to output the conversion script to file.
|
||||
on_finish->emit(string());
|
||||
on_finish->operator()(string());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -255,7 +257,7 @@ ConvProcess::ConvProcess(string const & script_file,
|
||||
Forkedcall::SignalTypePtr convert_ptr;
|
||||
convert_ptr.reset(new Forkedcall::SignalType);
|
||||
|
||||
convert_ptr->connect(SigC::slot(this, &ConvProcess::converted));
|
||||
convert_ptr->connect(boost::bind(&ConvProcess::converted, this, _1, _2, _3));
|
||||
|
||||
Forkedcall call;
|
||||
int retval = call.startscript(script_command, convert_ptr);
|
||||
@ -278,7 +280,7 @@ void ConvProcess::converted(string const &/* cmd */,
|
||||
}
|
||||
|
||||
if (on_finish_.get()) {
|
||||
on_finish_->emit(to_file_);
|
||||
on_finish_->operator()(to_file_);
|
||||
}
|
||||
|
||||
grfx::GConverter::get().erase(this);
|
||||
|
@ -25,7 +25,8 @@
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/utility.hpp>
|
||||
|
||||
#include <sigc++/signal_system.h>
|
||||
#include <boost/signals/signal1.hpp>
|
||||
#include <boost/signals/trackable.hpp>
|
||||
|
||||
#include <list>
|
||||
|
||||
@ -52,7 +53,7 @@ public:
|
||||
* converted file (to_file_base + extension(to_format_name)).
|
||||
* If unsuccessful, the string will be empty.
|
||||
*/
|
||||
typedef SigC::Signal1<void, string const &> SignalType;
|
||||
typedef boost::signal1<void, string const &> SignalType;
|
||||
///
|
||||
typedef boost::shared_ptr<SignalType> SignalTypePtr;
|
||||
///
|
||||
@ -88,7 +89,7 @@ private:
|
||||
|
||||
|
||||
/// Each ConvProcess represents a single conversion process.
|
||||
struct ConvProcess : public SigC::Object
|
||||
struct ConvProcess : public boost::signals::trackable
|
||||
{
|
||||
///
|
||||
typedef GConverter::SignalTypePtr SignalTypePtr;
|
||||
|
@ -16,15 +16,14 @@
|
||||
#include "GraphicsImage.h"
|
||||
#include "GraphicsParams.h"
|
||||
|
||||
|
||||
namespace grfx {
|
||||
|
||||
// This will be connected to a function that will return whichever
|
||||
// whichever derived class we desire.
|
||||
SigC::Signal0<ImagePtr> GImage::newImage;
|
||||
boost::signal0<ImagePtr> GImage::newImage;
|
||||
|
||||
/// Return the list of loadable formats.
|
||||
SigC::Signal0<GImage::FormatList> GImage::loadableFormats;
|
||||
boost::signal0<GImage::FormatList> GImage::loadableFormats;
|
||||
|
||||
std::pair<unsigned int, unsigned int>
|
||||
GImage::getScaledDimensions(GParams const & params) const
|
||||
|
@ -27,7 +27,8 @@
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include <sigc++/signal_system.h>
|
||||
#include <boost/signals/signal0.hpp>
|
||||
#include <boost/signals/signal1.hpp>
|
||||
|
||||
#include <X11/X.h>
|
||||
|
||||
@ -50,10 +51,10 @@ public:
|
||||
/** This will be connected to a function that will return whichever
|
||||
* derived class we desire.
|
||||
*/
|
||||
static SigC::Signal0<ImagePtr> newImage;
|
||||
static boost::signal0<ImagePtr> newImage;
|
||||
|
||||
/// Return the list of loadable formats.
|
||||
static SigC::Signal0<FormatList> loadableFormats;
|
||||
static boost::signal0<FormatList> loadableFormats;
|
||||
|
||||
///
|
||||
virtual ~GImage() {}
|
||||
@ -72,7 +73,7 @@ public:
|
||||
|
||||
/** At the end of the loading or modification process, return the new
|
||||
* image by emitting this signal */
|
||||
typedef SigC::Signal1<void, bool> SignalType;
|
||||
typedef boost::signal1<void, bool> SignalType;
|
||||
///
|
||||
typedef boost::shared_ptr<SignalType> SignalTypePtr;
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
2002-05-29 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* switch from SigC signals to boost::signals.
|
||||
|
||||
2002-05-28 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
* insets/insetgraphicsParams.[Ch]:
|
||||
@ -41,7 +45,7 @@
|
||||
* insettoc.h:
|
||||
* inseturl.C:
|
||||
* inseturl.h: use mouse_state. Kill insetKeyPress
|
||||
|
||||
|
||||
2002-05-24 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* insetbib.C:
|
||||
@ -55,7 +59,7 @@
|
||||
* insetspecialchar.C:
|
||||
* insettabular.C:
|
||||
* insettext.C: name change for font metrics
|
||||
|
||||
|
||||
2002-05-24 Juergen Vigna <jug@sad.it>
|
||||
|
||||
* insetgraphics.h: include inset.h first (for LString.h)
|
||||
@ -63,7 +67,7 @@
|
||||
2002-05-23 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* insettext.C: screen moved
|
||||
|
||||
|
||||
2002-05-23 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* insetbib.C:
|
||||
@ -83,7 +87,7 @@
|
||||
* insettext.C:
|
||||
* insettoc.C:
|
||||
* inseturl.C: LyXView moved into frontends/
|
||||
|
||||
|
||||
2002-05-23 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* inset.C:
|
||||
@ -99,7 +103,7 @@
|
||||
* insetspecialchar.C:
|
||||
* insettabular.C:
|
||||
* insettext.C: move Painter to frontends/
|
||||
|
||||
|
||||
2002-05-22 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* insettabular.h: use more specific smart_ptr header.
|
||||
|
@ -17,7 +17,7 @@
|
||||
#endif
|
||||
|
||||
#include "insetbutton.h"
|
||||
#include <sigc++/signal_system.h>
|
||||
#include <boost/signals/signal0.hpp>
|
||||
#include <boost/utility.hpp>
|
||||
|
||||
// Created by Alejandro 970222
|
||||
@ -120,7 +120,7 @@ public:
|
||||
///
|
||||
void setParams(InsetCommandParams const &);
|
||||
///
|
||||
SigC::Signal0<void> hideDialog;
|
||||
boost::signal0<void> hideDialog;
|
||||
|
||||
private:
|
||||
///
|
||||
|
@ -18,7 +18,8 @@
|
||||
|
||||
#include "inset.h"
|
||||
#include "LString.h"
|
||||
#include <sigc++/signal_system.h>
|
||||
|
||||
#include <boost/signals/signal0.hpp>
|
||||
|
||||
/** Used for error messages from LaTeX runs.
|
||||
|
||||
@ -73,7 +74,7 @@ public:
|
||||
///
|
||||
string const & getContents() const { return contents; }
|
||||
///
|
||||
SigC::Signal0<void> hideDialog;
|
||||
boost::signal0<void> hideDialog;
|
||||
private:
|
||||
///
|
||||
string contents;
|
||||
|
@ -19,7 +19,8 @@
|
||||
#endif
|
||||
|
||||
#include "insetcollapsable.h"
|
||||
#include <sigc++/signal_system.h>
|
||||
|
||||
#include <boost/signals/signal0.hpp>
|
||||
|
||||
/** A collapsable text inset for LaTeX insertions.
|
||||
|
||||
@ -73,7 +74,7 @@ public:
|
||||
///
|
||||
EDITABLE editable() const;
|
||||
///
|
||||
SigC::Signal0<void> hideDialog;
|
||||
boost::signal0<void> hideDialog;
|
||||
///
|
||||
void insetButtonPress(BufferView *, int x, int y, mouse_button::state button);
|
||||
///
|
||||
|
@ -19,7 +19,8 @@
|
||||
#include "insetbutton.h"
|
||||
#include "ExternalTemplate.h"
|
||||
#include "LString.h"
|
||||
#include <sigc++/signal_system.h>
|
||||
|
||||
#include <boost/signals/signal0.hpp>
|
||||
|
||||
///
|
||||
class InsetExternal : public InsetButton {
|
||||
@ -102,7 +103,7 @@ public:
|
||||
Params params() const;
|
||||
|
||||
/// hide connection
|
||||
SigC::Signal0<void> hideDialog;
|
||||
boost::signal0<void> hideDialog;
|
||||
|
||||
private:
|
||||
/// Write the output for a specific file format
|
||||
|
@ -17,7 +17,8 @@
|
||||
#endif
|
||||
|
||||
#include "insetcollapsable.h"
|
||||
#include <sigc++/signal_system.h>
|
||||
|
||||
#include <boost/signals/signal0.hpp>
|
||||
|
||||
class Painter;
|
||||
|
||||
@ -63,7 +64,7 @@ public:
|
||||
///
|
||||
bool showInsetDialog(BufferView *) const;
|
||||
///
|
||||
SigC::Signal0<void> hideDialog;
|
||||
boost::signal0<void> hideDialog;
|
||||
private:
|
||||
///
|
||||
string floatType_;
|
||||
|
@ -153,7 +153,6 @@ InsetGraphics::InsetGraphics(InsetGraphics const & ig,
|
||||
string const & filepath,
|
||||
bool same_id)
|
||||
: Inset(ig, same_id),
|
||||
SigC::Object(),
|
||||
graphic_label(unique_id()),
|
||||
cached_status_(grfx::ErrorUnknown), cache_filled_(false), old_asc(0)
|
||||
{
|
||||
@ -328,7 +327,7 @@ void InsetGraphics::draw(BufferView * bv, LyXFont const & font,
|
||||
string const justname = OnlyFilename (params().filename);
|
||||
if (!justname.empty()) {
|
||||
msgFont.setSize(LyXFont::SIZE_FOOTNOTE);
|
||||
paint.text(old_x + 8,
|
||||
paint.text(old_x + 8,
|
||||
baseline - font_metrics::maxAscent(msgFont) - 4,
|
||||
justname, msgFont);
|
||||
}
|
||||
|
@ -22,14 +22,16 @@
|
||||
#include "insets/inset.h"
|
||||
#include "graphics/GraphicsTypes.h"
|
||||
#include "insets/insetgraphicsParams.h"
|
||||
|
||||
// We need a signal here to hide an active dialog when we are deleted.
|
||||
#include "sigc++/signal_system.h"
|
||||
#include <boost/signals/signal0.hpp>
|
||||
#include <boost/signals/trackable.hpp>
|
||||
|
||||
class Dialogs;
|
||||
class LaTeXFeatures;
|
||||
|
||||
///
|
||||
class InsetGraphics : public Inset, public SigC::Object {
|
||||
class InsetGraphics : public Inset, public boost::signals::trackable {
|
||||
public:
|
||||
///
|
||||
InsetGraphics();
|
||||
@ -93,7 +95,7 @@ public:
|
||||
/** This signal is connected by our dialog and called when the inset
|
||||
is deleted.
|
||||
*/
|
||||
SigC::Signal0<void> hideDialog;
|
||||
boost::signal0<void> hideDialog;
|
||||
|
||||
private:
|
||||
/// Set the cached variables
|
||||
|
@ -17,6 +17,8 @@
|
||||
|
||||
#include "insetcommand.h"
|
||||
|
||||
#include <boost/signals/signal0.hpp>
|
||||
|
||||
class Buffer;
|
||||
struct LaTeXFeatures;
|
||||
|
||||
@ -116,7 +118,7 @@ public:
|
||||
bool loadIfNeeded() const;
|
||||
|
||||
/// hide a dialog if about
|
||||
SigC::Signal0<void> hideDialog;
|
||||
boost::signal0<void> hideDialog;
|
||||
private:
|
||||
/// get the text displayed on the button
|
||||
string const getScreenLabel(Buffer const *) const;
|
||||
|
@ -18,7 +18,8 @@
|
||||
|
||||
#include "insetcollapsable.h"
|
||||
#include "lyxlength.h"
|
||||
#include <sigc++/signal_system.h>
|
||||
|
||||
#include <boost/signals/signal0.hpp>
|
||||
|
||||
/** The minipage inset
|
||||
|
||||
@ -79,7 +80,7 @@ public:
|
||||
///
|
||||
void pageWidth(LyXLength const &);
|
||||
///
|
||||
SigC::Signal0<void> hideDialog;
|
||||
boost::signal0<void> hideDialog;
|
||||
///
|
||||
int getMaxWidth(BufferView *, UpdatableInset const *) const;
|
||||
///
|
||||
|
@ -1419,10 +1419,10 @@ void InsetTabular::toggleInsetCursor(BufferView * bv)
|
||||
}
|
||||
|
||||
LyXFont font; // = the_locking_inset->GetFont(par, cursor.pos);
|
||||
|
||||
|
||||
int const asc = font_metrics::maxAscent(font);
|
||||
int const desc = font_metrics::maxDescent(font);
|
||||
|
||||
|
||||
if (isCursorVisible())
|
||||
bv->hideLockedInsetCursor();
|
||||
else
|
||||
@ -1437,7 +1437,7 @@ void InsetTabular::showInsetCursor(BufferView * bv, bool show)
|
||||
return;
|
||||
if (!isCursorVisible()) {
|
||||
LyXFont font; // = GetFont(par, cursor.pos);
|
||||
|
||||
|
||||
int const asc = font_metrics::maxAscent(font);
|
||||
int const desc = font_metrics::maxDescent(font);
|
||||
bv->fitLockedInsetCursor(cursor_.x(), cursor_.y(), asc, desc);
|
||||
@ -1467,7 +1467,7 @@ void InsetTabular::fitInsetCursor(BufferView * bv) const
|
||||
return;
|
||||
}
|
||||
LyXFont font;
|
||||
|
||||
|
||||
int const asc = font_metrics::maxAscent(font);
|
||||
int const desc = font_metrics::maxDescent(font);
|
||||
resetPos(bv);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user