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
23 // uncomment this line to try out the new menus
40 #ifdef SIGC_CXX_NAMESPACES
46 This class is the form containing the view of the buffer. The actual buffer
47 view is supposed (at least IMHO) to be another class, that shows its output
48 in one or more LyXView's.
50 class LyXView : public Object {
53 LyXView(int w, int h);
58 /// Where to place the form.
59 void setPosition(int, int);
61 /// Show the main form.
62 void show(int, int, char const * t = "LyX");
64 /// init (should probably be removed later) (Lgb)
67 /// Redraw the main form.
70 /// returns the buffer currently shown in the main form.
71 Buffer * buffer() const;
74 BufferView * view() const;
76 /// returns a pointer to the form.
77 FL_FORM * getForm() const;
79 /// return a pointer to the toolbar
80 Toolbar * getToolbar() const;
82 /// sets the layout in the toolbar layout combox
83 void setLayout(int layout);
85 /// return a pointer to the lyxfunc
86 LyXFunc * getLyXFunc() const;
88 /// return a pointer to the minibuffer
89 MiniBuffer * getMiniBuffer() const;
93 Menubar * getMenubar() const;
99 Menus * getMenus() const;
102 Intl * getIntl() const;
105 Dialogs * getDialogs() { return dialogs_; }
108 void updateLayoutChoice();
110 /// Updates the title of the window
111 void updateWindowTitle();
114 /// Show state (toolbar and font in minibuffer)
117 /// Reset autosave timer
118 void resetAutosaveTimer();
125 MiniBuffer * minibuffer;
138 /** This is supposed to be a pointer or a list of pointers to the
139 BufferViews currently being shown in the LyXView. So far
140 this is not used, but that should change pretty soon. (Lgb) */
141 BufferView * bufferview;
143 void invalidateLayoutChoice();
145 void UpdateDocumentClassChoice();
148 static int KeyPressMask_raw_callback(FL_FORM *, void * xev);
149 /** This callback is run when a close event is sent from the
151 static int atCloseMainFormCB(FL_FORM *, void *);
156 Timeout autosave_timeout;
157 /// makes the main form.
158 void create_form_form_main(int width, int height);
159 /// A pointer to the form.
161 /** The last textclass layout list in the layout choice selector
162 This should probably be moved to the toolbar, but for now it's