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 <boost/scoped_ptr.hpp>
20 #include <boost/shared_ptr.hpp>
21 #include <boost/signals/connection.hpp>
23 struct fl_freebrowser_;
24 typedef fl_freebrowser_ FL_FREEBROWSER;
26 class ControlCommandBuffer;
29 /// in xforms, the minibuffer is both a status bar and a command buffer
33 XMiniBuffer(ControlCommandBuffer & control,
34 FL_Coord x, FL_Coord y, FL_Coord h, FL_Coord w);
39 /// repaint the minibuffer
42 /// command completion, history, etc. management
43 int peek_event(FL_OBJECT *, int, int, XEvent * xev);
46 void message(std::string const & str);
48 /// focus the buffer for editing mode
49 void focus() { messageMode(false); }
51 /// disable event management
54 /// xforms callback routine
55 void freebrowserCB(int action);
58 /// Are we in editing mode?
59 bool isEditingMode() const;
61 /// reset buffer to stored input text
64 /// go back to "at rest" message
67 /// set the minibuffer content in editing mode
68 void set_input(std::string const &);
70 /// go into message mode
71 void messageMode(bool on = true);
73 /// show a temporary message whilst in edit mode
74 void show_info(std::string const & info, std::string const & input, bool append = true);
77 boost::shared_ptr<FL_FREEBROWSER> freebrowser_;
80 boost::scoped_ptr<Timeout> info_timer_;
83 boost::scoped_ptr<Timeout> idle_timer_;
86 boost::signals::connection info_con;
88 boost::signals::connection idle_con;
90 boost::signals::connection result_con;
92 boost::signals::connection keypress_con;
94 /// This is the input widget object
97 /// the controller we use
98 ControlCommandBuffer & controller_;
100 /// stored input when showing info
101 std::string stored_input_;
103 /// are we showing an informational temporary message ?
107 #endif // XMINIBUFFER_H