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 "LString.h"
|
2002-05-22 01:16:37 +00:00
|
|
|
|
2000-10-02 00:55:02 +00:00
|
|
|
#include <boost/utility.hpp>
|
2002-05-22 01:16:37 +00:00
|
|
|
#include <boost/shared_ptr.hpp>
|
2002-05-29 16:21:03 +00:00
|
|
|
#include <boost/signals/signal0.hpp>
|
|
|
|
#include <boost/signals/signal1.hpp>
|
2002-05-22 01:16:37 +00:00
|
|
|
#include <vector>
|
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-07-30 11:56:00 +00:00
|
|
|
class InsetFloat;
|
2001-08-06 14:55:02 +00:00
|
|
|
class InsetERT;
|
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. */
|
2002-05-29 16:21:03 +00:00
|
|
|
static boost::signal0<void> redrawGUI;
|
2000-11-10 17:29:47 +00:00
|
|
|
|
2002-03-11 09:54:42 +00:00
|
|
|
/// Toggle tooltips on/off in all dialogs.
|
2002-05-29 16:21:03 +00:00
|
|
|
static boost::signal0<void> toggleTooltips;
|
2002-03-11 09:54:42 +00:00
|
|
|
|
|
|
|
/// Are the tooltips on or off?
|
|
|
|
static bool tooltipsEnabled();
|
|
|
|
|
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
|
2002-05-29 16:21:03 +00:00
|
|
|
boost::signal0<void> hideAll;
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2000-10-13 05:57:05 +00:00
|
|
|
/// Hide any dialogs that require a buffer for them to operate
|
2002-05-29 16:21:03 +00:00
|
|
|
boost::signal0<void> hideBufferDependent;
|
2002-03-21 21:21:28 +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.
|
|
|
|
*/
|
2002-05-29 16:21:03 +00:00
|
|
|
boost::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
|
|
|
//@{
|
2001-07-13 14:03:48 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void showAboutlyx();
|
2001-02-12 14:09:09 +00:00
|
|
|
/// show the key and label of a bibliography entry
|
2002-06-18 15:44:30 +00:00
|
|
|
void showBibitem(InsetCommand * ic);
|
2001-02-12 14:09:09 +00:00
|
|
|
/// show the bibtex dialog
|
2002-06-18 15:44:30 +00:00
|
|
|
void showBibtex(InsetCommand * ic);
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void showCharacter();
|
2001-06-15 16:18:43 +00:00
|
|
|
/// connected to the character dialog also
|
2002-06-18 15:44:30 +00:00
|
|
|
void setUserFreeFont();
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void showCitation(InsetCommand *);
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void createCitation(string const &);
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void showDocument();
|
2001-06-15 16:18:43 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void showError(InsetError *);
|
2001-03-12 11:22:26 +00:00
|
|
|
/// show the external inset dialog
|
2002-06-18 15:44:30 +00:00
|
|
|
void showExternal(InsetExternal *);
|
2001-10-09 15:20:10 +00:00
|
|
|
/// show the contents of a file.
|
2002-06-18 15:44:30 +00:00
|
|
|
void showFile(string const &);
|
2002-02-18 19:13:48 +00:00
|
|
|
/// show all forked child processes
|
2002-06-18 15:44:30 +00:00
|
|
|
void showForks();
|
2000-08-11 14:42:20 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void showGraphics(InsetGraphics *);
|
2001-02-12 14:09:09 +00:00
|
|
|
/// show the details of a LyX file include inset
|
2002-06-18 15:44:30 +00:00
|
|
|
void showInclude(InsetInclude *);
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void showIndex(InsetCommand *);
|
2000-08-03 12:56:25 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void createIndex(string const &);
|
2000-06-12 11:55:12 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void showInfo(InsetInfo *);
|
2001-02-06 17:41:42 +00:00
|
|
|
/// show the LaTeX log or build file
|
2002-06-18 15:44:30 +00:00
|
|
|
void showLogFile();
|
2002-03-21 21:21:28 +00:00
|
|
|
/// display the top-level maths panel
|
2002-06-18 15:44:30 +00:00
|
|
|
void showMathPanel();
|
2000-09-22 15:09:51 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void showMinipage(InsetMinipage *);
|
2001-06-15 16:18:43 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void updateMinipage(InsetMinipage *);
|
2001-06-15 16:18:43 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void showERT(InsetERT *);
|
2001-08-06 14:55:02 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void updateERT(InsetERT *);
|
2001-08-06 14:55:02 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void showFloat(InsetFloat *);
|
2001-07-30 11:56:00 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void showParagraph();
|
2001-06-15 16:18:43 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void updateParagraph();
|
2001-06-15 16:18:43 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void showPreamble();
|
2000-09-22 15:09:51 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void showPreferences();
|
2000-09-22 15:09:51 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void showPrint();
|
2000-07-07 07:46:37 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void showRef(InsetCommand *);
|
2000-08-08 13:55:26 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void createRef(string const &);
|
2001-03-06 10:20:33 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void showSearch();
|
2002-03-07 15:06:57 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void showSendto();
|
2001-07-13 11:50:39 +00:00
|
|
|
/// bring up the spellchecker
|
2002-06-18 15:44:30 +00:00
|
|
|
void showSpellchecker();
|
2001-07-13 11:50:39 +00:00
|
|
|
/// bring up the spellchecker tab in preferences
|
2002-06-18 15:44:30 +00:00
|
|
|
void showSpellcheckerPreferences();
|
2000-08-08 13:55:26 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void showTabular(InsetTabular *);
|
2000-09-22 15:09:51 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void updateTabular(InsetTabular *);
|
2000-09-22 15:09:51 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void showTabularCreate();
|
2001-10-09 15:20:10 +00:00
|
|
|
/// show the TexInfo
|
2002-06-18 15:44:30 +00:00
|
|
|
void showTexinfo();
|
2001-07-29 10:42:11 +00:00
|
|
|
/// show the thesaurus dialog
|
2002-06-18 15:44:30 +00:00
|
|
|
void showThesaurus(string const &);
|
2000-09-22 15:09:51 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void showTOC(InsetCommand *);
|
2000-08-01 17:33:32 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void createTOC(string const &);
|
2000-08-01 17:33:32 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void showUrl(InsetCommand *);
|
2000-07-27 08:55:59 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
void createUrl(string const &);
|
2001-06-15 16:18:43 +00:00
|
|
|
/// show the version control log
|
2002-06-18 15:44:30 +00:00
|
|
|
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.
|
2002-06-18 15:44:30 +00:00
|
|
|
//void add(DialogBase *);
|
2001-03-12 12:44:56 +00:00
|
|
|
/// the dialogs being managed
|
2002-06-18 15:44:30 +00:00
|
|
|
//std::vector<db_ptr> dialogs_;
|
2000-06-12 11:55:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|