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
40 This class is the form containing the view of the buffer. The actual buffer
41 view is supposed (at least IMHO) to be another class, that shows its output
42 in one or more LyXView's.
47 LyXView(int w, int h);
52 /// Where to place the form.
53 void setPosition(int, int);
55 /// Show the main form.
56 void show(int, int, char const * t = "LyX");
58 /// init (should probably be removed later) (Lgb)
61 /// Redraw the main form.
64 /// returns the buffer currently shown in the main form.
65 Buffer * buffer() const;
68 BufferView * view() const;
70 /// returns a pointer to the main form.
71 FD_form_main * getMainForm() const;
73 /// returns a pointer to the form.
74 FL_FORM * getForm() const;
76 /// return a pointer to the toolbar
77 Toolbar * getToolbar() const;
79 /// return a pointer to the lyxfunc
80 LyXFunc * getLyXFunc() const;
82 /// return a pointer to the minibuffer
83 MiniBuffer * getMiniBuffer() const;
86 Menus * getMenus() const;
89 Intl * getIntl() const;
92 Dialogs * getDialogs() { return dialogs_; }
95 void updateLayoutChoice();
97 /// Updates the title of the window
98 void updateWindowTitle();
100 /// Reset autosave timer
101 void resetAutosaveTimer();
108 MiniBuffer * minibuffer;
116 /** This is supposed to be a pointer or a list of pointers to the
117 BufferViews currently being shown in the LyXView. So far
118 this is not used, but that should change pretty soon. (Lgb) */
119 BufferView * bufferview;
121 void invalidateLayoutChoice();
123 void UpdateDocumentClassChoice();
126 static int KeyPressMask_raw_callback(FL_FORM *, void * xev);
127 /** This callback is run when a close event is sent from the
129 static int atCloseMainFormCB(FL_FORM *, void *);
133 static void UpdateTimerCB(void *);
136 Timeout autosave_timeout;
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.
143 /** The last textclass layout list in the layout choice selector
144 This should probably be moved to the toolbar, but for now it's