]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/freebrowser.h
remove defaults stuff, let Qt handle no toolbar
[lyx.git] / src / frontends / xforms / freebrowser.h
1 /**
2  * \file freebrowser.h
3  * \author Angus Leeming
4  *
5  * A freebrowser is a browser widget in its own form.
6  * It is used for example to instantiate the drop-down list beneath a
7  * combox.
8  */
9
10 #ifndef FL_FREEBROWSER_H
11 #define FL_FREEBROWSER_H
12
13 #if defined(__cplusplus)
14 extern "C"
15 {
16 #endif
17
18 enum freebrowser_position {
19     FL_FREEBROWSER_BELOW,
20     FL_FREEBROWSER_ABOVE
21 };
22
23 typedef struct fl_freebrowser_ {
24     /** Use this and you'll be told when something happens.
25      *  \param == 0: the browser has merely been hidden.
26      *         == 1: a change has been made.
27      */
28     void (* callback) (struct fl_freebrowser_ *, int action);
29
30     /** Set this to 1 if you want to capture all KeyPress events
31      *  generating printable chars.
32      */
33     int want_printable;
34     /** Is set only if want_printable is true. */
35     char last_printable;
36
37     /** Details of the implementation. */
38     void * parent;
39     FL_FORM * form;
40     FL_OBJECT * browser;
41     Window save_window;
42 } FL_FREEBROWSER;
43
44
45 /** A function to create a freebrowser widget, "owned" by widget \param parent.
46  */
47 FL_EXPORT FL_FREEBROWSER * fl_create_freebrowser(void * parent);
48
49 FL_EXPORT void fl_free_freebrowser(FL_FREEBROWSER *);
50
51 /** \param abs_x, \param abs_y are the coordinates of the top left corner
52  *  of the browser relative to the top left hand corner of the _screen_.
53  *  \param w, \param h are the browser dimensions.
54  */
55 FL_EXPORT void fl_show_freebrowser(FL_FREEBROWSER *,
56                                    FL_Coord abs_x, FL_Coord abs_y,
57                                    FL_Coord w, FL_Coord h);
58
59 FL_EXPORT void fl_hide_freebrowser(FL_FREEBROWSER *);
60
61 /** Return the browser itself. */
62 FL_EXPORT FL_OBJECT * fl_get_freebrowser_browser(FL_FREEBROWSER *);
63
64 #if defined(__cplusplus)
65 }
66 #endif
67
68 #endif