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>
28 * XFormsView - xforms implementation of LyXView
30 * xforms-private implementation of the main LyX window.
32 class XFormsView : public LyXView {
42 /// create a main window of the given dimensions
43 XFormsView(int w, int h);
47 /// Accessor to the appropriate layout Box.
48 lyx::frontend::Box & getBox(Position pos) const;
51 * show - display the top-level window
52 * @param xpos requested x position (or 0)
53 * @param xpos requested y position (or 0)
54 * @param title window title
56 void show(int xpos, int ypos, std::string const & t = std::string("LyX"));
58 /// get the xforms main form
59 FL_FORM * getForm() const;
60 /// redraw the main form.
61 virtual void redraw();
63 virtual void busy(bool) const;
65 /// callback for close event from window manager
66 static int atCloseMainFormCB(FL_FORM *, void *);
68 /// display a status message
69 virtual void message(std::string const & str);
71 /// clear back to normal status message
72 virtual void clearMessage();
74 boost::signal0<void> metricsUpdated;
78 * setWindowTitle - set title of window
79 * @param t main window title
80 * @param it iconified (short) title
82 virtual void setWindowTitle(std::string const & t, std::string const & it);
84 /// update the minibuffer state message
85 void show_view_state();
89 /// The top-most box of the layout engine containing all other boxes.
90 lyx::frontend::Box window_;
92 // Accessors to the various Boxes.
93 std::map<Position, lyx::frontend::Box *> box_map_;
96 boost::scoped_ptr<XMiniBuffer> minibuffer_;
98 boost::signals::connection view_state_con;
100 boost::signals::connection focus_con;
102 boost::signals::connection redraw_con;
106 /// Passed to the window manager to give a pretty little symbol ;-)