]> git.lyx.org Git - features.git/commitdiff
guii2
authorJohn Levon <levon@movementarian.org>
Thu, 23 May 2002 12:08:47 +0000 (12:08 +0000)
committerJohn Levon <levon@movementarian.org>
Thu, 23 May 2002 12:08:47 +0000 (12:08 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4190 a592a061-630c-0410-9148-cb99ea01b6c8

106 files changed:
src/BufferView2.C
src/BufferView_pimpl.C
src/ChangeLog
src/FontLoader.C
src/LyXView.C [deleted file]
src/LyXView.h [deleted file]
src/Makefile.am
src/WorkArea.C
src/XFormsView.C [deleted file]
src/XFormsView.h [deleted file]
src/buffer.C
src/bufferlist.C
src/bufferview_funcs.C
src/converter.C
src/frontends/ChangeLog
src/frontends/Liason.C
src/frontends/LyXView.C [new file with mode: 0644]
src/frontends/LyXView.h [new file with mode: 0644]
src/frontends/Makefile.am
src/frontends/controllers/ChangeLog
src/frontends/controllers/ControlAboutlyx.C
src/frontends/controllers/ControlBibitem.C
src/frontends/controllers/ControlBibtex.C
src/frontends/controllers/ControlCharacter.C
src/frontends/controllers/ControlCitation.C
src/frontends/controllers/ControlCommand.C
src/frontends/controllers/ControlConnections.C
src/frontends/controllers/ControlERT.C
src/frontends/controllers/ControlError.C
src/frontends/controllers/ControlExternal.C
src/frontends/controllers/ControlFloat.C
src/frontends/controllers/ControlForks.C
src/frontends/controllers/ControlGraphics.C
src/frontends/controllers/ControlInclude.C
src/frontends/controllers/ControlIndex.C
src/frontends/controllers/ControlLog.C
src/frontends/controllers/ControlMinipage.C
src/frontends/controllers/ControlPreamble.C
src/frontends/controllers/ControlPrint.C
src/frontends/controllers/ControlRef.C
src/frontends/controllers/ControlSearch.C
src/frontends/controllers/ControlSendto.C
src/frontends/controllers/ControlShowFile.C
src/frontends/controllers/ControlSpellchecker.C
src/frontends/controllers/ControlTabularCreate.C
src/frontends/controllers/ControlTexinfo.C
src/frontends/controllers/ControlThesaurus.C
src/frontends/controllers/ControlToc.C
src/frontends/controllers/ControlUrl.C
src/frontends/controllers/ControlVCLog.C
src/frontends/gnome/ChangeLog
src/frontends/gnome/Dialogs.C
src/frontends/gnome/FileDialog.C
src/frontends/qt2/ChangeLog
src/frontends/qt2/QtLyXView.h
src/frontends/xforms/ChangeLog
src/frontends/xforms/DropDown.h
src/frontends/xforms/FileDialog.C
src/frontends/xforms/FormBaseDeprecated.C
src/frontends/xforms/FormDocument.C
src/frontends/xforms/FormIndex.C
src/frontends/xforms/FormInset.C
src/frontends/xforms/FormMathsBitmap.C
src/frontends/xforms/FormMathsDelim.C
src/frontends/xforms/FormMathsMatrix.C
src/frontends/xforms/FormMathsPanel.C
src/frontends/xforms/FormParagraph.C
src/frontends/xforms/FormPreferences.C
src/frontends/xforms/FormPrint.C
src/frontends/xforms/FormTabular.C
src/frontends/xforms/Makefile.am
src/frontends/xforms/XFormsView.C [new file with mode: 0644]
src/frontends/xforms/XFormsView.h [new file with mode: 0644]
src/importer.C
src/insets/ChangeLog
src/insets/insetbib.C
src/insets/insetcite.C
src/insets/inseterror.C
src/insets/insetert.C
src/insets/insetexternal.C
src/insets/insetfloat.C
src/insets/insetfloatlist.C
src/insets/insetgraphics.C
src/insets/insetinclude.C
src/insets/insetindex.C
src/insets/insetminipage.C
src/insets/insetparent.C
src/insets/insetref.C
src/insets/insettabular.C
src/insets/insettext.C
src/insets/insettoc.C
src/insets/inseturl.C
src/lyx_cb.C
src/lyx_gui.C
src/lyx_main.C
src/lyxfind.C
src/lyxfunc.C
src/lyxvc.C
src/mathed/ChangeLog
src/mathed/formula.C
src/mathed/formulabase.C
src/minibuffer.C
src/text.C
src/text2.C
src/trans.C
src/vc-backend.C

index a3e6691c44d592b2fae49cb559b1418c63c1ea61..996791f36223543b6efd9d96282a02b0dc29950d 100644 (file)
@@ -14,7 +14,7 @@
 #include "buffer.h"
 #include "lyxcursor.h"
 #include "lyxtext.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "bufferlist.h"
 #include "lyxscreen.h"
 #include "LaTeX.h"
index 73e690de18f00373d4fd05d90b821bbc61057760..613cc3b363c91353d53927275a7d06d428e8399d 100644 (file)
@@ -10,7 +10,7 @@
 #include "lyxtext.h"
 #include "lyxrow.h"
 #include "paragraph.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "commandtags.h"
 #include "lyxfunc.h"
 #include "debug.h"
index 72ccf19648ae02c3dfd766991390aa3c9b10f6af..1e1f157dee99a2a1296356894342ece3d188ed66 100644 (file)
@@ -1,16 +1,44 @@
 2002-05-23  John Levon  <moz@compsoc.man.ac.uk>
 
-       * src/Makefile.am:
-       * src/PainterBase.C:
-       * src/PainterBase.h:
-       * src/Painter.C:
-       * src/Painter.h:
-       * src/WorkArea.C:
-       * src/WorkArea.h:
-       * src/screen.C:
-       * src/tabular.C:
-       * src/text.C:
-       * src/text2.C: move Painter to frontends/
+       * BufferView2.C:
+       * BufferView_pimpl.C:
+       * FontLoader.C:
+       * LyXView.h:
+       * LyXView.C:
+       * Makefile.am:
+       * WorkArea.C:
+       * XFormsView.h:
+       * XFormsView.C:
+       * buffer.C:
+       * bufferlist.C:
+       * bufferview_funcs.C:
+       * converter.C: 
+       * importer.C: 
+       * lyx_cb.C:
+       * lyx_gui.C:
+       * lyx_main.C:
+       * lyx_find.C:
+       * lyxfunc.C:
+       * lyxvc.C:
+       * minibuffer.C:
+       * text.C:
+       * text2.C:
+       * trans.C:
+       * vc-backend.C: move LyX/XFormsView into frontends/
+2002-05-23  John Levon  <moz@compsoc.man.ac.uk>
+
+       * Makefile.am:
+       * PainterBase.C:
+       * PainterBase.h:
+       * Painter.C:
+       * Painter.h:
+       * WorkArea.C:
+       * WorkArea.h:
+       * screen.C:
+       * tabular.C:
+       * text.C:
+       * text2.C: move Painter to frontends/
  
 2002-05-22  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
index 7567dde5be7fbfe7552db3874b367e1c5b642c30..8d08bb9dd889329227833dfd7c207a97c3733c89 100644 (file)
@@ -21,7 +21,7 @@
 #include "debug.h"
 #include "lyxrc.h"     // lyxrc.font_*
 #include "BufferView.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "frontends/GUIRunTime.h"
 
 using std::endl;
diff --git a/src/LyXView.C b/src/LyXView.C
deleted file mode 100644 (file)
index 561e644..0000000
+++ /dev/null
@@ -1,247 +0,0 @@
-/* This file is part of
- * ======================================================
- *
- *           LyX, The Document Processor
- *
- *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2001 The LyX Team.
- *
- * ====================================================== */
-
-#include <config.h>
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "LyXView.h"
-#include "minibuffer.h"
-#include "debug.h"
-#include "intl.h"
-#include "lyxrc.h"
-#include "lyxtext.h"
-#include "buffer.h"
-#include "MenuBackend.h"
-#include "bufferview_funcs.h" // CurrentState()
-#include "gettext.h"
-#include "lyxfunc.h"
-#include "BufferView.h"
-#include "lyxtextclasslist.h"
-
-#include "frontends/Dialogs.h"
-#include "frontends/Toolbar.h"
-#include "frontends/Timeout.h"
-#include "frontends/Menubar.h"
-
-#include "support/filetools.h"        // OnlyFilename()
-
-#include <sys/time.h>
-#include <unistd.h>
-
-using std::endl;
-
-extern void AutoSave(BufferView *);
-extern void QuitLyX();
-
-string current_layout;
-
-
-LyXView::LyXView()
-{
-       lyxerr[Debug::INIT] << "Initializing LyXFunc" << endl;
-       lyxfunc = new LyXFunc(this);
-
-       intl = new Intl;
-
-       // Give the timeout some default sensible value.
-       autosave_timeout = new Timeout(5000);
-
-       dialogs_ = new Dialogs(this);
-       Dialogs::redrawGUI.connect(SigC::slot(this, &LyXView::redraw));
-}
-
-
-LyXView::~LyXView()
-{
-       delete menubar;
-       delete toolbar;
-       delete bufferview;
-       delete minibuffer;
-       delete lyxfunc;
-       delete intl;
-       delete autosave_timeout;
-       delete dialogs_;
-}
-
-
-void LyXView::resize()
-{
-       view()->resize();
-}
-
-
-/// returns the buffer currently shown in the main form.
-Buffer * LyXView::buffer() const
-{
-       return bufferview->buffer();
-}
-
-
-BufferView * LyXView::view() const
-{
-       return bufferview;
-}
-
-
-Toolbar * LyXView::getToolbar() const
-{
-       return toolbar;
-}
-
-
-void LyXView::setLayout(string const & layout)
-{
-       toolbar->setLayout(layout);
-}
-
-
-void LyXView::updateToolbar()
-{
-       toolbar->update();
-}
-
-
-LyXFunc * LyXView::getLyXFunc() const
-{
-       return lyxfunc;
-}
-
-
-MiniBuffer * LyXView::getMiniBuffer() const
-{
-       return minibuffer;
-}
-
-
-void LyXView::message(string const & str)
-{
-       minibuffer->message(str);
-}
-
-
-void LyXView::messagePush(string const & str)
-{
-       minibuffer->messagePush(str);
-}
-
-
-void LyXView::messagePop()
-{
-       minibuffer->messagePop();
-}
-
-
-Menubar * LyXView::getMenubar() const
-{
-       return menubar;
-}
-
-
-void LyXView::updateMenubar()
-{
-       if ((!view() || !view()->buffer())
-           && menubackend.hasMenu("main_nobuffer"))
-               menubar->set("main_nobuffer");
-       else
-               menubar->set("main");
-       menubar->update();
-}
-
-
-Intl * LyXView::getIntl() const
-{
-       return intl;
-}
-
-
-// Callback for autosave timer
-void LyXView::AutoSave()
-{
-       lyxerr[Debug::INFO] << "Running AutoSave()" << endl;
-       if (view()->available())
-               ::AutoSave(view());
-}
-
-
-/// Reset autosave timer
-void LyXView::resetAutosaveTimer()
-{
-       if (lyxrc.autosave)
-               autosave_timeout->restart();
-}
-
-
-void LyXView::invalidateLayoutChoice()
-{
-       last_textclass = -1;
-}
-
-
-void LyXView::updateLayoutChoice()
-{
-       // This has a side-effect that the layouts are not showed when no
-       // document is loaded.
-       if (!view() || !view()->buffer()) {
-               toolbar->clearLayoutList();
-               return;
-       }
-
-       // Update the layout display
-       if (last_textclass != int(buffer()->params.textclass)) {
-               toolbar->updateLayoutList(true);
-               last_textclass = int(buffer()->params.textclass);
-               current_layout = textclasslist[last_textclass].defaultLayoutName();
-       } else {
-               toolbar->updateLayoutList(false);
-       }
-
-       string const & layout =
-               bufferview->getLyXText()->cursor.par()->layout();
-
-       if (layout != current_layout) {
-               toolbar->setLayout(layout);
-               current_layout = layout;
-       }
-}
-
-
-// Updates the title of the window with the filename of the current document
-void LyXView::updateWindowTitle()
-{
-       static string last_title = "LyX";
-       string title = "LyX";
-       string icon_title = "LyX";
-
-       if (view()->available()) {
-               string const cur_title = buffer()->fileName();
-               if (!cur_title.empty()) {
-                       title += ": " + MakeDisplayPath(cur_title, 30);
-                       if (!buffer()->isLyxClean())
-                               title += _(" (Changed)");
-                       if (buffer()->isReadonly())
-                               title += _(" (read only)");
-                       /* Show only the filename if it's available. */
-                       icon_title = OnlyFilename(cur_title);
-               }
-       }
-       if (title != last_title) {
-               setWindowTitle(title, icon_title);
-               last_title = title;
-       }
-}
-
-
-void LyXView::showState()
-{
-       message(currentState(view()));
-}
diff --git a/src/LyXView.h b/src/LyXView.h
deleted file mode 100644 (file)
index 425469a..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-// -*- C++ -*-
-
-#ifndef LYXVIEW_BASE_H
-#define LYXVIEW_BASE_H
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include <boost/utility.hpp>
-#include <sigc++/signal_system.h>
-
-#include "LString.h"
-#include "support/types.h"
-
-class Buffer;
-class Toolbar;
-class MiniBuffer;
-class Intl;
-class Menubar;
-
-class BufferView;
-class Dialogs;
-class LyXFunc;
-class Timeout;
-
-///
-class LyXView : public SigC::Object, boost::noncopyable {
-public:
-       ///
-       LyXView();
-       ///
-       virtual ~LyXView();
-       ///
-       virtual void init() = 0;
-       ///
-       virtual void setPosition(int, int) = 0;
-       ///
-       virtual void show(int, int, string const &) = 0;
-       /// Redraw the main form.
-       virtual void redraw() = 0;
-
-       /// Resize all BufferViews in this LyXView (because the width changed)
-       void resize();
-
-       /// returns the buffer currently shown in the main form.
-       Buffer * buffer() const;
-
-       ///
-       BufferView * view() const;
-
-       /// return a pointer to the toolbar
-       Toolbar * getToolbar() const;
-
-       /// sets the layout in the toolbar layout combox
-       void setLayout(string const & layout);
-       /// update the toolbar
-       void updateToolbar();
-
-       /// return a pointer to the lyxfunc
-       LyXFunc * getLyXFunc() const;
-
-       /// return a pointer to the minibuffer
-       MiniBuffer * getMiniBuffer() const;
-
-       ///
-       void message(string const &);
-       ///
-       void messagePush(string const & str);
-       ///
-       void messagePop();
-
-       ///
-       Menubar * getMenubar() const;
-
-       ///
-       void updateMenubar();
-
-       ///
-       Intl * getIntl() const;
-
-       ///
-       Dialogs * getDialogs() { return dialogs_; }
-
-       ///
-       void updateLayoutChoice();
-
-       /// Updates the title of the window
-       void updateWindowTitle();
-
-       /// Show state (toolbar and font in minibuffer)
-       void showState();
-
-       /// Reset autosave timer
-       void resetAutosaveTimer();
-       ///
-       virtual void prohibitInput() const = 0;
-       ///
-       virtual void allowInput() const = 0;
-protected:
-       ///
-       Menubar * menubar;
-       ///
-       Toolbar * toolbar;
-       /** This is supposed to be a pointer or a list of pointers to the
-          BufferViews currently being shown in the LyXView. So far
-          this is not used, but that should change pretty soon. (Lgb) */
-       BufferView * bufferview;
-       ///
-       MiniBuffer * minibuffer;
-       ///
-       Intl * intl;
-       ///
-       Timeout * autosave_timeout;
-       /// A callback
-       void AutoSave();
-       ///
-       void invalidateLayoutChoice();
-private:
-       ///
-       LyXFunc * lyxfunc;
-       ///
-       Dialogs * dialogs_;
-       ///
-       virtual void setWindowTitle(string const &, string const &) = 0;
-       /** The last textclass layout list in the layout choice selector
-         This should probably be moved to the toolbar, but for now it's
-       here. (Asger) */
-       int last_textclass;
-};
-#endif
index 6265f693e8e12ee1d2a020479ee4f2d9ae96cbe0..ab93038cc3441935a021028a22c95c6e4fe65697 100644 (file)
@@ -76,8 +76,6 @@ lyx_SOURCES = \
        Lsstream.h \
        LyXAction.C \
        LyXAction.h \
-       LyXView.C \
-       LyXView.h \
        MenuBackend.C \
        MenuBackend.h \
        ParagraphParameters.C \
@@ -95,8 +93,6 @@ lyx_SOURCES = \
        ToolbarDefaults.h \
        WorkArea.C \
        WorkArea.h \
-       XFormsView.C \
-       XFormsView.h \
        box.h \
        box.C \
        broken_headers.h \
@@ -218,8 +214,6 @@ lyx_SOURCES = \
        undo.h \
        undo_funcs.C \
        undo_funcs.h \
-       undostack.C \
-       undostack.h \
        vc-backend.C \
        vc-backend.h \
        version.C \
index cb114c60e0ba2df45a6b1c895ca5962aaa37ad16..d2235da63303907fafac5f53ec473d06898206b5 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "WorkArea.h"
 #include "debug.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "lyxrc.h" // lyxrc.show_banner
 #include "version.h" // lyx_version
 
@@ -574,12 +574,10 @@ int WorkArea::event_cb(XEvent * xev)
                case SelectionRequest:
                        lyxerr[Debug::GUI] << "X requested selection." << endl;
                        selectionRequested.emit();
-//                     ret = 1;
                        break;
                case SelectionClear:
                        lyxerr[Debug::GUI] << "Lost selection." << endl;
                        selectionLost.emit();
-//                     ret = 1;
                        break;
        }
        return ret;
diff --git a/src/XFormsView.C b/src/XFormsView.C
deleted file mode 100644 (file)
index bb73db7..0000000
+++ /dev/null
@@ -1,258 +0,0 @@
-/* This file is part of
- * ======================================================
- *
- *           LyX, The Document Processor
- *
- *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2001 The LyX Team.
- *
- * ====================================================== */
-
-#include <config.h>
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "XFormsView.h"
-#if FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5)
-#include "lyxlookup.h"
-#endif
-#include "minibuffer.h"
-#include "debug.h"
-#include "intl.h"
-#include "lyxrc.h"
-#include "support/filetools.h"        // OnlyFilename()
-#include "frontends/Toolbar.h"
-#include "frontends/Menubar.h"
-#include "frontends/Timeout.h"
-#include "MenuBackend.h"
-#include "ToolbarDefaults.h"
-#include "lyxfunc.h"
-#include "BufferView.h"
-
-using std::endl;
-
-//extern void AutoSave(BufferView *);
-extern void QuitLyX();
-
-// This is very temporary
-BufferView * current_view;
-
-extern "C" {
-
-static
-int C_XFormsView_atCloseMainFormCB(FL_FORM * form, void * p)
-{
-       return XFormsView::atCloseMainFormCB(form, p);
-}
-
-}
-
-
-XFormsView::XFormsView(int width, int height)
-       : LyXView()
-{
-       create_form_form_main(width, height);
-       fl_set_form_atclose(form_, C_XFormsView_atCloseMainFormCB, 0);
-
-       // Connect the minibuffer signals
-       minibuffer->stringReady.connect(SigC::slot(getLyXFunc(),
-                                               &LyXFunc::miniDispatch));
-       minibuffer->timeout.connect(SigC::slot(getLyXFunc(),
-                                              &LyXFunc::initMiniBuffer));
-
-       // Make sure the buttons are disabled if needed.
-       updateToolbar();
-}
-
-
-XFormsView::~XFormsView() {}
-
-
-/// Redraw the main form.
-void XFormsView::redraw() {
-       lyxerr[Debug::INFO] << "XFormsView::redraw()" << endl;
-       fl_redraw_form(form_);
-       getMiniBuffer()->redraw();
-}
-
-
-FL_FORM * XFormsView::getForm() const
-{
-       return form_;
-}
-
-
-// Callback for close main form from window manager
-int XFormsView::atCloseMainFormCB(FL_FORM *, void *)
-{
-       QuitLyX();
-       return FL_IGNORE;
-}
-
-
-void XFormsView::setPosition(int x, int y)
-{
-       fl_set_form_position(form_, x, y);
-}
-
-
-void XFormsView::show(int place, int border, string const & title)
-{
-       fl_set_form_minsize(form_, form_->w, form_->h);
-       fl_show_form(form_, place, border, title.c_str());
-       getLyXFunc()->initMiniBuffer();
-#if FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5)
-       InitLyXLookup(fl_get_display(), form_->window);
-#endif
-}
-
-
-void XFormsView::create_form_form_main(int width, int height)
-       /* to make this work as it should, .lyxrc should have been
-        * read first; OR maybe this one should be made dynamic.
-        * Hmmmm. Lgb.
-        * We will probably not have lyxrc before the main form is
-        * initialized, because error messages from lyxrc parsing
-        * are presented (and rightly so) in GUI popups. Asger.
-        */
-{
-       // the main form
-       form_ = fl_bgn_form(FL_NO_BOX, width, height);
-       form_->u_vdata = this;
-       FL_OBJECT * obj = fl_add_box(FL_FLAT_BOX, 0, 0, width, height, "");
-       fl_set_object_color(obj, FL_MCOL, FL_MCOL);
-
-       // Parameters for the appearance of the main form
-       int const air = 2;
-       int const bw = abs(fl_get_border_width());
-
-       //
-       // THE MENUBAR
-       //
-       menubar = new Menubar(this, menubackend);
-
-       //
-       // TOOLBAR
-       //
-
-       toolbar = new Toolbar(this, air, 30 + air + bw, toolbardefaults);
-
-       // Setup the toolbar
-       toolbar->set(true);
-
-       //
-       // WORKAREA
-       //
-
-       int const ywork = 60 + 2 * air + bw;
-       int const workheight = height - ywork - (25 + 2 * air);
-
-       ::current_view = bufferview = new BufferView(this, air, ywork,
-                                                    width - 3 * air,
-                                                    workheight);
-
-       //
-       // MINIBUFFER
-       //
-
-       minibuffer = new MiniBuffer(this, air, height - (25 + air),
-                                   width - (2 * air), 25);
-
-       //
-       // TIMERS
-       //
-
-       autosave_timeout->timeout.connect(SigC::slot(this, &XFormsView::AutoSave));
-
-       //
-       // Misc
-       //
-
-       //  assign an icon to main form
-       string iconname = LibFileSearch("images", "lyx", "xpm");
-       if (!iconname.empty()) {
-               unsigned int w, h;
-               Pixmap lyx_p, lyx_mask;
-               lyx_p = fl_read_pixmapfile(fl_root,
-                                          iconname.c_str(),
-                                          &w,
-                                          &h,
-                                          &lyx_mask,
-                                          0,
-                                          0,
-                                          0); // this leaks
-               fl_set_form_icon(form_, lyx_p, lyx_mask);
-       }
-
-       // set min size
-       fl_set_form_minsize(form_, 50, 50);
-
-       fl_end_form();
-
-       minibuffer->dd_init();
-}
-
-
-void XFormsView::init()
-{
-       // Set the textclass choice
-       invalidateLayoutChoice();
-       updateLayoutChoice();
-       updateMenubar();
-
-       // Start autosave timer
-       if (lyxrc.autosave) {
-               autosave_timeout->setTimeout(lyxrc.autosave * 1000);
-               autosave_timeout->start();
-       }
-
-       intl->InitKeyMapper(lyxrc.use_kbmap);
-}
-
-
-void XFormsView::setWindowTitle(string const & title, string const & icon_title)
-{
-       fl_set_form_title(form_, title.c_str());
-       fl_winicontitle(form_->window, icon_title.c_str());
-}
-
-
-// How should this actually work? Should it prohibit input in all BufferViews,
-// or just in the current one? If "just the current one", then it should be
-// placed in BufferView. If "all BufferViews" then LyXGUI (I think) should
-// run "prohibitInput" on all LyXViews which will run prohibitInput on all
-// BufferViews. Or is it perhaps just the (input in) BufferViews in the
-// current LyxView that should be prohibited (Lgb) (This applies to
-// "allowInput" as well.)
-void XFormsView::prohibitInput() const
-{
-       view()->hideCursor();
-
-       static Cursor cursor;
-       static bool cursor_undefined = true;
-
-       if (cursor_undefined) {
-               cursor = XCreateFontCursor(fl_get_display(), XC_watch);
-               XFlush(fl_get_display());
-               cursor_undefined = false;
-       }
-
-       /* set the cursor to the watch for all forms and the canvas */
-       XDefineCursor(fl_get_display(), getForm()->window, cursor);
-
-       XFlush(fl_get_display());
-       fl_deactivate_all_forms();
-}
-
-
-void XFormsView::allowInput() const
-{
-       /* reset the cursor from the watch for all forms and the canvas */
-
-       XUndefineCursor(fl_get_display(), getForm()->window);
-
-       XFlush(fl_get_display());
-       fl_activate_all_forms();
-}
diff --git a/src/XFormsView.h b/src/XFormsView.h
deleted file mode 100644 (file)
index f96cc9d..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-// -*- C++ -*-
-/* This file is part of
- * ======================================================
- *
- *           LyX, The Document Processor
- *
- *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2001 The LyX Team.
- *
- * ====================================================== */
-
-#ifndef LyXView_H
-#define LyXView_H
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include FORMS_H_LOCATION
-
-#include "LyXView.h"
-
-/**
-  This class is the form containing the view of the buffer. The actual buffer
-  view is supposed (at least IMHO) to be another class, that shows its output
-  in one or more LyXView's.
- */
-class XFormsView : public LyXView {
-public:
-       /// constructor
-       XFormsView(int w, int h);
-       /// destructor
-       ~XFormsView();
-       /// Where to place the form.
-       virtual void setPosition(int, int);
-       /// Show the main form.
-       virtual void show(int, int, string const & t = string("LyX"));
-       /// init (should probably be removed later) (Lgb)
-       virtual void init();
-       /// Redraw the main form.
-       virtual void redraw();
-       /// returns a pointer to the form.
-       FL_FORM * getForm() const;
-       ///
-       virtual void prohibitInput() const;
-       ///
-       virtual void allowInput() const;
-       /** This callback is run when a close event is sent from the
-         window manager. */
-       static int atCloseMainFormCB(FL_FORM *, void *);
-private:
-       /// pass the title, and the iconified title
-       virtual void setWindowTitle(string const &, string const &);
-       /// makes the main form.
-       void create_form_form_main(int width, int height);
-       /// A pointer to the form.
-       FL_FORM * form_;
-};
-#endif
index 5aee0fe97ee1eac3fd4c2d1b373b39e802a1aac9..3da303c63136701d815010840e97f2d198cf8b94 100644 (file)
@@ -31,7 +31,7 @@
 #include "version.h"
 #include "LaTeX.h"
 #include "Chktex.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "debug.h"
 #include "LaTeXFeatures.h"
 #include "lyxtext.h"
@@ -735,7 +735,6 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par,
                LyXLex nylex(0, 0);
                nylex.setStream(istr);
                inset->read(this, nylex);
-
                par->insertInset(pos, inset, font);
                ++pos;
                insertErtContents(par, pos);
@@ -1768,7 +1767,6 @@ bool Buffer::save() const
                */
 
                // Should probably have some more error checking here.
-               // Should be cleaned up in 0.13, at least a bit.
                // Doing it this way, also makes the inodes stay the same.
                // This is still not a very good solution, in particular we
                // might loose the owner of the backup.
@@ -3610,7 +3608,6 @@ void Buffer::simpleDocBookOnePar(ostream & os,
 }
 
 
-// This should be enabled when the Chktex class is implemented. (Asger)
 // chktex should be run with these flags disabled: 3, 22, 25, 30, 38(?)
 // Other flags: -wall -v0 -x
 int Buffer::runChktex()
index 3b69c1d0713dbf6f09509f515d1f5ab999262fb7..e93dddae8923d75c21aa1b544488afd29c4f3d98 100644 (file)
@@ -28,7 +28,7 @@
 #include "bufferview_funcs.h"
 #include "BufferView.h"
 #include "gettext.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "vc-backend.h"
 #include "TextCache.h"
 #include "lyxtextclasslist.h"
index 768f700a9b7b180354850dd424126f8e7044d9f9..d6f804083a34fe72731b73cceff6d6ef2a9bc990 100644 (file)
@@ -15,7 +15,7 @@
 #endif
 
 #include "bufferview_funcs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "BufferView.h"
 #include "paragraph.h"
 #include "lyxfont.h"
@@ -206,7 +206,7 @@ string const currentState(BufferView * bv)
 }
 
 
-/* -------> Does the actual toggle job of the XxxCB() calls above.
+/* Does the actual toggle job of the calls above.
  * Also shows the current font state.
  */
 void toggleAndShow(BufferView * bv, LyXFont const & font, bool toggleall)
index d192e26aca7cd9e06ee7be456422793e2e9dec0d..843d8477ed3af3e0edb5ac0adc6c72bdf4945b22 100644 (file)
@@ -21,7 +21,7 @@
 #include "buffer.h"
 #include "bufferview_funcs.h"
 #include "LaTeX.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "lyx_cb.h" // ShowMessage()
 #include "gettext.h"
 #include "BufferView.h"
index 69d9685f2823f07c64aca19bd0602461c76e981a..70fd733d9ca1df6736519df9f11a4bd24cd36754 100644 (file)
@@ -1,3 +1,10 @@
+2002-05-23  John Levon  <moz@compsoc.man.ac.uk>
+
+       * Liason.C:
+       * LyXView.h: 
+       * LyXView.C:
+       * Makefile.am: move LyXView here
+
 2002-05-23  John Levon  <moz@compsoc.man.ac.uk>
 
        * Makefile.am:
index ee8d456c831cfadfaea7c5f4daf122e2f088e201..cda33f196f638423811066325b715734046df652 100644 (file)
@@ -18,7 +18,7 @@
 #include "lyxrc.h"
 #include "PrinterParams.h"
 
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "BufferView.h"
 #include "buffer.h"
 #include "exporter.h"
diff --git a/src/frontends/LyXView.C b/src/frontends/LyXView.C
new file mode 100644 (file)
index 0000000..63f7559
--- /dev/null
@@ -0,0 +1,247 @@
+/* This file is part of
+ * ======================================================
+ *
+ *           LyX, The Document Processor
+ *
+ *           Copyright 1995 Matthias Ettrich
+ *           Copyright 1995-2001 The LyX Team.
+ *
+ * ====================================================== */
+
+#include <config.h>
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include "frontends/LyXView.h"
+#include "minibuffer.h"
+#include "debug.h"
+#include "intl.h"
+#include "lyxrc.h"
+#include "lyxtext.h"
+#include "buffer.h"
+#include "MenuBackend.h"
+#include "bufferview_funcs.h" // CurrentState()
+#include "gettext.h"
+#include "lyxfunc.h"
+#include "BufferView.h"
+#include "lyxtextclasslist.h"
+
+#include "frontends/Dialogs.h"
+#include "frontends/Toolbar.h"
+#include "frontends/Timeout.h"
+#include "frontends/Menubar.h"
+
+#include "support/filetools.h"        // OnlyFilename()
+
+#include <sys/time.h>
+#include <unistd.h>
+
+using std::endl;
+
+extern void AutoSave(BufferView *);
+extern void QuitLyX();
+
+string current_layout;
+
+
+LyXView::LyXView()
+{
+       lyxerr[Debug::INIT] << "Initializing LyXFunc" << endl;
+       lyxfunc = new LyXFunc(this);
+
+       intl = new Intl;
+
+       // Give the timeout some default sensible value.
+       autosave_timeout = new Timeout(5000);
+
+       dialogs_ = new Dialogs(this);
+       Dialogs::redrawGUI.connect(SigC::slot(this, &LyXView::redraw));
+}
+
+
+LyXView::~LyXView()
+{
+       delete menubar;
+       delete toolbar;
+       delete bufferview;
+       delete minibuffer;
+       delete lyxfunc;
+       delete intl;
+       delete autosave_timeout;
+       delete dialogs_;
+}
+
+
+void LyXView::resize()
+{
+       view()->resize();
+}
+
+
+/// returns the buffer currently shown in the main form.
+Buffer * LyXView::buffer() const
+{
+       return bufferview->buffer();
+}
+
+
+BufferView * LyXView::view() const
+{
+       return bufferview;
+}
+
+
+Toolbar * LyXView::getToolbar() const
+{
+       return toolbar;
+}
+
+
+void LyXView::setLayout(string const & layout)
+{
+       toolbar->setLayout(layout);
+}
+
+
+void LyXView::updateToolbar()
+{
+       toolbar->update();
+}
+
+
+LyXFunc * LyXView::getLyXFunc() const
+{
+       return lyxfunc;
+}
+
+
+MiniBuffer * LyXView::getMiniBuffer() const
+{
+       return minibuffer;
+}
+
+
+void LyXView::message(string const & str)
+{
+       minibuffer->message(str);
+}
+
+
+void LyXView::messagePush(string const & str)
+{
+       minibuffer->messagePush(str);
+}
+
+
+void LyXView::messagePop()
+{
+       minibuffer->messagePop();
+}
+
+
+Menubar * LyXView::getMenubar() const
+{
+       return menubar;
+}
+
+
+void LyXView::updateMenubar()
+{
+       if ((!view() || !view()->buffer())
+           && menubackend.hasMenu("main_nobuffer"))
+               menubar->set("main_nobuffer");
+       else
+               menubar->set("main");
+       menubar->update();
+}
+
+
+Intl * LyXView::getIntl() const
+{
+       return intl;
+}
+
+
+// Callback for autosave timer
+void LyXView::AutoSave()
+{
+       lyxerr[Debug::INFO] << "Running AutoSave()" << endl;
+       if (view()->available())
+               ::AutoSave(view());
+}
+
+
+/// Reset autosave timer
+void LyXView::resetAutosaveTimer()
+{
+       if (lyxrc.autosave)
+               autosave_timeout->restart();
+}
+
+
+void LyXView::invalidateLayoutChoice()
+{
+       last_textclass = -1;
+}
+
+
+void LyXView::updateLayoutChoice()
+{
+       // This has a side-effect that the layouts are not showed when no
+       // document is loaded.
+       if (!view() || !view()->buffer()) {
+               toolbar->clearLayoutList();
+               return;
+       }
+
+       // Update the layout display
+       if (last_textclass != int(buffer()->params.textclass)) {
+               toolbar->updateLayoutList(true);
+               last_textclass = int(buffer()->params.textclass);
+               current_layout = textclasslist[last_textclass].defaultLayoutName();
+       } else {
+               toolbar->updateLayoutList(false);
+       }
+
+       string const & layout =
+               bufferview->getLyXText()->cursor.par()->layout();
+
+       if (layout != current_layout) {
+               toolbar->setLayout(layout);
+               current_layout = layout;
+       }
+}
+
+
+// Updates the title of the window with the filename of the current document
+void LyXView::updateWindowTitle()
+{
+       static string last_title = "LyX";
+       string title = "LyX";
+       string icon_title = "LyX";
+
+       if (view()->available()) {
+               string const cur_title = buffer()->fileName();
+               if (!cur_title.empty()) {
+                       title += ": " + MakeDisplayPath(cur_title, 30);
+                       if (!buffer()->isLyxClean())
+                               title += _(" (Changed)");
+                       if (buffer()->isReadonly())
+                               title += _(" (read only)");
+                       /* Show only the filename if it's available. */
+                       icon_title = OnlyFilename(cur_title);
+               }
+       }
+       if (title != last_title) {
+               setWindowTitle(title, icon_title);
+               last_title = title;
+       }
+}
+
+
+void LyXView::showState()
+{
+       message(currentState(view()));
+}
diff --git a/src/frontends/LyXView.h b/src/frontends/LyXView.h
new file mode 100644 (file)
index 0000000..425469a
--- /dev/null
@@ -0,0 +1,131 @@
+// -*- C++ -*-
+
+#ifndef LYXVIEW_BASE_H
+#define LYXVIEW_BASE_H
+
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+#include <boost/utility.hpp>
+#include <sigc++/signal_system.h>
+
+#include "LString.h"
+#include "support/types.h"
+
+class Buffer;
+class Toolbar;
+class MiniBuffer;
+class Intl;
+class Menubar;
+
+class BufferView;
+class Dialogs;
+class LyXFunc;
+class Timeout;
+
+///
+class LyXView : public SigC::Object, boost::noncopyable {
+public:
+       ///
+       LyXView();
+       ///
+       virtual ~LyXView();
+       ///
+       virtual void init() = 0;
+       ///
+       virtual void setPosition(int, int) = 0;
+       ///
+       virtual void show(int, int, string const &) = 0;
+       /// Redraw the main form.
+       virtual void redraw() = 0;
+
+       /// Resize all BufferViews in this LyXView (because the width changed)
+       void resize();
+
+       /// returns the buffer currently shown in the main form.
+       Buffer * buffer() const;
+
+       ///
+       BufferView * view() const;
+
+       /// return a pointer to the toolbar
+       Toolbar * getToolbar() const;
+
+       /// sets the layout in the toolbar layout combox
+       void setLayout(string const & layout);
+       /// update the toolbar
+       void updateToolbar();
+
+       /// return a pointer to the lyxfunc
+       LyXFunc * getLyXFunc() const;
+
+       /// return a pointer to the minibuffer
+       MiniBuffer * getMiniBuffer() const;
+
+       ///
+       void message(string const &);
+       ///
+       void messagePush(string const & str);
+       ///
+       void messagePop();
+
+       ///
+       Menubar * getMenubar() const;
+
+       ///
+       void updateMenubar();
+
+       ///
+       Intl * getIntl() const;
+
+       ///
+       Dialogs * getDialogs() { return dialogs_; }
+
+       ///
+       void updateLayoutChoice();
+
+       /// Updates the title of the window
+       void updateWindowTitle();
+
+       /// Show state (toolbar and font in minibuffer)
+       void showState();
+
+       /// Reset autosave timer
+       void resetAutosaveTimer();
+       ///
+       virtual void prohibitInput() const = 0;
+       ///
+       virtual void allowInput() const = 0;
+protected:
+       ///
+       Menubar * menubar;
+       ///
+       Toolbar * toolbar;
+       /** This is supposed to be a pointer or a list of pointers to the
+          BufferViews currently being shown in the LyXView. So far
+          this is not used, but that should change pretty soon. (Lgb) */
+       BufferView * bufferview;
+       ///
+       MiniBuffer * minibuffer;
+       ///
+       Intl * intl;
+       ///
+       Timeout * autosave_timeout;
+       /// A callback
+       void AutoSave();
+       ///
+       void invalidateLayoutChoice();
+private:
+       ///
+       LyXFunc * lyxfunc;
+       ///
+       Dialogs * dialogs_;
+       ///
+       virtual void setWindowTitle(string const &, string const &) = 0;
+       /** The last textclass layout list in the layout choice selector
+         This should probably be moved to the toolbar, but for now it's
+       here. (Asger) */
+       int last_textclass;
+};
+#endif
index f4f4bbbf7f210be994545b4dfac2d76f25969e0c..f54c3cca05ead0b34fa3afe87395f309e17e8e90 100644 (file)
@@ -31,4 +31,6 @@ libfrontends_la_SOURCES = \
        Timeout.C \
        Timeout.h \
        Toolbar.C \
-       Toolbar.h
+       Toolbar.h \
+       LyXView.C \
+       LyXView.h
index 013220b30c2f1f3c32bc0a6fdcb9187feb08093b..c9028c63f8e404c00917017549c7d4f0c38a58ba 100644 (file)
@@ -1,3 +1,36 @@
+2002-05-23  John Levon  <moz@compsoc.man.ac.uk>
+
+       * ControlAboutlyx.C:
+       * ControlBibitem.C:
+       * ControlBibtex.C:
+       * ControlCharacter.C:
+       * ControlCitation.C:
+       * ControlCommand.C:
+       * ControlConnections.C:
+       * ControlERT.C:
+       * ControlError.C:
+       * ControlExternal.C:
+       * ControlFloat.C:
+       * ControlForks.C:
+       * ControlGraphics.C:
+       * ControlInclude.C:
+       * ControlIndex.C:
+       * ControlLog.C:
+       * ControlMinipage.C:
+       * ControlPreamble.C:
+       * ControlPrint.C:
+       * ControlRef.C:
+       * ControlSearch.C:
+       * ControlSendto.C:
+       * ControlShowFile.C:
+       * ControlSpellchecker.C:
+       * ControlTabularCreate.C:
+       * ControlTexinfo.C:
+       * ControlThesaurus.C:
+       * ControlToc.C:
+       * ControlUrl.C:
+       * ControlVCLog.C: LyXView moved into frontends
 2002-05-22  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
        * ControlExternal.C: add scoped_ptr.hpp
index d7d5412d1ddaabb8ef77033832a9127cb3466cfd..744f4bcd58449d7f13f6d6807556a56dbdaca1a3 100644 (file)
@@ -18,7 +18,7 @@
 #include "ButtonControllerBase.h"
 #include "ControlAboutlyx.h"
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "Lsstream.h"
 #include "BufferView.h"
 #include "gettext.h"
index b1e2b884b57769e011ca704fe66b0c8d97ea7c25..01aca772086d8e68353fd3e9ed0f19f2328fd4f8 100644 (file)
@@ -23,7 +23,7 @@
 #include "ButtonControllerBase.h"
 #include "ControlBibitem.h"
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "buffer.h"
 #include "BufferView.h"
 
index 085309becbd67785895a982e47ba5c88db53f022..e9cc2e44abfc1a9265d9ebd279e727f84fd4371b 100644 (file)
@@ -24,7 +24,7 @@
 #include "ButtonControllerBase.h"
 #include "ControlBibtex.h"
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "buffer.h"
 #include "BufferView.h"
 #include "lyxrc.h"
index a00011273a3ea46a910a7c1d07c9ae8fe1eb7eda..ddf3a08621509108dc68036ae221458c3bf2f3fb 100644 (file)
@@ -20,7 +20,7 @@
 #include "buffer.h"
 #include "Dialogs.h"
 #include "Liason.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "bufferview_funcs.h" // ToggleAndShow
 #include "gettext.h"
 #include "language.h"
index d7852e334db4d7518fff19fab530af17cfee083c..3b22dd7c98bd26110fbcf7c9e281cf2567b9a2a1 100644 (file)
@@ -23,7 +23,7 @@
 #include "ControlCitation.h"
 #include "buffer.h"
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 
 // need to #include this in _one_ of the ControlCommand-derived classses in
 // order to instantiate
index 35226c7c53177a8752471d9b783a9d2fc3feafc1..1eb3cab3cb4f666b0b44b36f724fbabaaa5a4e41 100644 (file)
@@ -23,7 +23,7 @@
 #include "ControlInset.tmpl"
 #include "buffer.h"
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "lyxfunc.h"
 #include "BufferView.h"
 
index ca90b5ee77ed5cd33b2378def3073379c89410ed..f2d3eb3173e77a1c440243a95d6eaba6ff7f99ea 100644 (file)
@@ -20,7 +20,7 @@
 #include "ViewBase.h"
 #include "ControlConnections.h"
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "buffer.h"
 
 using SigC::slot;
index 6115604b9a92d7f51c0466dde3bb259f61bc76ff..a237d2c0a296e5dc357d008fb5e9ad489b809e29 100644 (file)
@@ -22,7 +22,7 @@
 #include "ControlERT.h"
 #include "ControlInset.tmpl"
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "buffer.h"
 #include "BufferView.h"
 
index d6c94ea7697fc5d0e41624306cedb31a7ff38dbd..4d7696f915e52e34bb6de18bdc14978601879b25 100644 (file)
@@ -22,7 +22,7 @@
 #include "ControlError.h"
 #include "ControlInset.tmpl"
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "buffer.h"
 #include "insets/inseterror.h"
 
index 7de496d5b117f47e8377be4c9dd4576596ac44cb..403686f74031e51a635f23a91af0ea64aba64262 100644 (file)
@@ -25,7 +25,7 @@
 #include "ControlInset.tmpl"
 #include "Dialogs.h"
 #include "Liason.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "ViewBase.h"
 #include "buffer.h"
 #include "frontends/Alert.h"
index 64f22fde39a613f7c13c4baa4273f6bb5958d033..73a0c01e617de87cf649acf6216245252bca902c 100644 (file)
@@ -20,7 +20,7 @@
 #include "ControlFloat.h"
 #include "ControlInset.tmpl"
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "buffer.h"
 #include "BufferView.h"
 #include "insets/insetfloat.h"
index 4ffbfb82bcc972bf0970bd9419d7fa68b0975c2a..95c806125b24834ab4d817a88a7a0b192c62b80b 100644 (file)
@@ -17,7 +17,7 @@
 #include "ViewBase.h"
 
 #include "BufferView.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "lyxfunc.h"
 
 #include "frontends/Dialogs.h"
index b7b8d86fa874e3e1471f901ecb2966d259205b03..07690ba99d73c37f027783b295e5f1ea13b9ac7a 100644 (file)
@@ -30,7 +30,7 @@
 #include "buffer.h"
 #include "BufferView.h"
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "gettext.h"
 #include "lyxrc.h"
 
index a9134e0fbfed8372546e8ab02c0964c0a2fa7928..c289b026a132e892a53762b80f0e02a6ba495879 100644 (file)
@@ -23,7 +23,7 @@
 #include "Alert.h"
 #include "BufferView.h"
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "lyxfunc.h"
 #include "gettext.h"
 #include "helper_funcs.h"
index 6b2cd0702cbd7ba7262a895d35317049da9de847..b4ee8784f5ba8563d356a29aa68e3da38252c059 100644 (file)
@@ -22,7 +22,7 @@
 #include "ControlIndex.h"
 #include "buffer.h"
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 
 using SigC::slot;
 
index c878e050426e56b5d86077834960580ba0abfe46..d9ac1d4789ce799a30b91a608264667a38f9203f 100644 (file)
@@ -21,7 +21,7 @@
 #include "ViewBase.h"
 #include "ButtonControllerBase.h"
 #include "ControlLog.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "Dialogs.h"
 #include "lyxrc.h"
 #include "BufferView.h"
index f8fe7fe521abc8df26e41294c0596c0776f71b33..3cbd8579f8c6cfa784a43a8c991c701e31acd896 100644 (file)
@@ -22,7 +22,7 @@
 #include "ControlMinipage.h"
 #include "ControlInset.tmpl"
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "buffer.h"
 #include "BufferView.h"
 #include "helper_funcs.h"
index 814b518289e24ff9c3d1d899b011d3c011e92f5d..20bbcc9a47a1448884f310810ec0fac96e44d6e1 100644 (file)
@@ -15,7 +15,7 @@
 #include "ViewBase.h"
 #include "ButtonControllerBase.h"
 #include "ControlPreamble.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "Dialogs.h"
 #include "buffer.h"
 #include "lyxrc.h"
index 0526472a5fc0ca6d5d8643ab50e4fed015f7565d..37673096bc7e1f1c421e71411f5ee3c42da18e05 100644 (file)
@@ -23,7 +23,7 @@
 #include "ControlPrint.h"
 #include "buffer.h"
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "PrinterParams.h"
 #include "Liason.h"
 #include "helper_funcs.h"
index 5aac880b9cf3665848e3d5092287498232d61b8c..4f98837756d1a969c2e7fd4137d7115ea7cfe861 100644 (file)
 #include "ButtonControllerBase.h"
 #include "ControlRef.h"
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "buffer.h"
 #include "lyxfunc.h"
 #include "bufferlist.h"
 #include "support/filetools.h" // MakeAbsPath, MakeDisplayPath
+#include "debug.h"
 
 using SigC::slot;
 using std::vector;
index 958238e2ac1152262bd44de24ee5b9b4289b88c9..46a971191a0323e05c90f95cef12731769b3d7f9 100644 (file)
@@ -22,7 +22,7 @@
 #include "ControlSearch.h"
 #include "Dialogs.h"
 #include "Liason.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "buffer.h"
 #include "lyxfind.h"
 #include "debug.h"
index 93e1467f0b3e16012179918e707ce72c876fc2a4..993536124c5ec7bfb16900f0f3e7146ba913008b 100644 (file)
@@ -17,7 +17,7 @@
 #include "ButtonControllerBase.h"
 #include "ControlSendto.h"
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "BufferView.h"
 #include "buffer.h"
 #include "converter.h"
index f46100860b205090292e92d6f7bb43bb9003f617..90f8d2628ab8c634e950acbaa8eddae0b7a5a444 100644 (file)
@@ -17,7 +17,7 @@
 #include "ButtonControllerBase.h"
 #include "ControlShowFile.h"
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "BufferView.h"
 #include "gettext.h"
 #include "support/filetools.h" // FileSearch
index c4e66b5443cee3a0e78ace9fb2fe54845f939b73..01c24bf606cba119590d302b902408fd82645fce 100644 (file)
@@ -33,7 +33,7 @@
 #include "buffer.h"
 #include "lyxrc.h"
 #include "BufferView.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "lyxtext.h"
 #include "gettext.h"
 #include "support/lstrings.h"
index ad7661e1308a5ac5ea4ae1333036ce8196896da7..229732a6a90384c624220c97d568c985390e7b6b 100644 (file)
@@ -21,7 +21,7 @@
 #include "ControlTabularCreate.h"
 #include "BufferView.h"
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "lyxfunc.h"
 #include "support/lstrings.h"
 
index 280be5d4a80b88b3fdb56e6d2c9b00ddd275a12e..040192ce35becb13c33de9872a43035b0bc661fc 100644 (file)
@@ -21,7 +21,7 @@
 #include "ButtonControllerBase.h"
 #include "ControlTexinfo.h"
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "BufferView.h"
 #include "gettext.h"
 #include "support/filetools.h" // FileSearch
index 7486a4e4e9c52cf78ae03b013729d63aab3f93e4..44ac51393132e8bb017bac7f54b8368d07f48b01 100644 (file)
@@ -17,7 +17,7 @@
 #include "ControlThesaurus.h"
 #include "Dialogs.h"
 #include "Liason.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "lyxfind.h"
 #include "buffer.h"
 #include "debug.h"
index 20a9f596d1931d380813a24d71e97c007dcdfd01..65d509ad57ff883c7c65f5eba1e24c19722e8ad9 100644 (file)
@@ -22,7 +22,7 @@
 #include "ControlToc.h"
 #include "buffer.h"
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "lyxfunc.h"
 #include "support/lstrings.h" // tostr
 #include "gettext.h"
index 174663f2be1856f7d275bcb50f1f43f57e3379fc..96a8de56832f200b6bd488c44dbd5adce1ab9a9a 100644 (file)
@@ -21,7 +21,7 @@
 #include "ButtonControllerBase.h"
 #include "ControlUrl.h"
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "buffer.h"
 
 using SigC::slot;
index 4e79491e8c6e7ef387abdd5a51b5e2a6602f0eb7..e877b69f4b679eed401a6804ab1c052c23c40b92 100644 (file)
@@ -25,7 +25,7 @@
 #include "ControlVCLog.h"
 #include "buffer.h"
 #include "BufferView.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "Dialogs.h"
 #include "lyxrc.h"
 #include "support/lyxlib.h"
index 9f6e784405df0a7dae5e166b72b05598b72dfd2d..ffd4e439839596cb1557987455d930d05435b7c5 100644 (file)
@@ -1,3 +1,7 @@
+2002-05-23  John Levon  <moz@compsoc.man.ac.uk>
+
+       * FileDialog.C: LyXView moved into frontends/
 2002-04-09  Michael A. Koziarski  <michael@koziarski.com>
 
        * dialoges/GERT.glade
index 048129a267f644e6a9e183a42ad9979e524fe3a1..94e9627886faf64ba411ee1f72a7063c1bf098a1 100644 (file)
@@ -17,7 +17,7 @@
 #include "gettext.h"
 
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "gnomeBC.h"
 #include "Tooltips.h"
 #include "GUI.h"
index 3d573507535d13bcaa90c244974f52b6aa37db41..8e950eb807209bbd5444098e01075f18675bdd6e 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <sigc++/signal_system.h>
 
-#include "LyXView.h" // This is only needed while we have the xforms part!
+#include "frontends/LyXView.h" // This is only needed while we have the xforms part!
 #include "bufferview_funcs.h"
 // FileDialog::Private
 
index b8d24b4bd0fc2555d3613e67f8cffd04cd9e074a..f753743bce0d20334760c240d1b672df2198b2c0 100644 (file)
@@ -1,3 +1,7 @@
+2002-05-23  John Levon  <moz@compsoc.man.ac.uk>
+
+       * QtLyXView.h: moved into frontends/
 2002-05-22  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
        * QDocument.h: use more specific smart_ptr header.
index 46288fe08393d17bedb89eace7156a35940fae5d..aca4b635a4b1dafe63fe55e483dc7d6c91d7df1e 100644 (file)
@@ -10,4 +10,4 @@
  */
 
 #undef emit
-#include "LyXView.h"
+#include "frontends/LyXView.h"
index f198ce1c72100139e0affd5b9c1b538ecbd662be..35834cf5b057dc70e190b0e9a7edda055e7848f9 100644 (file)
@@ -1,3 +1,24 @@
+2002-05-23  John Levon  <moz@compsoc.man.ac.uk>
+
+       * DropDown.h:
+       * FileDialog.C:
+       * FormBaseDeprecated.C:
+       * FormDocument.C:
+       * FormIndex.C:
+       * FormInset.C:
+       * FormMathsBitmap.C:
+       * FormMathsDelim.C:
+       * FormMathsMatrix.C:
+       * FormMathsPanel.C:
+       * FormParagraph.C:
+       * FormPreferences.C:
+       * FormPrint.C:
+       * FormTabular.C:
+       * Makefile.am:
+       * XFormsView.h:
+       * XFormsView.C: LyXView is now in frontends/,
+       XFormsView moved to here
+        
 2002-05-23  John Levon  <moz@compsoc.man.ac.uk>
 
        * Makefile.am:
index e5be63abc4b4e7e86c9e888b8e459eda348be243..42eeac46cf7ce911f241637666beaab93f142125 100644 (file)
@@ -14,7 +14,7 @@
 #pragma interface
 #endif
 
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include <sigc++/signal_system.h>
 #include "LString.h"
 #include FORMS_H_LOCATION
index ade7afffbdbf04ac68e1d98ce996c48489efc70d..fc8b0e10e512690c2998390d42cbfb72e51865fa 100644 (file)
@@ -17,7 +17,7 @@
 // temp. hack until Allow/prohibitInput is not
 // needed any more in src/ - for now it's simplest
 // to leave it there
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "bufferview_funcs.h"
 #include "gettext.h"
 #include "commandtags.h"
index 41c808f0c425c54fb96a84464d599ccd7cc71c55..8b5b2fe731341571e0dc2227f750b6a842fc0782 100644 (file)
@@ -18,7 +18,7 @@
 #include "xforms_resize.h"
 #include "GUIRunTime.h"
 #include "Tooltips.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "lyxrc.h"
 #include "support/LAssert.h"
 
@@ -98,7 +98,7 @@ void FormBaseDeprecated::show()
        }
 
        fl_freeze_form(form());
-       update();  // make sure its up-to-date
+       update();
        fl_unfreeze_form(form());
 
        if (form()->visible) {
index ec42fc7be1e5c58458254f399b0ec466942bf1ae..40e553cc31ab9426169710a657e351d22c48c40b 100644 (file)
@@ -27,7 +27,7 @@
 #include "bmtable.h"
 #include "language.h"
 #include "frnt_lang.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "lyxfunc.h"
 #include "lyxrc.h"
 #include "BufferView.h"
index 369fa138b2fd340f40929494f269c0d9e6d3556b..98aa975cbe2cffa9102f41519cc4f8091e41bc0e 100644 (file)
@@ -15,7 +15,7 @@
 #include "xformsBC.h"
 #include "ControlIndex.h"
 #include "FormIndex.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "form_index.h"
 
 typedef FormCB<ControlIndex, FormDB<FD_form_index> > base_class;
index 5f6c102cc5d021f8fbcf5ff364a636931c58e908..34a1cb71571a0e2f98aec3d58e074010dbed9bbe 100644 (file)
@@ -15,7 +15,7 @@
 #endif
 
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "FormInset.h"
 #include "xformsBC.h"
 
index 4a5423c8d7d08c8f35e33ee0a45c4fef8f31cb68..39bec4ad147115277c6e5b2e6241f7b0a9e546cb 100644 (file)
@@ -21,7 +21,7 @@
 #include "FormMathsBitmap.h"
 
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "bmtable.h"
 #include "debug.h"
 #include "xforms_helpers.h"
index a744c3524f8ed1e7774a2d0318553dc3561e78e2..257dcd073541d39948aceb8a8b31af812b312bec 100644 (file)
@@ -18,7 +18,7 @@
 #include "FormMathsDelim.h"
 #include "form_maths_delim.h"
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "bmtable.h"
 #include "debug.h"
 #include "support/lstrings.h"
index 3e4ae0e14e1746062991246671a7c5f6a56f1722..b443c57b3d241f47442f8a3be9bf201f05d48ddb 100644 (file)
@@ -20,7 +20,7 @@
 #include "FormMathsMatrix.h"
 #include "form_maths_matrix.h"
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "Lsstream.h"
 #include "lyxfunc.h"
 #include "support/LAssert.h"
index 00ccc448917ddaaac8cd83349e2b87bd1aad3664..a9cc5b6dd97a5e22a4a325414b9f00e3db6e214a 100644 (file)
@@ -16,7 +16,7 @@
 #endif
 
 #include "Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "FormMathsPanel.h"
 #include "form_maths_panel.h"
 #include "MathsSymbols.h"
index 610035ba2873910aea8c0b0f09bd3cc85cc376f8..67ca2674cfa422758d001c082e5a96c16f18c14f 100644 (file)
@@ -18,7 +18,7 @@
 #include "form_paragraph.h"
 #include "Dialogs.h"
 #include "Liason.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "buffer.h"
 #include "lyxtext.h"
 #include "xforms_helpers.h"
index 34dee4f661b24d7e8ddef6e37cd185ca008f8358..12b6aae30b104c88adf0ba98e87fcb8cc2ad90dc 100644 (file)
@@ -20,7 +20,7 @@
 #include "buffer.h"
 #include "converter.h"
 #include "debug.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "language.h"
 #include "frnt_lang.h"
 #include "lyxfunc.h"
index 340424dfbc3362e2684b9acf45484fa96e159b37..41924a46d2afb6065ff19826ebbedcf3d6759a6a 100644 (file)
@@ -18,7 +18,7 @@
 #include "FormPrint.h"
 #include "form_print.h"
 
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 
 #include "PrinterParams.h"
 
index 5b58392bb0851e7244387da50e962ff370c92e2d..d9c1899ad78f00630ab21a17aa0f2a1bb0994984 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "FormTabular.h"
 #include "form_tabular.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "Dialogs.h"
 #include "buffer.h"
 #include "xforms_helpers.h"
index a774fa5098374cc7002be035f34e844a3336bd8a..f32f0f37afce51c42b07239a5bce841b608f68d1 100644 (file)
@@ -208,8 +208,10 @@ libxforms_la_SOURCES = \
        Toolbar_pimpl.h \
        Tooltips.C \
        Tooltips.h \
-       XPainter.h \
+       XFormsView.C \
+       XFormsView.h \
        XPainter.C \
+       XPainter.h \
        xforms_helpers.C \
        xforms_helpers.h \
        xforms_resize.C \
diff --git a/src/frontends/xforms/XFormsView.C b/src/frontends/xforms/XFormsView.C
new file mode 100644 (file)
index 0000000..bb73db7
--- /dev/null
@@ -0,0 +1,258 @@
+/* This file is part of
+ * ======================================================
+ *
+ *           LyX, The Document Processor
+ *
+ *           Copyright 1995 Matthias Ettrich
+ *           Copyright 1995-2001 The LyX Team.
+ *
+ * ====================================================== */
+
+#include <config.h>
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include "XFormsView.h"
+#if FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5)
+#include "lyxlookup.h"
+#endif
+#include "minibuffer.h"
+#include "debug.h"
+#include "intl.h"
+#include "lyxrc.h"
+#include "support/filetools.h"        // OnlyFilename()
+#include "frontends/Toolbar.h"
+#include "frontends/Menubar.h"
+#include "frontends/Timeout.h"
+#include "MenuBackend.h"
+#include "ToolbarDefaults.h"
+#include "lyxfunc.h"
+#include "BufferView.h"
+
+using std::endl;
+
+//extern void AutoSave(BufferView *);
+extern void QuitLyX();
+
+// This is very temporary
+BufferView * current_view;
+
+extern "C" {
+
+static
+int C_XFormsView_atCloseMainFormCB(FL_FORM * form, void * p)
+{
+       return XFormsView::atCloseMainFormCB(form, p);
+}
+
+}
+
+
+XFormsView::XFormsView(int width, int height)
+       : LyXView()
+{
+       create_form_form_main(width, height);
+       fl_set_form_atclose(form_, C_XFormsView_atCloseMainFormCB, 0);
+
+       // Connect the minibuffer signals
+       minibuffer->stringReady.connect(SigC::slot(getLyXFunc(),
+                                               &LyXFunc::miniDispatch));
+       minibuffer->timeout.connect(SigC::slot(getLyXFunc(),
+                                              &LyXFunc::initMiniBuffer));
+
+       // Make sure the buttons are disabled if needed.
+       updateToolbar();
+}
+
+
+XFormsView::~XFormsView() {}
+
+
+/// Redraw the main form.
+void XFormsView::redraw() {
+       lyxerr[Debug::INFO] << "XFormsView::redraw()" << endl;
+       fl_redraw_form(form_);
+       getMiniBuffer()->redraw();
+}
+
+
+FL_FORM * XFormsView::getForm() const
+{
+       return form_;
+}
+
+
+// Callback for close main form from window manager
+int XFormsView::atCloseMainFormCB(FL_FORM *, void *)
+{
+       QuitLyX();
+       return FL_IGNORE;
+}
+
+
+void XFormsView::setPosition(int x, int y)
+{
+       fl_set_form_position(form_, x, y);
+}
+
+
+void XFormsView::show(int place, int border, string const & title)
+{
+       fl_set_form_minsize(form_, form_->w, form_->h);
+       fl_show_form(form_, place, border, title.c_str());
+       getLyXFunc()->initMiniBuffer();
+#if FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5)
+       InitLyXLookup(fl_get_display(), form_->window);
+#endif
+}
+
+
+void XFormsView::create_form_form_main(int width, int height)
+       /* to make this work as it should, .lyxrc should have been
+        * read first; OR maybe this one should be made dynamic.
+        * Hmmmm. Lgb.
+        * We will probably not have lyxrc before the main form is
+        * initialized, because error messages from lyxrc parsing
+        * are presented (and rightly so) in GUI popups. Asger.
+        */
+{
+       // the main form
+       form_ = fl_bgn_form(FL_NO_BOX, width, height);
+       form_->u_vdata = this;
+       FL_OBJECT * obj = fl_add_box(FL_FLAT_BOX, 0, 0, width, height, "");
+       fl_set_object_color(obj, FL_MCOL, FL_MCOL);
+
+       // Parameters for the appearance of the main form
+       int const air = 2;
+       int const bw = abs(fl_get_border_width());
+
+       //
+       // THE MENUBAR
+       //
+       menubar = new Menubar(this, menubackend);
+
+       //
+       // TOOLBAR
+       //
+
+       toolbar = new Toolbar(this, air, 30 + air + bw, toolbardefaults);
+
+       // Setup the toolbar
+       toolbar->set(true);
+
+       //
+       // WORKAREA
+       //
+
+       int const ywork = 60 + 2 * air + bw;
+       int const workheight = height - ywork - (25 + 2 * air);
+
+       ::current_view = bufferview = new BufferView(this, air, ywork,
+                                                    width - 3 * air,
+                                                    workheight);
+
+       //
+       // MINIBUFFER
+       //
+
+       minibuffer = new MiniBuffer(this, air, height - (25 + air),
+                                   width - (2 * air), 25);
+
+       //
+       // TIMERS
+       //
+
+       autosave_timeout->timeout.connect(SigC::slot(this, &XFormsView::AutoSave));
+
+       //
+       // Misc
+       //
+
+       //  assign an icon to main form
+       string iconname = LibFileSearch("images", "lyx", "xpm");
+       if (!iconname.empty()) {
+               unsigned int w, h;
+               Pixmap lyx_p, lyx_mask;
+               lyx_p = fl_read_pixmapfile(fl_root,
+                                          iconname.c_str(),
+                                          &w,
+                                          &h,
+                                          &lyx_mask,
+                                          0,
+                                          0,
+                                          0); // this leaks
+               fl_set_form_icon(form_, lyx_p, lyx_mask);
+       }
+
+       // set min size
+       fl_set_form_minsize(form_, 50, 50);
+
+       fl_end_form();
+
+       minibuffer->dd_init();
+}
+
+
+void XFormsView::init()
+{
+       // Set the textclass choice
+       invalidateLayoutChoice();
+       updateLayoutChoice();
+       updateMenubar();
+
+       // Start autosave timer
+       if (lyxrc.autosave) {
+               autosave_timeout->setTimeout(lyxrc.autosave * 1000);
+               autosave_timeout->start();
+       }
+
+       intl->InitKeyMapper(lyxrc.use_kbmap);
+}
+
+
+void XFormsView::setWindowTitle(string const & title, string const & icon_title)
+{
+       fl_set_form_title(form_, title.c_str());
+       fl_winicontitle(form_->window, icon_title.c_str());
+}
+
+
+// How should this actually work? Should it prohibit input in all BufferViews,
+// or just in the current one? If "just the current one", then it should be
+// placed in BufferView. If "all BufferViews" then LyXGUI (I think) should
+// run "prohibitInput" on all LyXViews which will run prohibitInput on all
+// BufferViews. Or is it perhaps just the (input in) BufferViews in the
+// current LyxView that should be prohibited (Lgb) (This applies to
+// "allowInput" as well.)
+void XFormsView::prohibitInput() const
+{
+       view()->hideCursor();
+
+       static Cursor cursor;
+       static bool cursor_undefined = true;
+
+       if (cursor_undefined) {
+               cursor = XCreateFontCursor(fl_get_display(), XC_watch);
+               XFlush(fl_get_display());
+               cursor_undefined = false;
+       }
+
+       /* set the cursor to the watch for all forms and the canvas */
+       XDefineCursor(fl_get_display(), getForm()->window, cursor);
+
+       XFlush(fl_get_display());
+       fl_deactivate_all_forms();
+}
+
+
+void XFormsView::allowInput() const
+{
+       /* reset the cursor from the watch for all forms and the canvas */
+
+       XUndefineCursor(fl_get_display(), getForm()->window);
+
+       XFlush(fl_get_display());
+       fl_activate_all_forms();
+}
diff --git a/src/frontends/xforms/XFormsView.h b/src/frontends/xforms/XFormsView.h
new file mode 100644 (file)
index 0000000..762bb32
--- /dev/null
@@ -0,0 +1,59 @@
+// -*- C++ -*-
+/* This file is part of
+ * ======================================================
+ *
+ *           LyX, The Document Processor
+ *
+ *           Copyright 1995 Matthias Ettrich
+ *           Copyright 1995-2001 The LyX Team.
+ *
+ * ====================================================== */
+
+#ifndef LyXView_H
+#define LyXView_H
+
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+#include FORMS_H_LOCATION
+
+#include "frontends/LyXView.h"
+
+/**
+  This class is the form containing the view of the buffer. The actual buffer
+  view is supposed (at least IMHO) to be another class, that shows its output
+  in one or more LyXView's.
+ */
+class XFormsView : public LyXView {
+public:
+       /// constructor
+       XFormsView(int w, int h);
+       /// destructor
+       ~XFormsView();
+       /// Where to place the form.
+       virtual void setPosition(int, int);
+       /// Show the main form.
+       virtual void show(int, int, string const & t = string("LyX"));
+       /// init (should probably be removed later) (Lgb)
+       virtual void init();
+       /// Redraw the main form.
+       virtual void redraw();
+       /// returns a pointer to the form.
+       FL_FORM * getForm() const;
+       ///
+       virtual void prohibitInput() const;
+       ///
+       virtual void allowInput() const;
+       /** This callback is run when a close event is sent from the
+         window manager. */
+       static int atCloseMainFormCB(FL_FORM *, void *);
+private:
+       /// pass the title, and the iconified title
+       virtual void setWindowTitle(string const &, string const &);
+       /// makes the main form.
+       void create_form_form_main(int width, int height);
+       /// A pointer to the form.
+       FL_FORM * form_;
+};
+#endif
index 563651d465e372b6db207709067a1845c16f8008..59b943a07d3687d49dbc219f2523d50d8c439ac9 100644 (file)
@@ -18,7 +18,7 @@
 
 #include "importer.h"
 #include "converter.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "lyxfunc.h"
 
 #include "bufferlist.h"
index e4ea1516f9b98695f666a65b2137c677c41137c7..291df21dd572d07a7f7f8a57d7b975276a973749 100644 (file)
@@ -1,3 +1,23 @@
+2002-05-23  John Levon  <moz@compsoc.man.ac.uk>
+
+       * insetbib.C:
+       * insetcite.C:
+       * inseterror.C:
+       * insetert.C:
+       * insetexternal.C:
+       * insetfloat.C:
+       * insetfloatlist.C:
+       * insetgraphics.C:
+       * insetinclude.C:
+       * insetindex.C:
+       * insetminipage.C:
+       * insetparent.C:
+       * insetref.C:
+       * insettabular.C:
+       * insettext.C:
+       * insettoc.C:
+       * inseturl.C: LyXView moved into frontends/
 2002-05-23  John Levon  <moz@compsoc.man.ac.uk>
 
        * inset.C:
index 8b4ca13d18711b14d6f1c152186beeb26c50bc4b..ec4547eba20d84d592b2b56d6e8a7290f017d792 100644 (file)
@@ -12,7 +12,7 @@
 #include "lyxtext.h"
 #include "lyxrc.h"
 #include "font.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "lyxtextclasslist.h"
 
 #include "frontends/Dialogs.h"
index edcfeb1e7d50689e4b3ab287ea782d487b337db4..a0b7ccf03bf29a35d6d03f395d6990bd4b75459d 100644 (file)
@@ -17,7 +17,7 @@
 #include "buffer.h"
 #include "BufferView.h"
 #include "LaTeXFeatures.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "debug.h"
 #include "gettext.h"
 
index 23924528ac61d01653edf140f871dd9f7c2d9c6d..f48761c02597d9c6243a0b8765ced2cddc93a207 100644 (file)
@@ -19,7 +19,7 @@
 #include "lyxfont.h"
 #include "gettext.h"
 #include "inseterror.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "frontends/Painter.h"
 #include "frontends/Dialogs.h"
 
index 8471c835795a3d404929cc98dc9517200dbb393f..67fa7d8c198ae98a347c23f3549437f972d72e29 100644 (file)
@@ -19,7 +19,7 @@
 #include "language.h"
 #include "buffer.h"
 #include "BufferView.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "lyxtext.h"
 #include "debug.h"
 #include "lyxtextclasslist.h"
index 35b8ace1b9ce5f1aa4b2fb27bebb446276d47b69..3a43e5069d6028c6cfa68dfaf3856cd4904fb6b8 100644 (file)
@@ -18,7 +18,7 @@
 #include "ExternalTemplate.h"
 #include "BufferView.h"
 #include "buffer.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "lyx_main.h"
 #include "LaTeXFeatures.h"
 #include "gettext.h"
index c458a9560a70f0ea04ba05cd0012f1e1c122f9bb..cc733c4226cc621de6caceb94f4fec0dee0a9138 100644 (file)
@@ -26,7 +26,7 @@
 #include "debug.h"
 #include "Floating.h"
 #include "buffer.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "frontends/Dialogs.h"
 
 using std::ostream;
index 7c146848c2179004318197eec0d3ffb9fae5dcf0..579989b37822258ac8333289e388ed1df17c1e63 100644 (file)
@@ -8,7 +8,7 @@
 #include "FloatList.h"
 #include "LaTeXFeatures.h"
 #include "frontends/Dialogs.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "BufferView.h"
 #include "buffer.h"
 #include "gettext.h"
index 3ba1248838753c6be70bdeebf3cccc7b85c8caab..f440b269910f5ed49788200954c7e2705eda27e7 100644 (file)
@@ -81,7 +81,7 @@ TODO Before initial production release:
 #include "graphics/GraphicsCache.h"
 #include "graphics/GraphicsImage.h"
 
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "lyxtext.h"
 #include "buffer.h"
 #include "BufferView.h"
index 8d4370243f484c4a004a2a19b7d97741b39b431e..3bda5bea60c1a4c1919bb674868452afa4cc399c 100644 (file)
@@ -10,7 +10,7 @@
 #include "BufferView.h"
 #include "debug.h"
 #include "lyxrc.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "LaTeXFeatures.h"
 #include "gettext.h"
 #include "lyxtextclasslist.h"
index 1e673e71ec8eae643ce69a22388fb36e8fd1c69a..85f2d2f395d0cffffab9db4033a5390c766b4e30 100644 (file)
@@ -6,7 +6,7 @@
 
 #include "insetindex.h"
 #include "BufferView.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "frontends/Dialogs.h"
 #include "LaTeXFeatures.h"
 #include "gettext.h"
index 9440b3def18b64e82fb2206cf3a5b100dad58802..91bef6d40c0c3f221011ddaad911c603ee735bfc 100644 (file)
@@ -17,7 +17,7 @@
 #include "gettext.h"
 #include "lyxfont.h"
 #include "BufferView.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "frontends/Dialogs.h"
 #include "lyxtext.h"
 #include "insets/insettext.h"
index f516755bd15eaf1550640e6ee44e7b1e0ec6203c..90f2d98fb40f6ee8735e000e2f049bfd97f81da6 100644 (file)
@@ -20,7 +20,7 @@
 #include "insetparent.h"
 #include "support/filetools.h"
 #include "BufferView.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "support/LOstream.h"
 #include "commandtags.h"
 #include "buffer.h"
index 1ad1209070c318325ff017d2155ecb05c9e79853..c9ad260e20d09be1f4a52f54f3084e4e4190787f 100644 (file)
@@ -10,7 +10,7 @@
 #include "debug.h"
 #include "gettext.h"
 #include "LaTeXFeatures.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "frontends/Dialogs.h"
 #include "lyxfunc.h"
 #include "BufferView.h"
index 6c65dca7fffb4ee159b8204f8a8c6abcd95ec443..f486a217f77922ef2955d762ae5c8466c21e6342 100644 (file)
@@ -25,7 +25,7 @@
 #include "frontends/Painter.h"
 #include "font.h"
 #include "lyxtext.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "insets/insettext.h"
 #include "debug.h"
 #include "gettext.h"
index 23741c9ebebcc1baef6bca0431aedb5c6a6ef59a..268613f621818a8fd0e10447deb02a6c61d820ae 100644 (file)
@@ -21,7 +21,7 @@
 #include "lyxfont.h"
 #include "commandtags.h"
 #include "buffer.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "BufferView.h"
 #include "lyxtextclasslist.h"
 #include "LaTeXFeatures.h"
index 843dad55e9c63c5a5c780c18a365c565c09e6e79..5ba5af06657c93bf468b41561e85834fff4944c4 100644 (file)
@@ -7,7 +7,7 @@
 #include "gettext.h"
 #include "insettoc.h"
 #include "BufferView.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "frontends/Dialogs.h"
 #include "debug.h"
 #include "buffer.h"
index d52b6afaafacc95e1655977a51975d8cdc7f4c18..1fbad24d33c909fddfb51fcf5adf298ef75433d0 100644 (file)
@@ -7,7 +7,7 @@
 #include "inseturl.h"
 #include "BufferView.h"
 #include "LaTeXFeatures.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "debug.h"
 #include "frontends/Dialogs.h"
 #include "support/lstrings.h"
index acd2dc171b61fdc03abe9b4c2e8ddf83204c5237..7d52cadc5d5f7f2f9f615ba98439adab4f16e225 100644 (file)
@@ -17,7 +17,7 @@
 #include "bufferview_funcs.h"
 #include "debug.h"
 #include "lastfiles.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "lyxrc.h"
 #include "lyxtext.h"
 #include "gettext.h"
index aff0e0fe87819ed5beedd4473f3ab724f611dbba..6bfe005cfd5f66c7cc6f8dac7ad533bc2099c52a 100644 (file)
@@ -20,7 +20,7 @@
 #include "lyx_main.h"
 #include "debug.h"
 #include "version.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "buffer.h"
 #include "BufferView.h"
 #include "lyxserver.h"
@@ -90,7 +90,7 @@ int LyX_XErrHandler(Display * display, XErrorEvent * xeev)
        lyxerr << etxt << " id: " << xeev->resourceid << endl;
        // By doing an abort we get a nice backtrace. (hopefully)
        lyx::abort();
-       return 0; // Solaris CC wants us to return something
+       return 0;
 }
 
 }
index 7f8e5bb0ba62f70d59a8ff8082e8285b125e27ca..bc3da055e9bdf6a2b5880aa5cd7f65f058d87cc0 100644 (file)
@@ -17,7 +17,7 @@
 
 #include "lyx_main.h"
 #include "lyx_gui.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "lyxfunc.h"
 #include "lyxrc.h"
 #include "buffer.h"
index 7e42daca2d64a9abc3f228930cd0437858d1de32..72784eff1aa02e59f4b74c33c7881296c18cfd7b 100644 (file)
@@ -6,7 +6,7 @@
 
 #include "lyxtext.h"
 #include "lyxfind.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "frontends/Alert.h"
 #include "support/textutils.h"
 #include "support/lstrings.h"
index e71a977d1db6b0d9d3221eea704a0aca003be7d8..50359223001cfd8317e51542fa325cbe7f9e464e 100644 (file)
@@ -36,7 +36,7 @@
 #include "bufferview_funcs.h"
 #include "minibuffer.h"
 #include "vspace.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "FloatList.h"
 #include "converter.h"
 #include "exporter.h"
index 4431b6d30f67e0f43d819539375e580cad3c77aa..98c8edd01061d0586a5b18d8c9a4af457c38ba22 100644 (file)
@@ -10,7 +10,7 @@
 #include "buffer.h"
 #include "BufferView.h"
 #include "gettext.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "lyxfunc.h"
 
 #include "frontends/Alert.h"
index 6b84e4adaf3bbc4ccbbba15d6b0ec55af2926c4d..245fbae75ffa3dff77ddecfa7fbb987205185256 100644 (file)
@@ -1,3 +1,8 @@
+2002-05-23  John Levon  <moz@compsoc.man.ac.uk>
+
+       * formula.C:
+       * formulabase.C: LyXView moved into frontends/
 2002-05-23  John Levon  <moz@compsoc.man.ac.uk>
 
        * formula.C:
index 415b0e0f42832e40c7e24c5ad55a734a671530b5..a35e90862efc2cb05242a0517603c3b2d44afee4 100644 (file)
@@ -35,7 +35,7 @@
 #include "support/LAssert.h"
 #include "support/systemcall.h"
 #include "support/filetools.h" // LibFileSearch
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "frontends/Painter.h"
 #include "lyxrc.h"
 #include "math_hullinset.h"
index 865faf702638c4f4e98cec7e0a729e5280aa2c91..e01e2c858b43cf6317aa9c6ca5dace8adabcebc6 100644 (file)
@@ -33,7 +33,7 @@
 #include "debug.h"
 #include "math_support.h"
 #include "support/lstrings.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "frontends/Painter.h"
 #include "font.h"
 #include "Lsstream.h"
index 92a307dfc73d5040f4d3a1ddfc9496d567efbf61..bbc4f92c097e7db656a8c7f8d26b15240e15afba 100644 (file)
 
 // FIXME: temporary
 #include "frontends/xforms/DropDown.h"
+#include "frontends/xforms/XFormsView.h"
 
 #include "minibuffer.h"
 
 #include "support/lyxalgo.h"
 #include "support/filetools.h"
 #include "support/lstrings.h"
-#include "LyXView.h"
-#include "XFormsView.h"
+#include "frontends/LyXView.h"
 #include "gettext.h"
 #include "LyXAction.h"
 #include "BufferView.h"
index 469e0e929f5b4fd95582ac1845bdc0513448c447..1b28196ab02e42f4275451eb59e695bbc16f9021 100644 (file)
@@ -19,7 +19,7 @@
 #include "buffer.h"
 #include "debug.h"
 #include "lyxrc.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "frontends/Painter.h"
 #include "tracer.h"
 #include "font.h"
index f45841a81069ef4824495af06f2fa5de714027ad..dd00754792007ddc06eb919d063c98cad23c6b94 100644 (file)
 #include "LString.h"
 #include "paragraph.h"
 #include "lyxtextclasslist.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "undo_funcs.h"
 #include "buffer.h"
 #include "bufferparams.h"
 #include "gettext.h"
 #include "BufferView.h"
-#include "LyXView.h"
 #include "CutAndPaste.h"
 #include "frontends/Painter.h"
 #include "font.h"
index 57ba8d0421249c7b657b5628e46689f342b41099..7fee999c8ff381540ef6498102087378f657ef5b 100644 (file)
@@ -4,7 +4,7 @@
 #pragma implementation
 #endif
 
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "trans.h"
 #include "support/filetools.h"
 #include "support/lstrings.h"
index c4336d48e7fda94429b2f919bbf1a9fba06c9c3f..a0efd43e0c7bec16a3f47c4b5f09b6df640fbfb6 100644 (file)
@@ -8,7 +8,7 @@
 #include "debug.h"
 #include "buffer.h"
 #include "BufferView.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "lyxfunc.h"
 
 #include "support/FileInfo.h"