]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/gtk/GView.h
make it compile again
[lyx.git] / src / frontends / gtk / GView.h
index 039532bca571357c79baf6372f8fb7332fede6c2..655cdb4646b4cf99424d900efe6623f2a480deaf 100644 (file)
 #ifndef GVIEW_H
 #define GVIEW_H
 
-#include "frontends/LyXView.h"
 #include "bufferview_funcs.h"
-#include <memory>
+
+#include "frontends/LyXView.h"
+
+#include <gtkmm.h>
+
+#include <map>
+
+namespace lyx {
+namespace frontend {
+
 class GMiniBuffer;
 
-class GView : public LyXView, public Gtk::Window
-{
+class GView : public LyXView, public Gtk::Window {
 public:
-       virtual ~GView();
+       enum Position {
+               Top,
+               Bottom,
+               Left,
+               Right,
+               Center
+       };
+
+       GView();
+       ~GView();
+
+       Gtk::Box & getBox(Position pos);
 
        virtual void prohibitInput() const;
        virtual void allowInput() const;
-       virtual void message(std::string const &);
-       Gtk::VBox & getVBox() { return *vbox_.get(); }
-       GView();
+       virtual void message(lyx::docstring const &);
+
        bool on_delete_event(GdkEventAny * event);
        void focusWorkArea() { workArea_->grab_focus(); }
        void setGWorkArea(Gtk::Widget * w) { workArea_ = w; }
-       static GView * instance() { return view_; }
+
        /// show busy cursor
        virtual void busy(bool) const;
+
+       ///
+       Toolbars::ToolbarPtr makeToolbar(ToolbarBackend::Toolbar const & tbb);
+
        /// clear any temporary message and replace with current status
        virtual void clearMessage();
+
+       // returns true if this view has the focus.
+       virtual bool hasFocus() const;
+       ///
+       void updateStatusBar();
+
 private:
-       void showViewState();
        bool onFocusIn(GdkEventFocus * event);
-       virtual void setWindowTitle(std::string const & t, std::string const & it);
-       static GView * view_;
-       std::auto_ptr<Gtk::VBox> vbox_;
+       virtual void setWindowTitle(lyx::docstring const & t, lyx::docstring const & it);
+
+       // The top-most box containing all other boxes.
+       Gtk::VBox top_box_;
+
+       // The physical store for the boxes making up the layout.
+       typedef boost::shared_ptr<Gtk::Box> BoxPtr;
+       typedef std::vector<BoxPtr> BoxStore;
+       BoxStore box_store_;
+
+       // Accessors to the various Boxes.
+       std::map<Position, BoxPtr> box_map_;
+
        boost::scoped_ptr<GMiniBuffer> minibuffer_;
        Gtk::Widget * workArea_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif