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, public 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 Menubar * getMenubar() const;
93 Intl * getIntl() const;
96 Dialogs * getDialogs() { return dialogs_; }
99 void updateLayoutChoice();
101 /// Updates the title of the window
102 void updateWindowTitle();
105 /// Show state (toolbar and font in minibuffer)
108 /// Reset autosave timer
109 void resetAutosaveTimer();
116 MiniBuffer * minibuffer;
124 /** This is supposed to be a pointer or a list of pointers to the
125 BufferViews currently being shown in the LyXView. So far
126 this is not used, but that should change pretty soon. (Lgb) */
127 BufferView * bufferview;
129 void invalidateLayoutChoice();
131 /** This callback is run when a close event is sent from the
133 static int atCloseMainFormCB(FL_FORM *, void *);
138 Timeout autosave_timeout;
139 /// makes the main form.
140 void create_form_form_main(int width, int height);
141 /// A pointer to the form.
143 /** The last textclass layout list in the layout choice selector
144 This should probably be moved to the toolbar, but for now it's