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
23 #include "support/utility.hpp"
36 #ifdef SIGC_CXX_NAMESPACES
42 This class is the form containing the view of the buffer. The actual buffer
43 view is supposed (at least IMHO) to be another class, that shows its output
44 in one or more LyXView's.
46 class LyXView : public Object, public noncopyable {
49 LyXView(int w, int h);
54 /// Where to place the form.
55 void setPosition(int, int);
57 /// Show the main form.
58 void show(int, int, string const & t = string("LyX"));
60 /// init (should probably be removed later) (Lgb)
63 /// Redraw the main form.
66 /// returns the buffer currently shown in the main form.
67 Buffer * buffer() const;
70 BufferView * view() const;
72 /// returns a pointer to the form.
73 FL_FORM * getForm() const;
75 /// return a pointer to the toolbar
76 Toolbar * getToolbar() const;
78 /// sets the layout in the toolbar layout combox
79 void setLayout(LyXTextClass::size_type layout);
81 /// update the toolbar
84 /// return a pointer to the lyxfunc
85 LyXFunc * getLyXFunc() const;
87 /// return a pointer to the minibuffer
88 MiniBuffer * getMiniBuffer() const;
91 Menubar * getMenubar() const;
97 Intl * getIntl() const;
100 Dialogs * getDialogs() { return dialogs_; }
103 void updateLayoutChoice();
105 /// Updates the title of the window
106 void updateWindowTitle();
109 /// Show state (toolbar and font in minibuffer)
112 /// Reset autosave timer
113 void resetAutosaveTimer();
120 MiniBuffer * minibuffer;
128 /** This is supposed to be a pointer or a list of pointers to the
129 BufferViews currently being shown in the LyXView. So far
130 this is not used, but that should change pretty soon. (Lgb) */
131 BufferView * bufferview;
133 void invalidateLayoutChoice();
137 static int KeyPressMask_raw_callback(FL_FORM *, void * xev);
139 /** This callback is run when a close event is sent from the
141 static int atCloseMainFormCB(FL_FORM *, void *);
146 Timeout autosave_timeout;
147 /// makes the main form.
148 void create_form_form_main(int width, int height);
149 /// A pointer to the form.
151 /** The last textclass layout list in the layout choice selector
152 This should probably be moved to the toolbar, but for now it's