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 #if defined(__cplusplus)
22 /** This will eventually be moved into the enum of in-built widgets
28 /** The various types of combox. */
34 /** How the browser should be displayed relative to the buttons. */
40 /** A function to create a combox widget.
41 * \param type is, as yet, unused. there is only one type of combox.
42 * \param x, \param y: the x,y coordinates of the upper left hand corner
43 * of the widget, relative to the parent form'd origin.
44 * \param w, \param h: the widget's dimensions.
45 * \param label: the widget's label as it appears on the GUI.
48 fl_create_combox(FL_COMBOX_TYPE type,
49 FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h,
52 /** A function to create a combox widget and add it to the parent form.
53 * \see fl_create_combox() for an explanation of the argument list.
56 fl_add_combox(FL_COMBOX_TYPE type,
57 FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h,
60 /** The combox browser has a default height of 100 pixels. Adjust to suit. */
62 fl_set_combox_browser_height(FL_OBJECT * ob, int bh);
64 /** The browser will be displayed either below or above the button,
65 * dependent upon \param position.
68 fl_set_combox_position(FL_OBJECT * ob, FL_COMBOX_POSITION position);
70 /** Empty the browser and the combox, \param ob. */
72 fl_clear_combox(FL_OBJECT * ob);
74 /** Add a line to the combox browser.*/
76 fl_addto_combox(FL_OBJECT * ob, char const * text);
78 /** Set the combox to return line \param choice of the combox browser. */
80 fl_set_combox(FL_OBJECT * ob, int choice);
82 /** \return the currently selected line of the combox browser. */
84 fl_get_combox(FL_OBJECT * ob);
86 /** \return the contents of the combox.
87 * (Also the contents of currently selected line of the combox browser.)
89 FL_EXPORT char const *
90 fl_get_combox_text(FL_OBJECT * ob);
92 /** \return the contents of \param line of the combox browser. */
93 FL_EXPORT char const *
94 fl_get_combox_line(FL_OBJECT * ob, int line);
96 /** \return the number of items in the combox browser. */
98 fl_get_combox_maxitems(FL_OBJECT * ob);
100 /** Show the browser */
102 fl_show_combox_browser(FL_OBJECT * ob);
104 /** Hide the browser */
106 fl_hide_combox_browser(FL_OBJECT * ob);
108 #if defined(__cplusplus)
112 #endif /* not FL_COMBOX_H */