X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2FXFormsView.h;h=45e58ff870d738c9bfbc83f22508aeaa5068b01d;hb=d5443737342903de489d527802cd2cdd38987d74;hp=fe0b1a99255d8aacb6abe0e18db16ceaf113d1e7;hpb=99d1627a471b92f403598d03dfc861ddc3c11be0;p=lyx.git diff --git a/src/frontends/xforms/XFormsView.h b/src/frontends/xforms/XFormsView.h index fe0b1a9925..45e58ff870 100644 --- a/src/frontends/xforms/XFormsView.h +++ b/src/frontends/xforms/XFormsView.h @@ -6,18 +6,25 @@ * * \author unknown * - * Full author contact details are available in file CREDITS + * Full author contact details are available in file CREDITS. */ #ifndef LyXView_H #define LyXView_H - +#include "LayoutEngine.h" #include "forms_fwd.h" #include "frontends/LyXView.h" #include // for Pixmap +#include + +#include + +namespace lyx { +namespace frontend { + class XMiniBuffer; /** @@ -27,33 +34,53 @@ class XMiniBuffer; */ class XFormsView : public LyXView { public: + enum Position { + Top, + Bottom, + Left, + Right, + Center + }; + /// create a main window of the given dimensions XFormsView(int w, int h); ~XFormsView(); + /// Accessor to the appropriate layout Box. + boost::shared_ptr getBox(Position pos) const; + /** * show - display the top-level window * @param xpos requested x position (or 0) * @param xpos requested y position (or 0) * @param title window title */ - void show(int xpos, int ypos, string const & t = string("LyX")); + void show(int xpos, int ypos, std::string const & t = std::string("LyX")); /// get the xforms main form FL_FORM * getForm() const; /// redraw the main form. virtual void redraw(); - /// - virtual void prohibitInput() const; - /// - virtual void allowInput() const; + /// show busy cursor + virtual void busy(bool) const; /// callback for close event from window manager - static int atCloseMainFormCB(FL_FORM *, void *); + int atCloseMainFormCB(); /// display a status message - virtual void message(string const & str); + virtual void message(std::string const & str); + + /// clear back to normal status message + virtual void clearMessage(); + + /// + void updateMetrics(bool resize_form = false); + /// + boost::signal metricsUpdated; + + // returns true if this view has the focus. + virtual bool hasFocus() const; private: /** @@ -61,13 +88,19 @@ private: * @param t main window title * @param it iconified (short) title */ - virtual void setWindowTitle(string const & t, string const & it); + virtual void setWindowTitle(std::string const & t, std::string const & it); /// update the minibuffer state message void show_view_state(); - /// makes the main form. - void create_form_form_main(int width, int height); + /// The top-most box of the layout engine containing all other boxes. + Box window_; + + typedef std::map > BoxMap; + + // Accessors to the various Boxes. + BoxMap box_map_; + /// the minibuffer boost::scoped_ptr minibuffer_; /// @@ -84,4 +117,8 @@ private: /// Pixmap icon_mask_; }; + +} // namespace frontend +} // namespace lyx + #endif