3 * \author Angus Leeming
5 * A combination of two objects (a button and a browser) is encapsulated to
6 * get a combobox-like object.
12 #if defined(__cplusplus)
17 /** This will eventually be moved into the enum of in-built widgets
23 /** The types of combox. At the moment, there's only one. */
28 /** A function to create a combox widget.
29 * \param type is, as yet, unused. there is only one type of combox.
30 * \param x, \param y: the x,y coordinates of the upper left hand corner
31 * of the widget, relative to the parent form'd origin.
32 * \param w, \param h: the widget's dimensions.
33 * \param label: the widget's label as it appears on the GUI.
36 fl_create_combox(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h,
39 /** A function to create a combox widget and add it to the parent form.
40 * \see fl_create_combox() for an explanation of the argument list.
43 fl_add_combox(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h,
46 /** The combox browser has a default height of 100 pixels. Adjust to suit. */
47 FL_EXPORT void fl_set_combox_browser_height(FL_OBJECT * ob, int bh);
49 /** The browser will be displayed either below or above the button,
50 * dependent upon \param position.
52 FL_EXPORT void fl_set_combox_position(FL_OBJECT * ob, int position);
54 /** Empty the browser and the combox, \param ob. */
55 FL_EXPORT void fl_clear_combox(FL_OBJECT * ob);
57 /** Add a line to the combox browser.*/
58 FL_EXPORT void fl_addto_combox(FL_OBJECT * ob, char const * text);
60 /** Set the combox to return line \param choice of the combox browser. */
61 FL_EXPORT void fl_set_combox(FL_OBJECT * ob, int choice);
63 /** \return the currently selected line of the combox browser. */
64 FL_EXPORT int fl_get_combox(FL_OBJECT * ob);
66 /** \return the contents of the combox.
67 * (Also the contents of currently selected line of the combox browser.)
69 FL_EXPORT char const * fl_get_combox_text(FL_OBJECT * ob);
71 /** \return the contents of \param line of the combox browser. */
72 FL_EXPORT char const * fl_get_combox_line(FL_OBJECT * ob, int line);
74 /** \return the number of items in the combox browser. */
75 FL_EXPORT int fl_get_combox_maxitems(FL_OBJECT * ob);
77 /** Show the browser */
78 void fl_show_combox_browser(FL_OBJECT * ob);
80 /** Hide the browser */
81 void fl_hide_combox_browser(FL_OBJECT * ob);
83 #if defined(__cplusplus)