]> git.lyx.org Git - lyx.git/blobdiff - src/session.h
* src/LaTeX.C
[lyx.git] / src / session.h
index 32766b0f48f7e989d05539e038e3e0600bbc3424..4cf5dcb0808bd0c10c32f43d4bcd0f3f5c347941 100644 (file)
@@ -297,8 +297,11 @@ public:
                /// potentially, icons
        };
 
+       typedef boost::tuple<std::string, ToolbarInfo> ToolbarItem;
+
        /// info for each toolbar
-       typedef std::map<std::string, ToolbarInfo> ToolbarMap;
+       typedef std::vector<ToolbarItem> ToolbarList;
+
 
 public:
        ///
@@ -310,11 +313,24 @@ public:
        /// return reference to toolbar info, create a new one if needed
        ToolbarInfo & load(std::string const & name);
 
+       /// toolbar begin
+       ToolbarList::const_iterator begin() { return toolbars.begin(); }
+
+       /// toolbar end
+       ToolbarList::const_iterator end() { return toolbars.end(); }
+
 private:
        /// toolbar information
-       ToolbarMap toolbars;
+       ToolbarList toolbars;
 };
 
+/// comparison operator to sort toolbars, the rules are:
+///        ON before OFF
+///     TOP < BOTTOM < LEFT < RIGHT
+///     Line at each side
+///     order in each line
+bool operator< (ToolbarSection::ToolbarItem const & a, ToolbarSection::ToolbarItem const & b);
+
 
 class SessionInfoSection : SessionSection
 {