]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/XFormsView.h
add connection objects and assign to them to
[lyx.git] / src / frontends / xforms / XFormsView.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ======================================================
4  *
5  *           LyX, The Document Processor
6  *
7  *           Copyright 1995 Matthias Ettrich
8  *           Copyright 1995-2001 The LyX Team.
9  *
10  * ====================================================== */
11
12 #ifndef LyXView_H
13 #define LyXView_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "forms_fwd.h"
20
21 #include "frontends/LyXView.h"
22
23 class Dialogs;
24 class XMiniBuffer;
25
26 /**
27  * XFormsView - xforms implementation of LyXView
28  *
29  * xforms-private implementation of the main LyX window.
30  */
31 class XFormsView : public LyXView {
32 public:
33         /// create a main window of the given dimensions
34         XFormsView(int w, int h);
35
36         ~XFormsView();
37
38         /**
39          * show - display the top-level window
40          * @param xpos requested x position (or 0)
41          * @param xpos requested y position (or 0)
42          * @param title window title
43          */
44         void show(int xpos, int ypos, string const & t = string("LyX"));
45
46         /// get the xforms main form
47         FL_FORM * getForm() const;
48         /// redraw the main form.
49         virtual void redraw();
50         ///
51         virtual void prohibitInput() const;
52         ///
53         virtual void allowInput() const;
54
55         /// callback for close event from window manager
56         static int atCloseMainFormCB(FL_FORM *, void *);
57
58         /// display a status message
59         virtual void message(string const & str);
60
61 private:
62         /**
63          * setWindowTitle - set title of window
64          * @param t main window title
65          * @param it iconified (short) title
66          */
67         virtual void setWindowTitle(string const & t, string const & it);
68
69         /// update the minibuffer state message
70         void show_view_state();
71
72         /// makes the main form.
73         void create_form_form_main(Dialogs & d, int width, int height);
74         /// the minibuffer
75         boost::scoped_ptr<XMiniBuffer> minibuffer_;
76         ///
77         boost::signals::connection view_state_con;
78         ///
79         boost::signals::connection focus_con;
80         ///
81         boost::signals::connection redraw_con;
82
83         /// the main form.
84         FL_FORM * form_;
85 };
86 #endif