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 the x coordinate of the upper left hand corner of the widget,
43 * relative to the parent form'd origin.
44 * \param y the y coordinate of the upper left hand corner of the widget,
45 * relative to the parent form'd origin.
46 * \param w the widget's width
47 * \param h the widget's height
48 * \param label the widget's label as it appears on the GUI.
51 fl_create_combox(FL_COMBOX_TYPE type,
52 FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h,
55 /** A function to create a combox widget and add it to the parent form.
56 * \see fl_create_combox() for an explanation of the argument list.
59 fl_add_combox(FL_COMBOX_TYPE type,
60 FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h,
63 /** The combox browser has a default height of 100 pixels. Adjust to suit. */
65 fl_set_combox_browser_height(FL_OBJECT * ob, int bh);
67 /** The browser will be displayed either below or above the button,
68 * dependent upon \c position.
71 fl_set_combox_position(FL_OBJECT * ob, FL_COMBOX_POSITION position);
73 /** Empty the browser and the combox. */
75 fl_clear_combox(FL_OBJECT * ob);
77 /** Add a line to the combox browser. */
79 fl_addto_combox(FL_OBJECT * ob, char const * text);
81 /** Set the combox to return line \c choice of the combox browser. */
83 fl_set_combox(FL_OBJECT * ob, int choice);
85 /** \return the currently selected line of the combox browser. */
87 fl_get_combox(FL_OBJECT * ob);
89 /** \return the contents of the combox.
90 * (Also the contents of currently selected line of the combox browser.)
92 FL_EXPORT char const *
93 fl_get_combox_text(FL_OBJECT * ob);
95 /** \return the contents of \c line of the combox browser. */
96 FL_EXPORT char const *
97 fl_get_combox_line(FL_OBJECT * ob, int line);
99 /** \return the number of items in the combox browser. */
101 fl_get_combox_maxitems(FL_OBJECT * ob);
103 /** Show the browser */
105 fl_show_combox_browser(FL_OBJECT * ob);
107 /** Hide the browser */
109 fl_hide_combox_browser(FL_OBJECT * ob);
111 #if defined(__cplusplus)
115 #endif /* not FL_COMBOX_H */