X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2FDialogs.h;h=cb8a929dd4dcfe6619add2950df8a17973a99758;hb=c5058bffd88b5eb000ffd11d5729fbec0f34fb0f;hp=db12181ec18b9de87200c93e9a5de6d1a4d4ca2e;hpb=3d137bfe7795f2376eb38aee97bff32ed16ba134;p=lyx.git diff --git a/src/frontends/Dialogs.h b/src/frontends/Dialogs.h index db12181ec1..cb8a929dd4 100644 --- a/src/frontends/Dialogs.h +++ b/src/frontends/Dialogs.h @@ -1,53 +1,42 @@ // -*- 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-2001 The LyX Team. - * - * This file Copyright 2000 - * Allan Rae - * ====================================================== + * Full author contact details are available in file CREDITS */ #ifndef DIALOGS_H #define DIALOGS_H +#ifdef __GNUG__ +#pragma interface +#endif + #include "LString.h" #include -#include +#include #include #include -#include - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "DialogBase.h" -// 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 InsetTabular; -class InsetCommand; class InsetMinipage; -class InsetFloat; -class InsetERT; class Paragraph; +class InsetTabular; /** 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 @@ -57,19 +46,20 @@ class Dialogs : boost::noncopyable { public: /// - typedef boost::shared_ptr db_ptr; - /**@name Constructor */ - //@{ - /// - 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 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 & redrawGUI(); /// Toggle tooltips on/off in all dialogs. - boost::signal0 toggleTooltips; + static void toggleTooltips(); /// Are the tooltips on or off? static bool tooltipsEnabled(); @@ -110,10 +100,18 @@ public: void showDocument(); /// void showError(InsetError *); + /// + void showERT(InsetERT *); + /// + void updateERT(InsetERT *); /// show the external inset dialog void showExternal(InsetExternal *); /// show the contents of a file. void showFile(string const &); + /// + void showFloat(InsetFloat *); + /// + void showWrap(InsetWrap *); /// show all forked child processes void showForks(); /// @@ -124,8 +122,6 @@ public: void showIndex(InsetCommand *); /// void createIndex(); - /// - void showInfo(InsetInfo *); /// show the LaTeX log or build file void showLogFile(); /// display the top-level maths panel @@ -135,15 +131,9 @@ public: /// void updateMinipage(InsetMinipage *); /// - void showERT(InsetERT *); - /// - void updateERT(InsetERT *); - /// - void showFloat(InsetFloat *); - /// void showParagraph(); /// - boost::signal0 updateParagraph; + void updateParagraph(); /// void showPreamble(); /// @@ -181,11 +171,12 @@ public: /// show the version control log void showVCLogFile(); //@} + private: - /// Add a dialog to the vector of dialogs. - //void add(DialogBase *); - /// the dialogs being managed - //std::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