2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright (C) 1995 Matthias Ettrich
8 * Copyright (C) 1995-1998 The LyX Team.
10 *======================================================*/
19 #include FORMS_H_LOCATION
23 #include "BufferView.h"
34 FL_OBJECT *timer_autosave;
36 FL_OBJECT *timer_update;
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.
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 *currentBuffer(){ return bufferview->currentBuffer();}
74 BufferView *currentView() { return bufferview; }
76 /// returns a pointer to the form.
77 FL_FORM *getForm() { return _form; }
79 /// return a pointer to the toolbar
80 Toolbar *getToolbar() { return toolbar; }
82 /// return a pointer to the lyxfunc
83 LyXFunc *getLyXFunc() { return lyxfunc; }
85 /// return a pointer to the minibuffer
86 MiniBuffer *getMiniBuffer() { return minibuffer; }
89 Menus *getMenus() { return menus; }
92 Intl *getIntl() { return intl; }
95 void updateLayoutChoice();
97 /// Updates the title of the window
98 void updateWindowTitle();
100 /// Reset autosave timer
101 void resetAutosaveTimer();
108 MiniBuffer *minibuffer;
114 /** This is supposed to be a pointer or a list of pointers to the
115 BufferViews currently being shown in the LyXView. So far
116 this is not used, but that should change pretty soon. (Lgb) */
117 BufferView *bufferview;
119 void invalidateLayoutChoice();
121 void UpdateDocumentClassChoice();
124 static int KeyPressMask_raw_callback(FL_FORM *, void *xev);
125 /** This callback is run when a close event is sent from the
127 static int atCloseMainFormCB(FL_FORM *, void *);
129 static void AutosaveTimerCB(FL_OBJECT *, long);
131 static void UpdateTimerCB(FL_OBJECT *, long);
133 /// makes the main form.
134 FD_form_main *create_form_form_main(int width, int height);
135 /// A pointer to the form.
136 FD_form_main *_form_main;
137 /// A pointer to the form.
140 /** The last textclass layout list in the layout choice selector
141 This should probably be moved to the toolbar, but for now it's