FontMetrics.h
KeyModifier.h
KeySymbol.h
- LyXView.h
mouse_state.h
Painter.h
Selection.h
}
-// Should probably be moved to somewhere else: BufferView? LyXView?
+// Should probably be moved to somewhere else: BufferView? GuiView?
bool Buffer::save() const
{
// We don't need autosaves in the immediate future. (Asger)
namespace frontend {
class Application;
-class LyXView;
}
namespace graphics {
/// Execute LyX.
int exec(int & argc, char * argv[]);
- ///
- frontend::LyXView * newLyXView();
-
private:
/// noncopyable
LyX(LyX const &);
// The correct solution would be to have a
// specialized (non-gui) BufferView. But how do
// we do it now? Probably we should just let it
- // connect to the lyxfunc in the single LyXView we
+ // connect to the lyxfunc in the single GuiView we
// support currently. (Lgb)
FuncRequest const fr(lyxaction.lookupFunc(cmd), arg);
class Clipboard;
class FontLoader;
-class Gui;
-class LyXView;
class Selection;
/// The main application class
Application (this is the frontend really, should probably be renamed).
|
- LyXView-1 (one or more in case of split-view mode).
+ GuiView-1 (one or more in case of split-view mode).
| |
| <tab-widget-1-1>
| | |
| |
| <tab-widget-1-2>
|
- LyXView-2 (one or more in case of split-view mode).
+ GuiView-2 (one or more in case of split-view mode).
| |
| <tab-widget-2-1>
| | |
- etc.
- 4) The Window: \c LyXView (and its qt4 specialisation \c GuiView)
+ 4) The Window: \c GuiView
This is a full window containing a menubar, toolbars and a central
- widget. A LyXView is in charge of creating and closing a View for a
+ widget. A GuiView is in charge of creating and closing a View for a
given Buffer.
In the qt4 specialisation, \c GuiView, the central widget is a tab
widget. Each tab is reverved to the visualisation of one Buffer and
- contains one WorkArea. In the qt4 frontend, one LyXView thus contains
+ contains one WorkArea. In the qt4 frontend, one GuiView thus contains
multiple WorkAreas but this number can limited to one for another
frontend. The idea is that the kernel should not know how a Buffer
is displayed on screen; it's the frontend business.
Application() {}
///
virtual ~Application() {}
- ///
- virtual LyXView * currentWindow() = 0;
/// LyX dispatcher: executes lyx actions and does necessary
/// screen updates depending on results.
+++ /dev/null
-// -*- C++ -*-
-/**
- * \file LyXView.h
- * This file is part of LyX, the document processor.
- * Licence details can be found in the file COPYING.
- *
- * \author Lars Gullik Bjønnes
- * \author John Levon
- *
- * Full author contact details are available in file CREDITS.
- */
-
-#ifndef LYXVIEW_H
-#define LYXVIEW_H
-
-#include "support/strfwd.h"
-
-namespace lyx {
-
-namespace support { class FileName; }
-
-class Buffer;
-class BufferView;
-class Cursor;
-class DispatchResult;
-class FuncStatus;
-class FuncRequest;
-class Inset;
-
-namespace frontend {
-
-/**
- * LyXView - main LyX window
- *
- * This class represents the main LyX window and provides
- * accessor functions to its content.
- *
- * The eventual intention is that LyX will support a number
- * of containing LyXViews. Currently a lot of code still
- * relies on there being a single top-level view.
- *
- * Additionally we would like to support multiple views
- * in a single LyXView.
- */
-class LyXView
-{
-public:
- ///
- virtual ~LyXView() {}
-
- /// \name Generic accessor functions
- //@{
- /// The current BufferView refers to the BufferView that has the focus,
- /// including for example the one that is created when you use the
- /// advanced search and replace pane.
- /// \return the currently selected buffer view.
- virtual BufferView * currentBufferView() = 0;
- virtual BufferView const * currentBufferView() const = 0;
-
- /// The document BufferView always refers to the view's main document
- /// BufferView. So, even if the BufferView in e.g., the advanced
- /// search and replace pane has the focus.
- /// \return the current document buffer view.
- virtual BufferView * documentBufferView() = 0;
- virtual BufferView const * documentBufferView() const = 0;
- //@}
-
- /// display a message in the view
- virtual void message(docstring const &) = 0;
-
- ///
- virtual bool getStatus(FuncRequest const & cmd, FuncStatus & flag) = 0;
- /// dispatch command.
- /// \return true if the \c FuncRequest has been dispatched.
- virtual void dispatch(FuncRequest const & cmd, DispatchResult & dr) = 0;
-
- ///
- virtual void restartCursor() = 0;
-
- /// Update the completion popup and the inline completion state.
- /// If \c start is true, then a new completion might be started.
- /// If \c keep is true, an active completion will be kept active
- /// even though the cursor moved. The update flags of \c cur might
- /// be changed.
- virtual void updateCompletion(Cursor & cur, bool start, bool keep) = 0;
-};
-
-} // namespace frontend
-} // namespace lyx
-
-#endif // LYXVIEW_H
Delegates.h \
KeyModifier.h \
KeySymbol.h \
- LyXView.h \
Painter.h \
Clipboard.h \
Selection.h \
#define BASE_WORKAREA_H
#include "frontends/KeyModifier.h"
-#include "frontends/LyXView.h"
namespace lyx {
private:
/** The Dialog's name is the means by which a dialog identifies
- * itself to the LyXView.
+ * itself to the GuiView.
*/
QString const name_;
///
}
-LyXView * GuiApplication::currentWindow()
-{
- return current_view_;
-}
-
-
FuncStatus GuiApplication::getStatus(FuncRequest const & cmd) const
{
FuncStatus flag;
switch (cmd.action) {
// This could be used for the no-GUI version. The GUI version is handled in
- // LyXView::getStatus(). See above.
+ // GuiView::getStatus(). See above.
/*
case LFUN_BUFFER_WRITE:
case LFUN_BUFFER_WRITE_AS: {
void GuiApplication::gotoBookmark(unsigned int idx, bool openFile, bool switchToBuffer)
{
- LyXView * lv = current_view_;
+ GuiView * lv = current_view_;
LASSERT(lv, /**/);
if (!theSession().bookmarks().isValid(idx))
return;
if (lv == 0)
return;
- // Let the current LyXView dispatch its own actions.
+ // Let the current GuiView dispatch its own actions.
lv->dispatch(cmd, dr);
if (dr.dispatched() && lv )
return;
namespace frontend {
class GuiView;
-class LyXView;
class GlobalMenuBar;
class GuiWorkArea;
class Menus;
void dispatch(FuncRequest const &);
void dispatch(FuncRequest const &, DispatchResult & dr);
FuncStatus getStatus(FuncRequest const & cmd) const;
- LyXView * currentWindow();
void dispatchDelayed(FuncRequest const &);
void resetGui();
void restoreGuiSession();
///
void setGuiLanguage();
- /// This LyXView is the one receiving Clipboard and Selection
+ /// This GuiView is the one receiving Clipboard and Selection
/// events
GuiView * current_view_;
void GuiView::resetDialogs()
{
- // Make sure that no LFUN uses any LyXView.
+ // Make sure that no LFUN uses any GuiView.
guiApp->setCurrentView(0);
saveLayout();
menuBar()->clear();
#define GUI_VIEW_H
#include "frontends/Delegates.h"
-#include "frontends/LyXView.h"
#include "support/strfwd.h"
namespace lyx {
+namespace support { class FileName; }
+
+class Buffer;
+class BufferView;
class Cursor;
+class DispatchResult;
+class FuncStatus;
+class FuncRequest;
+class Inset;
namespace frontend {
class ToolbarInfo;
/**
- * GuiView - Qt4 implementation of LyXView
+ * GuiView - Qt4 main LyX window
*
- * qt4-private implementation of the main LyX window.
+ * This class represents the main LyX window and provides
+ * accessor functions to its content.
*
* Note: a QObject emits a destroyed(QObject *) Qt signal when it
* is deleted. This might be useful for closing other dialogs
* depending on a given GuiView.
*/
-class GuiView : public QMainWindow, public LyXView, public GuiBufferViewDelegate,
+class GuiView : public QMainWindow, public GuiBufferViewDelegate,
public GuiBufferDelegate
{
Q_OBJECT
~GuiView();
- /// \name LyXView inherited methods.
- //@{
int id() const { return id_; }
+
void setBusy(bool);
+
+ /// \name Generic accessor functions
+ //@{
+ /// The current BufferView refers to the BufferView that has the focus,
+ /// including for example the one that is created when you use the
+ /// advanced search and replace pane.
+ /// \return the currently selected buffer view.
BufferView * currentBufferView();
BufferView const * currentBufferView() const;
+
+ /// The document BufferView always refers to the view's main document
+ /// BufferView. So, even if the BufferView in e.g., the advanced
+ /// search and replace pane has the focus.
+ /// \return the current document buffer view.
BufferView * documentBufferView();
BufferView const * documentBufferView() const;
+
void newDocument(std::string const & filename,
bool fromTemplate);
+ /// display a message in the view
/// could be called from any thread
void message(docstring const &);
/// must be called from GUI thread
void updateMessage(QString const & str);
bool getStatus(FuncRequest const & cmd, FuncStatus & flag);
+ /// dispatch command.
+ /// \return true if the \c FuncRequest has been dispatched.
void dispatch(FuncRequest const & cmd, DispatchResult & dr);
+
void restartCursor();
+ /// Update the completion popup and the inline completion state.
+ /// If \c start is true, then a new completion might be started.
+ /// If \c keep is true, an active completion will be kept active
+ /// even though the cursor moved. The update flags of \c cur might
+ /// be changed.
void updateCompletion(Cursor & cur, bool start, bool keep);
+
+ ///
void setFocus();
- //@}
///
void focusInEvent(QFocusEvent * e);
void setGuiView(GuiView &);
///
void setFullScreen(bool full_screen);
- /// is LyXView in fullscreen mode?
+ /// is GuiView in fullscreen mode?
bool isFullScreen();
///
void scheduleRedraw() { schedule_redraw_ = true; }