]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Toolbars.h
updated list of LyX translations
[lyx.git] / src / frontends / Toolbars.h
index dcc48b95262ed618d4e2aef24fd279af70cbc28c..55ada415f95d18ef19ec355d428da343bf216cdf 100644 (file)
@@ -26,7 +26,7 @@
 #include "ToolbarBackend.h"
 #include <boost/shared_ptr.hpp>
 #include <map>
-#include "session.h"
+#include "Session.h"
 
 
 namespace lyx {
@@ -68,8 +68,10 @@ public:
        /** update toolbar information
        * ToolbarInfo will then be saved by session
        */
-       virtual void saveInfo(ToolbarSection::ToolbarInfo & info) = 0;
+       virtual void saveInfo(ToolbarSection::ToolbarInfo & tbinfo) = 0;
 
+       /// whether toolbar is visible
+       virtual bool isVisible() const = 0;
        /// Refresh the contents of the bar.
        virtual void update() = 0;
        /// Accessor to the layout combox, if any.
@@ -88,15 +90,20 @@ public:
        /// Show/hide the named toolbar.
        void display(std::string const & name, bool show);
 
-       /// get toolbar state (on/off/auto)
-       ToolbarInfo::Flags getToolbarState(std::string const & name);
-       
-       /// toggle the state of toolbars (on/off/auto)
-       void toggleToolbarState(std::string const & name);
+       /// 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();
 
@@ -118,9 +125,9 @@ public:
 
 private:
        /// Add a new toolbar. if newline==true, start from a new line
-       void add(ToolbarInfo const & tb, bool newline);
+       void add(ToolbarInfo const & tbinfo, bool newline);
        /// Show or hide a toolbar.
-       void displayToolbar(ToolbarInfo const & tb, bool show);
+       void displayToolbar(ToolbarInfo const & tbinfo, bool show);
        /// Update the state of the icons
        void update();
 
@@ -144,7 +151,7 @@ private:
        int last_textclass_;
 
        // load flags with saved values
-       void initFlags(ToolbarInfo & tbb);
+       void initFlags(ToolbarInfo & tbinfo);
 };
 
 /// Set the layout in the kernel when an entry has been selected