4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
15 #include "GuiImplementation.h"
16 #include "LayoutEngine.h"
17 #include "forms_fwd.h"
19 #include "frontends/LyXView.h"
20 #include <X11/Xlib.h> // for Pixmap
22 #include <boost/signal.hpp>
32 * XFormsView - xforms implementation of LyXView
34 * xforms-private implementation of the main LyX window.
36 class XFormsView : public LyXView {
46 /// create a main window of the given dimensions
47 XFormsView(int w, int h);
51 /// Accessor to the appropriate layout Box.
52 boost::shared_ptr<Box> getBox(Position pos) const;
55 * show - display the top-level window
56 * @param xpos requested x position (or 0)
57 * @param xpos requested y position (or 0)
58 * @param title window title
60 void show(int xpos, int ypos, std::string const & t = std::string("LyX"));
62 /// get the xforms main form
63 FL_FORM * getForm() const;
64 /// redraw the main form.
65 virtual void redraw();
67 virtual void busy(bool) const;
69 /// callback for close event from window manager
70 int atCloseMainFormCB();
72 /// display a status message
73 virtual void message(std::string const & str);
75 /// clear back to normal status message
76 virtual void clearMessage();
79 void updateMetrics(bool resize_form = false);
81 boost::signal<void()> metricsUpdated;
83 // returns true if this view has the focus.
84 virtual bool hasFocus() const;
87 Gui & gui() { return frontend_; }
91 * setWindowTitle - set title of window
92 * @param t main window title
93 * @param it iconified (short) title
95 virtual void setWindowTitle(std::string const & t, std::string const & it);
97 /// update the minibuffer state message
98 void show_view_state();
100 /// The top-most box of the layout engine containing all other boxes.
103 typedef std::map<Position, boost::shared_ptr<Box> > BoxMap;
105 // Accessors to the various Boxes.
109 boost::scoped_ptr<XMiniBuffer> minibuffer_;
111 boost::signals::connection view_state_con;
113 boost::signals::connection focus_con;
115 boost::signals::connection redraw_con;
119 /// Passed to the window manager to give a pretty little symbol ;-)
124 GuiImplementation frontend_;
127 } // namespace frontend