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
|
|
|
|
* Copyright 1995-2000 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"
|
2000-10-02 00:55:02 +00:00
|
|
|
#include <boost/utility.hpp>
|
2000-06-12 11:55:12 +00:00
|
|
|
|
|
|
|
class DialogBase;
|
|
|
|
|
|
|
|
// 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;
|
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;
|
2000-06-12 11:55:12 +00:00
|
|
|
|
2000-07-27 10:26:38 +00:00
|
|
|
#ifdef SIGC_CXX_NAMESPACES
|
|
|
|
using SigC::Signal0;
|
|
|
|
using SigC::Signal1;
|
|
|
|
#endif
|
|
|
|
|
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.
|
|
|
|
*/
|
2000-07-27 10:26:38 +00:00
|
|
|
class Dialogs : public noncopyable
|
2000-06-12 11:55:12 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**@name Constructors and Deconstructors */
|
|
|
|
//@{
|
|
|
|
///
|
|
|
|
Dialogs(LyXView *);
|
|
|
|
///
|
|
|
|
~Dialogs();
|
|
|
|
//@}
|
|
|
|
|
2000-11-10 17:29:47 +00:00
|
|
|
/** Redraw all visible popups because, for example, the GUI colours
|
|
|
|
have been re-mapped. */
|
|
|
|
static Signal0<void> redrawGUI;
|
|
|
|
|
2000-06-12 11:55:12 +00:00
|
|
|
/**@name Global Hide and Update Signals */
|
|
|
|
//@{
|
|
|
|
/// Hide all visible popups
|
|
|
|
Signal0<void> hideAll;
|
|
|
|
|
2000-10-13 05:57:05 +00:00
|
|
|
/// Hide any dialogs that require a buffer for them to operate
|
2000-06-12 11:55:12 +00:00
|
|
|
Signal0<void> hideBufferDependent;
|
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
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-11 00:21:13 +00:00
|
|
|
Signal1<void, std::vector<string> const &> SetDocumentClassChoice;
|
2001-02-12 14:09:09 +00:00
|
|
|
/// show the key and label of a bibliography entry
|
|
|
|
Signal1<void, InsetCommand *> showBibitem;
|
|
|
|
/// show the bibtex dialog
|
|
|
|
Signal1<void, InsetCommand *> showBibtex;
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
|
|
|
Signal0<void> showCharacter;
|
|
|
|
///
|
2000-09-22 15:09:51 +00:00
|
|
|
Signal1<void, InsetCommand *> showCitation;
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2000-09-22 15:09:51 +00:00
|
|
|
Signal1<void, string const &> createCitation;
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
|
|
|
Signal0<void> showCopyright;
|
|
|
|
///
|
|
|
|
Signal0<void> showCredits;
|
|
|
|
///
|
2000-09-22 15:09:51 +00:00
|
|
|
Signal1<void, InsetError *> showError;
|
2000-08-11 14:42:20 +00:00
|
|
|
///
|
2000-07-31 12:30:10 +00:00
|
|
|
Signal1<void, InsetGraphics *> showGraphics;
|
2001-02-12 14:09:09 +00:00
|
|
|
/// show the details of a LyX file include inset
|
|
|
|
Signal1<void, InsetCommand *> showInclude;
|
|
|
|
/// create a LyX file include inset
|
|
|
|
Signal1<void, string const &> createInclude;
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2000-08-03 12:56:25 +00:00
|
|
|
Signal1<void, InsetCommand *> showIndex;
|
|
|
|
///
|
|
|
|
Signal1<void, string const &> createIndex;
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2000-09-22 15:09:51 +00:00
|
|
|
Signal1<void, InsetInfo *> showInfo;
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2000-09-22 15:09:51 +00:00
|
|
|
Signal0<void> showLayoutDocument;
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2000-09-25 15:59:27 +00:00
|
|
|
Signal0<void> showLayoutParagraph;
|
2001-02-26 15:17:19 +00:00
|
|
|
///
|
|
|
|
Signal0<void> showLayoutCharacter;
|
|
|
|
///
|
|
|
|
Signal0<void> setUserFreeFont;
|
2001-02-06 17:41:42 +00:00
|
|
|
/// show the version control log
|
|
|
|
Signal0<void> showVCLogFile;
|
|
|
|
/// show the LaTeX log or build file
|
2000-09-25 15:59:27 +00:00
|
|
|
Signal0<void> showLogFile;
|
2000-09-22 15:09:51 +00:00
|
|
|
///
|
|
|
|
Signal0<void> showPreamble;
|
|
|
|
///
|
|
|
|
Signal0<void> showPreferences;
|
|
|
|
///
|
|
|
|
Signal0<void> showPrint;
|
2000-07-07 07:46:37 +00:00
|
|
|
///
|
2000-08-08 13:55:26 +00:00
|
|
|
Signal1<void, InsetCommand *> showRef;
|
|
|
|
///
|
|
|
|
Signal1<void, string const &> createRef;
|
2001-03-06 10:20:33 +00:00
|
|
|
///
|
|
|
|
Signal0<void> showSearch;
|
2001-02-12 14:09:09 +00:00
|
|
|
/// pop up the splash
|
|
|
|
Signal0<void> showSplash;
|
|
|
|
/// hide the splash immediately
|
|
|
|
Signal0<void> hideSplash;
|
2000-08-08 13:55:26 +00:00
|
|
|
///
|
2000-09-22 15:09:51 +00:00
|
|
|
Signal1<void, InsetTabular *> showTabular;
|
|
|
|
///
|
|
|
|
Signal1<void, InsetTabular *> updateTabular;
|
|
|
|
///
|
|
|
|
Signal0<void> showTabularCreate;
|
|
|
|
///
|
2000-08-01 17:33:32 +00:00
|
|
|
Signal1<void, InsetCommand *> showTOC;
|
|
|
|
///
|
|
|
|
Signal1<void, string const &> createTOC;
|
|
|
|
///
|
|
|
|
Signal1<void, InsetCommand *> showUrl;
|
2000-07-27 08:55:59 +00:00
|
|
|
///
|
|
|
|
Signal1<void, string const &> createUrl;
|
|
|
|
///
|
2000-09-22 15:09:51 +00:00
|
|
|
Signal0<void> updateCharacter; // allow update as cursor moves
|
2000-06-12 11:55:12 +00:00
|
|
|
//@}
|
|
|
|
private:
|
|
|
|
///
|
2001-03-11 00:21:13 +00:00
|
|
|
std::vector<DialogBase *> dialogs_;
|
2000-06-12 11:55:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|