4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
13 #ifndef GMINI_BUFFER_H
14 #define GMINI_BUFFER_H
16 #include "frontends/Timeout.h"
21 class ControlCommandBuffer;
23 class GMiniBuffer : public sigc::trackable {
25 GMiniBuffer(GView * view, ControlCommandBuffer & control);
27 void message(std::string const & str);
31 bool onKeyPress(GdkEventKey * event);
32 bool onListKeyPress(GdkEventKey * event);
34 bool onListFocusIn(GdkEventFocus * event);
35 bool onFocusIn(GdkEventFocus * event);
36 bool onFocusOut(GdkEventFocus * event);
39 /// Are we in edit mode?
40 bool isEditMode() const;
41 /// reset buffer to stored input text
43 /// go back to "at rest" message
45 /// go into message mode
47 /// show a temporary message whilst in edit mode
48 void showInfo(Glib::ustring const & info, bool append = true);
49 void setInput(Glib::ustring const & input);
50 ControlCommandBuffer & controller_;
54 boost::scoped_ptr<Timeout> infoTimer_;
55 boost::signals::connection infoCon_;
57 boost::scoped_ptr<Timeout> idleTimer_;
58 boost::signals::connection idleCon_;
59 Glib::ustring storedInput_;
60 /// are we showing an informational temporary message ?
62 boost::scoped_ptr<Timeout> focusTimer_;
64 Gtk::ScrolledWindow scrolledWindow_;
65 Gtk::TreeModelColumn<Glib::ustring> listCol_;
66 Gtk::TreeModel::ColumnRecord listCols_;
67 Glib::RefPtr<Gtk::ListStore> listStore_;
68 Gtk::TreeView listView_;
69 Glib::RefPtr<Gtk::TreeSelection> listSel_;
72 } // namespace frontend