]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Toolbars.h
* src/frontends/qt4/GuiSelection.C
[lyx.git] / src / frontends / Toolbars.h
index 4ea55274e5ba63decf3386000ad8e7cc32b0d2f5..ad719b257b4764223982e73e3adf11e5f868c7bd 100644 (file)
@@ -26,6 +26,7 @@
 #include "ToolbarBackend.h"
 #include <boost/shared_ptr.hpp>
 #include <map>
+#include "session.h"
 
 
 namespace lyx {
@@ -64,6 +65,10 @@ public:
         *  metrics should be updated.
         */
        virtual void show(bool update_metrics) = 0;
+       /** update toolbar information
+       * ToolbarInfo will then be saved by session
+       */
+       virtual void saveInfo(ToolbarSection::ToolbarInfo & info) = 0;
 
        /// Refresh the contents of the bar.
        virtual void update() = 0;
@@ -83,9 +88,18 @@ public:
        /// Show/hide the named toolbar.
        void display(std::string const & name, bool show);
 
+       /// get toolbar state (on/off/auto)
+       ToolbarBackend::Flags getToolbarState(std::string const & name);
+       
+       /// toggle the state of toolbars (on/off/auto)
+       void toggleToolbarState(std::string const & name);
+
        /// Update the state of the toolbars.
        void update(bool in_math, bool in_table, bool review);
 
+       /// save toolbar information
+       void saveToolbarInfo();
+
        /// Select the right layout in the combox.
        void setLayout(std::string const & layout);
 
@@ -128,6 +142,9 @@ private:
 
        /// The last textclass layout list in the layout choice selector
        int last_textclass_;
+
+       // load flags with saved values
+       void initFlags(ToolbarBackend::Toolbar & tbb);
 };
 
 /// Set the layout in the kernel when an entry has been selected