]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/XFormsView.h
If I ever see another licence blurb again, it'll be too soon...
[lyx.git] / src / frontends / xforms / XFormsView.h
1 // -*- C++ -*-
2 /**
3  * \file XFormsView.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author unknown
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef LyXView_H
13 #define LyXView_H
14
15
16 #include "forms_fwd.h"
17
18 #include "frontends/LyXView.h"
19 #include <X11/Xlib.h> // for Pixmap
20
21 class XMiniBuffer;
22
23 /**
24  * XFormsView - xforms implementation of LyXView
25  *
26  * xforms-private implementation of the main LyX window.
27  */
28 class XFormsView : public LyXView {
29 public:
30         /// create a main window of the given dimensions
31         XFormsView(int w, int h);
32
33         ~XFormsView();
34
35         /**
36          * show - display the top-level window
37          * @param xpos requested x position (or 0)
38          * @param xpos requested y position (or 0)
39          * @param title window title
40          */
41         void show(int xpos, int ypos, string const & t = string("LyX"));
42
43         /// get the xforms main form
44         FL_FORM * getForm() const;
45         /// redraw the main form.
46         virtual void redraw();
47         /// show busy cursor
48         virtual void busy(bool) const;
49
50         /// callback for close event from window manager
51         static int atCloseMainFormCB(FL_FORM *, void *);
52
53         /// display a status message
54         virtual void message(string const & str);
55
56         /// clear back to normal status message
57         virtual void clearMessage();
58
59 private:
60         /**
61          * setWindowTitle - set title of window
62          * @param t main window title
63          * @param it iconified (short) title
64          */
65         virtual void setWindowTitle(string const & t, string const & it);
66
67         /// update the minibuffer state message
68         void show_view_state();
69
70         /// makes the main form.
71         void create_form_form_main(int width, int height);
72         /// the minibuffer
73         boost::scoped_ptr<XMiniBuffer> minibuffer_;
74         ///
75         boost::signals::connection view_state_con;
76         ///
77         boost::signals::connection focus_con;
78         ///
79         boost::signals::connection redraw_con;
80
81         /// the main form.
82         FL_FORM * form_;
83         /// Passed to the window manager to give a pretty little symbol ;-)
84         Pixmap icon_pixmap_;
85         ///
86         Pixmap icon_mask_;
87 };
88 #endif