]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/DropDown.h
John's spellchecker patch plus a new helper function getStringFromBrowser.
[lyx.git] / src / frontends / xforms / DropDown.h
1 /**
2  * \file DropDown.h
3  * Copyright 2001 the LyX Team
4  * Read the file COPYING
5  *
6  * \author John Levon <moz@compsoc.man.ac.uk>
7  */
8
9 #ifndef DROPDOWN_H
10 #define DROPDOWN_H
11  
12 #include "LyXView.h"
13 #include <sigc++/signal_system.h> 
14 #include "LString.h"
15 #include FORMS_H_LOCATION
16 #include <vector>
17  
18 class DropDown {
19 public:
20         /// constructor
21         DropDown(LyXView * lv, FL_OBJECT * ob);
22         /// destructor
23         ~DropDown();
24  
25         /// choose from the list of choices.
26         void select(std::vector<string> const & choices, int x, int y, int w);
27
28         /// user completed action
29         void completed();
30  
31         /// signal for completion
32         SigC::Signal1<void, string const &> result;
33          
34         /// X event
35         int peek(XEvent *);
36
37 private:
38         /// move up a browser line 
39         void line_up();
40
41         /// move down a browser line
42         void line_down();
43  
44         /// owning lyxview
45         LyXView * lv_;
46  
47         /// our form
48         FL_FORM * form_;
49
50         /// the browser
51         FL_OBJECT * browser_;
52 };
53
54 #endif // DROPDOWN_H