X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2FDialogs.h;h=cb8a929dd4dcfe6619add2950df8a17973a99758;hb=c5058bffd88b5eb000ffd11d5729fbec0f34fb0f;hp=03b988b8a716c12f0bbfaa0b7f1ee05b76d83c4b;hpb=e1cd54a1a23175d6ef84dd00609c96ed1470438c;p=lyx.git diff --git a/src/frontends/Dialogs.h b/src/frontends/Dialogs.h index 03b988b8a7..cb8a929dd4 100644 --- a/src/frontends/Dialogs.h +++ b/src/frontends/Dialogs.h @@ -1,154 +1,182 @@ // -*- C++ -*- -/* Dialogs.h - * Container of all dialogs and signals a LyXView needs or uses to access them. - * Author: Allan Rae - * This file is part of - * ====================================================== +/** + * \file Dialogs.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * \author Allan Rae * - * LyX, The Document Processor - * - * Copyright 1995 Matthias Ettrich - * Copyright 1995-2000 The LyX Team. - * - * This file Copyright 2000 - * Allan Rae - * ====================================================== + * Full author contact details are available in file CREDITS */ #ifndef DIALOGS_H #define DIALOGS_H -#include -#include +#ifdef __GNUG__ +#pragma interface +#endif #include "LString.h" -#include "support/utility.hpp" -class DialogBase; +#include +#include +#include +#include -// Maybe this should be a UIFunc modelled on LyXFunc class LyXView; - -class InsetGraphics; class InsetBibKey; class InsetBibtex; +class InsetCommand; class InsetError; +class InsetERT; +class InsetExternal; +class InsetFloat; +class InsetWrap; +class InsetGraphics; class InsetInclude; class InsetInfo; +class InsetMinipage; +class Paragraph; class InsetTabular; -class InsetCommand; - -using std::vector; - -#ifdef SIGC_CXX_NAMESPACES -using SigC::Signal0; -using SigC::Signal1; -#endif /** 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 : public noncopyable +class Dialogs : boost::noncopyable { public: - /**@name Constructors and Deconstructors */ - //@{ - /// - 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. + * + * Note that static boost signals break some compilers, so we return a + * reference to some hidden magic ;-) + */ + static boost::signal0 & redrawGUI(); + + /// Toggle tooltips on/off in all dialogs. + static void toggleTooltips(); + + /// Are the tooltips on or off? + static bool tooltipsEnabled(); + /**@name Global Hide and Update Signals */ //@{ - /// Hide all visible popups - Signal0 hideAll; - - /// Hide any popups that require a buffer for them to operate - Signal0 hideBufferDependent; - - /// Update visible, buffer-dependent popups - Signal0 updateBufferDependent; + /// Hide all visible dialogs + boost::signal0 hideAll; + + /// Hide any dialogs that require a buffer for them to operate + boost::signal0 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 updateBufferDependent; //@} /**@name Dialog Access Signals. Put into some sort of alphabetical order */ //@{ - /// Do we really have to push this? - Signal1 const &> SetDocumentClassChoice; /// - Signal1 showBibkey; + void showAboutlyx(); + /// show the key and label of a bibliography entry + void showBibitem(InsetCommand * ic); + /// show the bibtex dialog + void showBibtex(InsetCommand * ic); /// - Signal1 showBibtex; + void showCharacter(); + /// connected to the character dialog also + void setUserFreeFont(); /// - Signal0 showCharacter; + void showCitation(InsetCommand *); /// - Signal1 showCitation; + void createCitation(string const &); /// - Signal1 createCitation; + void showDocument(); /// - Signal0 showCopyright; + void showError(InsetError *); /// - Signal0 showCredits; + void showERT(InsetERT *); /// - Signal1 showError; + void updateERT(InsetERT *); + /// show the external inset dialog + void showExternal(InsetExternal *); + /// show the contents of a file. + void showFile(string const &); /// - Signal1 showGraphics; + void showFloat(InsetFloat *); /// - Signal1 showInclude; + void showWrap(InsetWrap *); + /// show all forked child processes + void showForks(); /// - Signal1 showIndex; + void showGraphics(InsetGraphics *); + /// show the details of a LyX file include inset + void showInclude(InsetInclude *); /// - Signal1 createIndex; + void showIndex(InsetCommand *); /// - Signal1 showInfo; + void createIndex(); + /// show the LaTeX log or build file + void showLogFile(); + /// display the top-level maths panel + void showMathPanel(); /// - Signal0 showLayoutDocument; + void showMinipage(InsetMinipage *); /// - Signal0 showLayoutParagraph; + void updateMinipage(InsetMinipage *); /// - Signal0 showLogFile; + void showParagraph(); /// - Signal0 showPreamble; + void updateParagraph(); /// - Signal0 showPreferences; + void showPreamble(); /// - Signal0 showPrint; + void showPreferences(); /// - Signal1 showRef; + void showPrint(); /// - Signal1 createRef; + void showRef(InsetCommand *); /// - Signal1 showTabular; + void createRef(string const &); /// - Signal1 updateTabular; + void showSearch(); /// - Signal1 hideTabular; + void showSendto(); + /// bring up the spellchecker + void showSpellchecker(); /// - Signal0 showTabularCreate; + void showTabular(InsetTabular *); /// - Signal1 showTOC; + void updateTabular(InsetTabular *); /// - Signal1 createTOC; + void showTabularCreate(); + /// show the TexInfo + void showTexinfo(); + /// show the thesaurus dialog + void showThesaurus(string const &); /// - Signal1 showUrl; + void showTOC(InsetCommand *); /// - Signal1 createUrl; + void createTOC(string const &); /// - Signal0 updateCharacter; // allow update as cursor moves + void showUrl(InsetCommand *); + /// + void createUrl(string const &); + /// show the version control log + void showVCLogFile(); //@} + private: - /// - vector dialogs_; + /// Use the Pimpl idiom to hide the internals. + class Impl; + /// The pointer never changes although *pimpl_'s contents may. + boost::scoped_ptr const pimpl_; }; #endif - - - - - - - -