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 "LayoutEngine.h"
16 #include "forms_fwd.h"
18 #include "frontends/LyXView.h"
19 #include <X11/Xlib.h> // for Pixmap
21 #include <boost/signal.hpp>
31 * XFormsView - xforms implementation of LyXView
33 * xforms-private implementation of the main LyX window.
35 class XFormsView : public LyXView {
45 /// create a main window of the given dimensions
46 XFormsView(int w, int h);
50 /// Accessor to the appropriate layout Box.
51 boost::shared_ptr<Box> getBox(Position pos) const;
54 * show - display the top-level window
55 * @param xpos requested x position (or 0)
56 * @param xpos requested y position (or 0)
57 * @param title window title
59 void show(int xpos, int ypos, std::string const & t = std::string("LyX"));
61 /// get the xforms main form
62 FL_FORM * getForm() const;
63 /// redraw the main form.
64 virtual void redraw();
66 virtual void busy(bool) const;
68 /// callback for close event from window manager
69 int atCloseMainFormCB();
71 /// display a status message
72 virtual void message(std::string const & str);
74 /// clear back to normal status message
75 virtual void clearMessage();
78 void updateMetrics(bool resize_form = false);
80 boost::signal<void()> metricsUpdated;
82 // returns true if this view has the focus.
83 virtual bool hasFocus() const;
87 * setWindowTitle - set title of window
88 * @param t main window title
89 * @param it iconified (short) title
91 virtual void setWindowTitle(std::string const & t, std::string const & it);
93 /// update the minibuffer state message
94 void show_view_state();
96 /// The top-most box of the layout engine containing all other boxes.
99 typedef std::map<Position, boost::shared_ptr<Box> > BoxMap;
101 // Accessors to the various Boxes.
105 boost::scoped_ptr<XMiniBuffer> minibuffer_;
107 boost::signals::connection view_state_con;
109 boost::signals::connection focus_con;
111 boost::signals::connection redraw_con;
115 /// Passed to the window manager to give a pretty little symbol ;-)
121 } // namespace frontend