#include "update_flags.h"
#include "support/strfwd.h"
#include "support/types.h"
#include "update_flags.h"
#include "support/strfwd.h"
#include "support/types.h"
+ /// \return Tool tip for the given position.
+ docstring toolTip(int x, int y) const;
+ /// \return the context menu for the given position.
+ docstring contextMenu(int x, int y) const;
/// Save the current position as bookmark.
/// if idx == 0, save to temp_bookmark
/// Save the current position as bookmark.
/// if idx == 0, save to temp_bookmark
- /// center the document view around the cursor.
- void center();
+ /// Ensure the cursor is visible.
+ /// This method will automatically scroll and update the BufferView and updated
+ /// if needed.
+ void showCursor();
+ /// LFUN_SCROLL Helper.
+ void lfunScroll(FuncRequest const & cmd);
/// scroll down document by the given number of pixels.
void scrollDown(int pixels);
/// scroll up document by the given number of pixels.
/// scroll down document by the given number of pixels.
void scrollDown(int pixels);
/// scroll up document by the given number of pixels.
/// translate and insert a character, using the correct keymap.
void translateAndInsert(char_type c, Text * t, Cursor & cur);
/// return true for events that will handle.
FuncStatus getStatus(FuncRequest const & cmd);
/// execute the given function.
/// translate and insert a character, using the correct keymap.
void translateAndInsert(char_type c, Text * t, Cursor & cur);
/// return true for events that will handle.
FuncStatus getStatus(FuncRequest const & cmd);
/// execute the given function.
- /// \return the Update::flags for further metrics update.
- Update::flags dispatch(FuncRequest const & argument);
+ /// \return true if the function has been processed.
+ bool dispatch(FuncRequest const & argument);
void putSelectionAt(DocIterator const & cur,
int length, bool backwards);
void putSelectionAt(DocIterator const & cur,
int length, bool backwards);
- void showDialogWithData(std::string const & name, std::string const & data);
-
- /// This signal is emitted when some inset dialogs needs to be shown.
- void showInsetDialog(std::string const & name, std::string const & data,
- Inset * inset);
+ void showDialog(std::string const & name, std::string const & data,
+ Inset * inset = 0);
/// This signal is emitted when some dialogs needs to be updated.
void updateDialog(std::string const & name, std::string const & data);
/// This signal is emitted when some dialogs needs to be updated.
void updateDialog(std::string const & name, std::string const & data);
// the position relative to (0, baseline) of outermost paragraph
Point coordOffset(DocIterator const & dit, bool boundary) const;
/// Update current paragraph metrics.
/// \return true if no further update is needed.
bool singleParUpdate();
// the position relative to (0, baseline) of outermost paragraph
Point coordOffset(DocIterator const & dit, bool boundary) const;
/// Update current paragraph metrics.
/// \return true if no further update is needed.
bool singleParUpdate();
/// Search recursively for the the innermost inset that covers (x, y) position.
/// \retval 0 if no inset is found.
/// Search recursively for the the innermost inset that covers (x, y) position.
/// \retval 0 if no inset is found.
Text const & text, //< The Text where we start searching.
int x, //< x-coordinate on screen
int y //< y-coordinate on screen
Text const & text, //< The Text where we start searching.
int x, //< x-coordinate on screen
int y //< y-coordinate on screen