X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiToolbars.h;h=29ec7b309223a8285f4ea2c426980ec10e875803;hb=dd3842505b22a768c9b3f71d7e675f9c06381699;hp=4c97475cad1303d6122603b653718b83b60feb2e;hpb=71f366d4dd0001a0aceeaac937524926dca9109b;p=lyx.git diff --git a/src/frontends/qt4/GuiToolbars.h b/src/frontends/qt4/GuiToolbars.h index 4c97475cad..29ec7b3092 100644 --- a/src/frontends/qt4/GuiToolbars.h +++ b/src/frontends/qt4/GuiToolbars.h @@ -14,24 +14,26 @@ #ifndef GUI_TOOLBARS_H #define GUI_TOOLBARS_H -#include "TextClass.h" -#include "ToolbarBackend.h" -#include "Session.h" +#include "TextClassPtr.h" + +#include "support/docstring.h" #include namespace lyx { + +class ToolbarInfo; + namespace frontend { -class GuiLayoutBox; class GuiToolbar; -class GuiViewBase; +class GuiView; class GuiToolbars { public: /// - GuiToolbars(GuiViewBase & owner); + GuiToolbars(GuiView & owner); /// Initialize the toolbars using the backend database. void init(); @@ -48,7 +50,8 @@ public: void toggleToolbarState(std::string const & name, bool allowauto); /// Update the state of the toolbars. - void update(bool in_math, bool in_table, bool review); + void update(bool in_math, bool in_table, bool review, + bool in_mathmacrotemplate); /// Is the Toolbar currently visible? bool visible(std::string const & name) const; @@ -56,18 +59,9 @@ public: /// save toolbar information void saveToolbarInfo(); - /// Select the right layout in the combox. - void setLayout(docstring const & layout); + /// Show or hide the command buffer. + void showCommandBuffer(bool show_it); - /** Populate the layout combox - returns whether we did a full - * update or not - */ - bool updateLayoutList(TextClassPtr textclass); - - /// Drop down the layout list. - void openLayoutList(); - /// Erase the layout list. - void clearLayoutList(); private: /// Add a new toolbar. if newline==true, start from a new line @@ -83,16 +77,7 @@ private: void initFlags(ToolbarInfo & tbinfo); /// The parent window. - GuiViewBase & owner_; - - /** The layout box is actually owned by whichever toolbar - * contains it. All the Toolbars class needs is a means of - * accessing it. - * - * We don't need to use boost::weak_ptr here because the toolbars - * are also stored here. There are, therefore, no lifetime issues. - */ - GuiLayoutBox * layout_; + GuiView & owner_; /// Toolbar store providing access to individual toolbars by name. typedef std::map ToolbarsMap;