fltk/documentation/Fl_Browser_.html

134 lines
5.6 KiB
HTML
Raw Normal View History

<HTML><BODY>
<HR break>
<H2><A name=Fl_Browser_>class Fl_Browser_</A></H2>
<HR>
<H3>Class Hierarchy</H3>
<UL>
<PRE>
<A href=Fl_Widget.html#Fl_Widget>Fl_Widget</A>
|
+----<B>Fl_Browser_</B>
|
+----<A href=Fl_Browser.html#Fl_Browser>Fl_Browser</A>
</PRE>
</UL>
<H3>Include Files</H3>
<UL>
<PRE>
#include &lt;FL/Fl_Browser_.H&gt;
</PRE>
</UL>
<H3>Description</H3>
This is the base class for browsers. To be useful it must be
subclassed and several virtual functions defined. The Forms-compatable
browser and the file chooser's browser are subclassed off of this.
<P>This has been designed so that the subclass has complete control
over the storage of the data, although because <TT>next()</TT> and <TT>
prev()</TT> functions are used to index, it works best as a linked list
or as a large block of characters in which the line breaks must be
searched for. </P>
<P>A great deal of work has been done so that the &quot;height&quot; of a data
object does not need to be determined until it is drawn. This is
useful if actually figuring out the size of an object requires
accessing image data or doing <TT>stat()</TT> on a file or doing some
other slow operation. </P>
<H3>Methods</H3>
<CENTER>
<TABLE width=90%>
<TR><TD align=left valign=top>
<UL>
<LI><A href=#Fl_Browser_.Fl_Browser_>Fl_Browser_</A></LI>
<LI><A href=#Fl_Browser_.~Fl_Browser_>~Fl_Browser_</A></LI>
<LI><A href=#Fl_Browser_.bbox>bbox</A></LI>
<LI><A href=#Fl_Browser_.deleting>deleting</A></LI>
<LI><A href=#Fl_Browser_.deselect>deselect</A></LI>
<LI><A href=#Fl_Browser_.display>display</A></LI>
<LI><A href=#Fl_Browser_.displayed>displayed</A></LI>
<LI><A href=#Fl_Browser_.draw>draw</A></LI>
<LI><A href=#Fl_Browser_.find_item>find_item</A></LI>
</UL>
</TD><TD align=left valign=top>
<UL>
<LI><A href=#Fl_Browser_.full_height>full_height</A></LI>
<LI><A href=#Fl_Browser_.full_width>full_width</A></LI>
<LI><A href=#Fl_Browser_.handle>handle</A></LI>
<LI><A href=#Fl_Browser_.has_scrollbar>has_scrollbar</A></LI>
<LI><A href=#Fl_Browser_.hposition>hposition</A></LI>
<LI><A href=#Fl_Browser_.incr_height>incr_height</A></LI>
<LI><A href=#Fl_Browser_.inserting>inserting</A></LI>
<LI><A href=#Fl_Browser_.item_draw>item_draw</A></LI>
</UL>
</TD><TD align=left valign=top>
<UL>
<LI><A href=#Fl_Browser_.item_first>item_first</A></LI>
<LI><A href=#Fl_Browser_.item_height>item_height</A></LI>
<LI><A href=#Fl_Browser_.item_next>item_next</A></LI>
<LI><A href=#Fl_Browser_.item_prev>item_prev</A></LI>
<LI><A href=#Fl_Browser_.item_quick_height>item_quick_height</A></LI>
<LI><A href=#Fl_Browser_.item_select>item_select</A></LI>
<LI><A href=#Fl_Browser_.item_selected>item_selected</A></LI>
<LI><A href=#Fl_Browser_.item_width>item_width</A></LI>
</UL>
</TD><TD align=left valign=top>
<UL>
<LI><A href=#Fl_Browser_.leftedge>leftedge</A></LI>
<LI><A href=#Fl_Browser_.new_list>new_list</A></LI>
<LI><A href=#Fl_Browser_.position>position</A></LI>
<LI><A href=#Fl_Browser_.redraw_line>redraw_line</A></LI>
<LI><A href=#Fl_Browser_.redraw_lines>redraw_lines</A></LI>
<LI><A href=#Fl_Browser_.replacing>replacing</A></LI>
<LI><A href=#Fl_Browser_.resize>resize</A></LI>
<LI><A href=#Fl_Browser_.scrollbar_left>scrollbar_left</A></LI>
</UL>
</TD><TD align=left valign=top>
<UL>
<LI><A href=#Fl_Browser_.scrollbar_right>scrollbar_right</A></LI>
<LI><A href=#Fl_Browser_.select>select</A></LI>
<LI><A href=#Fl_Browser_.select_only>select_only</A></LI>
<LI><A href=#Fl_Browser_.selection>selection</A></LI>
<LI><A href=#Fl_Browser_.textcolor>textcolor</A></LI>
<LI><A href=#Fl_Browser_.textfont>textfont</A></LI>
<LI><A href=#Fl_Browser_.textsize>textsize</A></LI>
<LI><A href=#Fl_Browser_.top>top</A></LI>
</UL>
</TD></TR>
</TABLE>
</CENTER>
<H4><A name=Fl_Browser_.Fl_Browser_>Fl_Browser::Fl_Browser(int, int,
int, int, const char * = 0)</A></H4>
The constructor makes an empty browser.
<H4><A name=Fl_Browser_.~Fl_Browser_>Fl_Browser::~Fl_Browser(void)</A></H4>
The destructor deletes all list items and destroys the browser.
<H4><A name=Fl_Browser_.has_scrollbar>void
Fl_Browser_::has_scrollbar(int h)</A></H4>
By default you can scroll in both directions, and the scrollbars
disappear if the data will fit in the widget. has_scrollbar() changes
this based on the value of <TT>h</TT>:
<UL>
<LI><CODE>0</CODE> - No scrollbars </LI>
<LI><CODE>Fl_Browser_::HORIZONTAL</CODE> - Only a horizontal scrollbar. </LI>
<LI><CODE>Fl_Browser_::VERTICAL</CODE> - Only a vertical scrollbar. </LI>
<LI><CODE>Fl_Browser_::BOTH</CODE> - The default is both scrollbars. </LI>
<LI><CODE>Fl_Browser_::HORIZONTAL_ALWAYS</CODE> - Horizontal scrollbar
always on, vertical always off. </LI>
<LI><CODE>Fl_Browser_::VERTICAL_ALWAYS</CODE> - Vertical scrollbar
always on, horizontal always off. </LI>
<LI><CODE>Fl_Browser_::BOTH_ALWAYS</CODE> - Both always on. </LI>
</UL>
<H4><A name=Fl_Browser_.textcolor>Fl_Color Fl_Browser_::textcolor()
const
<BR> void Fl_Browser_::textcolor(Fl_Color color)</A></H4>
The first form gets the default text color for the lines in the
browser.
<P>The second form sets the default text color to <TT>color</TT></P>
<H4><A name=Fl_Browser_.textfont>Fl_Font Fl_Browser_::textfont() const
<BR> void Fl_Browser_::textfont(Fl_Font font)</A></H4>
The first form gets the default text font for the lines in the
browser.
<P>The second form sets the default text font to <TT>font</TT></P>
<H4><A name=Fl_Browser_.textsize>uchar Fl_Browser_::textsize() const
<BR> void Fl_Browser_::textsize(uchar size)</A></H4>
The first form gets the default text size for the lines in the
browser.
<P>The second form sets the default text size to <TT>size</TT></P>
</BODY></HTML>