]> git.lyx.org Git - lyx.git/blob - src/frontends/gtk/GView.h
Minipage is no more (long live the box inset)
[lyx.git] / src / frontends / gtk / GView.h
1 // -*- C++ -*-
2 /**
3  * \file gtk/GView.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Huang Ying
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef GVIEW_H
13 #define GVIEW_H
14
15 #include "frontends/LyXView.h"
16 #include "bufferview_funcs.h"
17 #include <memory>
18 class GMiniBuffer;
19
20 class GView : public LyXView, public Gtk::Window
21 {
22 public:
23         virtual ~GView();
24
25         virtual void prohibitInput() const;
26         virtual void allowInput() const;
27         virtual void message(std::string const &);
28         Gtk::VBox & getVBox() { return *vbox_.get(); }
29         GView();
30         bool on_delete_event(GdkEventAny * event);
31         void focusWorkArea() { workArea_->grab_focus(); }
32         void setGWorkArea(Gtk::Widget * w) { workArea_ = w; }
33         static GView * instance() { return view_; }
34         /// show busy cursor
35         virtual void busy(bool) const;
36         /// clear any temporary message and replace with current status
37         virtual void clearMessage();
38 private:
39         void showViewState();
40         bool onFocusIn(GdkEventFocus * event);
41         virtual void setWindowTitle(std::string const & t, std::string const & it);
42         static GView * view_;
43         std::auto_ptr<Gtk::VBox> vbox_;
44         boost::scoped_ptr<GMiniBuffer> minibuffer_;
45         Gtk::Widget * workArea_;
46 };
47
48 #endif