1999-09-27 18:44:28 +00:00
|
|
|
// -*- C++ -*-
|
2002-06-12 02:54:19 +00:00
|
|
|
/**
|
|
|
|
* \file LyXView.h
|
2002-09-05 15:14:23 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-06-12 02:54:19 +00:00
|
|
|
*
|
2008-11-14 15:58:50 +00:00
|
|
|
* \author Lars Gullik Bjønnes
|
2002-12-01 22:59:25 +00:00
|
|
|
* \author John Levon
|
2002-09-05 14:10:50 +00:00
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2002-06-12 02:54:19 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LYXVIEW_H
|
|
|
|
#define LYXVIEW_H
|
1999-09-27 18:44:28 +00:00
|
|
|
|
2007-11-12 23:23:19 +00:00
|
|
|
#include "support/strfwd.h"
|
2007-08-23 16:31:58 +00:00
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
namespace lyx {
|
|
|
|
|
2006-12-02 16:07:15 +00:00
|
|
|
namespace support { class FileName; }
|
|
|
|
|
2001-07-03 15:19:04 +00:00
|
|
|
class Buffer;
|
2000-04-08 17:02:02 +00:00
|
|
|
class BufferView;
|
2008-02-29 09:18:46 +00:00
|
|
|
class Cursor;
|
2007-11-19 20:56:05 +00:00
|
|
|
class FuncStatus;
|
2007-08-14 09:54:59 +00:00
|
|
|
class FuncRequest;
|
|
|
|
class Inset;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
2006-06-20 08:39:16 +00:00
|
|
|
namespace frontend {
|
|
|
|
|
2002-06-12 02:54:19 +00:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
2007-11-12 22:35:43 +00:00
|
|
|
class LyXView
|
2007-10-02 18:27:20 +00:00
|
|
|
{
|
1999-09-27 18:44:28 +00:00
|
|
|
public:
|
2007-09-19 21:28:11 +00:00
|
|
|
///
|
2007-11-13 09:52:28 +00:00
|
|
|
virtual ~LyXView() {}
|
1999-09-27 18:44:28 +00:00
|
|
|
|
2002-06-12 11:34:13 +00:00
|
|
|
//@{ generic accessor functions
|
1999-09-27 18:44:28 +00:00
|
|
|
|
2009-08-22 16:16:56 +00:00
|
|
|
/// \return the currently selected buffer view.
|
2009-09-05 14:29:11 +00:00
|
|
|
virtual BufferView * currentBufferView() = 0;
|
|
|
|
virtual BufferView const * currentBufferView() const = 0;
|
2009-08-22 16:16:56 +00:00
|
|
|
/// \return the current document buffer view.
|
|
|
|
virtual BufferView * documentBufferView() = 0;
|
2009-09-05 14:29:11 +00:00
|
|
|
virtual BufferView const * documentBufferView() const = 0;
|
2009-09-23 19:49:36 +00:00
|
|
|
//@}
|
2000-07-25 10:46:18 +00:00
|
|
|
|
2002-06-12 11:34:13 +00:00
|
|
|
/// display a message in the view
|
2006-10-21 00:16:43 +00:00
|
|
|
virtual void message(docstring const &) = 0;
|
2002-06-18 15:44:30 +00:00
|
|
|
|
2007-11-19 20:56:05 +00:00
|
|
|
///
|
2008-05-22 15:01:36 +00:00
|
|
|
virtual bool getStatus(FuncRequest const & cmd, FuncStatus & flag) = 0;
|
2007-11-23 09:44:02 +00:00
|
|
|
/// dispatch command.
|
2007-11-26 14:36:50 +00:00
|
|
|
/// \return true if the \c FuncRequest has been dispatched.
|
2007-11-26 22:45:17 +00:00
|
|
|
virtual bool dispatch(FuncRequest const & cmd) = 0;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2007-11-13 09:52:28 +00:00
|
|
|
///
|
|
|
|
virtual void restartCursor() = 0;
|
2002-06-12 02:54:19 +00:00
|
|
|
|
2008-02-21 19:42:34 +00:00
|
|
|
/// 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
|
2008-02-29 09:18:46 +00:00
|
|
|
/// even though the cursor moved. The update flags of \c cur might
|
|
|
|
/// be changed.
|
|
|
|
virtual void updateCompletion(Cursor & cur, bool start, bool keep) = 0;
|
1999-09-27 18:44:28 +00:00
|
|
|
};
|
2002-06-12 02:54:19 +00:00
|
|
|
|
2007-08-14 09:54:59 +00:00
|
|
|
} // namespace frontend
|
2006-10-21 00:16:43 +00:00
|
|
|
} // namespace lyx
|
|
|
|
|
2002-06-12 02:54:19 +00:00
|
|
|
#endif // LYXVIEW_H
|