4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * \author Asger and Jürgen
11 * Full author contact details are available in file CREDITS.
17 #include "lyx_forms.h"
19 #include "LayoutEngine.h"
21 #include <boost/scoped_ptr.hpp>
22 #include <boost/shared_ptr.hpp>
23 #include <boost/signals/connection.hpp>
25 struct fl_freebrowser_;
26 typedef fl_freebrowser_ FL_FREEBROWSER;
34 class ControlCommandBuffer;
36 /// in xforms, the minibuffer is both a status bar and a command buffer
40 XMiniBuffer(XFormsView & owner, ControlCommandBuffer & control);
45 /// repaint the minibuffer
48 /// command completion, history, etc. management
49 int peek_event(FL_OBJECT *, int, int, XEvent * xev);
52 void message(std::string const & str);
54 /// focus the buffer for editing mode
55 void focus() { messageMode(false); }
57 /// disable event management
60 /// xforms callback routine
61 void freebrowserCB(int action);
64 /// Are we in editing mode?
65 bool isEditingMode() const;
67 /// reset buffer to stored input text
70 /// go back to "at rest" message
73 /// set the minibuffer content in editing mode
74 void set_input(std::string const &);
76 /// go into message mode
77 void messageMode(bool on = true);
79 /// show a temporary message whilst in edit mode
80 void show_info(std::string const & info, std::string const & input, bool append = true);
83 boost::shared_ptr<FL_FREEBROWSER> freebrowser_;
86 boost::scoped_ptr<Timeout> info_timer_;
89 boost::scoped_ptr<Timeout> idle_timer_;
92 boost::signals::connection info_con;
94 boost::signals::connection idle_con;
96 boost::signals::connection result_con;
98 boost::signals::connection keypress_con;
100 /// This is the input widget object
103 /// the controller we use
104 ControlCommandBuffer & controller_;
106 /// stored input when showing info
107 std::string stored_input_;
109 /// are we showing an informational temporary message ?
112 boost::shared_ptr<Box> minibuffer_;
117 } // namespace frontend
120 #endif // XMINIBUFFER_H