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 /// update the toolbar
88 /// return a pointer to the lyxfunc
89 LyXFunc * getLyXFunc() const;
91 /// return a pointer to the minibuffer
92 MiniBuffer * getMiniBuffer() const;
96 Menubar * getMenubar() const;
102 Menus * getMenus() const;
105 Intl * getIntl() const;
108 Dialogs * getDialogs() { return dialogs_; }
111 void updateLayoutChoice();
113 /// Updates the title of the window
114 void updateWindowTitle();
117 /// Show state (toolbar and font in minibuffer)
120 /// Reset autosave timer
121 void resetAutosaveTimer();
128 MiniBuffer * minibuffer;
141 /** This is supposed to be a pointer or a list of pointers to the
142 BufferViews currently being shown in the LyXView. So far
143 this is not used, but that should change pretty soon. (Lgb) */
144 BufferView * bufferview;
146 void invalidateLayoutChoice();
148 void UpdateDocumentClassChoice();
151 static int KeyPressMask_raw_callback(FL_FORM *, void * xev);
152 /** This callback is run when a close event is sent from the
154 static int atCloseMainFormCB(FL_FORM *, void *);
159 Timeout autosave_timeout;
160 /// makes the main form.
161 void create_form_form_main(int width, int height);
162 /// A pointer to the form.
164 /** The last textclass layout list in the layout choice selector
165 This should probably be moved to the toolbar, but for now it's