+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
* 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
$(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 \
/* -*- 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
* ======================================================
*
<iterator> */
#undef HAVE_DECL_ISTREAMBUF_ITERATOR
-@BOTTOM@
+@BOTTOM@
-/************************************************************
+/************************************************************
** You should not need to change anything beyond this point */
#ifndef HAVE_STRCHR
#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 */
-
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... "
# 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
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
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
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
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
case $gxx_version in
2.95.*) ;;
2.96*) ;;
- *) ;;
+ *) CXXFLAGS="$CXXFLAGS -Winline";;
esac
fi
fi
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
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
#AM_PROG_LIBTOOL
LYX_PROG_LIBTOOL
-### Check which libsigc++ we're using
-LYX_WITH_SIGC
-
### Check if we want pspell libraries
CHECK_WITH_PSPELL
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 \
#include "support/filetools.h"
#include "support/lyxfunctional.h"
+#include <boost/bind.hpp>
+
#include <ctime>
#include <unistd.h>
#include <sys/wait.h>
using std::endl;
using std::make_pair;
using std::min;
-using SigC::slot;
using lyx::pos_type;
using lyx::textclass_type;
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);
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
// dialogs (Jug 20020424).
return;
}
-
+
Inset * inset_hit = checkInsetHit(bv_->text, xpos, ypos);
// Middle button press pastes if we have a selection
#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
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);
+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>
* 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:
* 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
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
tracer.h
INCLUDES = $(SIGC_CFLAGS) $(BOOST_INCLUDES) $(PSPELL_INCLUDES)
+#INCLUDES = $(BOOST_INCLUDES) $(PSPELL_INCLUDES)
localedir = $(datadir)/locale
#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();
///
void reset();
///
- SigC::Signal0<void> onstep;
+ boost::signal0<void> onstep;
private:
///
int value_;
+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:
* 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
* 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
#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.
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 */
// 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)
{
#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>
/** 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();
/**@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.
#include "support/filetools.h" // OnlyFilename()
+#include <boost/bind.hpp>
+
#include <sys/time.h>
#include <unistd.h>
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));
}
#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;
class Timeout;
///
-class LyXView : public SigC::Object, boost::noncopyable {
+class LyXView : public boost::signals::trackable, boost::noncopyable {
public:
///
LyXView();
// VERY temporary
#include "xforms/XPainter.h"
-
+
#endif
void Timeout::emit()
{
pimpl_->reset();
- timeout.emit();
+ timeout();
if (type == CONTINUOUS)
pimpl_->start();
}
#pragma interface
#endif
-#include <sigc++/signal_system.h>
+#include <boost/signals/signal0.hpp>
/**
* This class executes the callback when the timeout expires.
/// 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
-// 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
+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
#include "support/filetools.h" // FileSearch
#include "version.h"
+#include <boost/bind.hpp>
+
// needed for the browser
extern string system_lyxdir;
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);
}
* \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);
}
* \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()
* \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;
: 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);
}
*/
#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
using std::pair;
using std::vector;
-using SigC::slot;
vector<biblio::CiteStyle> ControlCitation::citeStyles_;
{
// 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);
}
* \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"
* \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()
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();
}
#include "ControlButtons.h"
+#include <boost/signals/connection.hpp>
+
class Dialogs;
class LyXView;
/// 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_;
};
*/
virtual void updateSlot(bool) { update(); }
/// Update connection.
- SigC::Connection u_;
+ boost::signals::connection u_;
};
#endif // CONTROLCONNECTIONS_H
#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);
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);
}
* \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);
}
#include "support/lstrings.h"
#include <boost/scoped_ptr.hpp>
+#include <boost/bind.hpp>
#include <utility>
#include <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);
}
#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
#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);
}
ForkedcallsController & fcc = ForkedcallsController::get();
childrenChanged_ =
- fcc.childrenChanged.connect(slot(this, &ControlForks::update));
+ fcc.childrenChanged.connect(boost::bind(&ControlForks::update, this));
}
#include "ControlDialog_impl.h"
#include "LString.h"
+
+#include <boost/signals/connection.hpp>
+
#include <sys/types.h>
#include <vector>
/// 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_;
};
*/
#include <config.h>
-#include <fstream>
#ifdef __GNUG__
#pragma implementation
#include "support/filetools.h"
#include "support/FileInfo.h"
+#include <boost/bind.hpp>
+
+#include <fstream>
using std::pair;
using std::make_pair;
// 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)) {
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);
}
{
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)));
}
}
} // namespace frnt
-
#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);
}
#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);
}
#include "ControlConnections.h"
#include "LString.h"
+#include <boost/signals/connection.hpp>
+
class Inset;
template <class Inset, class Params>
/// 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.
*/
*/
#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)
{}
if (inset) {
inset_ = inset;
ih_ = inset->hideDialog.connect(
- SigC::slot(this, &ControlInset::hide));
+ boost::bind(&ControlInset::hide, this));
}
connect();
}
#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);
}
#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"
#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);
}
#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);
}
#include "BufferView.h"
#include "support/LAssert.h"
+#include <boost/bind.hpp>
+
using Liason::printBuffer;
using Liason::getPrinterParams;
using std::make_pair;
: ControlDialogBD(lv, d),
params_(0)
{
- d_.showPrint.connect(SigC::slot(this, &ControlPrint::show));
+ d_.showPrint = boost::bind(&ControlPrint::show, this);
}
*/
#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;
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);
}
#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
*/
#include <config.h>
-#include <fstream>
#ifdef __GNUG__
#pragma implementation
#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;
format_(0),
command_(lyxrc.custom_export_command)
{
- d_.showSendto.connect(SigC::slot(this, &ControlSendto::show));
+ d_.showSendto = boost::bind(&ControlSendto::show, this);
}
*/
#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_);
#pragma implementation
#endif
-#include <sys/types.h> // needed by <sys/select.h> at least on freebsd
-
-#ifdef HAVE_SYS_SELECT_H
-# ifdef HAVE_STRINGS_H
- // <strings.h> is needed at least on AIX because FD_ZERO uses bzero().
- // BUT we cannot include both string.h and strings.h on Irix 6.5 :(
-# ifdef _AIX
-# include <strings.h>
-# endif
-# endif
-#include <sys/select.h>
-#endif
-
+#include "ControlSpellchecker.h"
#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 "frontends/LyXView.h"
+
+#include "support/lstrings.h"
+
# include "sp_ispell.h"
#ifdef USE_PSPELL
# include "sp_pspell.h"
#include "debug.h"
-using SigC::slot;
+#include <boost/bind.hpp>
+
+#include <sys/types.h> // needed by <sys/select.h> at least on freebsd
+
+#ifdef HAVE_SYS_SELECT_H
+# ifdef HAVE_STRINGS_H
+ // <strings.h> is needed at least on AIX because FD_ZERO uses bzero().
+ // BUT we cannot include both string.h and strings.h on Irix 6.5 :(
+# ifdef _AIX
+# include <strings.h>
+# endif
+# endif
+#include <sys/select.h>
+#endif
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);
}
#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);
}
#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);
}
#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);
}
#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);
}
#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);
}
*/
#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
GUIview view_;
};
+#if 0
/** Specialization for About LyX dialog
*/
template <class GUIview, class GUIbc>
: GUI<ControlVCLog, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
};
+#endif
#endif // GUI_H
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>
// reduce the number of connections needed in
// dialogs by a simple connection here.
- hideAll.connect(hideBufferDependent.slot());
+ hideAll.connect(hideBufferDependent);
}
{
XUngrabPointer(fl_get_display(), CurrentTime);
fl_hide_form(form_);
- result.emit(getSelectedStringFromBrowser(browser_));
+ result(getSelectedStringFromBrowser(browser_));
}
{
XUngrabPointer(fl_get_display(), CurrentTime);
fl_hide_form(form_);
- keypress.emit(c);
+ keypress(c);
}
#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 {
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 *);
#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" {
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)
{
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));
}
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();
}
#ifndef FORMBASEDEPRECATED_H
#define FORMBASEDEPRECATED_H
-#include FORMS_H_LOCATION
-#include <sigc++/signal_system.h>
-
#ifdef __GNUG__
#pragma interface
#endif
#include "xformsBC.h"
#include "FeedbackController.h"
+#include FORMS_H_LOCATION
+
+#include <boost/signals/trackable.hpp>
+
class Buffer;
class Dialogs;
class LyXView;
/// 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_;
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();
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();
virtual void updateSlot(bool) { update(); }
/// Update connection.
- SigC::Connection u_;
+ boost::signals::connection u_;
};
#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)
// 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);
}
#include "frontends/Dialogs.h"
#include "xforms_helpers.h"
+#include <boost/bind.hpp>
#ifdef HAVE_ERRNO_H
#include <cerrno>
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));
}
#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:
//}
-class FileDialog::Private : public SigC::Object {
+class FileDialog::Private : public boost::signals::trackable {
public:
///
Private();
/// Simulates a click on OK/Cancel
void Force(bool);
/// Redraw connection.
- SigC::Connection r_;
+ boost::signals::connection r_;
};
#endif // FORMFILEDIALOG_H
#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();
}
inset_ = inset;
params = inset->params();
- ih_ = inset->hideDialog.connect(slot(this, &FormCommand::hide));
+ ih_ = inset->hideDialog.connect(boost::bind(&FormCommand::hide, this));
show();
}
#define FORMCOMMAND_H
#include "FormBaseDeprecated.h"
+
#include "insets/insetcommand.h"
+#include <boost/signals/connection.hpp>
+
#ifdef __GNUG__
#pragma interface
#endif
virtual void updateSlot(bool);
/// inset::hide connection.
- SigC::Connection ih_;
+ boost::signals::connection ih_;
};
#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),
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);
}
#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;
// 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();
}
#include "FormBaseDeprecated.h"
#include <boost/scoped_ptr.hpp>
+#include <boost/signals/connection.hpp>
class Paragraph;
struct FD_form_paragraph;
ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
/// Changed Paragraph connection.
- SigC::Connection cp_;
+ boost::signals::connection cp_;
/// The current Paragraph
Paragraph const * par_;
#include "graphics/GraphicsCache.h"
+#include <boost/bind.hpp>
+
#include <utility>
#include <iomanip>
#include <X11/Xlib.h>
using std::setw;
using std::setfill;
-using SigC::slot;
-
extern string system_lyxdir;
extern string user_lyxdir;
// 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);
}
#include "support/lstrings.h"
+#include <boost/bind.hpp>
+
#include <functional>
-using SigC::slot;
using std::vector;
using std::bind2nd;
using std::remove_if;
// 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);
}
// 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;
}
// 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;
}
#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
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
}
#include "frontends/Timeout.h"
-#include <sigc++/signal_system.h>
-
#ifdef __GNUG__
#pragma interface
#endif
#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
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));
}
#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();
/** 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;
#include "lyxfunc.h"
#include "BufferView.h"
+#include <boost/bind.hpp>
+
using std::endl;
//extern void AutoSave(BufferView *);
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();
// TIMERS
//
- autosave_timeout->timeout.connect(SigC::slot(this, &XFormsView::AutoSave));
+ autosave_timeout->timeout.connect(boost::bind(&XFormsView::AutoSave, this));
//
// Misc
#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"
#pragma implementation
#endif
-#include "WorkArea.h"
+#include "XWorkArea.h"
#include "debug.h"
#include "frontends/LyXView.h"
#include "lyxrc.h" // lyxrc.show_banner
}
return b;
}
-
-
+
+
// FIXME
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
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;
*
* ======================================================*/
-#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:
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);
if (image_) {
lyxerr[Debug::GRAPHICS]
<< "Image is loaded already!" << std::endl;
- on_finish->emit(false);
+ on_finish->operator()(false);
return;
}
if (!image_) {
lyxerr[Debug::GRAPHICS]
<< "Unable to open image" << std::endl;
- on_finish->emit(false);
+ on_finish->operator()(false);
return;
}
}
if (on_finish_.get()) {
- on_finish_->emit(true);
+ on_finish_->operator()(true);
on_finish_.reset();
}
}
}
if (on_finish_.get()) {
- on_finish_->emit(false);
+ on_finish_->operator()(false);
on_finish_.reset();
}
}
+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>
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>
#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;
// 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);
// 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);
#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>
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;
* 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.
* 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;
#include "support/forkedcall.h"
#include "support/path.h"
+#include <boost/bind.hpp>
+
#include <fstream>
namespace {
if (!success) {
lyxerr[Debug::GRAPHICS]
<< "Unable to build the conversion script" << std::endl;
- on_finish->emit(string());
+ on_finish->operator()(string());
return;
}
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;
}
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);
}
if (on_finish_.get()) {
- on_finish_->emit(to_file_);
+ on_finish_->operator()(to_file_);
}
grfx::GConverter::get().erase(this);
#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>
* 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;
///
/// Each ConvProcess represents a single conversion process.
-struct ConvProcess : public SigC::Object
+struct ConvProcess : public boost::signals::trackable
{
///
typedef GConverter::SignalTypePtr SignalTypePtr;
#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
#include <boost/shared_ptr.hpp>
-#include <sigc++/signal_system.h>
+#include <boost/signals/signal0.hpp>
+#include <boost/signals/signal1.hpp>
#include <X11/X.h>
/** 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() {}
/** 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;
+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]:
* insettoc.h:
* inseturl.C:
* inseturl.h: use mouse_state. Kill insetKeyPress
-
+
2002-05-24 John Levon <moz@compsoc.man.ac.uk>
* insetbib.C:
* 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)
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:
* insettext.C:
* insettoc.C:
* inseturl.C: LyXView moved into frontends/
-
+
2002-05-23 John Levon <moz@compsoc.man.ac.uk>
* inset.C:
* 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.
#endif
#include "insetbutton.h"
-#include <sigc++/signal_system.h>
+#include <boost/signals/signal0.hpp>
#include <boost/utility.hpp>
// Created by Alejandro 970222
///
void setParams(InsetCommandParams const &);
///
- SigC::Signal0<void> hideDialog;
+ boost::signal0<void> hideDialog;
private:
///
#include "inset.h"
#include "LString.h"
-#include <sigc++/signal_system.h>
+
+#include <boost/signals/signal0.hpp>
/** Used for error messages from LaTeX runs.
///
string const & getContents() const { return contents; }
///
- SigC::Signal0<void> hideDialog;
+ boost::signal0<void> hideDialog;
private:
///
string contents;
#endif
#include "insetcollapsable.h"
-#include <sigc++/signal_system.h>
+
+#include <boost/signals/signal0.hpp>
/** A collapsable text inset for LaTeX insertions.
///
EDITABLE editable() const;
///
- SigC::Signal0<void> hideDialog;
+ boost::signal0<void> hideDialog;
///
void insetButtonPress(BufferView *, int x, int y, mouse_button::state button);
///
#include "insetbutton.h"
#include "ExternalTemplate.h"
#include "LString.h"
-#include <sigc++/signal_system.h>
+
+#include <boost/signals/signal0.hpp>
///
class InsetExternal : public InsetButton {
Params params() const;
/// hide connection
- SigC::Signal0<void> hideDialog;
+ boost::signal0<void> hideDialog;
private:
/// Write the output for a specific file format
#endif
#include "insetcollapsable.h"
-#include <sigc++/signal_system.h>
+
+#include <boost/signals/signal0.hpp>
class Painter;
///
bool showInsetDialog(BufferView *) const;
///
- SigC::Signal0<void> hideDialog;
+ boost::signal0<void> hideDialog;
private:
///
string floatType_;
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)
{
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);
}
#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();
/** 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
#include "insetcommand.h"
+#include <boost/signals/signal0.hpp>
+
class Buffer;
struct LaTeXFeatures;
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;
#include "insetcollapsable.h"
#include "lyxlength.h"
-#include <sigc++/signal_system.h>
+
+#include <boost/signals/signal0.hpp>
/** The minipage inset
///
void pageWidth(LyXLength const &);
///
- SigC::Signal0<void> hideDialog;
+ boost::signal0<void> hideDialog;
///
int getMaxWidth(BufferView *, UpdatableInset const *) const;
///
}
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
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);
return;
}
LyXFont font;
-
+
int const asc = font_metrics::maxAscent(font);
int const desc = font_metrics::maxDescent(font);
resetPos(bv);
#include <boost/scoped_ptr.hpp>
-#include <sigc++/signal_system.h>
+#include <boost/signals/signal0.hpp>
class LyXLex;
class Painter;
///
boost::scoped_ptr<LyXTabular> tabular;
///
- SigC::Signal0<void> hideDialog;
+ boost::signal0<void> hideDialog;
private:
///
}
-void InsetText::insetButtonPress(BufferView * bv,
+void InsetText::insetButtonPress(BufferView * bv,
int x, int y, mouse_button::state button)
{
no_selection = true;
}
-bool InsetText::insetButtonRelease(BufferView * bv,
+bool InsetText::insetButtonRelease(BufferView * bv,
int x, int y, mouse_button::state button)
{
no_selection = true;
}
// bug 393
lt->clearSelection();
-
+
updwhat = CURSOR_PAR;
updflag = true;
break;
int const asc = font_metrics::maxAscent(font);
int const desc = font_metrics::maxDescent(font);
-
+
if (isCursorVisible())
bv->hideLockedInsetCursor();
else
if (!isCursorVisible()) {
LyXFont const font =
getLyXText(bv)->getFont(bv->buffer(), cpar(bv), cpos(bv));
-
+
int const asc = font_metrics::maxAscent(font);
int const desc = font_metrics::maxDescent(font);
}
LyXFont const font =
getLyXText(bv)->getFont(bv->buffer(), cpar(bv), cpos(bv));
-
+
int const asc = font_metrics::maxAscent(font);
int const desc = font_metrics::maxDescent(font);
// WRONG
if (button == mouse_button::none && !isHighlyEditableInset(inset))
return false;
-
+
if (inset) {
if (x < 0)
x = insetWidth;
lyxerr << "meta_fake_bit is ["
<< meta_fake_bit << "]" << endl;
}
-#endif
+#endif
// remove Caps Lock and Mod2 as a modifiers
action = keyseq.addkey(keysym, (state | meta_fake_bit));
if (lyxerr.debugging(Debug::KEY)) {
#pragma interface
#endif
-#include <X11/Xlib.h>
-#include <sigc++/signal_system.h>
-#include "frontends/mouse_state.h"
-#include "frontends/key_state.h"
#include "commandtags.h" // for kb_action enum
#include "FuncStatus.h"
#include "kbsequence.h"
#include "LString.h"
+#include "frontends/mouse_state.h"
+#include "frontends/key_state.h"
+
+#include <boost/signals/trackable.hpp>
+
+#include <X11/Xlib.h>
+
class LyXView;
class LyXText;
keyboard or from the GUI. All GUI objects, including buttons and
menus should use this class and never call kernel functions directly.
*/
-class LyXFunc : public SigC::Object {
+class LyXFunc : public boost::signals::trackable {
public:
///
explicit
+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>
* formulabase.C:
- * formulabase.h:
+ * formulabase.h:
* math_inset.h: use mouse_state. Kill insetKeyPress
2002-05-24 John Levon <moz@compsoc.man.ac.uk>
* math_support.C: font loader moved
-
+
2002-05-24 John Levon <moz@compsoc.man.ac.uk>
* formulabase.C:
* math_funcinset.C:
* math_support.C:
* math_unknowninset.C: new name for font metrics
-
+
2002-05-24 Lars Gullik Bjønnes <larsbj@birdstep.com>
* math_autocorrect.C: include vector and add a using statement.
using std::endl;
using std::ostream;
using std::vector;
+
using std::abs;
MathCursor * mathcursor = 0;
namespace {
-
// local global
int first_x;
int first_y;
bool InsetFormulaBase::insetButtonRelease(BufferView * bv,
- int /*x*/, int /*y*/, mouse_button::state button)
+ int /*x*/, int /*y*/, mouse_button::state button)
{
//lyxerr << "insetButtonRelease: " << x << " " << y << "\n";
#ifndef CXX_GLOBAL_CSTD
using std::strchr;
+using std::isalpha;
#endif
MathCursor::MathCursor(InsetFormulaBase * formula, bool left)
- : formula_(formula), lastcode_(LM_TC_MIN),
+ : formula_(formula), lastcode_(LM_TC_MIN),
autocorrect_(false), selection_(false)
{
left ? first() : last();
bool positionable(MathCursor::cursor_type const & cursor,
- MathCursor::cursor_type const & anchor)
+ MathCursor::cursor_type const & anchor)
{
// avoid deeper nested insets when selecting
if (cursor.size() > anchor.size())
void MathCursor::insert(char c, MathTextCodes t)
{
//lyxerr << "inserting '" << c << "'\n";
- selClearOrDel();
+ selClearOrDel();
plainInsert(MathAtom(new MathCharInset(c, t)));
}
// no special circumstances, so insert the character without any fuss
insert(c, lastcode_ == LM_TC_MIN ? MathCharInset::nativeCode(c) : lastcode_);
lastcode_ = LM_TC_MIN;
- autocorrect_ = true;
+ autocorrect_ = true;
return true;
}
#include "BufferView.h"
#include "frontends/Timeout.h"
+#include <boost/bind.hpp>
+
#include <cctype>
-using SigC::slot;
using std::vector;
using std::back_inserter;
using std::find;
add(FL_NORMAL_INPUT, x, y, h, w);
timer = new Timeout(6000);
- timer->timeout.connect(slot(this, &MiniBuffer::init));
+ timer->timeout.connect(boost::bind(&MiniBuffer::init, this));
stored_timer = new Timeout(1500);
- stored_timer->timeout.connect(slot(this, &MiniBuffer::stored_slot));
+ stored_timer->timeout.connect(boost::bind(&MiniBuffer::stored_slot, this));
deactivate();
}
void MiniBuffer::dd_init()
{
dropdown_ = new DropDown(owner_, the_buffer);
- dropdown_->result.connect(slot(this, &MiniBuffer::set_complete_input));
- dropdown_->keypress.connect(slot(this, &MiniBuffer::append_char));
+ dropdown_->result.connect(boost::bind(&MiniBuffer::set_complete_input, this, _1));
+ dropdown_->keypress.connect(boost::bind(&MiniBuffer::append_char, this, _1));
}
if (!input.empty()) {
history_->push_back(input);
}
- stringReady.emit(input);
+ stringReady(input);
# if 0
}
#endif
if (the_buffer->focus)
return;
- timeout.emit();
+ timeout();
timer->stop();
}
#ifndef MINIBUFFER_H
#define MINIBUFFER_H
-#include <sigc++/signal_system.h>
+#include "LString.h"
+
+#include <boost/signals/signal0.hpp>
+#include <boost/signals/signal1.hpp>
+#include <boost/signals/trackable.hpp>
+
#include <vector>
#include FORMS_H_LOCATION
-#include "LString.h"
#ifdef __GNUG__
#pragma interface
class Timeout;
///
-class MiniBuffer : public SigC::Object {
+class MiniBuffer : public boost::signals::trackable {
public:
enum State {
spaces,
///
int peek_event(FL_OBJECT *, int, int);
///
- SigC::Signal1<void, string const &> stringReady;
+ boost::signal1<void, string const &> stringReady;
///
- //SigC::Signal0<void> escape;
+ //boost::signal0<void> escape;
///
- SigC::Signal0<void> timeout;
+ boost::signal0<void> timeout;
private:
///
void activate();
+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:
* limited_stack.h: new template for limited-size
stacks
-
+
2002-05-25 Lars Gullik Bjønnes <larsbj@birdstep.com>
* filetools.C: do not include LSubstring.h
#include "debug.h"
#include "frontends/Timeout.h"
+#include <boost/bind.hpp>
+
#include <cerrno>
#include <sys/types.h>
#include <sys/wait.h>
void Forkedcall::emitSignal()
{
if (signal_.get()) {
- signal_->emit(command_, pid_, retval_);
+ signal_->operator()(command_, pid_, retval_);
}
}
namespace {
-class Murder : public SigC::Object {
+class Murder : public boost::signals::trackable {
public:
//
static void killItDead(int secs, pid_t pid)
: timeout_(0), pid_(pid)
{
timeout_ = new Timeout(1000*secs, Timeout::ONETIME);
- timeout_->timeout.connect(SigC::slot(this, &Murder::kill));
+ timeout_->timeout.connect(boost::bind(&Murder::kill, this));
timeout_->start();
}
#include "LString.h"
#include <boost/shared_ptr.hpp>
-
-#include <sigc++/signal_system.h>
+#include <boost/signals/signal3.hpp>
#include <sys/types.h>
* we can return easily to C++ methods, rather than just globally
* accessible functions.
*/
- typedef SigC::Signal3<void, string const &, pid_t, int> SignalType;
+ typedef boost::signal3<void, string const &, pid_t, int> SignalType;
/** The signal is connected in the calling routine to the desired
* slot. We pass a shared_ptr rather than a reference to the signal
#include "forkedcontr.h"
#include "forkedcall.h"
#include "lyxfunctional.h"
-#include "frontends/Timeout.h"
#include "debug.h"
+#include "frontends/Timeout.h"
+
+#include <boost/bind.hpp>
+
#include <cerrno>
#include <cstdlib>
#include <unistd.h>
timeout_ = new Timeout(100, Timeout::ONETIME);
timeout_->timeout
- .connect(SigC::slot(this, &ForkedcallsController::timer));
+ .connect(boost::bind(&ForkedcallsController::timer, this));
}
Forkedcall * call = new Forkedcall(newcall);
forkedCalls.push_back(call);
- childrenChanged.emit();
+ childrenChanged();
}
}
if (start_size != forkedCalls.size())
- childrenChanged.emit();
+ childrenChanged();
}
#ifndef FORKEDCONTR_H
#define FORKEDCONTR_H
-#include <list>
-#include <vector>
#include "LString.h"
-#include <sigc++/signal_system.h>
+
+#include <boost/signals/signal0.hpp>
+#include <boost/signals/trackable.hpp>
+
#include <sys/types.h> // needed for pid_t
+#include <list>
+#include <vector>
+
#ifdef __GNUG__
#pragma interface
#endif
class Forkedcall;
class Timeout;
-class ForkedcallsController : public SigC::Object {
+class ForkedcallsController : public boost::signals::trackable {
public:
/// We need this to avoid warnings.
ForkedcallsController();
void kill(pid_t, int tolerance = 5);
/// Signal emitted when the list of current child processes changes.
- SigC::Signal0<void> childrenChanged;
+ boost::signal0<void> childrenChanged;
private:
///
freezeUndo();
cursor = selection.start;
while (cursor.par() != selection.end.par() ||
- cursor.pos() < selection.end.pos())
+ cursor.pos() < selection.end.pos())
{
if (cursor.pos() < cursor.par()->size()) {
// an open footnote should behave like a closed one
// pagragraph because we erased the last character.
if (cur.pos() > cur.par()->size())
cur.pos(cur.par()->size());
-
+
// recompute row et al. for this cursor
setCursor(bview, cur, cur.par(), cur.pos(), cur.boundary());
}