2000-06-12 11:55:12 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* Dialogs.h
|
|
|
|
* Container of all dialogs and signals a LyXView needs or uses to access them.
|
|
|
|
* Author: Allan Rae <rae@lyx.org>
|
|
|
|
* This file is part of
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
|
|
|
* Copyright 1995 Matthias Ettrich
|
2001-05-30 13:53:44 +00:00
|
|
|
* Copyright 1995-2001 The LyX Team.
|
2000-06-12 11:55:12 +00:00
|
|
|
*
|
|
|
|
* This file Copyright 2000
|
|
|
|
* Allan Rae
|
|
|
|
* ======================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef DIALOGS_H
|
|
|
|
#define DIALOGS_H
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <sigc++/signal_system.h>
|
|
|
|
|
|
|
|
#include "LString.h"
|
2000-10-02 00:55:02 +00:00
|
|
|
#include <boost/utility.hpp>
|
2001-03-15 13:37:04 +00:00
|
|
|
#include <boost/smart_ptr.hpp>
|
2000-06-12 11:55:12 +00:00
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "DialogBase.h"
|
2000-06-12 11:55:12 +00:00
|
|
|
|
|
|
|
// Maybe this should be a UIFunc modelled on LyXFunc
|
|
|
|
class LyXView;
|
|
|
|
|
2000-07-31 12:30:10 +00:00
|
|
|
class InsetGraphics;
|
2000-06-12 11:55:12 +00:00
|
|
|
class InsetBibKey;
|
|
|
|
class InsetBibtex;
|
2000-09-22 15:09:51 +00:00
|
|
|
class InsetError;
|
2001-03-12 11:22:26 +00:00
|
|
|
class InsetExternal;
|
2000-07-27 08:55:59 +00:00
|
|
|
class InsetInclude;
|
2000-06-12 11:55:12 +00:00
|
|
|
class InsetInfo;
|
2000-07-11 15:08:54 +00:00
|
|
|
class InsetTabular;
|
2000-08-01 17:33:32 +00:00
|
|
|
class InsetCommand;
|
2001-03-16 15:15:32 +00:00
|
|
|
class InsetMinipage;
|
2001-06-25 00:06:33 +00:00
|
|
|
class Paragraph;
|
2000-06-12 11:55:12 +00:00
|
|
|
|
|
|
|
/** 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.
|
|
|
|
*/
|
2001-04-17 14:02:45 +00:00
|
|
|
class Dialogs : boost::noncopyable
|
2000-06-12 11:55:12 +00:00
|
|
|
{
|
|
|
|
public:
|
2001-03-15 13:37:04 +00:00
|
|
|
///
|
|
|
|
typedef boost::shared_ptr<DialogBase> db_ptr;
|
|
|
|
/**@name Constructor */
|
2000-06-12 11:55:12 +00:00
|
|
|
//@{
|
|
|
|
///
|
|
|
|
Dialogs(LyXView *);
|
|
|
|
//@}
|
2001-03-15 13:37:04 +00:00
|
|
|
|
2001-04-03 14:30:58 +00:00
|
|
|
/** Redraw all visible dialogs because, for example, the GUI colours
|
2000-11-10 17:29:47 +00:00
|
|
|
have been re-mapped. */
|
2001-03-15 13:37:04 +00:00
|
|
|
static SigC::Signal0<void> redrawGUI;
|
2000-11-10 17:29:47 +00:00
|
|
|
|
2000-06-12 11:55:12 +00:00
|
|
|
/**@name Global Hide and Update Signals */
|
|
|
|
//@{
|
2001-04-03 14:30:58 +00:00
|
|
|
/// Hide all visible dialogs
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal0<void> hideAll;
|
2000-06-12 11:55:12 +00:00
|
|
|
|
2000-10-13 05:57:05 +00:00
|
|
|
/// Hide any dialogs that require a buffer for them to operate
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal0<void> hideBufferDependent;
|
2000-06-12 11:55:12 +00:00
|
|
|
|
2000-10-13 05:57:05 +00:00
|
|
|
/** Update visible, buffer-dependent dialogs
|
|
|
|
If the bool is true then a buffer change has occurred
|
|
|
|
else its still the same buffer.
|
|
|
|
*/
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal1<void, bool> updateBufferDependent;
|
2000-06-12 11:55:12 +00:00
|
|
|
//@}
|
|
|
|
|
2000-09-22 15:09:51 +00:00
|
|
|
/**@name Dialog Access Signals.
|
|
|
|
Put into some sort of alphabetical order */
|
2000-06-12 11:55:12 +00:00
|
|
|
//@{
|
2000-09-22 15:09:51 +00:00
|
|
|
/// Do we really have to push this?
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal1<void, std::vector<string> const &> SetDocumentClassChoice;
|
2001-02-12 14:09:09 +00:00
|
|
|
/// show the key and label of a bibliography entry
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal1<void, InsetCommand *> showBibitem;
|
2001-02-12 14:09:09 +00:00
|
|
|
/// show the bibtex dialog
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal1<void, InsetCommand *> showBibtex;
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal0<void> showCharacter;
|
2001-06-15 16:18:43 +00:00
|
|
|
/// connected to the character dialog also
|
|
|
|
SigC::Signal0<void> setUserFreeFont;
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal1<void, InsetCommand *> showCitation;
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal1<void, string const &> createCitation;
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal0<void> showCopyright;
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal0<void> showCredits;
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2001-06-15 16:18:43 +00:00
|
|
|
SigC::Signal0<void> showDocument;
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal1<void, InsetError *> showError;
|
2001-03-12 11:22:26 +00:00
|
|
|
/// show the external inset dialog
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal1<void, InsetExternal *> showExternal;
|
2000-08-11 14:42:20 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal1<void, InsetGraphics *> showGraphics;
|
2001-02-12 14:09:09 +00:00
|
|
|
/// show the details of a LyX file include inset
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal1<void, InsetInclude *> showInclude;
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal1<void, InsetCommand *> showIndex;
|
2000-08-03 12:56:25 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal1<void, string const &> createIndex;
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal1<void, InsetInfo *> showInfo;
|
2001-02-06 17:41:42 +00:00
|
|
|
/// show the LaTeX log or build file
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal0<void> showLogFile;
|
2001-03-16 12:08:14 +00:00
|
|
|
/// display the top-level maths panel
|
|
|
|
SigC::Signal0<void> showMathPanel;
|
2000-09-22 15:09:51 +00:00
|
|
|
///
|
2001-06-15 16:18:43 +00:00
|
|
|
SigC::Signal1<void, InsetMinipage *> showMinipage;
|
|
|
|
///
|
|
|
|
SigC::Signal1<void, InsetMinipage *> updateMinipage;
|
|
|
|
///
|
|
|
|
SigC::Signal0<void> showParagraph;
|
|
|
|
///
|
|
|
|
SigC::Signal0<void> updateParagraph;
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal0<void> showPreamble;
|
2000-09-22 15:09:51 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal0<void> showPreferences;
|
2001-06-28 13:02:03 +00:00
|
|
|
/// bring up the spellchecker tab in preferences
|
|
|
|
SigC::Signal0<void> showSpellcheckerPreferences;
|
2000-09-22 15:09:51 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal0<void> showPrint;
|
2000-07-07 07:46:37 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal1<void, InsetCommand *> showRef;
|
2000-08-08 13:55:26 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal1<void, string const &> createRef;
|
2001-03-06 10:20:33 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal0<void> showSearch;
|
2001-02-12 14:09:09 +00:00
|
|
|
/// pop up the splash
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal0<void> showSplash;
|
2001-03-12 12:44:56 +00:00
|
|
|
/// destroy the splash dialog
|
|
|
|
void destroySplash();
|
2000-08-08 13:55:26 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal1<void, InsetTabular *> showTabular;
|
2000-09-22 15:09:51 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal1<void, InsetTabular *> updateTabular;
|
2000-09-22 15:09:51 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal0<void> showTabularCreate;
|
2000-09-22 15:09:51 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal1<void, InsetCommand *> showTOC;
|
2000-08-01 17:33:32 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal1<void, string const &> createTOC;
|
2000-08-01 17:33:32 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal1<void, InsetCommand *> showUrl;
|
2000-07-27 08:55:59 +00:00
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
SigC::Signal1<void, string const &> createUrl;
|
2001-06-15 16:18:43 +00:00
|
|
|
/// show the version control log
|
|
|
|
SigC::Signal0<void> showVCLogFile;
|
2000-06-12 11:55:12 +00:00
|
|
|
//@}
|
|
|
|
private:
|
2001-03-15 13:37:04 +00:00
|
|
|
/// Add a dialog to the vector of dialogs.
|
|
|
|
void add(DialogBase *);
|
2001-03-12 12:44:56 +00:00
|
|
|
/// the dialogs being managed
|
2001-03-15 13:37:04 +00:00
|
|
|
std::vector<db_ptr> dialogs_;
|
2001-03-12 12:44:56 +00:00
|
|
|
/// the splash dialog
|
2001-03-15 13:37:04 +00:00
|
|
|
boost::scoped_ptr<DialogBase> splash_;
|
2000-06-12 11:55:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|