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/signals/signal0.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 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 static int atCloseMainFormCB(FL_FORM *, void *);
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::signal0<void> metricsUpdated;
84 * setWindowTitle - set title of window
85 * @param t main window title
86 * @param it iconified (short) title
88 virtual void setWindowTitle(std::string const & t, std::string const & it);
90 /// update the minibuffer state message
91 void show_view_state();
93 /// The top-most box of the layout engine containing all other boxes.
96 // Accessors to the various Boxes.
97 std::map<Position, Box *> box_map_;
100 boost::scoped_ptr<XMiniBuffer> minibuffer_;
102 boost::signals::connection view_state_con;
104 boost::signals::connection focus_con;
106 boost::signals::connection redraw_con;
110 /// Passed to the window manager to give a pretty little symbol ;-)
116 } // namespace frontend