]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/XMiniBuffer.h
portoaddons
[lyx.git] / src / frontends / xforms / XMiniBuffer.h
1 // -*- C++ -*-
2 /**
3  * \file XMiniBuffer.h
4  * Copyright 1995-2002 the LyX Team
5  * Read the file COPYING
6  *
7  * \author Lars
8  * \author Asger and Juergen
9  */
10
11 #ifndef XMINIBUFFER_H
12 #define XMINIBUFFER_H
13
14 #include "frontends/MiniBuffer.h"
15
16 #include FORMS_H_LOCATION
17
18 #ifdef __GNUG__
19 #pragma interface
20 #endif
21
22 class DropDown;
23
24 ///
25 class XMiniBuffer : public MiniBuffer {
26 public:
27         ///
28         XMiniBuffer(LyXView * o,
29                     FL_Coord x, FL_Coord y, FL_Coord h, FL_Coord w);
30
31         /// destructor
32         ~XMiniBuffer();
33
34         /// create drop down
35         void dd_init();
36
37         ///
38         void redraw();
39
40         ///
41         int peek_event(FL_OBJECT *, int, int, XEvent * xev);
42
43 protected:
44         /// Are we in editing mode?
45         virtual bool isEditingMode() const;
46         /// enter editing mode
47         virtual void editingMode();
48         /// enter message display mode
49         virtual void messageMode();
50
51         /**
52          * Append "c" to the current input contents when the completion
53          * list is displayed and has focus.
54          */
55         void append_char(char c);
56
57         /// set the minibuffer content in editing mode
58         virtual void set_input(string const &);
59
60         /// This creates the input widget for the minibuffer
61         FL_OBJECT * create_input_box(int, FL_Coord, FL_Coord, FL_Coord, FL_Coord);
62
63         /// the dropdown menu
64         DropDown * dropdown_;
65
66         /// This is the input widget object
67         FL_OBJECT * the_buffer;
68 };
69 #endif