]> git.lyx.org Git - lyx.git/blobdiff - src/LyX.h
Typo.
[lyx.git] / src / LyX.h
index f02ea652df5052de031dc0554bc790c0422de9cb..2a83af88c873b7132b79f0cc5da0ed118ed2ad1b 100644 (file)
--- a/src/LyX.h
+++ b/src/LyX.h
 
 namespace lyx {
 
-namespace support {
-class FileName;
-}
-
-class Buffer;
 class BufferList;
+class CmdDef;
 class Converters;
 class ErrorItem;
-class Inset;
+class KeyMap;
 class LyXFunc;
-class Server;
-class ServerSocket;
 class Messages;
 class Mover;
 class Movers;
+class Server;
+class ServerSocket;
 class Session;
-class KeyMap;
-class CmdDef;
 
 extern bool use_gui;
 
@@ -54,6 +48,11 @@ public:
        /// Execute LyX.
        int exec(int & argc, char * argv[]);
 
+       /// Try to exit LyX properly.
+       /// \p exit_code is 0 by default, if a non zero value is passed,
+       /// emergencyCleanup() will be called before exiting.
+       void exit(int exit_code = 0) const;
+
        static LyX & ref();
        static LyX const & cref();
 
@@ -80,10 +79,6 @@ public:
        frontend::Application & application();
        frontend::Application const & application() const;
 
-       ///
-       KeyMap & topLevelKeymap();
-       KeyMap const & topLevelKeymap() const;
-
        ///
        CmdDef & topLevelCmdDef();
 
@@ -96,24 +91,14 @@ public:
        ///
        Messages & getGuiMessages();
        ///
-       void setGuiLanguage(std::string const & language);
+       void setRcGuiLanguage();
 
        ///
        frontend::LyXView * newLyXView();
 
-       /** redraw \c inset in all the BufferViews in which it is currently
-        *  visible. If successful return a pointer to the owning Buffer.
-        */
-       Buffer const * updateInset(Inset const *) const;
-
-       void hideDialogs(std::string const & name, Inset * inset) const;
-
        /// Execute batch commands if available.
        void execBatchCommands();
 
-       ///
-       void addFileToLoad(support::FileName const &);
-
 private:
        /// noncopyable
        LyX(LyX const &);
@@ -132,21 +117,14 @@ private:
        int init(int & argc, char * argv[]);
 
        /// Load files passed at command-line.
+       /// return true on success false if we encounter an error
        /**
        This method is used only in non-GUI mode.
        */
-       void loadFiles();
-
-       /// Create a View, load files and restore GUI Session.
-       void restoreGuiSession();
-
-       /// Initialize RC font for the GUI.
-       void initGuiFont();
+       bool loadFiles();
 
        /// initial LyX set up
        bool init();
-       /// set up the default dead key bindings if requested
-       void deadKeyBindings(KeyMap * kbmap);
        /** Check for the existence of the user's support directory and,
         *  if not present, create it. Exits the program if the directory
         *  cannot be created.
@@ -156,8 +134,6 @@ private:
        bool queryUserLyXDir(bool explicit_userdir);
        /// read lyxrc/preferences
        bool readRcFile(std::string const & name);
-       /// read the given ui (menu/toolbar) file
-       bool readUIFile(std::string const & name, bool include = false);
        /// read the given languages file
        bool readLanguagesFile(std::string const & name);
        /// read the encodings.
@@ -183,6 +159,7 @@ private:
        friend void setMover(std::string const & fmt, std::string const & command);
        friend Movers & theSystemMovers();
        friend frontend::Application * theApp();
+       friend KeyMap & theTopLevelKeymap();
 };
 
 } // namespace lyx