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
33 FL_OBJECT * timer_autosave;
35 FL_OBJECT * timer_update;
44 This class is the form containing the view of the buffer. The actual buffer
45 view is supposed (at least IMHO) to be another class, that shows its output
46 in one or more LyXView's.
51 LyXView(int w, int h);
56 /// Where to place the form.
57 void setPosition(int, int);
59 /// Show the main form.
60 void show(int, int, char const * t = "LyX");
62 /// init (should probably be removed later) (Lgb)
65 /// Redraw the main form.
68 /// returns the buffer currently shown in the main form.
69 Buffer * buffer() const { return bufferview->buffer(); }
72 BufferView * view() { return bufferview; }
74 /// returns a pointer to the main form.
75 FD_form_main * getMainForm() { return _form_main; }
77 /// returns a pointer to the form.
78 FL_FORM * getForm() { return _form; }
80 /// return a pointer to the toolbar
81 Toolbar * getToolbar() { return toolbar; }
83 /// return a pointer to the lyxfunc
84 LyXFunc * getLyXFunc() { return lyxfunc; }
86 /// return a pointer to the minibuffer
87 MiniBuffer * getMiniBuffer() { return minibuffer; }
90 Menus * getMenus() { return menus; }
93 Intl * getIntl() { return intl; }
96 void updateLayoutChoice();
98 /// Updates the title of the window
99 void updateWindowTitle();
101 /// Reset autosave timer
102 void resetAutosaveTimer();
109 MiniBuffer * minibuffer;
115 /** This is supposed to be a pointer or a list of pointers to the
116 BufferViews currently being shown in the LyXView. So far
117 this is not used, but that should change pretty soon. (Lgb) */
118 BufferView * bufferview;
120 void invalidateLayoutChoice();
122 void UpdateDocumentClassChoice();
125 static int KeyPressMask_raw_callback(FL_FORM *, void * xev);
126 /** This callback is run when a close event is sent from the
128 static int atCloseMainFormCB(FL_FORM *, void *);
130 static void AutosaveTimerCB(FL_OBJECT *, long);
132 static void UpdateTimerCB(FL_OBJECT *, long);
134 /// makes the main form.
135 void create_form_form_main(int width, int height);
136 /// A pointer to the form.
137 FD_form_main * _form_main;
138 /// A pointer to the form.
141 /** The last textclass layout list in the layout choice selector
142 This should probably be moved to the toolbar, but for now it's