3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Angus Leeming
8 * Full author contact details are available in file CREDITS.
10 * A combination of two objects (a button and a browser) is encapsulated to
11 * get a combobox-like object.
17 #include "lyx_forms.h"
19 #if defined(__cplusplus)
24 /** This will eventually be moved into the enum of in-built widgets
30 /** The various types of combox. */
36 /** How the browser should be displayed relative to the buttons. */
42 /** A function to create a combox widget.
43 * \param type is, as yet, unused. there is only one type of combox.
44 * \param x the x coordinate of the upper left hand corner of the widget,
45 * relative to the parent form's origin.
46 * \param y the y coordinate of the upper left hand corner of the widget,
47 * relative to the parent form's origin.
48 * \param w the widget's width
49 * \param h the widget's height
50 * \param label the widget's label as it appears on the GUI.
53 fl_create_combox(FL_COMBOX_TYPE type,
54 FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h,
57 /** A function to create a combox widget and add it to the parent form.
58 * \see fl_create_combox() for an explanation of the argument list.
61 fl_add_combox(FL_COMBOX_TYPE type,
62 FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h,
65 /** The combox browser has a default height of 100 pixels. Adjust to suit. */
67 fl_set_combox_browser_height(FL_OBJECT * ob, int bh);
69 /** The browser will be displayed either below or above the button,
70 * dependent upon \c position.
73 fl_set_combox_position(FL_OBJECT * ob, FL_COMBOX_POSITION position);
75 /** Empty the browser and the combox. */
77 fl_clear_combox(FL_OBJECT * ob);
79 /** Add a line to the combox browser. */
81 fl_addto_combox(FL_OBJECT * ob, char const * text);
83 /** Set the combox to return line \c choice of the combox browser. */
85 fl_set_combox(FL_OBJECT * ob, int choice);
87 /** \return the currently selected line of the combox browser. */
89 fl_get_combox(FL_OBJECT * ob);
91 /** \return the contents of the combox.
92 * (Also the contents of currently selected line of the combox browser.)
94 FL_EXPORT char const *
95 fl_get_combox_text(FL_OBJECT * ob);
97 /** \return the contents of \c line of the combox browser. */
98 FL_EXPORT char const *
99 fl_get_combox_line(FL_OBJECT * ob, int line);
101 /** \return the number of items in the combox browser. */
103 fl_get_combox_maxitems(FL_OBJECT * ob);
105 /** Show the browser */
107 fl_show_combox_browser(FL_OBJECT * ob);
109 /** Hide the browser */
111 fl_hide_combox_browser(FL_OBJECT * ob);
113 #if defined(__cplusplus)
117 #endif /* NOT FL_COMBOX_H */