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>
24 class ControlCommandBuffer;
27 /// in xforms, the minibuffer is both a status bar and a command buffer
30 XMiniBuffer(XFormsView * o, ControlCommandBuffer & control,
31 FL_Coord x, FL_Coord y, FL_Coord h, FL_Coord w);
38 /// repaint the minibuffer
41 /// command completion, history, etc. management
42 int peek_event(FL_OBJECT *, int, int, XEvent * xev);
45 void message(string const & str);
47 /// focus the buffer for editing mode
48 void focus() { messageMode(false); }
50 /// disable event management
54 /// Are we in editing mode?
55 bool isEditingMode() const;
57 /// reset buffer to stored input text
60 /// go back to "at rest" message
64 * Append "c" to the current input contents when the completion
65 * list is displayed and has focus.
67 void append_char(char c);
69 /// completion selection callback
70 void set_complete_input(string const & str);
72 /// set the minibuffer content in editing mode
73 void set_input(string const &);
75 /// This creates the input widget for the minibuffer
76 FL_OBJECT * create_input_box(int, FL_Coord, FL_Coord, FL_Coord, FL_Coord);
78 /// go into message mode
79 void messageMode(bool on = true);
81 /// show a temporary message whilst in edit mode
82 void show_info(string const & info, string const & input, bool append = true);
85 boost::scoped_ptr<DropDown> dropdown_;
88 boost::scoped_ptr<Timeout> info_timer_;
91 boost::scoped_ptr<Timeout> idle_timer_;
93 /// This is the input widget object
94 FL_OBJECT * the_buffer_;
97 FL_OBJECT * input_obj_;
99 /// the controller we use
100 ControlCommandBuffer & controller_;
105 /// stored input when showing info
106 string stored_input_;
108 /// are we showing an informational temporary message ?
112 #endif // XMINIBUFFER_H