]> git.lyx.org Git - lyx.git/blobdiff - src/BufferParams.h
This optional argument to the InsetCollapsable constructor
[lyx.git] / src / BufferParams.h
index 7d1d7770809725a5c08cf9d83f994eb4a6ff49d4..af7333364b3b1aee59131990541d925acf0bc8b4 100644 (file)
@@ -133,13 +133,14 @@ public:
        std::set<std::string> const & getRemovedModules() const 
                        { return removedModules_; }
        ///
-       /// Add a module to the list of modules in use.
-       /// Returns true if module was successfully added.
-       /// The makeClass variable signals whether to call makeDocumentClass. This
-       /// need not be done if we know this isn't the final time through, or if
-       /// the BufferParams do not represent the parameters for an actual buffer
-       /// (as in GuiDocument).
+       /// Add a module to the list of modules in use. This checks only that the
+       /// module is not already in the list, so use moduleIsCompatible first if
+       /// you want to check for compatibility.
+       /// \return true if module was successfully added.
        bool addLayoutModule(std::string const & modName);
+       /// checks to make sure module's requriements are satisfied, that it does
+       /// not conflict with already-present modules, isn't already loaded, etc.
+       bool moduleCanBeAdded(std::string const & modName) const;
        ///
        void addRemovedModule(std::string const & modName) 
                        { removedModules_.insert(modName); }
@@ -344,6 +345,14 @@ private:
        void readModules(Lexer &);
        ///
        void readRemovedModules(Lexer &);
+       ///
+       void addDefaultModules();
+       /// checks for consistency among modules: makes sure requirements
+       /// are met, no modules exclude one another, etc, and resolves any
+       /// such conflicts, leaving us with a consistent collection.
+       /// \return true if modules were consistent, false if changes had
+       /// to be made.
+       bool checkModuleConsistency();
 
        /// for use with natbib
        CiteEngine cite_engine_;