2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2001 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 /// Resize all BufferViews in this LyXView (because the width changed)
65 /// returns the buffer currently shown in the main form.
66 Buffer * buffer() const;
69 BufferView * view() const;
71 /// returns a pointer to the form.
72 FL_FORM * getForm() const;
74 /// return a pointer to the toolbar
75 Toolbar * getToolbar() const;
77 /// sets the layout in the toolbar layout combox
78 void setLayout(LyXTextClass::size_type layout);
80 /// update the toolbar
83 /// return a pointer to the lyxfunc
84 LyXFunc * getLyXFunc() const;
86 /// return a pointer to the minibuffer
87 MiniBuffer * getMiniBuffer() const;
90 void message(string const &);
92 void messagePush(string const & str);
97 Menubar * getMenubar() const;
100 void updateMenubar();
103 Intl * getIntl() const;
106 Dialogs * getDialogs() { return dialogs_; }
109 void updateLayoutChoice();
111 /// Updates the title of the window
112 void updateWindowTitle();
114 /// Show state (toolbar and font in minibuffer)
117 /// Reset autosave timer
118 void resetAutosaveTimer();
125 MiniBuffer * minibuffer;
133 /** This is supposed to be a pointer or a list of pointers to the
134 BufferViews currently being shown in the LyXView. So far
135 this is not used, but that should change pretty soon. (Lgb) */
136 BufferView * bufferview;
138 void invalidateLayoutChoice();
140 /** This callback is run when a close event is sent from the
142 static int atCloseMainFormCB(FL_FORM *, void *);
147 Timeout autosave_timeout;
148 /// makes the main form.
149 void create_form_form_main(int width, int height);
150 /// A pointer to the form.
152 /** The last textclass layout list in the layout choice selector
153 This should probably be moved to the toolbar, but for now it's