]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/XFormsView.h
New lyx_gui namespace. Some working out to be done still ..
[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_H_LOCATION
20
21 #include "frontends/LyXView.h"
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         /// init (should probably be removed later) (Lgb)
44         virtual void init();
45         /// get the xforms main form
46         FL_FORM * getForm() const;
47         /// redraw the main form.
48         virtual void redraw();
49         ///
50         virtual void prohibitInput() const;
51         ///
52         virtual void allowInput() const;
53
54         /// callback for close event from window manager
55         static int atCloseMainFormCB(FL_FORM *, void *);
56
57 private:
58         /**
59          * setWindowTitle - set title of window
60          * @param t main window title
61          * @param it iconified (short) title
62          */
63         virtual void setWindowTitle(string const & t, string const & it); 
64  
65         /// makes the main form.
66         void create_form_form_main(int width, int height);
67         /// the main form.
68         boost::scoped_ptr<FL_FORM> form_;
69 };
70 #endif