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;
29 class ControlCommandBuffer;
32 /// in xforms, the minibuffer is both a status bar and a command buffer
36 XMiniBuffer(XFormsView & owner, ControlCommandBuffer & control);
41 /// repaint the minibuffer
44 /// command completion, history, etc. management
45 int peek_event(FL_OBJECT *, int, int, XEvent * xev);
48 void message(std::string const & str);
50 /// focus the buffer for editing mode
51 void focus() { messageMode(false); }
53 /// disable event management
56 /// xforms callback routine
57 void freebrowserCB(int action);
60 /// Are we in editing mode?
61 bool isEditingMode() const;
63 /// reset buffer to stored input text
66 /// go back to "at rest" message
69 /// set the minibuffer content in editing mode
70 void set_input(std::string const &);
72 /// go into message mode
73 void messageMode(bool on = true);
75 /// show a temporary message whilst in edit mode
76 void show_info(std::string const & info, std::string const & input, bool append = true);
79 boost::shared_ptr<FL_FREEBROWSER> freebrowser_;
82 boost::scoped_ptr<Timeout> info_timer_;
85 boost::scoped_ptr<Timeout> idle_timer_;
88 boost::signals::connection info_con;
90 boost::signals::connection idle_con;
92 boost::signals::connection result_con;
94 boost::signals::connection keypress_con;
96 /// This is the input widget object
99 /// the controller we use
100 ControlCommandBuffer & controller_;
102 /// stored input when showing info
103 std::string stored_input_;
105 /// are we showing an informational temporary message ?
108 lyx::frontend::Box * minibuffer_;
110 lyx::frontend::WidgetMap widgets_;
113 #endif // XMINIBUFFER_H