]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt4/GuiToolbars.h
Transfer the rest of Toolbars to GuiToolbars and delete Toolbars.{cpp,h}
[features.git] / src / frontends / qt4 / GuiToolbars.h
index 59b31c0328d748583357ef5759fb4c51ff97bfbe..4c97475cad1303d6122603b653718b83b60feb2e 100644 (file)
@@ -14,7 +14,9 @@
 #ifndef GUI_TOOLBARS_H
 #define GUI_TOOLBARS_H
 
-#include "frontends/Toolbars.h"
+#include "TextClass.h"
+#include "ToolbarBackend.h"
+#include "Session.h"
 
 #include <map>
 
@@ -25,14 +27,36 @@ class GuiLayoutBox;
 class GuiToolbar;
 class GuiViewBase;
 
-class GuiToolbars : public Toolbars
+class GuiToolbars
 {
 public:
        ///
        GuiToolbars(GuiViewBase & owner);
 
+       /// Initialize the toolbars using the backend database.
+       void init();
+
+       /// Show/hide the named toolbar.
+       void display(std::string const & name, bool show);
+
+       /// get toolbar info
+       ToolbarInfo * getToolbarInfo(std::string const & name);
+
+       /** toggle the state of toolbars (on/off/auto). Skip "auto"
+        * when allowauto is false.
+        */
+       void toggleToolbarState(std::string const & name, bool allowauto);
+
+       /// Update the state of the toolbars.
+       void update(bool in_math, bool in_table, bool review);
+
+       /// Is the Toolbar currently visible?
        bool visible(std::string const & name) const;
+
+       /// save toolbar information
        void saveToolbarInfo();
+
+       /// Select the right layout in the combox.
        void setLayout(docstring const & layout);
 
        /** Populate the layout combox - returns whether we did a full
@@ -45,11 +69,19 @@ public:
        /// Erase the layout list.
        void clearLayoutList();
 
-protected:
+private:
+       /// Add a new toolbar. if newline==true, start from a new line
        void add(ToolbarInfo const & tbinfo, bool newline);
+
+       /// Show or hide a toolbar.
        void displayToolbar(ToolbarInfo const & tbinfo, bool show);
+
+       /// Update the state of the icons
        void updateIcons();
 
+       // load flags with saved values
+       void initFlags(ToolbarInfo & tbinfo);
+
        /// The parent window.
        GuiViewBase & owner_;