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();
75 void updateMetrics(bool resize_form = false);
77 boost::signal0<void> metricsUpdated;
81 * setWindowTitle - set title of window
82 * @param t main window title
83 * @param it iconified (short) title
85 virtual void setWindowTitle(std::string const & t, std::string const & it);
87 /// update the minibuffer state message
88 void show_view_state();
90 /// The top-most box of the layout engine containing all other boxes.
91 lyx::frontend::Box window_;
93 // Accessors to the various Boxes.
94 std::map<Position, lyx::frontend::Box *> box_map_;
97 boost::scoped_ptr<XMiniBuffer> minibuffer_;
99 boost::signals::connection view_state_con;
101 boost::signals::connection focus_con;
103 boost::signals::connection redraw_con;
107 /// Passed to the window manager to give a pretty little symbol ;-)