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-07-27 10:26:38 +00:00
|
|
|
#include "support/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
|
|
|
using std::vector;
|
|
|
|
|
|
|
|
#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();
|
|
|
|
//@}
|
|
|
|
|
|
|
|
/**@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;
|
|
|
|
//@}
|
|
|
|
|
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?
|
|
|
|
Signal1<void, vector<string> const &> SetDocumentClassChoice;
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2000-09-22 15:09:51 +00:00
|
|
|
Signal1<void, InsetBibKey *> showBibkey;
|
2000-07-11 15:08:54 +00:00
|
|
|
///
|
2000-09-22 15:09:51 +00:00
|
|
|
Signal1<void, InsetBibtex *> 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;
|
|
|
|
///
|
2000-06-12 11:55:12 +00:00
|
|
|
Signal1<void, InsetInclude *> showInclude;
|
|
|
|
///
|
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-22 15:09:51 +00:00
|
|
|
Signal0<void> showLogFile;
|
|
|
|
///
|
|
|
|
Signal0<void> showParagraph;
|
|
|
|
///
|
|
|
|
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;
|
|
|
|
///
|
2000-09-22 15:09:51 +00:00
|
|
|
Signal1<void, InsetTabular *> showTabular;
|
|
|
|
///
|
|
|
|
Signal1<void, InsetTabular *> updateTabular;
|
|
|
|
///
|
|
|
|
Signal1<void, InsetTabular *> hideTabular;
|
|
|
|
///
|
|
|
|
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:
|
|
|
|
///
|
|
|
|
vector<DialogBase *> dialogs_;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|