4 * Copyright 1995-2002 the LyX Team
5 * Read the file COPYING
8 * \author Asger and Juergen
9 * \author John Levon <levon@movementarian.org>
15 #include FORMS_H_LOCATION
17 #include <boost/scoped_ptr.hpp>
18 #include <boost/signals/connection.hpp>
25 class ControlCommandBuffer;
28 /// in xforms, the minibuffer is both a status bar and a command buffer
32 XMiniBuffer(XFormsView * o, ControlCommandBuffer & control,
33 FL_Coord x, FL_Coord y, FL_Coord h, FL_Coord w);
41 /// repaint the minibuffer
44 /// command completion, history, etc. management
45 int peek_event(FL_OBJECT *, int, int, XEvent * xev);
48 void message(string const & str);
50 /// focus the buffer for editing mode
51 void focus() { messageMode(false); }
53 /// disable event management
57 /// Are we in editing mode?
58 bool isEditingMode() const;
60 /// reset buffer to stored input text
63 /// go back to "at rest" message
67 * Append "c" to the current input contents when the completion
68 * list is displayed and has focus.
70 void append_char(char c);
72 /// completion selection callback
73 void set_complete_input(string const & str);
75 /// set the minibuffer content in editing mode
76 void set_input(string const &);
78 /// This creates the input widget for the minibuffer
79 FL_OBJECT * create_input_box(int, FL_Coord, FL_Coord, FL_Coord, FL_Coord);
81 /// go into message mode
82 void messageMode(bool on = true);
84 /// show a temporary message whilst in edit mode
85 void show_info(string const & info, string const & input, bool append = true);
88 boost::scoped_ptr<DropDown> dropdown_;
91 boost::scoped_ptr<Timeout> info_timer_;
94 boost::scoped_ptr<Timeout> idle_timer_;
97 boost::signals::connection info_con;
99 boost::signals::connection idle_con;
101 boost::signals::connection result_con;
103 boost::signals::connection keypress_con;
104 /// This is the input widget object
105 FL_OBJECT * the_buffer_;
108 FL_OBJECT * input_obj_;
110 /// the controller we use
111 ControlCommandBuffer & controller_;
116 /// stored input when showing info
117 string stored_input_;
119 /// are we showing an informational temporary message ?
123 #endif // XMINIBUFFER_H