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 FORMS_H_LOCATION
19 #include <boost/scoped_ptr.hpp>
20 #include <boost/signals/connection.hpp>
27 class ControlCommandBuffer;
30 /// in xforms, the minibuffer is both a status bar and a command buffer
34 XMiniBuffer(XFormsView * o, ControlCommandBuffer & control,
35 FL_Coord x, FL_Coord y, FL_Coord h, FL_Coord w);
43 /// repaint the minibuffer
46 /// command completion, history, etc. management
47 int peek_event(FL_OBJECT *, int, int, XEvent * xev);
50 void message(string const & str);
52 /// focus the buffer for editing mode
53 void focus() { messageMode(false); }
55 /// disable event management
59 /// Are we in editing mode?
60 bool isEditingMode() const;
62 /// reset buffer to stored input text
65 /// go back to "at rest" message
69 * Append "c" to the current input contents when the completion
70 * list is displayed and has focus.
72 void append_char(char c);
74 /// completion selection callback
75 void set_complete_input(string const & str);
77 /// set the minibuffer content in editing mode
78 void set_input(string const &);
80 /// This creates the input widget for the minibuffer
81 FL_OBJECT * create_input_box(int, FL_Coord, FL_Coord, FL_Coord, FL_Coord);
83 /// go into message mode
84 void messageMode(bool on = true);
86 /// show a temporary message whilst in edit mode
87 void show_info(string const & info, string const & input, bool append = true);
90 boost::scoped_ptr<DropDown> dropdown_;
93 boost::scoped_ptr<Timeout> info_timer_;
96 boost::scoped_ptr<Timeout> idle_timer_;
99 boost::signals::connection info_con;
101 boost::signals::connection idle_con;
103 boost::signals::connection result_con;
105 boost::signals::connection keypress_con;
106 /// This is the input widget object
107 FL_OBJECT * the_buffer_;
110 FL_OBJECT * input_obj_;
112 /// the controller we use
113 ControlCommandBuffer & controller_;
118 /// stored input when showing info
119 string stored_input_;
121 /// are we showing an informational temporary message ?
125 #endif // XMINIBUFFER_H