+ /// Do some cleanup in preparation of an exit.
+ void prepareExit();
+
+ /// Early exit during the initialisation process.
+ void earlyExit(int status);
+
+ /// Initialise LyX and execute batch commands if available.
+ /**
+ \param files is filled in with the command-line file names.
+ \return exit code failure if any.
+ */
+ int execBatchCommands(int & argc, char * argv[],
+ std::vector<std::string> & files);
+
+ /// Create a View and restore GUI Session.
+ void restoreGuiSession(std::vector<std::string> const & files);
+
+ /// Initialize RC font for the GUI.
+ void initGuiFont();
+
+ /// initial LyX set up
+ bool init();
+ /// set up the default key bindings
+ void defaultKeyBindings(kb_keymap * kbmap);
+ /// set up the default dead key bindings if requested
+ void deadKeyBindings(kb_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.
+ * \returns true if the user-side configuration script
+ * (lib/configure) should be re-run in this directory.
+ */
+ 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);
+ /// read the given languages file
+ bool readLanguagesFile(std::string const & name);
+ /// read the given encodings file
+ bool readEncodingsFile(std::string const & name);
+ /// parsing of non-gui LyX options.
+ void easyParse(int & argc, char * argv[]);
+ /// shows up a parsing error on screen
+ void printError(ErrorItem const &);
+
+ /// has this user started lyx for the first time?