]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Dialogs.h
fix tooltips in toolbar
[lyx.git] / src / frontends / Dialogs.h
index 5fe2a6b392dc6c9202731a2d171597afe05c13dc..7e575eda799ad407e425e9f49dd4649eedf1b57b 100644 (file)
@@ -8,7 +8,7 @@
  *           LyX, The Document Processor
  *
  *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2000 The LyX Team.
+ *           Copyright 1995-2001 The LyX Team.
  *
  *           This file Copyright 2000
  *           Allan Rae
 #ifndef DIALOGS_H
 #define DIALOGS_H
 
-#include <vector>
-#include <sigc++/signal_system.h>
+#include "LString.h"
 
-using std::vector;
+#include <boost/utility.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/signals/signal0.hpp>
+#include <boost/signals/signal1.hpp>
+#include <vector>
 
-#ifdef SIGC_CXX_NAMESPACES
-using SigC::Signal0;
-using SigC::Signal1;
+#ifdef __GNUG__
+#pragma interface
 #endif
 
-#include "LString.h"
-
-class DialogBase;
+#include "DialogBase.h"
 
 // Maybe this should be a UIFunc modelled on LyXFunc
 class LyXView;
 
-class InsetInclude;
-class InsetIndex;
+class InsetGraphics;
 class InsetBibKey;
-class InsetCitation;
 class InsetBibtex;
+class InsetError;
+class InsetExternal;
+class InsetInclude;
 class InsetInfo;
 class InsetTabular;
+class InsetCommand;
+class InsetMinipage;
+class InsetFloat;
+class InsetERT;
+class Paragraph;
 
 /** Container of all dialogs and signals a LyXView needs or uses to access them
     The list of dialog signals isn't comprehensive but should be a good guide
     for any future additions.  Remember don't go overboard -- think minimal.
  */
-class Dialogs
+class Dialogs : boost::noncopyable
 {
 public:
-       /**@name Constructors and Deconstructors */
+       ///
+       typedef boost::shared_ptr<DialogBase> db_ptr;
+       /**@name Constructor */
        //@{
        ///
        Dialogs(LyXView *);
-       ///
-       ~Dialogs();
        //@}
-       
+
+       /** Redraw all visible dialogs because, for example, the GUI colours
+           have been re-mapped. */
+       boost::signal0<void> redrawGUI;
+
+       /// Toggle tooltips on/off in all dialogs.
+       boost::signal0<void> toggleTooltips;
+
+       /// Are the tooltips on or off?
+       static bool tooltipsEnabled();
+
        /**@name Global Hide and Update Signals */
        //@{
-       /// Hide all visible popups
-       Signal0<void> hideAll;
-       
-       /// Hide any popups that require a buffer for them to operate
-       Signal0<void> hideBufferDependent;
-       
-       /// Update visible, buffer-dependent popups
-       Signal0<void> updateBufferDependent;
+       /// Hide all visible dialogs
+       boost::signal0<void> hideAll;
+
+       /// Hide any dialogs that require a buffer for them to operate
+       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.
+        */
+       boost::signal1<void, bool> updateBufferDependent;
        //@}
 
-       /**@name Dialog Access Signals */
+       /**@name Dialog Access Signals.
+          Put into some sort of alphabetical order */
        //@{
-       /// Opens the Preamble Dialog.
-       Signal0<void> showPreamble;
        ///
-       Signal0<void> showLogFile;
+       void showAboutlyx();
+       /// show the key and label of a bibliography entry
+       void showBibitem(InsetCommand * ic);
+       /// show the bibtex dialog
+       void showBibtex(InsetCommand * ic);
+       ///
+       void showCharacter();
+       /// connected to the character dialog also
+       void setUserFreeFont();
+       ///
+       void showCitation(InsetCommand *);
        ///
-       Signal1<void, InsetTabular *> showTabular;
+       void createCitation(string const &);
        ///
-       Signal1<void, InsetTabular *> updateTabular;
+       void showDocument();
        ///
-       Signal1<void, InsetTabular *> hideTabular;
+       void showError(InsetError *);
+       /// show the external inset dialog
+       void showExternal(InsetExternal *);
+       /// show the contents of a file.
+       void showFile(string const &);
+       /// show all forked child processes
+       void showForks();
        ///
-       Signal0<void> showTabularCreate;
+       void showGraphics(InsetGraphics *);
+       /// show the details of a LyX file include inset
+       void showInclude(InsetInclude *);
        ///
-       Signal0<void> showCharacter;
+       void showIndex(InsetCommand *);
        ///
-       Signal0<void> updateCharacter;  // allow update as cursor moves
+       void createIndex();
        ///
-       Signal0<void> showParagraph;
+       void showInfo(InsetInfo *);
+       /// show the LaTeX log or build file
+       void showLogFile();
+       /// display the top-level maths panel
+       void showMathPanel();
        ///
-       Signal0<void> showDocument;
-       /// Do we really have to push this?
-       Signal1<void, vector<string> const &> SetDocumentClassChoice;
+       void showMinipage(InsetMinipage *);
        ///
-       Signal0<void> showPrint;
+       void updateMinipage(InsetMinipage *);
        ///
-       Signal0<void> showCopyright;
+       void showERT(InsetERT *);
        ///
-       Signal0<void> showCredits;
+       void updateERT(InsetERT *);
        ///
-       Signal0<void> showPreferences;
+       void showFloat(InsetFloat *);
        ///
-       Signal1<void, InsetInclude *> showInclude;
+       void showParagraph();
        ///
-       Signal1<void, InsetIndex *> showIndex;
+       void updateParagraph();
        ///
-       Signal1<void, InsetBibKey *> showBibkey;
+       void showPreamble();
        ///
-       Signal1<void, InsetCitation *> showCitation;
+       void showPreferences();
        ///
-       Signal1<void, string const &> createCitation;
+       void showPrint();
        ///
-       Signal1<void, InsetCitation *> hideCitation;
+       void showRef(InsetCommand *);
        ///
-       Signal1<void, InsetBibtex *> showBibtex;
+       void createRef(string const &);
        ///
-       Signal1<void, InsetInfo *> showInfo;
+       void showSearch();
+       ///
+       void showSendto();
+       /// bring up the spellchecker
+       void showSpellchecker();
+       /// bring up the spellchecker tab in preferences
+       void showSpellcheckerPreferences();
+       ///
+       void showTabular(InsetTabular *);
+       ///
+       void updateTabular(InsetTabular *);
+       ///
+       void showTabularCreate();
+       /// show the TexInfo
+       void showTexinfo();
+       /// show the thesaurus dialog
+       void showThesaurus(string const &);
+       ///
+       void showTOC(InsetCommand *);
+       ///
+       void createTOC(string const &);
+       ///
+       void showUrl(InsetCommand *);
+       ///
+       void createUrl(string const &);
+       /// show the version control log
+       void showVCLogFile();
        //@}
 private:
-       /// Disallow default constructor
-       Dialogs() {}
-       /// Disallow copy constructor
-       Dialogs(Dialogs &) {}
-       ///
-       vector<DialogBase *> dialogs_;
+       /// Add a dialog to the vector of dialogs.
+       //void add(DialogBase *);
+       /// the dialogs being managed
+       //std::vector<db_ptr> dialogs_;
 };
 
 #endif
-
-
-
-
-
-
-
-