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
32 #ifdef SIGC_CXX_NAMESPACES
38 This class is the form containing the view of the buffer. The actual buffer
39 view is supposed (at least IMHO) to be another class, that shows its output
40 in one or more LyXView's.
42 class LyXView : public Object {
45 LyXView(int w, int h);
50 /// Where to place the form.
51 void setPosition(int, int);
53 /// Show the main form.
54 void show(int, int, char const * t = "LyX");
56 /// init (should probably be removed later) (Lgb)
59 /// Redraw the main form.
62 /// returns the buffer currently shown in the main form.
63 Buffer * buffer() const;
66 BufferView * view() const;
68 /// returns a pointer to the form.
69 FL_FORM * getForm() const;
71 /// return a pointer to the toolbar
72 Toolbar * getToolbar() const;
74 /// return a pointer to the lyxfunc
75 LyXFunc * getLyXFunc() const;
77 /// return a pointer to the minibuffer
78 MiniBuffer * getMiniBuffer() const;
81 Menus * getMenus() const;
84 Intl * getIntl() const;
87 Dialogs * getDialogs() { return dialogs_; }
90 void updateLayoutChoice();
92 /// Updates the title of the window
93 void updateWindowTitle();
96 /// Show state (toolbar and font in minibuffer)
99 /// Reset autosave timer
100 void resetAutosaveTimer();
107 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 *);
133 Timeout autosave_timeout;
134 /// makes the main form.
135 void create_form_form_main(int width, int height);
136 /// A pointer to the form.
138 /** The last textclass layout list in the layout choice selector
139 This should probably be moved to the toolbar, but for now it's