2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-1998 The LyX Team.
10 * ====================================================== */
19 #include FORMS_H_LOCATION
23 #include "BufferView.h"
36 FL_OBJECT * timer_autosave;
38 FL_OBJECT * timer_update;
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.
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 { return bufferview->buffer(); }
75 BufferView * view() { return bufferview; }
77 /// returns a pointer to the main form.
78 FD_form_main * getMainForm() { return _form_main; }
80 /// returns a pointer to the form.
81 FL_FORM * getForm() { return _form; }
83 /// return a pointer to the toolbar
84 Toolbar * getToolbar() { return toolbar; }
86 /// return a pointer to the lyxfunc
87 LyXFunc * getLyXFunc() { return lyxfunc; }
89 /// return a pointer to the minibuffer
90 MiniBuffer * getMiniBuffer() { return minibuffer; }
93 Menus * getMenus() { return menus; }
96 Intl * getIntl() { return intl; }
99 void updateLayoutChoice();
101 /// Updates the title of the window
102 void updateWindowTitle();
104 /// Reset autosave timer
105 void resetAutosaveTimer();
112 MiniBuffer * minibuffer;
118 /** This is supposed to be a pointer or a list of pointers to the
119 BufferViews currently being shown in the LyXView. So far
120 this is not used, but that should change pretty soon. (Lgb) */
121 BufferView * bufferview;
123 void invalidateLayoutChoice();
125 void UpdateDocumentClassChoice();
128 static int KeyPressMask_raw_callback(FL_FORM *, void * xev);
129 /** This callback is run when a close event is sent from the
131 static int atCloseMainFormCB(FL_FORM *, void *);
133 static void AutosaveTimerCB(FL_OBJECT *, long);
135 static void UpdateTimerCB(FL_OBJECT *, long);
137 /// makes the main form.
138 void create_form_form_main(int width, int height);
139 /// A pointer to the form.
140 FD_form_main * _form_main;
141 /// A pointer to the form.
144 /** The last textclass layout list in the layout choice selector
145 This should probably be moved to the toolbar, but for now it's