]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Application.h
enable Font cache only for MacOSX and inline width() for other platform.
[lyx.git] / src / frontends / Application.h
index d8cee6ca4b5e16ad3bd3265b15a4a3c4cc3555a4..d9589f8078d11dfde3b000a9867c43c9b8186675 100644 (file)
@@ -20,12 +20,14 @@ class BufferView;
 class LyXFunc;
 class LyXServer;
 class LyXServerSocket;
+class LyXView;
        
 namespace lyx {
 namespace frontend {
 
 struct Application_pimpl;
 class Clipboard;
+class FontLoader;
 class Gui;
 class Selection;
 
@@ -45,18 +47,36 @@ public:
        ///
        virtual ~Application() {}
 
+       /// Start the main event loop, after executing the given batch
+       /// commands.
        int start(std::string const & batch);
        ///
        virtual Gui & gui() = 0;
        ///
        virtual int const exec() = 0;
-       ///
+
+       /// Quit running LyX.
+       /**
+       * This may either quit directly or record the exit status
+       * and only stop the event loop.
+       */
        virtual void exit(int status) = 0;
 
        ///
        virtual Clipboard & clipboard() = 0;
        ///
        virtual Selection & selection() = 0;
+       ///
+       virtual FontLoader & fontLoader() = 0;
+
+       /// return a suitable serif font name.
+       virtual std::string const romanFontName() = 0;
+
+       /// return a suitable sans serif font name.
+       virtual std::string const sansFontName() = 0;
+
+       /// return a suitable monospaced font name.
+       virtual std::string const typewriterFontName() = 0;
 
        ///
        LyXFunc & lyxFunc();
@@ -71,6 +91,11 @@ public:
        BufferList & bufferList();
        BufferList const & bufferList() const;
 
+       /// Create the main window with given geometry settings.
+       LyXView & createView(unsigned int width, unsigned int height,
+               int posx, int posy, bool maximize);
+       
+       ///
        void setBufferView(BufferView * buffer_view);
 
 protected:
@@ -79,9 +104,8 @@ protected:
        /// FIXME: \todo use Gui::currentView() in the future
        BufferView * buffer_view_;
 
+private:
        /// Application private implementation.
-       /// FIXME: this should be private but LyXFunc construction
-       /// is still done in GuiApplication.
        Application_pimpl * pimpl_;
 
 }; // Application