* Full author contact details are available in file CREDITS.
*/
-#ifndef LYX_APPLICATION_H
-#define LYX_APPLICATION_H
+#ifndef APPLICATION_H
+#define APPLICATION_H
+
+#include "ColorCode.h"
+
+#include "support/strfwd.h"
#include <boost/function.hpp>
-#include <string>
namespace lyx {
class BufferView;
-class Color_color;
+class Buffer;
+class FuncRequest;
+class FuncStatus;
+class Inset;
+class MenuBackend;
struct RGBColor;
namespace frontend {
{
public:
///
- Application(int & argc, char ** argv);
+ Application() {}
///
virtual ~Application() {}
///
- virtual Gui & gui() = 0;
+ virtual FuncStatus getStatus(FuncRequest const & cmd) = 0;
+ /// dispatch command.
+ /// \return true if the \c FuncRequest has been dispatched.
+ virtual bool dispatch(FuncRequest const & cmd) = 0;
+
+ ///
+ virtual void resetGui() = 0;
+
+ ///
+ virtual void hideDialogs(std::string const & name, Inset * inset) const = 0;
+ ///
+ virtual Buffer const * updateInset(Inset const * inset) const = 0;
/// Start the main event loop.
/// The batch command is programmed to be execute once
*/
virtual void exit(int status) = 0;
- /**
- * Synchronise all pending events.
- */
- virtual void syncEvents() = 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;
-
/**
* Given col, fills r, g, b in the range 0-255.
* The function returns true if successful.
* It returns false on failure and sets r, g, b to 0.
*/
- virtual bool getRgbColor(Color_color col, RGBColor & rgbcol) = 0;
+ virtual bool getRgbColor(ColorCode col, RGBColor & rgbcol) = 0;
- /** Eg, passing Color::black returns "000000",
- * passing Color::white returns "ffffff".
+ /** Eg, passing Color_black returns "000000",
+ * passing Color_white returns "ffffff".
*/
- virtual std::string const hexName(Color_color col) = 0;
+ virtual std::string const hexName(ColorCode col) = 0;
/**
* update an altered GUI color
*/
- virtual void updateColor(Color_color col) = 0;
+ virtual void updateColor(ColorCode col) = 0;
/**
* add a callback for socket read notification
* @param fd socket descriptor (file/socket/etc)
*/
typedef boost::function<void()> SocketCallback;
- virtual void registerSocketCallback( int fd, SocketCallback func) = 0;
+ virtual void registerSocketCallback(int fd, SocketCallback func) = 0;
/**
* remove a I/O read callback
*/
virtual void unregisterSocketCallback(int fd) = 0;
- /// Create the main window with given geometry settings.
- LyXView & createView(unsigned int width, unsigned int height,
- int posx, int posy, int maximized,
- unsigned int iconSizeXY, const std::string & geometryArg);
-
- ///
- LyXView const * currentView() const;
-
- ///
- LyXView * currentView();
-
///
- void setCurrentView(LyXView & current_view);
-
-private:
- /// This LyXView is the one receiving Clipboard and Selection
- /// Events
- LyXView * current_view_;
-
-}; // Application
+ virtual MenuBackend const & menuBackend() const = 0;
+ virtual MenuBackend & menuBackend() = 0;
+};
} // namespace frontend
frontend::Application * theApp();
frontend::Application * createApplication(int & argc, char * argv[]);
-
} // namespace lyx
-#endif // LYX_APPLICATION_H
+#endif // APPLICATION_H