+2001-09-27 Angus Leeming <a.leeming@ic.ac.uk>
+
+ * Dialogs.h (showSplash, destroySplash, splash_): removed.
+
+ * Dialogs.C (destroySplash): removed.
+
2001-08-27 John Levon <moz@compsoc.man.ac.uk>
* GUIRunTime.h: initApplication() should take a & to argc
lyx::Assert(ptr);
dialogs_.push_back(db_ptr(ptr));
}
-
-void Dialogs::destroySplash()
-{
- splash_.reset();
-}
SigC::Signal0<void> showSpellchecker;
/// bring up the spellchecker tab in preferences
SigC::Signal0<void> showSpellcheckerPreferences;
- /// pop up the splash
- SigC::Signal0<void> showSplash;
- /// destroy the splash dialog
- void destroySplash();
///
SigC::Signal1<void, InsetTabular *> showTabular;
///
void add(DialogBase *);
/// the dialogs being managed
std::vector<db_ptr> dialogs_;
- /// the splash dialog
- boost::scoped_ptr<DialogBase> splash_;
};
#endif
+2001-09-27 Angus Leeming <a.leeming@ic.ac.uk>
+
+ * ControlSplash.[Ch]: removed.
+
+ * GUI.h: remove GUISplash class.
+
+ * ViewBase.h: remove ViewSplash class.
+
+ * Makefile.am: remove ControlSplash.[Ch].
+
2001-09-25 Angus Leeming <a.leeming@ic.ac.uk>
* ControlButtons.h: add variable emergency_exit_. If set to true, the
+++ /dev/null
-/**
- * \file ControlSplash.C
- * Copyright 2001 the LyX Team
- * Read the file COPYING
- *
- * \author Allan Rae
- * \author John Levon
- * \author Angus Leeming, a.leeming@ic.ac.uk
- */
-
-#include <config.h>
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "ControlSplash.h"
-#include "Dialogs.h"
-#include "ViewBase.h"
-#include "version.h"
-#include "support/filetools.h"
-#include "lyxrc.h" // show_banner
-
-ControlSplash::ControlSplash(Dialogs & d)
- : d_(d)
-{
- c_ = d.showSplash.connect(SigC::slot(this, &ControlSplash::show));
-}
-
-
-string const & ControlSplash::bannerFile() const
-{
- return banner_file_;
-}
-
-
-string const & ControlSplash::LyXVersion() const
-{
- return version_;
-}
-
-
-void ControlSplash::show()
-{
- if (!lyxrc.show_banner)
- return;
-
- banner_file_ = LibFileSearch("images", "banner", "xpm");
- if (banner_file_.empty())
- return;
-
- version_ = LYX_VERSION;
-
- view().show();
-}
-
-
-void ControlSplash::hide()
-{
- view().hide();
- c_.disconnect();
- d_.destroySplash();
-}
+++ /dev/null
-// -*- C++ -*-
-/**
- * \file ControlSplash.h
- * Copyright 2001 the LyX Team
- * Read the file COPYING
- *
- * \author Allan Rae
- * \author John Levon
- * \author Angus Leeming, a.leeming@ic.ac.uk
- */
-
-#ifndef CONTROLSPLASH_H
-#define CONTROLSPLASH_H
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "DialogBase.h"
-#include "LString.h"
-
-class Dialogs;
-class ViewSplash;
-
-/** The startup splash screen
- */
-class ControlSplash : public DialogBase {
-public:
- ///
- ControlSplash(Dialogs &);
- ///
- string const & bannerFile() const;
- ///
- string const & LyXVersion() const;
- /// hide (and destroy) the dialog
- void hide();
-
-private:
- /** Allow the Controller to access the View. This method must be
- instantiated in a daughter class that creates the actual instance
- of the View. */
- virtual ViewSplash & view() = 0;
-
- /// show the dialog
- void show();
-
- /// our container
- Dialogs & d_;
- /// the show connection
- SigC::Connection c_;
-
- ///
- string banner_file_;
- ///
- string version_;
-};
-
-#endif // CONTROLSPLASH_H
#ifndef GUI_H
#define GUI_H
-/** This class instantiates and makes available the GUI-specific
- View for the Splash screen controller.
- */
-template <class GUIview>
-class GUISplash : public ControlSplash {
-public:
- ///
- GUISplash(Dialogs & d) : ControlSplash(d), view_(*this) {}
- ///
- virtual ViewSplash & view() { return view_; }
-
-private:
- ///
- GUIview view_;
-};
-
-
/** This class instantiates and makes available the GUI-specific
ButtonController and View.
*/
ControlSearch.h \
ControlSpellchecker.C \
ControlSpellchecker.h \
- ControlSplash.C \
- ControlSplash.h \
ControlTabularCreate.C \
ControlTabularCreate.h \
ControlThesaurus.C \
#include <boost/utility.hpp>
#include "ControlButtons.h"
-#include "ControlSplash.h"
class ViewBase {
public:
};
-class ViewSplash {
-public:
- ///
- ViewSplash(ControlSplash & c) : controller_(c) {}
- ///
- virtual ~ViewSplash() {}
-
- /// Hide the dialog.
- virtual void hide() = 0;
- /// Create the dialog and show it.
- virtual void show() = 0;
-
- /** The shortcut allows (e.g. xform's) global callback functions
- access without making the whole controller_ public.
- */
- ///
- void Hide() { controller_.hide(); }
-
-protected:
- /// The view is, after all, controlled!
- ControlSplash & controller_;
-};
-
-
/** A generic class to cast the ButtonController controller_.bc_ to it's
daughter class. */
template <class GUIbc>
+2001-09-27 Angus Leeming <a.leeming@ic.ac.uk>
+
+ * Dialogs.C: remove splash dialog code.
+
+ * Makefile.am: remove splash dialog files.
+
2001-09-09 Lars Gullik Bjønnes <larsbj@birdstep.com>
* Makefile.am (libgnome_la_LIBADD): depend on the gui libs.
#include "Dialogs.h"
#include "gnomeBC.h"
-#include "ControlSplash.h"
#include "ControlBibitem.h"
#include "ControlBibtex.h"
#include "ControlCharacter.h"
#include "FormPrint.h"
#include "FormRef.h"
#include "FormSearch.h"
-#include "FormSplash.h"
#include "FormTabular.h"
#include "FormTabularCreate.h"
#include "FormToc.h"
add(new GUITabularCreate<FormTabularCreate, gnomeBC>(*lv, *this));
/*
- splash_.reset(new FormSplash(lv, this));
-
add(new GUIBibitem<FormBibitem, xformsBC>(*lv, *this));
add(new GUIBibtex<FormBibtex, xformsBC>(*lv, *this));
add(new GUICharacter<FormCharacter, xformsBC>(*lv, *this));
add(new FormPrint(lv, this));
add(new FormRef(lv, this));
add(new FormSearch(lv, this));
- add(new FormSplash(lv, this));
add(new FormTabular(lv, this));
add(new FormTabularCreate(lv, this));
add(new FormToc(lv, this));
code wrapped up like that in the form_copyright.[Ch] which is awkward
but will at least allow multiple instances of the same dialog.
- Signals will also be a great help in controlling the splashscreen --
- once signalled to hide it can disconnect from the signal and remove
- itself from memory.
-
LyXFuncs will be used for requesting/setting LyX internal info. This
will ensure that scripts or LyXServer-connected applications can all
have access to the same calls as the internal user-interface.
# ../xforms/form_print.lo \
# ../xforms/FormRef.lo \
# ../xforms/form_ref.lo \
-# ../xforms/FormSplash.lo \
-# ../xforms/form_splash.lo \
# ../xforms/FormTabular.lo \
# ../xforms/form_tabular.lo \
# ../xforms/FormTabularCreate.lo \
+2001-09-27 Angus Leeming <a.leeming@ic.ac.uk>
+
+ * Dialogs.C: remove splash dialog code.
+
+ * QSplash.[Ch]:
+ * QSplashDialog.[Ch]: removed.
+
+ * Makefile.dialogs: remove splash dialog files.
+
2001-09-18 John Levon <moz@compsoc.man.ac.uk>
* QRef.C: fix compile
#include "QRef.h"
#include "QSearch.h"
#include "QSpellchecker.h"
-#include "QSplash.h"
#include "QTabularCreate.h"
#include "QThesaurus.h"
#include "QURL.h"
#include "controllers/ControlRef.h"
#include "controllers/ControlSearch.h"
#include "controllers/ControlSpellchecker.h"
-#include "controllers/ControlSplash.h"
#include "controllers/ControlTabularCreate.h"
#include "controllers/ControlThesaurus.h"
#include "controllers/ControlUrl.h"
Dialogs::Dialogs(LyXView * lv)
{
- splash_.reset(new QSplash(lv, this));
-
// dialogs that have been converted to new scheme
add(new GUICitation<QCitation, Qt2BC>(*lv, *this));
add(new GUIAboutlyx<QAbout, Qt2BC>(*lv, *this));
QRef \
QSearch \
QSpellchecker \
- QSplash \
QTabularCreate \
QThesaurus \
QToc \
QSearch.C QSearchDialog.C \
QSpellchecker.h QSpellcheckerDialog.h \
QSpellchecker.C QSpellcheckerDialog.C \
- QSplash.h QSplashDialog.h \
- QSplash.C QSplashDialog.C \
QTabularCreate.h QTabularCreateDialog.h \
QTabularCreate.C QTabularCreateDialog.C \
QThesaurus.h QThesaurusDialog.h \
QRefDialog_moc.C \
QSearchDialog_moc.C \
QSpellcheckerDialog_moc.C \
- QSplashDialog_moc.C \
QTabularCreateDialog_moc.C \
QThesaurusDialog_moc.C \
QTocDialog_moc.C \
+++ /dev/null
-/**
- * \file QSplash.C
- * Copyright 2001 the LyX Team
- * Read the file COPYING
- *
- * \author Edwin Leuven
- */
-
-#include <config.h>
-
-#include <qframe.h>
-
-#include "QSplashDialog.h"
-#include "QSplash.h"
-#include "Dialogs.h"
-#include "version.h"
-#include "support/filetools.h"
-#include "lyxrc.h"
-
-QSplash::QSplash(LyXView *, Dialogs * d)
- : dialog_(0), d_(d)
-{
- c_ = d->showSplash.connect(SigC::slot(this, &QSplash::show));
-}
-
-
-QSplash::~QSplash()
-{
- c_.disconnect();
- delete dialog_;
-}
-
-
-void QSplash::hide()
-{
- dialog_->hide();
-}
-
-
-void QSplash::show()
-{
- if (!lyxrc.show_banner)
- return;
-
- if (!dialog_)
- dialog_ = new QSplashDialog( 0, "LyX");
-
- // show banner
- dialog_->show();
-}
+++ /dev/null
-// -*- C++ -*-
-/**
- * \file QSplash.h
- * Copyright 2001 the LyX Team
- * Read the file COPYING
- *
- * \author Edwin Leuven
- */
-
-#ifndef QSPLASH_H
-#define QSPLASH_H
-
-#include "DialogBase.h"
-
-class Dialogs;
-class LyXView;
-class QSplashDialog;
-
-class QSplash : public DialogBase {
-
-public:
- QSplash(LyXView *, Dialogs *);
-
- ~QSplash();
-
- /// hide the dialog
- void hide();
-
-private:
- /// show the dialog
- void show();
-
- /// Real GUI implementation.
- QSplashDialog * dialog_;
- /// our container
- Dialogs * d_;
- /// the show connection
- SigC::Connection c_;
-};
-
-#endif // QSPLASH_H
+++ /dev/null
-/**
- * \file QSplashDialog.C
- * Copyright 2001 the LyX Team
- * Read the file COPYING
- *
- * \author Edwin Leuven
- */
-
-#include <config.h>
-
-#include <qapplication.h>
-#include <qtimer.h>
-#include <qframe.h>
-#include <qpixmap.h>
-
-#include "version.h"
-#include "support/filetools.h"
-#include "support/lstrings.h"
-#include "lyxrc.h"
-#include "QSplashDialog.h"
-
-QSplashDialog::QSplashDialog(QWidget * parent, const char * name, WFlags fl, bool modal)
- : QFrame(parent, name, fl, modal)
-{
- string const banner_file = LibFileSearch("images", "banner", "xpm");
- if (banner_file.empty())
- return;
-
- QPixmap const pm(tostr(banner_file).c_str());
- int const w = pm.width();
- int const h = pm.height();
-
- setBackgroundPixmap(pm);
- setLineWidth(0);
- setGeometry(QApplication::desktop()->width()/2 - w/2,
- QApplication::desktop()->height()/2 - h/2,
- w, h);
-
- QTimer::singleShot(5*1000, this, SLOT(hide()));
-}
-
-
-QSplashDialog::~QSplashDialog()
-{
-}
-
-
-void QSplashDialog::mousePressEvent( QMouseEvent * )
-{
- hide();
-}
+++ /dev/null
-/**
- * \file QSplashDialog.C
- * Copyright 2001 the LyX Team
- * Read the file COPYING
- *
- * \author Edwin Leuven
- */
-
-#ifndef FORMSPLASHBASE_H
-#define FORMSPLASHBASE_H
-
-class QSplashDialog : public QFrame
-{
-public:
- QSplashDialog(QWidget * parent, const char * name,
- WFlags fl = QWidget::WStyle_NoBorder | QWidget::WStyle_Customize,
- bool modal = false);
-
- ~QSplashDialog();
-
-protected:
- virtual void mousePressEvent(QMouseEvent *);
-};
-
-#endif // QSPLASHDIALOG_H
+2001-09-27 Angus Leeming <a.leeming@ic.ac.uk>
+
+ * Dialogs.C: remove splash dialog code.
+
+ * FormSplash.[Ch]:
+ * form_splash.[Ch]:
+ * forms/form_splash.fd: removed.
+
+ * Makefile.am:
+ * forms/makefile: remove splash dialog files.
+
+ * Menubar_pimpl.C (MenuCallback): no longer call Dialogs::destroySplash.
+
2001-09-27 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* forms/form_preferences.fd: fix typo
#include "ControlRef.h"
#include "ControlSearch.h"
#include "ControlSpellchecker.h"
-#include "ControlSplash.h"
#include "ControlTabularCreate.h"
#include "ControlThesaurus.h"
#include "ControlToc.h"
#include "form_ref.h"
#include "form_search.h"
#include "form_spellchecker.h"
-#include "form_splash.h"
#include "form_tabular_create.h"
#include "form_thesaurus.h"
#include "form_toc.h"
#include "FormRef.h"
#include "FormSearch.h"
#include "FormSpellchecker.h"
-#include "FormSplash.h"
#include "FormTabularCreate.h"
#include "FormThesaurus.h"
#include "FormToc.h"
Dialogs::Dialogs(LyXView * lv)
{
- splash_.reset(new GUISplash<FormSplash>(*this));
-
add(new GUIAboutlyx<FormAboutlyx, xformsBC>(*lv, *this));
add(new GUIBibitem<FormBibitem, xformsBC>(*lv, *this));
add(new GUIBibtex<FormBibtex, xformsBC>(*lv, *this));
code wrapped up like that in the form_copyright.[Ch] which is awkward
but will at least allow multiple instances of the same dialog.
- Signals will also be a great help in controlling the splashscreen --
- once signalled to hide it can disconnect from the signal and remove
- itself from memory.
-
LyXFuncs will be used for requesting/setting LyX internal info. This
will ensure that scripts or LyXServer-connected applications can all
have access to the same calls as the internal user-interface.
+++ /dev/null
-/**
- * \file FormSplash.C
- * Copyright 2001 the LyX Team
- * Read the file COPYING
- *
- * \author Allan Rae
- * \author John Levon
- */
-
-#include <config.h>
-
-#include FORMS_H_LOCATION
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "ControlSplash.h"
-#include "FormSplash.h"
-#include "form_splash.h"
-#include "form_splash.h"
-#include "support/LAssert.h"
-
-extern "C" {
-
- static
- int C_FormSplashCloseCB(FL_FORM * form, void *)
- {
- lyx::Assert(form && form->u_vdata);
- FormSplash * pre = static_cast<FormSplash *>(form->u_vdata);
- pre->Hide();
- return FL_CANCEL;
- }
-
- void C_FormSplashCB(FL_OBJECT * ob, long)
- {
- lyx::Assert(ob && ob->form && ob->form->u_vdata);
- FormSplash * pre = static_cast<FormSplash*>(ob->form->u_vdata);
- pre->Hide();
- }
-
-}
-
-
-FormSplash::FormSplash(ControlSplash & c)
- : ViewSplash(c)
-{}
-
-
-ControlSplash & FormSplash::controller() const
-{
- return static_cast<ControlSplash &>(controller_);
- //return dynamic_cast<ControlSplash &>(controller_);
-}
-
-
-void FormSplash::show()
-{
- if (!dialog_.get()) {
- build();
- fl_set_form_atclose(dialog_->form, C_FormSplashCloseCB, 0);
- }
-
- int const xpos = WidthOfScreen(ScreenOfDisplay(fl_get_display(),
- fl_screen));
- int const ypos = HeightOfScreen(ScreenOfDisplay(fl_get_display(),
- fl_screen));
-
- fl_set_form_position(dialog_->form, xpos, ypos);
-
- // Show the title form at most 5 secs
- fl_set_timer(dialog_->splash_timer, 5);
-
- if (dialog_->form->visible)
- fl_raise_form(dialog_->form);
- else
- // Workaround dumb xforms sizing bug
- fl_set_form_minsize(dialog_->form,
- dialog_->form->w,
- dialog_->form->h);
- fl_show_form(dialog_->form, FL_PLACE_CENTER, FL_NOBORDER, "");
-}
-
-
-void FormSplash::hide()
-{
- if (dialog_->form && dialog_->form->visible)
- fl_hide_form(dialog_->form);
-}
-
-
-void FormSplash::build()
-{
- dialog_.reset(build_splash());
-
- fl_set_form_dblbuffer(dialog_->form, 1); // use dbl buffer
- fl_addto_form(dialog_->form);
- FL_OBJECT * obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 0, 0, 425, 290, "");
- fl_set_pixmapbutton_file(obj, controller().bannerFile().c_str());
-
- fl_set_pixmapbutton_focus_outline(obj, 3);
- fl_set_button_shortcut(obj, "^M ^[", 1);
- fl_set_object_boxtype(obj, FL_NO_BOX);
- fl_set_object_callback(obj, C_FormSplashCB, 0);
-
- obj = fl_add_text(FL_NORMAL_TEXT, 248, 265, 170, 16,
- controller().LyXVersion().c_str());
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-// fl_mapcolor(FL_FREE_COL2, 0x05, 0x2e, 0x4c);
- fl_mapcolor(FL_FREE_COL2, 0x2b, 0x47, 0x82);
- fl_mapcolor(FL_FREE_COL3, 0xe1, 0xd2, 0x9b);
- fl_set_object_color(obj, FL_FREE_COL2, FL_FREE_COL2);
- fl_set_object_lcol(obj, FL_FREE_COL3);
- fl_set_object_lalign(obj, FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
- fl_set_object_lstyle(obj, FL_BOLD_STYLE);
- fl_end_form();
-}
+++ /dev/null
-// -*- C++ -*-
-/**
- * \file FormSplash.h
- * Copyright 2001 the LyX Team
- * Read the file COPYING
- *
- * \author Allan Rae
- * \author John Levon
- */
-
-#ifndef FORMSPLASH_H
-#define FORMSPLASH_H
-
-#include <boost/smart_ptr.hpp>
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "ViewBase.h"
-
-class ControlSplash;
-struct FD_form_splash;
-
-/** The startup splash screen
- */
-class FormSplash : public ViewSplash {
-public:
- ///
- FormSplash(ControlSplash &);
-
-private:
- /// Build the dialog
- void build();
- /// hide the dialog
- void hide();
- /// show the dialog
- void show();
-
- /// The parent controller
- ControlSplash & controller() const;
-
- /// Fdesign generated method
- FD_form_splash * build_splash();
-
- /// Real GUI implementation.
- boost::scoped_ptr<FD_form_splash> dialog_;
-};
-
-#endif // FORMSPLASH_H
FormSpellchecker.h \
form_spellchecker.C \
form_spellchecker.h \
- FormSplash.C \
- FormSplash.h \
- form_splash.C \
- form_splash.h \
FormTabular.C \
FormTabular.h \
form_tabular.C \
LyXView * view = iteminfo->pimpl_->owner_;
MenuItem const * item = iteminfo->item_.get();
- /* get the splash out of the way. It would be nicer
- * to only have this code at the start, but xforms
- * makes it too ugly to do
- */
- view->getDialogs()->destroySplash();
-
if (button == 1) {
// set the pseudo menu-button
fl_set_object_boxtype(ob, FL_DOWN_BOX);
+++ /dev/null
-// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
-#include <config.h>
-#include "lyx_gui_misc.h"
-#include "gettext.h"
-
-/* Form definition file generated with fdesign. */
-
-#include FORMS_H_LOCATION
-#include <stdlib.h>
-#include "form_splash.h"
-#include "FormSplash.h"
-
-FD_form_splash::~FD_form_splash()
-{
- if ( form->visible ) fl_hide_form( form );
- fl_free_form( form );
-}
-
-
-FD_form_splash * FormSplash::build_splash()
-{
- FL_OBJECT *obj;
- FD_form_splash *fdui = new FD_form_splash;
-
- fdui->form = fl_bgn_form(FL_NO_BOX, 420, 290);
- fdui->form->u_vdata = this;
- obj = fl_add_box(FL_UP_BOX, 0, 0, 420, 290, "");
- fl_set_object_color(obj, FL_BLACK, FL_TOP_BCOL);
- fdui->splash_timer = obj = fl_add_timer(FL_HIDDEN_TIMER, 110, 170, 190, 60, "");
- fl_set_object_callback(obj, C_FormSplashCB, 0);
- fl_end_form();
-
- fdui->form->fdui = fdui;
-
- return fdui;
-}
-/*---------------------------------------*/
-
+++ /dev/null
-// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
-/** Header file generated with fdesign **/
-
-#ifndef FD_form_splash_h_
-#define FD_form_splash_h_
-
-/** Callbacks, globals and object handlers **/
-extern "C" void C_FormSplashCB(FL_OBJECT *, long);
-
-
-/**** Forms and Objects ****/
-struct FD_form_splash {
- ~FD_form_splash();
-
- FL_FORM *form;
- FL_OBJECT *splash_timer;
-};
-
-#endif /* FD_form_splash_h_ */
+++ /dev/null
-Magic: 13000
-
-Internal Form Definition File
- (do not change)
-
-Number of forms: 1
-Unit of measure: FL_COORD_PIXEL
-
-=============== FORM ===============
-Name: form_splash
-Width: 420
-Height: 290
-Number of Objects: 2
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 420 290
-boxtype: FL_UP_BOX
-colors: FL_BLACK FL_TOP_BCOL
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_TIMER
-type: HIDDEN_TIMER
-box: 110 170 190 60
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_RED
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: splash_timer
-callback: C_FormSplashCB
-argument: 0
-
-==============================
-create_the_forms
form_ref.fd \
form_search.fd \
form_spellchecker.fd \
- form_splash.fd \
form_tabular.fd \
form_tabular_create.fd \
form_thesaurus.fd \