+2002-08-13 Angus Leeming <leeming@lyx.org>
+
+ * DialogBase.h: removed.
+
+ * Dialogs.h: rearrange #includes, forward declarations and some
+ functions. Remove commented out, historical code.
+
+ * Dialogs.[Ch] (showInfo): removed.
+
+ * guiapi.h (gui_ShowInfo): removed.
2002-08-13 André Pönitz <poenitz@gmx.net>
+++ /dev/null
-// -*- C++ -*-
-/* DialogBase.h
- * Abstract base class of all dialogs.
- * Author: Allan Rae <rae@lyx.org>
- * This file is part of
- * ======================================================
- *
- * LyX, The Document Processor
- *
- * Copyright 1995 Matthias Ettrich
- * Copyright 1995-2001 The LyX Team.
- *
- * This file Copyright 2000
- * Allan Rae
- * ======================================================
- */
-#ifndef DIALOGBASE_H
-#define DIALOGBASE_H
-
-#include <boost/utility.hpp>
-
-/** Abstract base class of all dialogs.
- The outside world only needs some way to tell a dialog when to show, hide
- or update itself. A dialog then takes whatever steps are necessary to
- satisfy that request. Thus a dialog will have to "pull" the necessary
- details from the core of the program.
- */
-class DialogBase : boost::noncopyable
-{
-public:
- /**@name Constructors and Deconstructors */
- //@{
- /// Virtual base destructor
- virtual ~DialogBase() {}
- //@}
-
- /**@name Signal Targets */
- //@{
- ///
- //virtual void show() = 0;
- ///
- virtual void hide() = 0;
- ///
- virtual void update() {};
- ///
- virtual void close() {};
- //@}
-};
-
-#endif // DIALOGBASE_H
}
-void Dialogs::showInfo(InsetInfo * /*ii*/)
-{
-#if 0
- gui_ShowInfo(ii, *dialogs_lyxview, *this);
-#endif
-}
-
-
void Dialogs::showLogFile()
{
gui_ShowLogFile(*dialogs_lyxview, *this);
// -*- 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-2001 The LyX Team.
- *
- * This file Copyright 2000
- * Allan Rae
- * ======================================================
+/**
+ * \file Dialogs.h
+ * Copyright 1995-2002 The LyX Team.
+ * See the file COPYING.
+ * \author Allan Rae, rae@lyx.org
*/
#ifndef DIALOGS_H
#define DIALOGS_H
+#ifdef __GNUG__
+#pragma interface
+#endif
+
#include "LString.h"
#include <boost/utility.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/signals/signal0.hpp>
#include <boost/signals/signal1.hpp>
-#include <vector>
-
-#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 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
{
public:
///
- typedef boost::shared_ptr<DialogBase> db_ptr;
- /**@name Constructor */
- //@{
+ typedef boost::shared_ptr<boost::noncopyable> db_ptr;
///
Dialogs(LyXView *);
- //@}
/** Redraw all visible dialogs because, for example, the GUI colours
have been re-mapped. */
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 *);
/// show all forked child processes
void showForks();
///
void showIndex(InsetCommand *);
///
void createIndex();
- ///
- void showInfo(InsetInfo *);
/// show the LaTeX log or build file
void showLogFile();
/// display the top-level maths panel
///
void updateMinipage(InsetMinipage *);
///
- void showERT(InsetERT *);
- ///
- void updateERT(InsetERT *);
- ///
- void showFloat(InsetFloat *);
- ///
void showParagraph();
///
boost::signal0<void> updateParagraph;
/// 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<db_ptr> dialogs_;
};
#endif
+2002-08-14 Angus Leeming <leeming@lyx.org>
+
+ * GUI.h: class GUI deries from boost::noncopyable
+
+ * ControlButtons.h: no longer derives from DialogBase, but instead
+ derives directly from boost::noncopyable.
+
+ * ViewBase.h: derives from boost::noncopyable.
+
+ * ControlCharacter.C:
+ * ControlCommand.C:
+ * ControlConnections.C:
+ * ControlGraphics.C:
+ * ControlInclude.C:
+ * ControlParagraph.C:
+ * ControlPreamble.C:
+ * ControlPrint.C:
+ * ControlSearch.C:
+ * ControlSpellchecker.C:
+ * ControlTexinfo.C:
+ * ControlThesaurus.C:
+ rearrange #includes. Remove unnecessary ones.
+
+ * ControlError.h: add "insets/inseterror.h".
+
+ * helper_funcs.h: add necessary #includes.
+
+ * tex_helpers.[Ch]: add #pragma directives for g++.
+
+ * Makefile.am: remove src/frontends from -I list to compiler.
+
2002-08-13 Angus Leeming <leeming@lyx.org>
* ControlConnections.C:
#pragma interface
#endif
-#include "DialogBase.h" // This can go eventually
+#include <boost/utility.hpp>
class ViewBase;
class ButtonControllerBase;
/** Abstract base class for Controllers with a ButtonController.
*/
-class ControlButtons : public DialogBase
+class ControlButtons : boost::noncopyable
{
public:
///
#endif
#include "ControlCharacter.h"
+
#include "ViewBase.h"
#include "ButtonControllerBase.h"
+
#include "buffer.h"
-#include "Liason.h"
#include "bufferview_funcs.h" // ToggleAndShow
#include "gettext.h"
#include "language.h"
+#include "frontends/Liason.h"
#include "frontends/LyXView.h"
using Liason::setMinibuffer;
#pragma implementation
#endif
-#include "ViewBase.h"
-#include "ButtonControllerBase.h"
#include "ControlCommand.h"
-#include "buffer.h"
-#include "Dialogs.h"
-#include "lyxfunc.h"
+
#include "BufferView.h"
#include "funcrequest.h"
+#include "lyxfunc.h"
ControlCommand::ControlCommand(LyXView & lv, Dialogs & d, kb_action ac)
#endif
#include "ControlConnections.h"
+
#include "ViewBase.h"
-#include "Dialogs.h"
+
#include "buffer.h"
#include "BufferView.h"
+#include "frontends/Dialogs.h"
#include "frontends/LyXView.h"
#include <boost/bind.hpp>
#endif
#include "ControlInset.h"
+#include "insets/inseterror.h" // needed for proper instantiation of GUI<>.
class InsetError;
#include "helper_funcs.h"
-#include "converter.h"
#include "buffer.h"
#include "BufferView.h"
-#include "Dialogs.h"
+#include "converter.h"
#include "gettext.h"
#include "lyxrc.h"
*
* \author Alejandro Aguilar Sierra
* \author John Levon, moz@compsoc.man.ac.uk
- * \author Angus Leeming, a.leeming@.ac.uk
+ * \author Angus Leeming, a.leeming@ic.ac.uk
*/
#include <config.h>
#endif
#include "ControlInclude.h"
-#include "Alert.h"
+
+#include "helper_funcs.h"
+
#include "BufferView.h"
-#include "lyxfunc.h"
+#include "funcrequest.h"
#include "gettext.h"
-#include "helper_funcs.h"
+#include "lyxfunc.h"
#include "lyxrc.h"
-#include "funcrequest.h"
+
+#include "frontends/Alert.h"
#include "support/filetools.h"
#endif
#include "ControlParagraph.h"
+
#include "ButtonControllerBase.h"
#include "ViewBase.h"
-#include "ParagraphParameters.h"
-#include "Liason.h"
+
+#include "buffer.h"
#include "BufferView.h"
#include "gettext.h"
-#include "buffer.h"
#include "lyxtext.h"
+#include "ParagraphParameters.h"
+
+#include "frontends/Dialogs.h"
+#include "frontends/Liason.h"
+
#include "support/LAssert.h"
-#include "Dialogs.h"
+
#include <boost/bind.hpp>
using Liason::setMinibuffer;
ControlParagraph::ControlParagraph(LyXView & lv, Dialogs & d)
: ControlDialogBD(lv, d), pp_(0), ininset_(false)
{
- d_.updateParagraph.connect(
- boost::bind(&ControlParagraph::changedParagraph, this));
-
+ d_.updateParagraph.connect(
+ boost::bind(&ControlParagraph::changedParagraph, this));
}
#endif
#include "ControlPreamble.h"
+
#include "ViewBase.h"
+
#include "buffer.h"
-#include "Liason.h"
#include "gettext.h"
+#include "frontends/Liason.h"
+
ControlPreamble::ControlPreamble(LyXView & lv, Dialogs & d)
: ControlDialogBD(lv, d),
#endif
#include "ControlPrint.h"
+
#include "ViewBase.h"
#include "ButtonControllerBase.h"
+
#include "buffer.h"
-#include "PrinterParams.h"
-#include "Liason.h"
+#include "gettext.h"
#include "helper_funcs.h"
+#include "PrinterParams.h"
+
#include "frontends/Alert.h"
-#include "gettext.h"
+#include "frontends/Liason.h"
+
#include "support/LAssert.h"
using Liason::printBuffer;
#endif
#include "ControlSearch.h"
-#include "Liason.h"
-#include "lyxfind.h"
+
#include "gettext.h"
+#include "lyxfind.h"
+#include "frontends/Liason.h"
#include "support/lstrings.h"
#endif
#include "ControlSpellchecker.h"
+
+#include "ViewBase.h"
+
#include "buffer.h"
-#include "lyxrc.h"
#include "BufferView.h"
-#include "lyxtext.h"
#include "gettext.h"
#include "language.h"
-
-#include "ViewBase.h"
-#include "Dialogs.h"
-#include "Liason.h"
+#include "lyxrc.h"
+#include "lyxtext.h"
#include "frontends/Alert.h"
#endif
#include "ControlTexinfo.h"
-#include "Dialogs.h"
-#include "gettext.h"
+
#include "helper_funcs.h"
#include "tex_helpers.h"
+#include "frontends/Dialogs.h"
#include "frontends/LyXView.h"
#include "support/filetools.h" // FileSearch
#endif
#include "ControlThesaurus.h"
-#include "Liason.h"
-#include "lyxfind.h"
+
#include "gettext.h"
+#include "lyxfind.h"
+
+#include "frontends/Liason.h"
using Liason::setMinibuffer;
#include "ButtonController.h"
+#include <boost/utility.hpp>
/** This class makes a whole out of the disparate parts of a dialog.
*/
template <typename Controller, typename GUIview,
typename Policy, typename GUIbc>
-class GUI {
+class GUI : boost::noncopyable {
public:
///
GUI(LyXView & lv, Dialogs & d);
noinst_LTLIBRARIES = libcontrollers.la
INCLUDES = -I$(top_srcdir)/src/ \
- -I$(top_srcdir)/src/frontends/ \
$(SIGC_CFLAGS) $(BOOST_INCLUDES)
EXTRA_DIST = ButtonController.tmpl ControlDialog.tmpl ControlInset.tmpl
#include "support/LAssert.h"
+#include <boost/utility.hpp>
+
class ControlButtons;
-class ViewBase {
+class ViewBase : boost::noncopyable {
public:
///
ViewBase() : controller_ptr_(0) {}
#ifndef HELPERFUNCS_H
#define HELPERFUNCS_H
-#include <utility> // pair
-
#ifdef __GNUG__
#pragma interface
#endif
+#include "LString.h"
+
+#include <utility> // pair
+#include <vector> // pair
+
class LyXView;
/** Launch a file dialog and return the chosen file.
#include <config.h>
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
#include "tex_helpers.h"
#include "debug.h"
#ifndef TEX_HELPERS_H
#define TEX_HELPERS_H
+#ifdef __GNUG__
+#pragma interface
+#endif
+
#include "LString.h"
// build filelists of all availabe bst/cls/sty-files. done through
class InsetFloat;
class InsetGraphics;
class InsetInclude;
-class InsetInfo;
class InsetMinipage;
class InsetTabular;
void gui_ShowInclude(InsetInclude *, LyXView & lv, Dialogs & d);
void gui_ShowIndex(InsetCommand *, LyXView & lv, Dialogs & d);
void gui_CreateIndex(LyXView & lv, Dialogs & d);
- void gui_ShowInfo(InsetInfo *, LyXView & lv, Dialogs & d);
void gui_ShowLogFile(LyXView & lv, Dialogs & d);
void gui_ShowMathPanel(LyXView & lv, Dialogs & d);
void gui_ShowMinipage(InsetMinipage *, LyXView & lv, Dialogs & d);
+2002-08-14 Angus Leeming <leeming@lyx.org>
+
+ * FormBaseDeprecated.h: no longer derives from DialogBase, but instead
+ derives directly from boost::noncopyable.
+ (show): made public.
+
+ * FeedbackController.h: rearrange #includes.
+
+ * FormDocument.C:
+ * FormMathsDeco.C:
+ * FormMathsDelim.C:
+ * FormMathsMatrix.C:
+ * FormMathsPanel.C:
+ * FormTabular.C: remove #include "Dialogs.h"
+
+ * FormMathsBitmap.C: remove #include "Dialogs.h", "LyXView.h".
+
+ * FormPreferences.C: rearrange #includes.
+
+ * FormTabular.h (showInset, updateInset): make public.
+
+ * FormDocument.C (build): enable the bmtable to find the right file!
+
+ * guiapi.C (gui_ShowInfo): removed.
2002-08-13 André Poenitz <poenitz@gmx.net>
* Toolbar_pimpl.C: small cleanup
-
2002-08-13 Angus Leeming <leeming@lyx.org>
* FileDialog.C:
#ifndef FEEDBACKCONTROLLER_H
#define FEEDBACKCONTROLLER_H
-#include "forms_fwd.h"
-#include "LString.h"
-
#ifdef __GNUG__
#pragma interface
#endif
+#include "forms_fwd.h"
+#include "LString.h"
+
class FeedbackController
{
public:
#pragma interface
#endif
-#include "DialogBase.h"
#include "LString.h"
#include "xformsBC.h"
#include "FeedbackController.h"
#include "forms_fwd.h"
+#include <boost/utility.hpp>
#include <boost/signals/connection.hpp>
class Buffer;
class LyXView;
class Tooltips;
-class FormBaseDeprecated : public DialogBase, public FeedbackController
+class FormBaseDeprecated : boost::noncopyable, public FeedbackController
{
public:
///
Tooltips & tooltips();
- friend void gui_ShowDocument(LyXView &, Dialogs &);
+ /// Create the dialog if necessary, update it and display it.
+ virtual void show();
protected: // methods
*/
virtual void redraw();
- /// Create the dialog if necessary, update it and display it.
- virtual void show();
/// Hide the dialog.
virtual void hide();
/// Update the dialog.
#include "FormDocument.h"
#include "forms/form_document.h"
#include "Alert.h"
-#include "Dialogs.h"
#include "lyxtextclasslist.h"
#include "combox.h"
#include "tex-strings.h"
setPrehandler(bullets_->input_bullet_latex);
fl_set_input_maxchars(bullets_->input_bullet_latex, 80);
+ string const bmtablefile = LibFileSearch("images", "standard", "xpm");
+ fl_set_bmtable_pixmap_file(bullets_->bmtable_bullet_panel, 6, 6,
+ bmtablefile.c_str());
+
bc_.addReadOnly(bullets_->radio_bullet_depth_1);
bc_.addReadOnly(bullets_->radio_bullet_depth_2);
bc_.addReadOnly(bullets_->radio_bullet_depth_3);
#endif
#include "FormMathsBitmap.h"
-#include "Dialogs.h"
-#include "frontends/LyXView.h"
#include "bmtable.h"
#include "debug.h"
#include "forms_gettext.h"
#include "FormMathsDeco.h"
#include "forms/form_maths_deco.h"
-#include "Dialogs.h"
#include "bmtable.h"
#include FORMS_H_LOCATION
#include "FormMathsDelim.h"
#include "forms/form_maths_delim.h"
-#include "Dialogs.h"
-#include "frontends/LyXView.h"
+
#include "bmtable.h"
+
#include "debug.h"
#include "funcrequest.h"
+#include "lyxfunc.h"
+
+#include "frontends/LyXView.h"
+
+#include "support/lstrings.h"
+
#include "Lsstream.h"
+
#include FORMS_H_LOCATION
#include "delim.xbm"
#pragma implementation
#endif
-#include <algorithm>
-
#include "FormMathsMatrix.h"
#include "forms/form_maths_matrix.h"
-#include "Dialogs.h"
-#include "frontends/LyXView.h"
-#include "Lsstream.h"
+
#include "funcrequest.h"
+#include "lyxfunc.h"
+
+#include "frontends/LyXView.h"
+
#include "support/LAssert.h"
#include "support/lyxalgo.h" // lyx::count
+
+#include "Lsstream.h"
+
#include FORMS_H_LOCATION
+#include <algorithm>
+
#ifndef CXX_GLOBAL_CSTD
using std::strlen;
#endif
#pragma implementation
#endif
-#include "Dialogs.h"
#include "frontends/LyXView.h"
#include "FormMathsPanel.h"
#include "forms/form_maths_panel.h"
*/
class FormMathsPanel : public FormBaseBD {
public:
- friend void gui_ShowMathPanel(LyXView &, Dialogs &);
///
FormMathsPanel(LyXView *, Dialogs *);
///
#include "FormPreferences.h"
#include "forms/form_preferences.h"
-#include "Dialogs.h"
+
+#include "combox.h"
+#include "Color.h"
+#include "input_validators.h"
+#include "forms_gettext.h"
+#include "xforms_helpers.h"
+#include "helper_funcs.h"
#include "buffer.h"
#include "converter.h"
#include "debug.h"
-#include "frontends/LyXView.h"
#include "language.h"
#include "frnt_lang.h"
#include "lyxlex.h"
#include "Lsstream.h"
#include "funcrequest.h"
-#include "combox.h"
-#include "Color.h"
-#include "input_validators.h"
-#include "forms_gettext.h"
-#include "xforms_helpers.h"
-#include "helper_funcs.h"
+#include "frontends/LyXView.h"
+#include "frontends/Dialogs.h"
#include "support/lyxfunctional.h"
#include "support/lyxmanip.h"
*/
class FormPreferences : public FormBaseBI {
public:
- friend void gui_ShowPreferences(LyXView &, Dialogs &);
///
FormPreferences(LyXView &, Dialogs &);
#include "FormTabular.h"
#include "forms/form_tabular.h"
#include "frontends/LyXView.h"
-#include "Dialogs.h"
#include "buffer.h"
#include "xforms_helpers.h"
#include "lyxrc.h" // to set the default length values
*/
class FormTabular : public FormInset {
public:
- friend void gui_ShowTabular(InsetTabular *, LyXView &, Dialogs &);
- friend void gui_UpdateTabular(InsetTabular *, LyXView &, Dialogs &);
-
/// #FormTabular x(LyXFunc ..., Dialogs ...);#
FormTabular(LyXView &, Dialogs &);
+ /// Slot launching dialog to an existing inset
+ void showInset(InsetTabular *);
+ /// Slot launching dialog to an existing inset
+ void updateInset(InsetTabular *);
+
private:
/// Pointer to the actual instantiation of the ButtonController.
virtual xformsBC & bc();
/// Disconnect signals. Also perform any necessary housekeeping.
virtual void disconnect();
- /// Slot launching dialog to an existing inset
- void showInset(InsetTabular *);
- /// Slot launching dialog to an existing inset
- void updateInset(InsetTabular *);
/// Update dialog before showing it
virtual void update();
/// Build the dialog
}
-#if 0
- void gui_ShowInfo(InsetInfo *, LyXView & lv, Dialogs & d)
- {
- }
-#endif
-
-
void gui_ShowLogFile(LyXView & lv, Dialogs & d)
{
static GUI<ControlLog, FormLog,