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 * ====================================================== */
19 #include FORMS_H_LOCATION
22 #include "support/utility.hpp"
24 // uncomment this line to try out the new menus
41 #ifdef SIGC_CXX_NAMESPACES
47 This class is the form containing the view of the buffer. The actual buffer
48 view is supposed (at least IMHO) to be another class, that shows its output
49 in one or more LyXView's.
51 class LyXView : public Object, public noncopyable {
54 LyXView(int w, int h);
59 /// Where to place the form.
60 void setPosition(int, int);
62 /// Show the main form.
63 void show(int, int, char const * t = "LyX");
65 /// init (should probably be removed later) (Lgb)
68 /// Redraw the main form.
71 /// returns the buffer currently shown in the main form.
72 Buffer * buffer() const;
75 BufferView * view() const;
77 /// returns a pointer to the form.
78 FL_FORM * getForm() const;
80 /// return a pointer to the toolbar
81 Toolbar * getToolbar() const;
83 /// sets the layout in the toolbar layout combox
84 void setLayout(int layout);
86 /// update the toolbar
89 /// return a pointer to the lyxfunc
90 LyXFunc * getLyXFunc() const;
92 /// return a pointer to the minibuffer
93 MiniBuffer * getMiniBuffer() const;
97 Menubar * getMenubar() const;
100 void updateMenubar();
103 Menus * getMenus() const;
106 Intl * getIntl() const;
109 Dialogs * getDialogs() { return dialogs_; }
112 void updateLayoutChoice();
114 /// Updates the title of the window
115 void updateWindowTitle();
118 /// Show state (toolbar and font in minibuffer)
121 /// Reset autosave timer
122 void resetAutosaveTimer();
129 MiniBuffer * minibuffer;
142 /** This is supposed to be a pointer or a list of pointers to the
143 BufferViews currently being shown in the LyXView. So far
144 this is not used, but that should change pretty soon. (Lgb) */
145 BufferView * bufferview;
147 void invalidateLayoutChoice();
149 void UpdateDocumentClassChoice();
153 static int KeyPressMask_raw_callback(FL_FORM *, void * xev);
155 /** This callback is run when a close event is sent from the
157 static int atCloseMainFormCB(FL_FORM *, void *);
162 Timeout autosave_timeout;
163 /// makes the main form.
164 void create_form_form_main(int width, int height);
165 /// A pointer to the form.
167 /** The last textclass layout list in the layout choice selector
168 This should probably be moved to the toolbar, but for now it's