summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFabien Costantini <fabien@onepost.net>2008-09-14 12:45:42 +0000
committerFabien Costantini <fabien@onepost.net>2008-09-14 12:45:42 +0000
commit58548b781d7c3f0fa6c8c72c63dece888a02ea43 (patch)
treeaf4c8ec52edf7fb82f0201a21a6cfe4da9daf759 /src
parent8bc9d467efaca58d5f515e47dd07eda9533a24b0 (diff)
Doxygen Documentation WP2 done.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6235 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Browser.cxx52
-rw-r--r--src/Fl_Browser_.cxx113
-rw-r--r--src/Fl_Browser_load.cxx8
-rw-r--r--src/Fl_Check_Browser.cxx21
-rw-r--r--src/Fl_File_Chooser2.cxx288
-rw-r--r--src/glut_font.cxx4
6 files changed, 470 insertions, 16 deletions
diff --git a/src/Fl_Browser.cxx b/src/Fl_Browser.cxx
index 5e24bbce9..c7325b583 100644
--- a/src/Fl_Browser.cxx
+++ b/src/Fl_Browser.cxx
@@ -128,11 +128,16 @@ FL_BLINE* Fl_Browser::_remove(int line) {
return(ttt);
}
+/** Remove line n and make the browser one line shorter.*/
void Fl_Browser::remove(int line) {
if (line < 1 || line > lines) return;
free(_remove(line));
}
+/**
+ Insert a new line <I>before</I> line n. If n &gt;
+ size() then the line is added to the end.
+*/
void Fl_Browser::insert(int line, FL_BLINE* t) {
if (!first) {
t->prev = t->next = 0;
@@ -173,11 +178,25 @@ void Fl_Browser::insert(int line, const char* newtext, void* d) {
insert(line, t);
}
+/**
+ Line from is removed and reinserted at to; to
+ is calculated after the line is removed.
+*/
void Fl_Browser::move(int to, int from) {
if (from < 1 || from > lines) return;
insert(to, _remove(from));
}
+/**
+ The first form returns the text for line n. If n is
+ out of range it returns NULL.
+ <P>The second form sets the text for line n.
+*/
+/**
+ The first form returns the text for line n. If n is
+ out of range it returns NULL.
+ <P>The second form sets the text for line n.
+*/
void Fl_Browser::text(int line, const char* newtext) {
if (line < 1 || line > lines) return;
FL_BLINE* t = find_line(line);
@@ -200,6 +219,16 @@ void Fl_Browser::text(int line, const char* newtext) {
redraw_line(t);
}
+/**
+ The first form returns the data for line n. If n is
+ out of range this returns NULL.
+ <P>The second form sets the data for line n.
+*/
+/**
+ The first form returns the data for line n. If n is
+ out of range this returns NULL.
+ <P>The second form sets the data for line n.
+*/
void Fl_Browser::data(int line, void* d) {
if (line < 1 || line > lines) return;
find_line(line)->data = d;
@@ -392,8 +421,9 @@ void Fl_Browser::item_draw(void* v, int X, int Y, int W, int H) const {
static const int no_columns[1] = {0};
+/** The constructor makes an empty browser.*/
Fl_Browser::Fl_Browser(int X, int Y, int W, int H, const char*l)
- : Fl_Browser_(X, Y, W, H, l) {
+: Fl_Browser_(X, Y, W, H, l) {
column_widths_ = no_columns;
lines = 0;
full_height_ = 0;
@@ -427,10 +457,16 @@ void Fl_Browser::lineposition(int line, Fl_Line_Position pos) {
position(final);
}
+/**
+ The first form returns the current top line in the browser. If there
+ is no vertical scrollbar then this will always return 1.
+ <P>The second form scrolls the browser so the top line in the browser is n.
+*/
int Fl_Browser::topline() const {
return lineno(top());
}
+/** Remove all the lines in the browser.*/
void Fl_Browser::clear() {
for (FL_BLINE* l = first; l;) {
FL_BLINE* n = l->next;
@@ -443,6 +479,12 @@ void Fl_Browser::clear() {
new_list();
}
+/**
+ Add a new line to the end of the browser. The text is copied using
+ the strdup() function. It may also be NULL to make a
+ blank line. The void * argument is returned as the data()
+ of the new item.
+*/
void Fl_Browser::add(const char* newtext, void* d) {
insert(lines+1, newtext, d);
//Fl_Browser_::display(last);
@@ -463,11 +505,13 @@ int Fl_Browser::select(int line, int v) {
return Fl_Browser_::select(find_line(line), v);
}
+/** Return 1 if line n is selected, 0 if it not selected.*/
int Fl_Browser::selected(int line) const {
if (line < 1 || line > lines) return 0;
return find_line(line)->flags & SELECTED;
}
+/** Makes line n visible for selection.*/
void Fl_Browser::show(int line) {
FL_BLINE* t = find_line(line);
if (t->flags & NOTDISPLAYED) {
@@ -477,6 +521,10 @@ void Fl_Browser::show(int line) {
}
}
+/**
+ Makes line n invisible, preventing selection by the user.
+ The line can still be selected under program control.
+*/
void Fl_Browser::hide(int line) {
FL_BLINE* t = find_line(line);
if (!(t->flags & NOTDISPLAYED)) {
@@ -491,6 +539,7 @@ void Fl_Browser::display(int line, int v) {
if (v) show(line); else hide(line);
}
+/** Returns a non-zero value if line n is visible.*/
int Fl_Browser::visible(int line) const {
if (line < 1 || line > lines) return 0;
return !(find_line(line)->flags&NOTDISPLAYED);
@@ -540,6 +589,7 @@ void Fl_Browser::swap(FL_BLINE *a, FL_BLINE *b) {
cache = 0;
}
+/** Swaps two lines in the browser.*/
void Fl_Browser::swap(int ai, int bi) {
if (ai < 1 || ai > lines || bi < 1 || bi > lines) return;
FL_BLINE* a = find_line(ai);
diff --git a/src/Fl_Browser_.cxx b/src/Fl_Browser_.cxx
index 9a6b8f801..2bc6ce99f 100644
--- a/src/Fl_Browser_.cxx
+++ b/src/Fl_Browser_.cxx
@@ -94,6 +94,10 @@ void Fl::scrollbar_size(int W) {
}
// return where to draw the actual box:
+/**
+ This method returns the bounding box for the interior of the list, inside
+ the scrollbars.
+*/
void Fl_Browser_::bbox(int& X, int& Y, int& W, int& H) const {
Fl_Boxtype b = box() ? box() : FL_DOWN_BOX;
X = x()+Fl::box_dx(b);
@@ -112,6 +116,10 @@ void Fl_Browser_::bbox(int& X, int& Y, int& W, int& H) const {
if (H < 0) H = 0;
}
+/**
+ This method returns the X position of the left edge of the list area
+ after adjusting for the scrollbar and border, if any.
+*/
int Fl_Browser_::leftedge() const {
int X, Y, W, H; bbox(X, Y, W, H);
return X;
@@ -120,6 +128,7 @@ int Fl_Browser_::leftedge() const {
// The scrollbars may be moved again by draw(), since each one's size
// depends on whether the other is visible or not. This skips over
// Fl_Group::resize since it moves the scrollbars uselessly.
+/** Repositions and/or resizes the browser.*/
void Fl_Browser_::resize(int X, int Y, int W, int H) {
Fl_Widget::resize(X, Y, W, H);
// move the scrollbars so they can respond to events:
@@ -133,6 +142,10 @@ void Fl_Browser_::resize(int X, int Y, int W, int H) {
}
// Cause minimal update to redraw the given item:
+/**
+ This method should be called when the contents of an item have changed
+ but not changed the height of the item.
+*/
void Fl_Browser_::redraw_line(void* l) {
if (!redraw1 || redraw1 == l) {redraw1 = l; damage(FL_DAMAGE_EXPOSE);}
else if (!redraw2 || redraw2 == l) {redraw2 = l; damage(FL_DAMAGE_EXPOSE);}
@@ -195,6 +208,11 @@ void Fl_Browser_::update_top() {
// Change position(), top() will update when update_top() is called
// (probably by draw() or handle()):
+/**
+ Gets or sets the vertical scrolling position of the list,
+ which is the pixel offset of the list items within the list
+ area.
+*/
void Fl_Browser_::position(int yy) {
if (yy < 0) yy = 0;
if (yy == position_) return;
@@ -202,6 +220,11 @@ void Fl_Browser_::position(int yy) {
if (yy != real_position_) redraw_lines();
}
+/**
+ Gets or sets the horizontal scrolling position of the list,
+ which is the pixel offset of the list items within the list
+ area.
+*/
void Fl_Browser_::hposition(int xx) {
if (xx < 0) xx = 0;
if (xx == hposition_) return;
@@ -210,6 +233,10 @@ void Fl_Browser_::hposition(int xx) {
}
// Tell whether item is currently displayed:
+/**
+ This method returns non-zero if item p is currently visible in
+ the list.
+*/
int Fl_Browser_::displayed(void* p) const {
int X, Y, W, H; bbox(X, Y, W, H);
int yy = H+offset_;
@@ -222,6 +249,7 @@ int Fl_Browser_::displayed(void* p) const {
// Ensure this item is displayed:
// Messy because we have no idea if it is before top or after bottom:
+/** Displays item p, scrolling the list as necessary.*/
void Fl_Browser_::display(void* p) {
// First special case - want to display first item in the list?
@@ -304,6 +332,12 @@ void Fl_Browser_::display(void* p) {
// redraw, has side effect of updating top and setting scrollbar:
+/**
+ The first form draws the list within the normal widget bounding box.
+
+ <P>The second form draws the contents of the browser within the
+ specified bounding box.
+*/
void Fl_Browser_::draw() {
int drawsquare = 0;
update_top();
@@ -455,6 +489,11 @@ J1:
}
// Quick way to delete and reset everything:
+/**
+ This method should be called when the list data is completely replaced
+ or cleared. It informs the Fl_Browser_ widget that any cached
+ information it has concerning the items is invalid.
+*/
void Fl_Browser_::new_list() {
top_ = 0;
position_ = real_position_ = 0;
@@ -468,6 +507,11 @@ void Fl_Browser_::new_list() {
// Tell it that this item is going away, and that this must remove
// all pointers to it:
+/**
+ This method should be used when an item is deleted from the list.
+ It allows the Fl_Browser_ to discard any cached data it has
+ on the item.
+*/
void Fl_Browser_::deleting(void* l) {
if (displayed(l)) {
redraw_lines();
@@ -487,6 +531,10 @@ void Fl_Browser_::deleting(void* l) {
if (l == max_width_item) {max_width_item = 0; max_width = 0;}
}
+/**
+ This method should be used when an item is replaced in the list.
+ It allows the Fl_Browser_ to update its cache data as needed.
+*/
void Fl_Browser_::replacing(void* a, void* b) {
redraw_line(a);
if (a == selection_) selection_ = b;
@@ -503,11 +551,19 @@ void Fl_Browser_::swapping(void* a, void* b) {
else if (b == top_) top_ = a;
}
+/**
+ This method should be used when an item is added to the list.
+ It allows the Fl_Browser_ to update its cache data as needed.
+*/
void Fl_Browser_::inserting(void* a, void* b) {
if (displayed(a)) redraw_lines();
if (a == top_) top_ = b;
}
+/**
+ This method returns the item under mouse at my. If no item is
+ displayed at that position then NULL is returned.
+*/
void* Fl_Browser_::find_item(int my) {
update_top();
int X, Y, W, H; bbox(X, Y, W, H);
@@ -521,6 +577,13 @@ void* Fl_Browser_::find_item(int my) {
return 0;
}
+/**
+ Sets the selection state of item p to s and
+ returns 1 if the state changed or 0 if it did not.
+
+ <P>If docb is non-zero, select tries to call the callback
+ function for the widget.
+*/
int Fl_Browser_::select(void* l, int i, int docallbacks) {
if (type() == FL_MULTI_BROWSER) {
if (selection_ != l) {
@@ -553,6 +616,13 @@ int Fl_Browser_::select(void* l, int i, int docallbacks) {
return 1;
}
+/**
+ Deselects all items in the list and returns 1 if the state changed
+ or 0 if it did not.
+
+ <P>If docb is non-zero, deselect tries to call the
+ callback function for the widget.
+*/
int Fl_Browser_::deselect(int docallbacks) {
if (type() == FL_MULTI_BROWSER) {
int change = 0;
@@ -568,6 +638,13 @@ int Fl_Browser_::deselect(int docallbacks) {
}
}
+/**
+ Selects item p and returns 1 if the state changed or 0 if it did
+ not. Any other items in the list are deselected.
+
+ <P>If docb is non-zero, select_only tries to call the
+ callback function for the widget.
+*/
int Fl_Browser_::select_only(void* l, int docallbacks) {
if (!l) return deselect(docallbacks);
int change = 0;
@@ -579,7 +656,7 @@ int Fl_Browser_::select_only(void* l, int docallbacks) {
display(l);
return change;
}
-
+/** Handles an event within the normal widget bounding box. */
int Fl_Browser_::handle(int event) {
// must do shortcuts first or the scrollbar will get them...
if (event == FL_ENTER || event == FL_LEAVE) return 1;
@@ -796,6 +873,7 @@ J1:
return 0;
}
+/** The constructor makes an empty browser.*/
Fl_Browser_::Fl_Browser_(int X, int Y, int W, int H, const char* l)
: Fl_Group(X, Y, W, H, l),
scrollbar(0, 0, 0, 0, 0), // they will be resized by draw()
@@ -826,14 +904,32 @@ Fl_Browser_::Fl_Browser_(int X, int Y, int W, int H, const char* l)
// Default versions of some of the virtual functions:
+/**
+ This method may be provided by the subclass to return the height of the
+ item p in pixels. Allow for two additional pixels for the list
+ selection box. This method differs from
+ item_height in that it is only
+ called for selection and scrolling operations. The default implementation
+ calls item_height.
+*/
int Fl_Browser_::item_quick_height(void* l) const {
return item_height(l);
}
+/**
+ This method may be provided to return the average height of all items, to
+ be used for scrolling. The default implementation uses the height of the first
+ item.
+*/
int Fl_Browser_::incr_height() const {
return item_quick_height(item_first());
}
+/**
+ This method may be provided by the subclass to indicate the full height
+ of the item list in pixels. The default implementation computes the full
+ height from the item heights.
+*/
int Fl_Browser_::full_height() const {
int t = 0;
for (void* p = item_first(); p; p = item_next(p))
@@ -841,12 +937,27 @@ int Fl_Browser_::full_height() const {
return t;
}
+/**
+ This method may be provided by the subclass to indicate the full width
+ of the item list in pixels. The default implementation computes the full
+ width from the item widths.
+*/
int Fl_Browser_::full_width() const {
return max_width;
}
+/**
+ This method must be implemented by the subclass if it supports
+ multiple selections in the browser. The s argument specifies the
+ selection state for item p: 0 = off, 1 = on.
+*/
void Fl_Browser_::item_select(void*, int) {}
+/**
+ This method must be implemented by the subclass if it supports
+ multiple selections in the browser. The method should return 1 if p
+ is selected and 0 otherwise.
+*/
int Fl_Browser_::item_selected(void* l) const {return l==selection_;}
//
diff --git a/src/Fl_Browser_load.cxx b/src/Fl_Browser_load.cxx
index 7e99a56b7..9112074a9 100644
--- a/src/Fl_Browser_load.cxx
+++ b/src/Fl_Browser_load.cxx
@@ -30,6 +30,14 @@
#include <stdio.h>
#include <FL/fl_utf8.H>
+/**
+ Clears the browser and reads the file, adding each line from the file
+ to the browser. If the filename is NULL or a zero-length
+ string then this just clears the browser. This returns zero if there
+ was any error in opening or reading the file, in which case errno
+ is set to the system error. The data() of each line is set
+ to NULL.
+*/
int Fl_Browser::load(const char *filename) {
#define MAXFL_BLINE 1024
char newtext[MAXFL_BLINE];
diff --git a/src/Fl_Check_Browser.cxx b/src/Fl_Check_Browser.cxx
index a95feabee..4476df196 100644
--- a/src/Fl_Check_Browser.cxx
+++ b/src/Fl_Check_Browser.cxx
@@ -85,7 +85,8 @@ int Fl_Check_Browser::lineno(cb_item *p0) const {
}
Fl_Check_Browser::Fl_Check_Browser(int X, int Y, int W, int H, const char *l)
- : Fl_Browser_(X, Y, W, H, l) {
+/** The constructor makes an empty browser.*/
+: Fl_Browser_(X, Y, W, H, l) {
type(FL_SELECT_BROWSER);
when(FL_WHEN_NEVER);
first = last = 0;
@@ -164,11 +165,16 @@ int Fl_Check_Browser::item_selected(void *v) const {
cb_item *i = (cb_item *)v;
return i->selected;
}
-
+/**
+ Add a new unchecked line to the end of the browser. The text is copied
+ using the strdup() function. It may also be NULL to make
+ a blank line. The second form can set the item checked.
+*/
int Fl_Check_Browser::add(char *s) {
return (add(s, 0));
}
+/** See int Fl_Check_Browser::add(char *s) */
int Fl_Check_Browser::add(char *s, int b) {
cb_item *p = (cb_item *)malloc(sizeof(cb_item));
p->next = 0;
@@ -193,6 +199,10 @@ int Fl_Check_Browser::add(char *s, int b) {
return (nitems_);
}
+/**
+ Remove line n and make the browser one line shorter. Returns the
+ number of lines left in the browser.
+*/
int Fl_Check_Browser::remove(int item) {
cb_item *p = find_item(item);
@@ -225,6 +235,7 @@ int Fl_Check_Browser::remove(int item) {
return (nitems_);
}
+/** Remove every item from the browser.*/
void Fl_Check_Browser::clear() {
cb_item *p = first;
cb_item *next;
@@ -246,6 +257,7 @@ void Fl_Check_Browser::clear() {
cached_item = -1;
}
+/** Gets the current status of item item. */
int Fl_Check_Browser::checked(int i) const {
cb_item *p = find_item(i);
@@ -253,6 +265,7 @@ int Fl_Check_Browser::checked(int i) const {
return 0;
}
+/** Sets the check status of item item to b. */
void Fl_Check_Browser::checked(int i, int b) {
cb_item *p = find_item(i);
@@ -267,10 +280,12 @@ void Fl_Check_Browser::checked(int i, int b) {
}
}
+/** Returns the index of the currently selected item.*/
int Fl_Check_Browser::value() const {
return lineno((cb_item *)selection());
}
+/** Return a pointer to an internal buffer holding item item's text.*/
char *Fl_Check_Browser::text(int i) const {
cb_item *p = find_item(i);
@@ -278,6 +293,7 @@ char *Fl_Check_Browser::text(int i) const {
return 0;
}
+/** Sets all the items checked.*/
void Fl_Check_Browser::check_all() {
cb_item *p;
@@ -288,6 +304,7 @@ void Fl_Check_Browser::check_all() {
redraw();
}
+/** Sets all the items unchecked.*/
void Fl_Check_Browser::check_none() {
cb_item *p;
diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx
index c7d481df4..8447ab080 100644
--- a/src/Fl_File_Chooser2.cxx
+++ b/src/Fl_File_Chooser2.cxx
@@ -24,6 +24,276 @@
//
// http://www.fltk.org/str.php
//
+
+// fabien: ATTENTION: Only Out Of Source Gen. because cxx/H files are autogenerated by fluid.
+
+/** \class Fl_File_Chooser
+ The Fl_File_Chooser widget displays a standard file selection
+ dialog that supports various selection modes.
+
+ <CENTER>\image html Fl_File_Chooser.jpg</CENTER>
+
+ <P>The Fl_File_Chooser class also exports several static values
+ that may be used to localize or customize the appearance of all file chooser
+ dialogs:
+
+ <CENTER><TABLE BORDER="1">
+ <TR>
+ <TH>Member</TH>
+ <TH>Default value</TH>
+ </TR>
+ <TR>
+ <TD>add_favorites_label</TD>
+ <TD>"Add to Favorites"</TD>
+ </TR>
+ <TR>
+ <TD>all_files_label</TD>
+ <TD>"All Files (*)"</TD>
+ </TR>
+ <TR>
+ <TD>custom_filter_label</TD>
+ <TD>"Custom Filter"</TD>
+ </TR>
+ <TR>
+ <TD>existing_file_label</TD>
+ <TD>"Please choose an existing file!"</TD>
+ </TR>
+ <TR>
+ <TD>favorites_label</TD>
+ <TD>"Favorites"</TD>
+ </TR>
+ <TR>
+ <TD>filename_label</TD>
+ <TD>"Filename:"</TD>
+ </TR>
+ <TR>
+ <TD>filesystems_label</TD>
+ <TD>"My Computer" (WIN32)<BR>
+ "File Systems" (all others)</TD>
+ </TR>
+ <TR>
+ <TD>manage_favorites_label</TD>
+ <TD>"Manage Favorites"</TD>
+ </TR>
+ <TR>
+ <TD>new_directory_label</TD>
+ <TD>"New Directory?"</TD>
+ </TR>
+ <TR>
+ <TD>new_directory_tooltip</TD>
+ <TD>"Create a new directory."</TD>
+ </TR>
+ <TR>
+ <TD>preview_label</TD>
+ <TD>"Preview"</TD>
+ </TR>
+ <TR>
+ <TD>save_label</TD>
+ <TD>"Save"</TD>
+ </TR>
+ <TR>
+ <TD>show_label</TD>
+ <TD>"Show:"</TD>
+ </TR>
+ <TR>
+ <TD>sort</TD>
+ <TD>fl_numericsort</TD>
+ </TR>
+ </TABLE></CENTER>
+
+ <P>The sort member specifies the sort function that is
+ used when loading the contents of a directory.
+*/
+
+/** \fn Fl_File_Chooser::Fl_File_Chooser(const char *pathname, const char *pattern, int type, const char *title)
+ The constructor creates the Fl_File_Chooser dialog pictured
+ above. The pathname argument can be a directory name or a
+ complete file name (in which case the corresponding file is highlighted
+ in the list and in the filename input field.)
+
+ <P>The pattern argument can be a NULL
+ string or "*" to list all files, or it can be a
+ series of descriptions and filter strings separated by tab
+ characters (\t). The format of filters is either
+ "Description text (patterns)" or just "patterns". A file chooser
+ that provides filters for HTML and image files might look like:
+
+ <UL><PRE>
+ "HTML Files (*.html)\tImage Files (*.{bmp,gif,jpg,png})"
+ </PRE></UL>
+
+ <P>The file chooser will automatically add the "All Files (*)"
+ pattern to the end of the string you pass if you do not provide
+ one. The first filter in the string is the default filter.
+
+ <P>See the FLTK documentation on fl_filename_match()
+ for the kinds of pattern strings that are supported.
+
+ <P>The type argument can be one of the following:
+
+ <UL>
+ <LI>SINGLE - allows the user to select a
+ single, existing file.
+ <LI>MULTI - allows the user to select one
+ or more existing files.
+ <LI>CREATE - allows the user to select a
+ single, existing file or specify a new filename.
+ <LI>DIRECTORY - allows the user to select a
+ single, existing directory.
+ </UL>
+
+ <P>The title argument is used to set the title bar text for the
+ Fl_File_Chooser window.
+*/
+
+/** \fn Fl_File_Chooser::~Fl_File_Chooser()
+ Destroys the widget and frees all memory used by it.*/
+
+/** \fn void Fl_File_Chooser::color(Fl_Color c)
+ Sets or gets the background color of the Fl_File_Browser list.*/
+
+/** \fn Fl_Color Fl_File_Chooser::color()
+ Sets or gets the background color of the Fl_File_Browser list.*/
+
+/** \fn int Fl_File_Chooser::count()
+ Returns the number of selected files.*/
+
+/** \fn void Fl_File_Chooser::directory(const char *pathname)
+ Sets or gets the current directory.*/
+
+/** \fn const char *Fl_File_Chooser::directory()
+ Sets or gets the current directory.*/
+
+/** \fn void Fl_File_Chooser::filter(const char *pattern)
+ Sets or gets the current filename filter patterns. The filter
+ patterns use fl_filename_match().
+ Multiple patterns can be used by separating them with tabs, like
+ "*.jpg\t*.png\t*.gif\t*". In addition, you can provide
+ human-readable labels with the patterns inside parenthesis, like
+ "JPEG&nbsp;Files&nbsp;(*.jpg)\tPNG&nbsp;Files&nbsp;(*.png)\tGIF&nbsp;Files&nbsp;(*.gif)\tAll&nbsp;Files&nbsp;(*)".
+ Use filter(NULL) to show all files.
+*/
+
+/** \fn const char *Fl_File_Chooser::filter()
+ See void filter(const char *pattern)*/
+
+/** \fn void Fl_File_Chooser::filter_value(int f)
+ Sets or gets the current filename filter selection.*/
+
+/** \fn int Fl_File_Chooser::filter_value()
+ Sets or gets the current filename filter selection.*/
+
+/** \fn void Fl_File_Chooser::hide()
+ Hides the Fl_File_Chooser window.*/
+
+/** \fn void Fl_File_Chooser::iconsize(uchar s)
+ Sets or gets the size of the icons in the Fl_File_Browser. By
+ default the icon size is set to 1.5 times the textsize().
+*/
+
+/** \fn uchar Fl_File_Chooser::iconsize()
+ Sets or gets the size of the icons in the Fl_File_Browser. By
+ default the icon size is set to 1.5 times the textsize().
+*/
+
+/** \fn void Fl_File_Chooser::label(const char *l)
+ Sets or gets the title bar text for the Fl_File_Chooser.*/
+
+/** \fn const char *Fl_File_Chooser::label()
+ Sets or gets the title bar text for the Fl_File_Chooser.*/
+
+/** \fn void Fl_File_Chooser::ok_label(const char *l)
+ Sets or gets the label for the "ok" button in the
+ Fl_File_Chooser.
+*/
+
+/** \fn const char *Fl_File_Chooser::ok_label()
+ Sets or gets the label for the "ok" button in the
+ Fl_File_Chooser.
+*/
+
+/** \fn int Fl_File_Chooser::preview() const
+ Returns the current state of the preview box. */
+
+/** \fn void Fl_File_Chooser::rescan()
+ Reloads the current directory in the Fl_File_Browser.*/
+
+/** \fn void Fl_File_Chooser::show()
+ Shows the Fl_File_Chooser window.*/
+
+/** \fn void Fl_File_Chooser::textcolor(Fl_Color c)
+ Sets or gets the current Fl_File_Browser text color.*/
+
+/** \fn Fl_Color Fl_File_Chooser::textcolor()
+ Sets or gets the current Fl_File_Browser text color.*/
+
+/** \fn void Fl_File_Chooser::textfont(Fl_Font f)
+ Sets or gets the current Fl_File_Browser text font.*/
+
+/** \fn Fl_Font Fl_File_Chooser::textfont()
+ Sets or gets the current Fl_File_Browser text font.*/
+
+/** \fn void Fl_File_Chooser::textsize(Fl_Fontsize s)
+ Sets or gets the current Fl_File_Browser text size.*/
+
+/** \fn Fl_Fontsize Fl_File_Chooser::textsize()
+ Sets or gets the current Fl_File_Browser text size.*/
+
+/** \fn void Fl_File_Chooser::type(int t)
+ Sets or gets the current type of Fl_File_Chooser.*/
+
+/** \fn int Fl_File_Chooser::type()
+ Sets or gets the current type of Fl_File_Chooser.*/
+
+/** \fn const char *Fl_File_Chooser::value(const char *pathname)
+ Sets or gets the current value of the selected file.
+
+ <P>In the second form, <i>file</i> is a <i>1</i>-based index into a list of
+ file names. The number of selected files is returned by
+ Fl_File_Chooser::count().
+
+ <P>This sample code loops through all selected files:
+ <PRE>
+ // Get list of filenames user selected from a MULTI chooser
+ for ( int t=1; t&lt;=chooser-&gt;count(); t++ ) {
+ const char *filename = chooser-&gt;value(t);
+ ..
+ }
+ </PRE>
+*/
+
+/** \fn const char *Fl_File_Chooser::value(int file)
+ See const char *value(const char *pathname)*/
+
+/** \fn const char *Fl_File_Chooser::value()
+ See const char *value(const char *pathname)*/
+
+/** \fn int Fl_File_Chooser::visible()
+ Returns 1 if the Fl_File_Chooser window is visible.*/
+
+/** \fn Fl_Widget* Fl_File_Chooser::add_extra(Fl_Widget*)
+ Adds extra widget at the bottom of Fl_File_Chooser window.
+ Returns pointer for previous extra widget or NULL if not set previously.
+ If argument is NULL only remove previous extra widget.<BR>
+ <I>NOTE! Fl_File_Chooser doesn't delete extra widget in destructor! To prevent memory leakage don't forget
+ delete unused extra widgets by yourself.</I>
+*/
+ /** \fn int Fl_File_Chooser::shown()
+ Returns non-zero if the file chooser main window show() has been called (but not hide()
+ see Fl_Window::shown()
+ */
+
+ /** \fn void Fl_File_Chooser::callback(void (*cb)(Fl_File_Chooser *, void *), void *d = 0)
+ Sets the file chooser callback cb and associated data d */
+
+ /** \fn void Fl_File_Chooser::user_data(void *d)
+ Sets the file chooser user data d */
+
+ /** \fn void * Fl_File_Chooser::user_data() const
+ Gets the file chooser user data d */
+
+// *** END OF OUT OF SOURCE DOC ***
+
// Contents:
//
// Fl_File_Chooser::count() - Return the number of selected files.
@@ -794,12 +1064,9 @@ Fl_File_Chooser::newdir()
}
-//
-// 'Fl_File_Chooser::preview()' - Enable or disable the preview tile.
-//
-void
-Fl_File_Chooser::preview(int e)// I - 1 = enable preview, 0 = disable preview
+/** Enable or disable the preview tile. 1 = enable preview, 0 = disable preview. */
+void Fl_File_Chooser::preview(int e)
{
previewButton->value(e);
prefs_.set("preview", e);
@@ -868,12 +1135,11 @@ Fl_File_Chooser::rescan()
}
//
-// 'Fl_File_Chooser::rescan_keep_filename()' - Rescan the current directory
-// without clearing the filename, then select the file if it is in the list
-//
-
-void
-Fl_File_Chooser::rescan_keep_filename()
+/**
+ Rescan the current directory without clearing the filename,
+ then select the file if it is in the list
+*/
+void Fl_File_Chooser::rescan_keep_filename()
{
// if no filename was set, this is likely a diretory browser
const char *fn = fileName->value();
diff --git a/src/glut_font.cxx b/src/glut_font.cxx
index 6053d733a..788e9dee4 100644
--- a/src/glut_font.cxx
+++ b/src/glut_font.cxx
@@ -114,8 +114,10 @@ void glutStrokeString(void* fontID, const unsigned char *string) {
* A newline will simply translate the next character's insertion
* point back to the start of the line and down one line.
*/
-
+#if !defined(WIN32) || defined(CYGWIN)
#warning FIXME This needs to be UTF aware now
+#endif
+
while ((c = *string++) != 0) {
if (c < font->Quantity) {
if (c == '\n') {