]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Dialogs.h
better selection and scrolling behaviour
[lyx.git] / src / frontends / Dialogs.h
index 97e3bb873db74171155a3b172d36957a7cc6a0d6..cb8a929dd4dcfe6619add2950df8a17973a99758 100644 (file)
@@ -1,9 +1,11 @@
 // -*- C++ -*-
 /**
  * \file Dialogs.h
- * Copyright 1995-2002 The LyX Team.
- * See the file COPYING.
- * \author Allan Rae, rae@lyx.org
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ * \author Allan Rae
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #ifndef DIALOGS_H
 #include "LString.h"
 
 #include <boost/utility.hpp>
-#include <boost/shared_ptr.hpp>
+#include <boost/scoped_ptr.hpp>
 #include <boost/signals/signal0.hpp>
 #include <boost/signals/signal1.hpp>
 
-// Maybe this should be a UIFunc modelled on LyXFunc
 class LyXView;
-
 class InsetBibKey;
 class InsetBibtex;
 class InsetCommand;
@@ -30,6 +30,7 @@ class InsetError;
 class InsetERT;
 class InsetExternal;
 class InsetFloat;
+class InsetWrap;
 class InsetGraphics;
 class InsetInclude;
 class InsetInfo;
@@ -45,16 +46,20 @@ class Dialogs : boost::noncopyable
 {
 public:
        ///
-       typedef boost::shared_ptr<boost::noncopyable> db_ptr;
-       ///
-       Dialogs(LyXView *);
+       Dialogs(LyXView &);
+       /// Define an empty d-tor out-of-line to keep boost::scoped_ptr happy.
+       ~Dialogs();
 
        /** Redraw all visible dialogs because, for example, the GUI colours
-           have been re-mapped. */
-       boost::signal0<void> redrawGUI;
+        *  have been re-mapped.
+        *
+        *  Note that static boost signals break some compilers, so we return a
+        *  reference to some hidden magic ;-)
+        */
+       static boost::signal0<void> & redrawGUI();
 
        /// Toggle tooltips on/off in all dialogs.
-       boost::signal0<void> toggleTooltips;
+       static void toggleTooltips();
 
        /// Are the tooltips on or off?
        static bool tooltipsEnabled();
@@ -105,6 +110,8 @@ public:
        void showFile(string const &);
        ///
        void showFloat(InsetFloat *);
+       ///
+       void showWrap(InsetWrap *);
        /// show all forked child processes
        void showForks();
        ///
@@ -126,7 +133,7 @@ public:
        ///
        void showParagraph();
        ///
-       boost::signal0<void>  updateParagraph;
+       void updateParagraph();
        ///
        void showPreamble();
        ///
@@ -164,6 +171,12 @@ public:
        /// show the version control log
        void showVCLogFile();
        //@}
+
+private:
+       /// Use the Pimpl idiom to hide the internals.
+       class Impl;
+       /// The pointer never changes although *pimpl_'s contents may.
+       boost::scoped_ptr<Impl> const pimpl_;
 };
 
 #endif