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
23 #include "frontends/Timeout.h"
24 #include <boost/utility.hpp>
38 This class is the form containing the view of the buffer. The actual buffer
39 view is supposed (at least IMHO) to be another class, that shows its output
40 in one or more LyXView's.
42 class LyXView : public SigC::Object, boost::noncopyable {
45 LyXView(int w, int h);
50 /// Where to place the form.
51 void setPosition(int, int);
53 /// Show the main form.
54 void show(int, int, string const & t = string("LyX"));
56 /// init (should probably be removed later) (Lgb)
59 /// Redraw the main form.
62 /// returns the buffer currently shown in the main form.
63 Buffer * buffer() const;
66 BufferView * view() const;
68 /// returns a pointer to the form.
69 FL_FORM * getForm() const;
71 /// return a pointer to the toolbar
72 Toolbar * getToolbar() const;
74 /// sets the layout in the toolbar layout combox
75 void setLayout(LyXTextClass::size_type layout);
77 /// update the toolbar
80 /// return a pointer to the lyxfunc
81 LyXFunc * getLyXFunc() const;
83 /// return a pointer to the minibuffer
84 MiniBuffer * getMiniBuffer() const;
87 void message(string const &);
89 void messagePush(string const & str);
94 Menubar * getMenubar() const;
100 Intl * getIntl() const;
103 Dialogs * getDialogs() { return dialogs_; }
106 void updateLayoutChoice();
108 /// Updates the title of the window
109 void updateWindowTitle();
111 /// Show state (toolbar and font in minibuffer)
114 /// Reset autosave timer
115 void resetAutosaveTimer();
122 MiniBuffer * minibuffer;
130 /** This is supposed to be a pointer or a list of pointers to the
131 BufferViews currently being shown in the LyXView. So far
132 this is not used, but that should change pretty soon. (Lgb) */
133 BufferView * bufferview;
135 void invalidateLayoutChoice();
137 /** This callback is run when a close event is sent from the
139 static int atCloseMainFormCB(FL_FORM *, void *);
144 Timeout autosave_timeout;
145 /// makes the main form.
146 void create_form_form_main(int width, int height);
147 /// A pointer to the form.
149 /** The last textclass layout list in the layout choice selector
150 This should probably be moved to the toolbar, but for now it's