4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * \author Asger and Juergen
11 * Full author contact details are available in file CREDITS.
17 #include "lyx_forms.h"
20 #include <boost/scoped_ptr.hpp>
21 #include <boost/shared_ptr.hpp>
22 #include <boost/signals/connection.hpp>
24 struct fl_freebrowser_;
25 typedef fl_freebrowser_ FL_FREEBROWSER;
27 class ControlCommandBuffer;
30 /// in xforms, the minibuffer is both a status bar and a command buffer
34 XMiniBuffer(ControlCommandBuffer & control,
35 FL_Coord x, FL_Coord y, FL_Coord h, FL_Coord w);
40 /// repaint the minibuffer
43 /// command completion, history, etc. management
44 int peek_event(FL_OBJECT *, int, int, XEvent * xev);
47 void message(string const & str);
49 /// focus the buffer for editing mode
50 void focus() { messageMode(false); }
52 /// disable event management
55 /// xforms callback routine
56 void freebrowserCB(int action);
59 /// Are we in editing mode?
60 bool isEditingMode() const;
62 /// reset buffer to stored input text
65 /// go back to "at rest" message
68 /// set the minibuffer content in editing mode
69 void set_input(string const &);
71 /// go into message mode
72 void messageMode(bool on = true);
74 /// show a temporary message whilst in edit mode
75 void show_info(string const & info, string const & input, bool append = true);
78 boost::shared_ptr<FL_FREEBROWSER> freebrowser_;
81 boost::scoped_ptr<Timeout> info_timer_;
84 boost::scoped_ptr<Timeout> idle_timer_;
87 boost::signals::connection info_con;
89 boost::signals::connection idle_con;
91 boost::signals::connection result_con;
93 boost::signals::connection keypress_con;
95 /// This is the input widget object
98 /// the controller we use
99 ControlCommandBuffer & controller_;
101 /// stored input when showing info
102 string stored_input_;
104 /// are we showing an informational temporary message ?
108 #endif // XMINIBUFFER_H