case LFUN_COMMAND_EXECUTE:
BOOST_ASSERT(lyx_view_);
- lyx_view_->showMiniBuffer(true);
+ lyx_view_->dispatch(cmd);
break;
case LFUN_CANCEL:
case LFUN_BUFFER_EXPORT:
BOOST_ASSERT(lyx_view_ && lyx_view_->buffer());
if (argument == "custom")
- lyx_view_->getDialogs().show("sendto");
+ lyx_view_->showDialog("sendto");
else
lyx_view_->buffer()->doExport(argument, false);
break;
if (name == "character") {
data = freefont2string();
if (!data.empty())
- lyx_view_->getDialogs().show("character", data);
+ lyx_view_->showDialogWithData("character", data);
} else if (name == "latexlog") {
Buffer::LogType type;
string const logfile = lyx_view_->buffer()->logName(&type);
break;
}
data += Lexer::quoteString(logfile);
- lyx_view_->getDialogs().show("log", data);
+ lyx_view_->showDialogWithData("log", data);
} else if (name == "vclog") {
string const data = "vc " +
Lexer::quoteString(lyx_view_->buffer()->lyxvc().getLogFile());
- lyx_view_->getDialogs().show("log", data);
+ lyx_view_->showDialogWithData("log", data);
} else
- lyx_view_->getDialogs().show(name, data);
+ lyx_view_->showDialogWithData(name, data);
break;
}
} else if (name == "paragraph") {
dispatch(FuncRequest(LFUN_PARAGRAPH_UPDATE));
} else if (name == "prefs") {
- lyx_view_->getDialogs().update(name, string());
+ lyx_view_->updateDialog(name, string());
}
break;
}
void updateToolbars();
ToolbarInfo * getToolbarInfo(std::string const & name);
void toggleToolbarState(std::string const & name, bool allowauto);
-
- /// show - display the top-level window
- void showView();
-
- /// menu item has been selected
- void activated(FuncRequest const &);
-
///
QMenu * createPopupMenu();
- ///
- void addTabWorkArea();
-
/// dispatch to current BufferView
void dispatch(FuncRequest const & cmd);
/// set a buffer to the current workarea.
void setBuffer(Buffer * b); ///< \c Buffer to set.
-Q_SIGNALS:
- void closing(int);
-
-public Q_SLOTS:
- /// idle timeout.
- /// clear any temporary message and replace with current status.
- void clearMessage();
+ /// GuiBufferDelegate.
+ ///@{
+ void resetAutosaveTimers();
+ void errors(std::string const &);
+ void structureChanged() { updateToc(); }
+ ///@}
+ ////
+ void showDialog(std::string const & name);
+ void showDialogWithData(std::string const & name,
+ std::string const & data);
+ void showInsetDialog(std::string const & name,
+ std::string const & data, Inset * inset);
+ void updateDialog(std::string const & name,
+ std::string const & data);
+
+ /// called on timeout
+ void autoSave();
///
- void updateWindowTitle(GuiWorkArea * wa);
+ void updateEmbeddedFiles();
- ///
- void on_currentWorkAreaChanged(GuiWorkArea *);
+ /// \return the current buffer view.
+ BufferView * view();
- /// slots to change the icon size
- void smallSizedIcons();
- void normalSizedIcons();
- void bigSizedIcons();
+ /// get access to the dialogs
+ Dialogs & getDialogs() { return *dialogs_; }
+ ///
+ Dialogs const & getDialogs() const { return *dialogs_; }
-private:
- friend class GuiWorkArea;
+ /// load a buffer into the current workarea.
+ Buffer * loadLyXFile(support::FileName const & name, ///< File to load.
+ bool tolastfiles = true); ///< append to the "Open recent" menu?
- /// make sure we quit cleanly
- virtual void closeEvent(QCloseEvent * e);
- ///
- virtual void resizeEvent(QResizeEvent * e);
+ /** redraw \c inset in all the BufferViews in which it is currently
+ * visible. If successful return a pointer to the owning Buffer.
+ */
+ Buffer const * updateInset(Inset const *);
///
- virtual void moveEvent(QMoveEvent * e);
+ void restartCursor();
/// \return the \c Workarea associated to \p Buffer
/// \retval 0 if no \c WorkArea is found.
void removeWorkArea(GuiWorkArea * work_area);
/// return the current WorkArea (the one that has the focus).
GuiWorkArea const * currentWorkArea() const;
- /// FIXME: This non-const access is needed because of
- /// a mis-designed \c ControlSpellchecker.
- GuiWorkArea * currentWorkArea();
- /// GuiBufferDelegate.
- ///@{
- void resetAutosaveTimers();
- void errors(std::string const &);
- void structureChanged() { updateToc(); }
- ///@}
+Q_SIGNALS:
+ void closing(int);
+public Q_SLOTS:
+ /// idle timeout.
+ /// clear any temporary message and replace with current status.
+ void clearMessage();
+
+private Q_SLOTS:
+ ///
+ void updateWindowTitle(GuiWorkArea * wa);
+
+ ///
+ void on_currentWorkAreaChanged(GuiWorkArea *);
+
+ /// slots to change the icon size
+ void smallSizedIcons();
+ void normalSizedIcons();
+ void bigSizedIcons();
+
+private:
+ ///
+ void addTabWorkArea();
/// connect to signals in the given BufferView
void connectBufferView(BufferView & bv);
void connectBuffer(Buffer & buf);
/// disconnect from signals in the given buffer
void disconnectBuffer();
-
- ////
- void showDialog(std::string const & name);
- void showDialogWithData(std::string const & name,
- std::string const & data);
- void showInsetDialog(std::string const & name,
- std::string const & data, Inset * inset);
- void updateDialog(std::string const & name,
- std::string const & data);
-
///
void updateToc();
-
///
void dragEnterEvent(QDragEnterEvent * ev);
///
void dropEvent(QDropEvent * ev);
+ /// make sure we quit cleanly
+ virtual void closeEvent(QCloseEvent * e);
+ ///
+ virtual void resizeEvent(QResizeEvent * e);
+ ///
+ virtual void moveEvent(QMoveEvent * e);
/// in order to catch Tab key press.
bool event(QEvent * e);
bool focusNextPrevChild(bool);
///
QRect updateFloatingGeometry();
- /// called on timeout
- void autoSave();
- ///
- void updateEmbeddedFiles();
-
- /// \return the current buffer view.
- BufferView * view();
-
- /// get access to the dialogs
- Dialogs & getDialogs() { return *dialogs_; }
- ///
- Dialogs const & getDialogs() const { return *dialogs_; }
-
- //@}
-
- /// load a buffer into the current workarea.
- Buffer * loadLyXFile(support::FileName const & name, ///< File to load.
- bool tolastfiles = true); ///< append to the "Open recent" menu?
-
- /** redraw \c inset in all the BufferViews in which it is currently
- * visible. If successful return a pointer to the owning Buffer.
- */
- Buffer const * updateInset(Inset const *);
///
- void restartCursor();
-
+ void setIconSize(unsigned int size);
-private:
///
struct GuiViewPrivate;
GuiViewPrivate & d;
///
QRect floatingGeometry_;
- void setIconSize(unsigned int size);
-
struct ToolbarSize {
int top_width;
int bottom_width;