2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2000 The LyX Team.
10 * ====================================================== */
20 #include FORMS_H_LOCATION
24 #include <boost/utility.hpp>
37 #ifdef SIGC_CXX_NAMESPACES
43 This class is the form containing the view of the buffer. The actual buffer
44 view is supposed (at least IMHO) to be another class, that shows its output
45 in one or more LyXView's.
47 class LyXView : public Object, public noncopyable {
50 LyXView(int w, int h);
55 /// Where to place the form.
56 void setPosition(int, int);
58 /// Show the main form.
59 void show(int, int, string const & t = string("LyX"));
61 /// init (should probably be removed later) (Lgb)
64 /// Redraw the main form.
67 /// returns the buffer currently shown in the main form.
68 Buffer * buffer() const;
71 BufferView * view() const;
73 /// returns a pointer to the form.
74 FL_FORM * getForm() const;
76 /// return a pointer to the toolbar
77 Toolbar * getToolbar() const;
79 /// sets the layout in the toolbar layout combox
80 void setLayout(LyXTextClass::size_type layout);
82 /// update the toolbar
85 /// return a pointer to the lyxfunc
86 LyXFunc * getLyXFunc() const;
88 /// return a pointer to the minibuffer
89 MiniBuffer * getMiniBuffer() const;
92 Menubar * getMenubar() const;
98 Intl * getIntl() const;
101 Dialogs * getDialogs() { return dialogs_; }
104 void updateLayoutChoice();
106 /// Updates the title of the window
107 void updateWindowTitle();
110 /// Show state (toolbar and font in minibuffer)
113 /// Reset autosave timer
114 void resetAutosaveTimer();
121 MiniBuffer * minibuffer;
129 /** This is supposed to be a pointer or a list of pointers to the
130 BufferViews currently being shown in the LyXView. So far
131 this is not used, but that should change pretty soon. (Lgb) */
132 BufferView * bufferview;
134 void invalidateLayoutChoice();
136 /** This callback is run when a close event is sent from the
138 static int atCloseMainFormCB(FL_FORM *, void *);
143 Timeout autosave_timeout;
144 /// makes the main form.
145 void create_form_form_main(int width, int height);
146 /// A pointer to the form.
148 /** The last textclass layout list in the layout choice selector
149 This should probably be moved to the toolbar, but for now it's