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. */
61 FL_EXPORT void fl_set_combox_browser_height(FL_OBJECT * ob, int bh);
63 /** The browser will be displayed either below or above the button,
64 * dependent upon \param position.
66 FL_EXPORT void fl_set_combox_position(FL_OBJECT * ob,
67 FL_COMBOX_POSITION position);
69 /** Empty the browser and the combox, \param ob. */
70 FL_EXPORT void fl_clear_combox(FL_OBJECT * ob);
72 /** Add a line to the combox browser.*/
73 FL_EXPORT void fl_addto_combox(FL_OBJECT * ob, char const * text);
75 /** Set the combox to return line \param choice of the combox browser. */
76 FL_EXPORT void fl_set_combox(FL_OBJECT * ob, int choice);
78 /** \return the currently selected line of the combox browser. */
79 FL_EXPORT int fl_get_combox(FL_OBJECT * ob);
81 /** \return the contents of the combox.
82 * (Also the contents of currently selected line of the combox browser.)
84 FL_EXPORT char const * fl_get_combox_text(FL_OBJECT * ob);
86 /** \return the contents of \param line of the combox browser. */
87 FL_EXPORT char const * fl_get_combox_line(FL_OBJECT * ob, int line);
89 /** \return the number of items in the combox browser. */
90 FL_EXPORT int fl_get_combox_maxitems(FL_OBJECT * ob);
92 /** Show the browser */
93 void fl_show_combox_browser(FL_OBJECT * ob);
95 /** Hide the browser */
96 void fl_hide_combox_browser(FL_OBJECT * ob);
98 #if defined(__cplusplus)