mirror of
https://github.com/fltk/fltk.git
synced 2026-06-01 06:14:28 +08:00
Remove $Id$ tags, update URL's, and more
- remove obsolete svn '$Id$' tags from all source files - update .fl files and generated files accordingly - replace 'http://www.fltk.org' URL's with 'https://...' - replace bug report URL 'str.php' with 'bugs.php' - remove trailing whitespace - fix other whitespace errors flagged by Git - add and/or fix missing or wrong standard headers - convert tabs to spaces in all source files The only relevant code changes are in the fluid/ folder where some .fl files and other source files were used to generate the '$Id' headers and footers.
This commit is contained in:
+313
-319
File diff suppressed because it is too large
Load Diff
+4
-10
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Adjuster widget header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -31,7 +29,7 @@
|
||||
/**
|
||||
The Fl_Adjuster widget was stolen from Prisms, and has proven
|
||||
to be very useful for values that need a large dynamic range.
|
||||
\image html adjuster1.png
|
||||
\image html adjuster1.png
|
||||
\image latex adjuster1.png "Fl_Adjuster" width=4cm
|
||||
<P>When you press a button and drag to the right the value increases.
|
||||
When you drag to the left it decreases. The largest button adjusts by
|
||||
@@ -67,7 +65,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+2
-8
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// BMP image header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2020 by Bill Spitzak and others.
|
||||
@@ -11,9 +9,9 @@
|
||||
//
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// https://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -41,7 +39,3 @@ class FL_EXPORT Fl_BMP_Image : public Fl_RGB_Image {
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+4
-10
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Bitmap header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2017 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -38,7 +36,7 @@ public:
|
||||
const uchar *array;
|
||||
/** Non-zero if array points to bitmap data allocated internally */
|
||||
int alloc_array;
|
||||
|
||||
|
||||
private:
|
||||
/** for internal use */
|
||||
fl_uintptr_t id_;
|
||||
@@ -62,7 +60,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+4
-10
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Box header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -45,7 +43,7 @@ public:
|
||||
<P>The destructor removes the box.
|
||||
*/
|
||||
Fl_Box(int X, int Y, int W, int H, const char *l=0);
|
||||
|
||||
|
||||
/** See Fl_Box::Fl_Box(int x, int y, int w, int h, const char * = 0) */
|
||||
Fl_Box(Fl_Boxtype b, int X, int Y, int W, int H, const char *l);
|
||||
|
||||
@@ -53,7 +51,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+15
-21
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Browser header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2016 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -36,7 +34,7 @@ struct FL_BLINE;
|
||||
lines, and manages all the storage for the text. This is not a text
|
||||
editor or spreadsheet! But it is useful for showing a vertical list of
|
||||
named objects to the user.
|
||||
|
||||
|
||||
\image html fl_hold_browser.png "Fl_Hold_Browser"
|
||||
\image latex fl_hold_browser.png "Fl_Hold_Browser" width=4cm
|
||||
|
||||
@@ -57,9 +55,9 @@ struct FL_BLINE;
|
||||
describes.
|
||||
|
||||
The base class does nothing when the user clicks on it. The
|
||||
subclasses
|
||||
Fl_Select_Browser,
|
||||
Fl_Hold_Browser, and
|
||||
subclasses
|
||||
Fl_Select_Browser,
|
||||
Fl_Hold_Browser, and
|
||||
Fl_Multi_Browser react to user clicks to select lines in
|
||||
the browser and do callbacks.
|
||||
|
||||
@@ -76,7 +74,7 @@ struct FL_BLINE;
|
||||
\code
|
||||
// How to loop through all the items in the browser
|
||||
for ( int t=1; t<=browser->size(); t++ ) { // index 1 based..!
|
||||
printf("item #%d, label='%s'\n", t, browser->text(t));
|
||||
printf("item #%d, label='%s'\n", t, browser->text(t));
|
||||
}
|
||||
\endcode
|
||||
|
||||
@@ -87,15 +85,15 @@ struct FL_BLINE;
|
||||
*/
|
||||
class FL_EXPORT Fl_Browser : public Fl_Browser_ {
|
||||
|
||||
FL_BLINE *first; // the array of lines
|
||||
FL_BLINE *first; // the array of lines
|
||||
FL_BLINE *last;
|
||||
FL_BLINE *cache;
|
||||
int cacheline; // line number of cache
|
||||
int lines; // Number of lines
|
||||
int cacheline; // line number of cache
|
||||
int lines; // Number of lines
|
||||
int full_height_;
|
||||
const int* column_widths_;
|
||||
char format_char_; // alternative to @-sign
|
||||
char column_char_; // alternative to tab
|
||||
char format_char_; // alternative to @-sign
|
||||
char column_char_; // alternative to tab
|
||||
|
||||
protected:
|
||||
|
||||
@@ -218,7 +216,7 @@ public:
|
||||
Gets the current format code prefix character, which by default is '\@'.
|
||||
A string of formatting codes at the start of each column are stripped off
|
||||
and used to modify how the rest of the line is printed:
|
||||
|
||||
|
||||
\li <tt>'\@.'</tt> Print rest of line, don't look for more '\@' signs
|
||||
\li <tt>'\@\@'</tt> Doubling the format character prints the format
|
||||
character once, followed by the rest of line
|
||||
@@ -241,7 +239,7 @@ public:
|
||||
\li <tt>'\@-'</tt> draw an engraved line through the middle.
|
||||
|
||||
Notice that the '\@.' command can be used to reliably
|
||||
terminate the parsing. To print a random string in a random color, use
|
||||
terminate the parsing. To print a random string in a random color, use
|
||||
<tt>sprintf("@C%d@.%s", color, string)</tt> and it will work even if the
|
||||
string starts with a digit or has the format character in it.
|
||||
*/
|
||||
@@ -330,7 +328,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+53
-59
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Common browser header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2016 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -28,15 +26,15 @@
|
||||
#include "Fl_Group.H"
|
||||
#endif
|
||||
#include "Fl_Scrollbar.H"
|
||||
#include <FL/Fl.H> // Fl::scrollbar_size()
|
||||
#include <FL/Fl.H> // Fl::scrollbar_size()
|
||||
|
||||
#define FL_NORMAL_BROWSER 0 /**< type() of Fl_Browser */
|
||||
#define FL_SELECT_BROWSER 1 /**< type() of FL_Select_Browser */
|
||||
#define FL_HOLD_BROWSER 2 /**< type() of Fl_Hold_Browser */
|
||||
#define FL_MULTI_BROWSER 3 /**< type() of Fl_Multi_Browser */
|
||||
#define FL_NORMAL_BROWSER 0 /**< type() of Fl_Browser */
|
||||
#define FL_SELECT_BROWSER 1 /**< type() of FL_Select_Browser */
|
||||
#define FL_HOLD_BROWSER 2 /**< type() of Fl_Hold_Browser */
|
||||
#define FL_MULTI_BROWSER 3 /**< type() of Fl_Multi_Browser */
|
||||
|
||||
#define FL_SORT_ASCENDING 0 /**< sort browser items in ascending alphabetic order. */
|
||||
#define FL_SORT_DESCENDING 1 /**< sort in descending order */
|
||||
#define FL_SORT_ASCENDING 0 /**< sort browser items in ascending alphabetic order. */
|
||||
#define FL_SORT_DESCENDING 1 /**< sort in descending order */
|
||||
|
||||
/**
|
||||
This is the base class for browsers. To be useful it must be
|
||||
@@ -44,7 +42,7 @@
|
||||
browser and the file chooser's browser are subclassed off of this.
|
||||
|
||||
This has been designed so that the subclass has complete control
|
||||
over the storage of the data, although because next() and
|
||||
over the storage of the data, although because next() and
|
||||
prev() 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.
|
||||
@@ -76,21 +74,21 @@ Keyboard navigation of browser items
|
||||
extend a selection or de-selection.
|
||||
*/
|
||||
class FL_EXPORT Fl_Browser_ : public Fl_Group {
|
||||
int position_; // where user wants it scrolled to
|
||||
int real_position_; // the current vertical scrolling position
|
||||
int hposition_; // where user wants it panned to
|
||||
int real_hposition_; // the current horizontal scrolling position
|
||||
int offset_; // how far down top_ item the real_position is
|
||||
int max_width; // widest object seen so far
|
||||
uchar has_scrollbar_; // which scrollbars are enabled
|
||||
int position_; // where user wants it scrolled to
|
||||
int real_position_; // the current vertical scrolling position
|
||||
int hposition_; // where user wants it panned to
|
||||
int real_hposition_; // the current horizontal scrolling position
|
||||
int offset_; // how far down top_ item the real_position is
|
||||
int max_width; // widest object seen so far
|
||||
uchar has_scrollbar_; // which scrollbars are enabled
|
||||
Fl_Font textfont_;
|
||||
Fl_Fontsize textsize_;
|
||||
Fl_Color textcolor_;
|
||||
void* top_; // which item scrolling position is in
|
||||
void* selection_; // which is selected (except for FL_MULTI_BROWSER)
|
||||
void* top_; // which item scrolling position is in
|
||||
void* selection_; // which is selected (except for FL_MULTI_BROWSER)
|
||||
void *redraw1,*redraw2; // minimal update pointers
|
||||
void* max_width_item; // which item has max_width_
|
||||
int scrollbar_size_; // size of scrollbar trough
|
||||
void* max_width_item; // which item has max_width_
|
||||
int scrollbar_size_; // size of scrollbar trough
|
||||
|
||||
void update_top();
|
||||
|
||||
@@ -98,7 +96,7 @@ protected:
|
||||
|
||||
// All of the following must be supplied by the subclass:
|
||||
/**
|
||||
This method must be provided by the subclass
|
||||
This method must be provided by the subclass
|
||||
to return the first item in the list.
|
||||
\see item_first(), item_next(), item_last(), item_prev()
|
||||
*/
|
||||
@@ -121,8 +119,8 @@ protected:
|
||||
\see item_first(), item_next(), item_last(), item_prev()
|
||||
*/
|
||||
virtual void *item_last() const { return 0L; }
|
||||
/**
|
||||
This method must be provided by the subclass to return
|
||||
/**
|
||||
This method must be provided by the subclass to return
|
||||
the height of \p item in pixels.
|
||||
Allow for two additional pixels for the list selection box.
|
||||
\param[in] item The item whose height is returned.
|
||||
@@ -145,28 +143,28 @@ protected:
|
||||
*/
|
||||
virtual void item_draw(void *item,int X,int Y,int W,int H) const = 0;
|
||||
/**
|
||||
This optional method returns a string (label) that may be used for sorting.
|
||||
This optional method returns a string (label) that may be used for sorting.
|
||||
\param[in] item The item whose label text is returned.
|
||||
\returns The item's text label. (Can be NULL if blank)
|
||||
*/
|
||||
virtual const char *item_text(void *item) const { (void)item; return 0L; }
|
||||
/**
|
||||
This optional method should be provided by the subclass
|
||||
This optional method should be provided by the subclass
|
||||
to efficiently swap browser items \p a and \p b, such as for sorting.
|
||||
\param[in] a,b The two items to be swapped.
|
||||
*/
|
||||
virtual void item_swap(void *a,void *b) { (void)a; (void)b; }
|
||||
/**
|
||||
This method must be provided by the subclass
|
||||
to return the item for the specified \p index.
|
||||
This method must be provided by the subclass
|
||||
to return the item for the specified \p index.
|
||||
\param[in] index The \p index of the item to be returned
|
||||
\returns The item at the specified \p index.
|
||||
*/
|
||||
virtual void *item_at(int index) const { (void)index; return 0L; }
|
||||
// you don't have to provide these but it may help speed it up:
|
||||
virtual int full_width() const ; // current width of all items
|
||||
virtual int full_height() const ; // current height of all items
|
||||
virtual int incr_height() const ; // average height of an item
|
||||
virtual int full_width() const ; // current width of all items
|
||||
virtual int full_height() const ; // current height of all items
|
||||
virtual int incr_height() const ; // average height of an item
|
||||
// These only need to be done by subclass if you want a multi-browser:
|
||||
virtual void item_select(void *item,int val=1);
|
||||
virtual int item_selected(void *item) const ;
|
||||
@@ -178,9 +176,9 @@ protected:
|
||||
void *top() const { return top_; }
|
||||
/**
|
||||
Returns the item currently selected, or NULL if there is no selection.
|
||||
|
||||
|
||||
For multiple selection browsers this call returns the currently focused item,
|
||||
even if it is not selected. To find all selected items, call
|
||||
even if it is not selected. To find all selected items, call
|
||||
Fl_Multi_Browser::selected() for every item in question.
|
||||
*/
|
||||
void *selection() const { return selection_; }
|
||||
@@ -197,9 +195,9 @@ protected:
|
||||
*/
|
||||
void redraw_lines() { damage(FL_DAMAGE_SCROLL); } // redraw all of them
|
||||
void bbox(int &X,int &Y,int &W,int &H) const;
|
||||
int leftedge() const; // x position after scrollbar & border
|
||||
int leftedge() const; // x position after scrollbar & border
|
||||
void *find_item(int ypos); // item under mouse
|
||||
|
||||
|
||||
void draw();
|
||||
Fl_Browser_(int X,int Y,int W,int H,const char *L=0);
|
||||
|
||||
@@ -223,7 +221,7 @@ public:
|
||||
/**
|
||||
Gets the vertical scroll position of the list as a pixel position \p pos.
|
||||
The position returned is how many pixels of the list are scrolled off the top edge
|
||||
of the screen. Example: A position of '3' indicates the top 3 pixels of
|
||||
of the screen. Example: A position of '3' indicates the top 3 pixels of
|
||||
the list are scrolled off the top edge of the screen.
|
||||
\see position(), hposition()
|
||||
*/
|
||||
@@ -250,13 +248,13 @@ public:
|
||||
- bit 3-31: reserved for future use
|
||||
*/
|
||||
enum { // values for has_scrollbar()
|
||||
HORIZONTAL = 1, ///< Only show horizontal scrollbar.
|
||||
VERTICAL = 2, ///< Only show vertical scrollbar.
|
||||
BOTH = 3, ///< Show both scrollbars. (default)
|
||||
ALWAYS_ON = 4, ///< Specified scrollbar(s) should 'always' be shown (to be used with HORIZONTAL/VERTICAL)
|
||||
HORIZONTAL_ALWAYS = 5, ///< Horizontal scrollbar always on.
|
||||
VERTICAL_ALWAYS = 6, ///< Vertical scrollbar always on.
|
||||
BOTH_ALWAYS = 7 ///< Both scrollbars always on.
|
||||
HORIZONTAL = 1, ///< Only show horizontal scrollbar.
|
||||
VERTICAL = 2, ///< Only show vertical scrollbar.
|
||||
BOTH = 3, ///< Show both scrollbars. (default)
|
||||
ALWAYS_ON = 4, ///< Specified scrollbar(s) should 'always' be shown (to be used with HORIZONTAL/VERTICAL)
|
||||
HORIZONTAL_ALWAYS = 5, ///< Horizontal scrollbar always on.
|
||||
VERTICAL_ALWAYS = 6, ///< Vertical scrollbar always on.
|
||||
BOTH_ALWAYS = 7 ///< Both scrollbars always on.
|
||||
};
|
||||
/**
|
||||
Returns the current scrollbar mode, see Fl_Browser_::has_scrollbar(uchar)
|
||||
@@ -265,9 +263,9 @@ public:
|
||||
/**
|
||||
Sets whether the widget should have scrollbars or not (default Fl_Browser_::BOTH).
|
||||
By default you can scroll in both directions, and the scrollbars
|
||||
disappear if the data will fit in the widget.
|
||||
disappear if the data will fit in the widget.
|
||||
has_scrollbar() changes this based on the value of \p mode:
|
||||
|
||||
|
||||
- 0 - No scrollbars.
|
||||
|
||||
- Fl_Browser_::HORIZONTAL - Only a horizontal scrollbar.
|
||||
@@ -317,9 +315,9 @@ public:
|
||||
/**
|
||||
Gets the current size of the scrollbars' troughs, in pixels.
|
||||
|
||||
If this value is zero (default), this widget will use the
|
||||
If this value is zero (default), this widget will use the
|
||||
Fl::scrollbar_size() value as the scrollbar's width.
|
||||
|
||||
|
||||
\returns Scrollbar size in pixels, or 0 if the global Fl::scrollbar_size() is being used.
|
||||
\see Fl::scrollbar_size(int)
|
||||
*/
|
||||
@@ -330,24 +328,24 @@ public:
|
||||
Sets the pixel size of the scrollbars' troughs to \p newSize, in pixels.
|
||||
|
||||
Normally you should not need this method, and should use
|
||||
Fl::scrollbar_size(int) instead to manage the size of ALL
|
||||
your widgets' scrollbars. This ensures your application
|
||||
Fl::scrollbar_size(int) instead to manage the size of ALL
|
||||
your widgets' scrollbars. This ensures your application
|
||||
has a consistent UI, is the default behavior, and is normally
|
||||
what you want.
|
||||
|
||||
Only use THIS method if you really need to override the global
|
||||
scrollbar size. The need for this should be rare.
|
||||
|
||||
|
||||
Setting \p newSize to the special value of 0 causes the widget to
|
||||
track the global Fl::scrollbar_size(), which is the default.
|
||||
|
||||
|
||||
\param[in] newSize Sets the scrollbar size in pixels.\n
|
||||
If 0 (default), scrollbar size tracks the global Fl::scrollbar_size()
|
||||
\see Fl::scrollbar_size()
|
||||
*/
|
||||
void scrollbar_size(int newSize) {
|
||||
scrollbar_size_ = newSize;
|
||||
}
|
||||
}
|
||||
/**
|
||||
Returns the global value Fl::scrollbar_size().
|
||||
\deprecated Use scrollbar_size() instead.
|
||||
@@ -379,7 +377,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+11
-17
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Button header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2014 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -27,13 +25,13 @@
|
||||
#endif
|
||||
|
||||
// values for type()
|
||||
#define FL_NORMAL_BUTTON 0 /**< value() will be set to 1 during the press of the button and
|
||||
#define FL_NORMAL_BUTTON 0 /**< value() will be set to 1 during the press of the button and
|
||||
reverts back to 0 when the button is released */
|
||||
#define FL_TOGGLE_BUTTON 1 ///< value() toggles between 0 and 1 at every click of the button
|
||||
#define FL_RADIO_BUTTON (FL_RESERVED_TYPE+2) /**< is set to 1 at button press, and all other
|
||||
buttons in the same group with <tt>type() == FL_RADIO_BUTTON</tt>
|
||||
are set to zero.*/
|
||||
#define FL_HIDDEN_BUTTON 3 ///< for Forms compatibility
|
||||
#define FL_TOGGLE_BUTTON 1 ///< value() toggles between 0 and 1 at every click of the button
|
||||
#define FL_RADIO_BUTTON (FL_RESERVED_TYPE+2) /**< is set to 1 at button press, and all other
|
||||
buttons in the same group with <tt>type() == FL_RADIO_BUTTON</tt>
|
||||
are set to zero.*/
|
||||
#define FL_HIDDEN_BUTTON 3 ///< for Forms compatibility
|
||||
|
||||
extern FL_EXPORT Fl_Shortcut fl_old_shortcut(const char*);
|
||||
|
||||
@@ -59,7 +57,7 @@ class Fl_Widget_Tracker;
|
||||
\li \c FL_TOGGLE_BUTTON: value() is inverted after button press.
|
||||
\li \c FL_RADIO_BUTTON: value() is set to 1 after button press, and all other
|
||||
buttons in the current group with <tt>type() == FL_RADIO_BUTTON</tt>
|
||||
are set to zero.
|
||||
are set to zero.
|
||||
|
||||
\todo Refactor the doxygen comments for Fl_Button when() documentation.
|
||||
|
||||
@@ -70,7 +68,7 @@ class Fl_Widget_Tracker;
|
||||
clicks the button, or when a shortcut is typed.
|
||||
\li \c FL_WHEN_CHANGED: The callback is done each time the value() changes
|
||||
(when the user pushes and releases the button, and as the mouse is
|
||||
dragged around in and out of the button).
|
||||
dragged around in and out of the button).
|
||||
*/
|
||||
|
||||
class FL_EXPORT Fl_Button : public Fl_Widget {
|
||||
@@ -170,7 +168,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+24
-30
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Main header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2016 by Bill Spitzak and others.
|
||||
@@ -9,15 +7,15 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
Handling transparently platform dependent cairo include files
|
||||
Handling transparently platform dependent cairo include files
|
||||
*/
|
||||
|
||||
#ifndef FL_CAIRO_H
|
||||
@@ -31,12 +29,12 @@
|
||||
|
||||
# include <cairo.h>
|
||||
|
||||
/**
|
||||
/**
|
||||
\addtogroup group_cairo
|
||||
@{
|
||||
*/
|
||||
|
||||
/**
|
||||
/**
|
||||
Contains all the necessary info on the current cairo context.
|
||||
A private internal & unique corresponding object is created to
|
||||
permit cairo context state handling while keeping it opaque.
|
||||
@@ -48,33 +46,33 @@ public:
|
||||
Fl_Cairo_State() : cc_(0), own_cc_(false), autolink_(false), window_(0), gc_(0) {}
|
||||
|
||||
// access attributes
|
||||
cairo_t* cc() const {return cc_;} ///< Gets the current cairo context
|
||||
bool autolink() const {return autolink_;} ///< Gets the autolink option. See Fl::cairo_autolink_context(bool)
|
||||
cairo_t* cc() const {return cc_;} ///< Gets the current cairo context
|
||||
bool autolink() const {return autolink_;} ///< Gets the autolink option. See Fl::cairo_autolink_context(bool)
|
||||
/** Sets the current cairo context.
|
||||
|
||||
\p own == \e true (the default) indicates that the cairo context \p c
|
||||
will be deleted by FLTK internally when another cc is set later.
|
||||
\p own == \e true (the default) indicates that the cairo context \p c
|
||||
will be deleted by FLTK internally when another cc is set later.
|
||||
|
||||
\p own == \e false indicates cc deletion is handled externally
|
||||
by the user program.
|
||||
\p own == \e false indicates cc deletion is handled externally
|
||||
by the user program.
|
||||
*/
|
||||
void cc(cairo_t* c, bool own=true) {
|
||||
if (cc_ && own_cc_) cairo_destroy(cc_);
|
||||
cc_=c;
|
||||
if (!cc_) window_=0;
|
||||
own_cc_=own;
|
||||
if (cc_ && own_cc_) cairo_destroy(cc_);
|
||||
cc_=c;
|
||||
if (!cc_) window_=0;
|
||||
own_cc_=own;
|
||||
}
|
||||
void autolink(bool b); ///< Sets the autolink option, only available with --enable-cairoext
|
||||
void window(void* w) {window_=w;} ///< Sets the window \p w to keep track on
|
||||
void* window() const {return window_;} ///< Gets the last window attached to a cc
|
||||
void gc(void* c) {gc_=c;} ///< Sets the gc \p c to keep track on
|
||||
void* gc() const {return gc_;} ///< Gets the last gc attached to a cc
|
||||
void window(void* w) {window_=w;} ///< Sets the window \p w to keep track on
|
||||
void* window() const {return window_;} ///< Gets the last window attached to a cc
|
||||
void gc(void* c) {gc_=c;} ///< Sets the gc \p c to keep track on
|
||||
void* gc() const {return gc_;} ///< Gets the last gc attached to a cc
|
||||
|
||||
private:
|
||||
cairo_t * cc_; // contains the unique autoupdated cairo context
|
||||
bool own_cc_; // indicates whether we must delete the cc, useful for internal cleanup
|
||||
bool autolink_; // false by default, prevents the automatic cairo mapping on fltk windows
|
||||
// for custom cairo implementations.
|
||||
cairo_t * cc_; // contains the unique autoupdated cairo context
|
||||
bool own_cc_; // indicates whether we must delete the cc, useful for internal cleanup
|
||||
bool autolink_; // false by default, prevents the automatic cairo mapping on fltk windows
|
||||
// for custom cairo implementations.
|
||||
void* window_, *gc_; // for keeping track internally of last win+gc treated
|
||||
};
|
||||
|
||||
@@ -82,7 +80,3 @@ private:
|
||||
|
||||
# endif // FLTK_HAVE_CAIRO
|
||||
#endif // FL_CAIRO_H
|
||||
|
||||
//
|
||||
// End of "$Id$" .
|
||||
//
|
||||
|
||||
+7
-13
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Main header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2018 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -29,7 +27,7 @@
|
||||
# include <FL/Fl.H>
|
||||
# include <FL/Fl_Double_Window.H>
|
||||
|
||||
/**
|
||||
/**
|
||||
\addtogroup group_cairo
|
||||
@{
|
||||
*/
|
||||
@@ -44,7 +42,7 @@
|
||||
\note You can alternatively define your custom cairo FLTK window,
|
||||
and thus at least override the draw() method to provide custom cairo
|
||||
support. In this case you will probably use Fl::cairo_make_current(Fl_Window*)
|
||||
to attach a context to your window. You should do it only when your window is
|
||||
to attach a context to your window. You should do it only when your window is
|
||||
the current window. \see Fl_Window::current()
|
||||
*/
|
||||
class FL_EXPORT Fl_Cairo_Window : public Fl_Double_Window {
|
||||
@@ -62,7 +60,7 @@ protected:
|
||||
if (draw_cb_) { // call the Cairo draw callback
|
||||
// manual method ? if yes explicitly get a cairo_context here
|
||||
if (!Fl::cairo_autolink_context())
|
||||
Fl::cairo_make_current(this);
|
||||
Fl::cairo_make_current(this);
|
||||
draw_cb_(this, Fl::cairo_cc());
|
||||
// flush cairo drawings: necessary at least for Windows
|
||||
cairo_surface_t *s = cairo_get_target(Fl::cairo_cc());
|
||||
@@ -73,7 +71,7 @@ protected:
|
||||
public:
|
||||
/** This defines the cairo draw callback prototype that you must further */
|
||||
typedef void (*cairo_draw_cb) (Fl_Cairo_Window* self, cairo_t* def);
|
||||
/**
|
||||
/**
|
||||
You must provide a draw callback which will implement your cairo rendering.
|
||||
This method will permit you to set your cairo callback to \p cb.
|
||||
*/
|
||||
@@ -87,7 +85,3 @@ private:
|
||||
|
||||
# endif // FLTK_HAVE_CAIRO
|
||||
#endif // FL_CAIRO_WINDOW_H
|
||||
|
||||
//
|
||||
// End of "$Id$" .
|
||||
//
|
||||
|
||||
+17
-23
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Forms chart header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -27,24 +25,24 @@
|
||||
#endif
|
||||
|
||||
// values for type()
|
||||
#define FL_BAR_CHART 0 /**< type() for Bar Chart variant */
|
||||
#define FL_HORBAR_CHART 1 /**< type() for Horizontal Bar Chart variant */
|
||||
#define FL_LINE_CHART 2 /**< type() for Line Chart variant */
|
||||
#define FL_FILL_CHART 3 /**< type() for Fill Line Chart variant */
|
||||
#define FL_SPIKE_CHART 4 /**< type() for Spike Chart variant */
|
||||
#define FL_PIE_CHART 5 /**< type() for Pie Chart variant */
|
||||
#define FL_SPECIALPIE_CHART 6 /**< type() for Special Pie Chart variant */
|
||||
#define FL_BAR_CHART 0 /**< type() for Bar Chart variant */
|
||||
#define FL_HORBAR_CHART 1 /**< type() for Horizontal Bar Chart variant */
|
||||
#define FL_LINE_CHART 2 /**< type() for Line Chart variant */
|
||||
#define FL_FILL_CHART 3 /**< type() for Fill Line Chart variant */
|
||||
#define FL_SPIKE_CHART 4 /**< type() for Spike Chart variant */
|
||||
#define FL_PIE_CHART 5 /**< type() for Pie Chart variant */
|
||||
#define FL_SPECIALPIE_CHART 6 /**< type() for Special Pie Chart variant */
|
||||
|
||||
#define FL_FILLED_CHART FL_FILL_CHART /**< for compatibility */
|
||||
#define FL_FILLED_CHART FL_FILL_CHART /**< for compatibility */
|
||||
|
||||
#define FL_CHART_MAX 128 /**< max entries per chart */
|
||||
#define FL_CHART_LABEL_MAX 18 /**< max label length for entry */
|
||||
#define FL_CHART_MAX 128 /**< max entries per chart */
|
||||
#define FL_CHART_LABEL_MAX 18 /**< max label length for entry */
|
||||
|
||||
/** For internal use only */
|
||||
struct FL_CHART_ENTRY {
|
||||
float val; /**< For internal use only. */
|
||||
unsigned col; /**< For internal use only. */
|
||||
char str[FL_CHART_LABEL_MAX+1]; /**< For internal use only. */
|
||||
float val; /**< For internal use only. */
|
||||
unsigned col; /**< For internal use only. */
|
||||
char str[FL_CHART_LABEL_MAX+1]; /**< For internal use only. */
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -52,7 +50,7 @@ struct FL_CHART_ENTRY {
|
||||
\brief Fl_Chart displays simple charts.
|
||||
It is provided for Forms compatibility.
|
||||
|
||||
\image html charts.png
|
||||
\image html charts.png
|
||||
\image latex charts.png "Fl_Chart" width=10cm
|
||||
\todo Refactor Fl_Chart::type() information.
|
||||
|
||||
@@ -145,7 +143,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+9
-15
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Fl_Check_Browser header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -55,11 +53,11 @@ public:
|
||||
#ifndef FL_DOXYGEN
|
||||
/** For internal use only. */
|
||||
struct cb_item {
|
||||
cb_item *next; /**< For internal use only. */
|
||||
cb_item *prev; /**< For internal use only. */
|
||||
char checked; /**< For internal use only. */
|
||||
char selected; /**< For internal use only. */
|
||||
char *text; /**< For internal use only. */
|
||||
cb_item *next; /**< For internal use only. */
|
||||
cb_item *prev; /**< For internal use only. */
|
||||
char checked; /**< For internal use only. */
|
||||
char selected; /**< For internal use only. */
|
||||
char *text; /**< For internal use only. */
|
||||
};
|
||||
#endif // !FL_DOXYGEN
|
||||
|
||||
@@ -81,7 +79,7 @@ public:
|
||||
~Fl_Check_Browser() { clear(); }
|
||||
int add(char *s); // add an (unchecked) item
|
||||
int add(char *s, int b); // add an item and set checked
|
||||
// both return the new nitems()
|
||||
// both return the new nitems()
|
||||
int remove(int item); // delete an item. Returns nitems()
|
||||
|
||||
// inline const char * methods to avoid breaking binary compatibility...
|
||||
@@ -114,7 +112,3 @@ public:
|
||||
|
||||
#endif // Fl_Check_Browser_H
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Check button header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2014 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
#ifndef Fl_Check_Button_H
|
||||
@@ -33,7 +31,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+5
-11
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Choice header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -45,7 +43,7 @@
|
||||
and then:
|
||||
|
||||
- The item's callback is done if one has been set; the
|
||||
Fl_Choice is passed as the Fl_Widget* argument,
|
||||
Fl_Choice is passed as the Fl_Widget* argument,
|
||||
along with any userdata configured for the callback.
|
||||
|
||||
- If the item does not have a callback, the Fl_Choice widget's
|
||||
@@ -100,7 +98,7 @@
|
||||
return Fl::run();
|
||||
}
|
||||
\endcode
|
||||
|
||||
|
||||
*/
|
||||
class FL_EXPORT Fl_Choice : public Fl_Menu_ {
|
||||
protected:
|
||||
@@ -122,7 +120,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+27
-33
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Clock header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2017 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -30,12 +28,12 @@
|
||||
// Please change doxygen documentation below (class Fl_Clock_Output)
|
||||
// accordingly as well when changing the following type values:
|
||||
|
||||
#define FL_SQUARE_CLOCK 0 /**< type() of Square Clock variant */
|
||||
#define FL_ROUND_CLOCK 1 /**< type() of Round Clock variant */
|
||||
#define FL_ANALOG_CLOCK FL_SQUARE_CLOCK /**< An analog clock is square */
|
||||
#define FL_SQUARE_CLOCK 0 /**< type() of Square Clock variant */
|
||||
#define FL_ROUND_CLOCK 1 /**< type() of Round Clock variant */
|
||||
#define FL_ANALOG_CLOCK FL_SQUARE_CLOCK /**< An analog clock is square */
|
||||
#define FL_DIGITAL_CLOCK FL_SQUARE_CLOCK /**< Not yet implemented */
|
||||
|
||||
// fabien: Please keep the horizontal formatting of both images in class desc,
|
||||
// fabien: Please keep the horizontal formatting of both images in class desc,
|
||||
// don't lose vertical space for nothing!
|
||||
|
||||
/**
|
||||
@@ -45,11 +43,11 @@
|
||||
The time shown on the clock is not updated. To display the current time,
|
||||
use Fl_Clock instead.
|
||||
|
||||
\htmlonly <BR> <table align=CENTER border=1 cellpadding=5 >
|
||||
\htmlonly <BR> <table align=CENTER border=1 cellpadding=5 >
|
||||
<caption align=bottom>type() FL_SQUARE_CLOCK and FL_ROUND_CLOCK </caption> <TR><TD> \endhtmlonly
|
||||
\image html clock.png
|
||||
\image html clock.png
|
||||
\htmlonly </TD> <TD> \endhtmlonly
|
||||
\image html round_clock.png
|
||||
\image html round_clock.png
|
||||
\htmlonly </TD> </TR> </table> \endhtmlonly
|
||||
\image latex clock.png "FL_SQUARE_CLOCK type" width=4cm
|
||||
\image latex round_clock.png "FL_ROUND_CLOCK type" width=4cm
|
||||
@@ -57,10 +55,10 @@
|
||||
Values for clock type() (\#include \<FL/Clock.H\>):
|
||||
|
||||
\code
|
||||
#define FL_SQUARE_CLOCK 0 // Square Clock variant
|
||||
#define FL_ROUND_CLOCK 1 // Round Clock variant
|
||||
#define FL_ANALOG_CLOCK FL_SQUARE_CLOCK // An analog clock is square
|
||||
#define FL_DIGITAL_CLOCK FL_SQUARE_CLOCK // Not yet implemented
|
||||
#define FL_SQUARE_CLOCK 0 // Square Clock variant
|
||||
#define FL_ROUND_CLOCK 1 // Round Clock variant
|
||||
#define FL_ANALOG_CLOCK FL_SQUARE_CLOCK // An analog clock is square
|
||||
#define FL_DIGITAL_CLOCK FL_SQUARE_CLOCK // Not yet implemented
|
||||
\endcode
|
||||
|
||||
*/
|
||||
@@ -76,8 +74,8 @@ public:
|
||||
|
||||
Fl_Clock_Output(int X, int Y, int W, int H, const char *L = 0);
|
||||
|
||||
void value(ulong v); // set to this Unix time
|
||||
|
||||
void value(ulong v); // set to this Unix time
|
||||
|
||||
void value(int H, int m, int s);
|
||||
|
||||
/**
|
||||
@@ -108,9 +106,9 @@ public:
|
||||
/**
|
||||
Returns the shadow drawing mode of the hands.
|
||||
|
||||
\returns shadow drawing mode of the hands
|
||||
\retval 0 no shadows
|
||||
\retval 1 draw shadows of hands (default)
|
||||
\returns shadow drawing mode of the hands
|
||||
\retval 0 no shadows
|
||||
\retval 1 draw shadows of hands (default)
|
||||
*/
|
||||
int shadow() const {return shadow_;}
|
||||
|
||||
@@ -124,7 +122,7 @@ public:
|
||||
|
||||
The default is to draw the shadows (1).
|
||||
|
||||
\param[in] mode 1 = shadows (default), 0 = no shadows
|
||||
\param[in] mode 1 = shadows (default), 0 = no shadows
|
||||
*/
|
||||
void shadow(int mode) { shadow_ = mode ? 1 : 0; }
|
||||
};
|
||||
@@ -135,18 +133,18 @@ public:
|
||||
\class Fl_Clock
|
||||
\brief This widget provides a round analog clock display.
|
||||
|
||||
Fl_Clock is provided for Forms compatibility.
|
||||
Fl_Clock is provided for Forms compatibility.
|
||||
It installs a 1-second timeout callback using Fl::add_timeout().
|
||||
You can choose the rounded or square type of the clock with type().
|
||||
Please see Fl_Clock_Output widget for applicable values.
|
||||
|
||||
\htmlonly <BR> <table align=CENTER border=1 cellpadding=5 >
|
||||
\htmlonly <BR> <table align=CENTER border=1 cellpadding=5 >
|
||||
<caption align=bottom>type() FL_SQUARE_CLOCK and FL_ROUND_CLOCK </caption> <TR><TD> \endhtmlonly
|
||||
\image html clock.png
|
||||
\image html clock.png
|
||||
\htmlonly </TD> <TD> \endhtmlonly
|
||||
\image html round_clock.png
|
||||
\image html round_clock.png
|
||||
\htmlonly </TD> </TR> </table> \endhtmlonly
|
||||
\image latex clock.png "FL_SQUARE_CLOCK type" width=4cm
|
||||
\image latex clock.png "FL_SQUARE_CLOCK type" width=4cm
|
||||
\image latex round_clock.png "FL_ROUND_CLOCK type" width=4cm
|
||||
|
||||
\see class Fl_Clock_Output
|
||||
@@ -156,14 +154,10 @@ public:
|
||||
int handle(int);
|
||||
|
||||
Fl_Clock(int X, int Y, int W, int H, const char *L = 0);
|
||||
|
||||
|
||||
Fl_Clock(uchar t, int X, int Y, int W, int H, const char *L);
|
||||
|
||||
|
||||
~Fl_Clock();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+13
-19
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Color chooser header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2019 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/** \file
|
||||
@@ -67,7 +65,7 @@ public:
|
||||
|
||||
#endif // !FL_DOXYGEN
|
||||
|
||||
/** \addtogroup group_comdlg
|
||||
/** \addtogroup group_comdlg
|
||||
@{ */
|
||||
|
||||
/**
|
||||
@@ -122,21 +120,21 @@ class FL_EXPORT Fl_Color_Chooser : public Fl_Group {
|
||||
static void rgb_cb(Fl_Widget*, void*);
|
||||
static void mode_cb(Fl_Widget*, void*);
|
||||
public:
|
||||
|
||||
|
||||
int handle(int e);
|
||||
|
||||
/**
|
||||
Returns which Fl_Color_Chooser variant is currently active
|
||||
\return color modes are rgb(0), byte(1), hex(2), or hsv(3)
|
||||
/**
|
||||
Returns which Fl_Color_Chooser variant is currently active
|
||||
\return color modes are rgb(0), byte(1), hex(2), or hsv(3)
|
||||
*/
|
||||
int mode() {return choice.value();}
|
||||
|
||||
/**
|
||||
Set which Fl_Color_Chooser variant is currently active
|
||||
\param[in] newMode color modes are rgb(0), byte(1), hex(2), or hsv(3)
|
||||
|
||||
/**
|
||||
Set which Fl_Color_Chooser variant is currently active
|
||||
\param[in] newMode color modes are rgb(0), byte(1), hex(2), or hsv(3)
|
||||
*/
|
||||
void mode(int newMode);
|
||||
|
||||
|
||||
/**
|
||||
Returns the current hue.
|
||||
0 <= hue < 6. Zero is red, one is yellow, two is green, etc.
|
||||
@@ -190,7 +188,3 @@ FL_EXPORT int fl_color_chooser(const char* name, double& r, double& g, double& b
|
||||
FL_EXPORT int fl_color_chooser(const char* name, uchar& r, uchar& g, uchar& b, int m=-1);
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+7
-13
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Copy-to-clipboard code for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2014 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
#ifndef Fl_Copy_Surface_H
|
||||
@@ -22,12 +20,12 @@
|
||||
#include <FL/Fl_Widget_Surface.H>
|
||||
|
||||
/** Supports copying of graphical data to the clipboard.
|
||||
|
||||
|
||||
<br> After creation of an Fl_Copy_Surface object, make it the current drawing surface calling Fl_Surface_Device::push_current(), and all subsequent graphics requests
|
||||
will be recorded in the clipboard. It's possible to draw widgets (using Fl_Copy_Surface::draw()
|
||||
) or to use any of the \ref fl_drawings or the \ref fl_attributes.
|
||||
Finally, delete the Fl_Copy_Surface object to load the clipboard with the graphical data.
|
||||
<br> Fl_Gl_Window 's can be copied to the clipboard as well.
|
||||
<br> Fl_Gl_Window 's can be copied to the clipboard as well.
|
||||
<br> Usage example:
|
||||
\code
|
||||
Fl_Widget *g = ...; // a widget you want to copy to the clipboard
|
||||
@@ -44,7 +42,7 @@
|
||||
2) as a color bitmap. Applications to which the clipboard content is pasted can use the format
|
||||
that suits them best.
|
||||
\li Mac OS: The graphical data are copied to the clipboard (a.k.a. pasteboard) in two 'flavors':
|
||||
1) in vectorial form as PDF data; 2) in bitmap form as a TIFF image.
|
||||
1) in vectorial form as PDF data; 2) in bitmap form as a TIFF image.
|
||||
Applications to which the clipboard content is pasted can use the flavor that suits them best.
|
||||
\li X11: the graphical data are copied to the clipboard as an image in BMP format.
|
||||
*/
|
||||
@@ -78,7 +76,7 @@ public:
|
||||
|
||||
/**
|
||||
A base class describing the interface between FLTK and draw-to-clipboard operations.
|
||||
|
||||
|
||||
This class is only for internal use by the FLTK library.
|
||||
|
||||
A supported platform should implement the virtual methods of this class
|
||||
@@ -108,7 +106,3 @@ protected:
|
||||
*/
|
||||
|
||||
#endif // Fl_Copy_Surface_H
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+5
-11
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Counter header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -29,8 +27,8 @@
|
||||
#endif
|
||||
|
||||
// values for type():
|
||||
#define FL_NORMAL_COUNTER 0 /**< type() for counter with fast buttons */
|
||||
#define FL_SIMPLE_COUNTER 1 /**< type() for counter without fast buttons */
|
||||
#define FL_NORMAL_COUNTER 0 /**< type() for counter with fast buttons */
|
||||
#define FL_SIMPLE_COUNTER 1 /**< type() for counter without fast buttons */
|
||||
|
||||
/**
|
||||
Controls a single floating point value with button (or keyboard) arrows.
|
||||
@@ -109,7 +107,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+7
-13
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Definition of classes Fl_Surface_Device, Fl_Display_Device
|
||||
// for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@@ -10,14 +8,14 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/** \file Fl_Device.H
|
||||
/** \file Fl_Device.H
|
||||
\brief declaration of classes Fl_Surface_Device, Fl_Display_Device, Fl_Device_Plugin.
|
||||
*/
|
||||
|
||||
@@ -36,7 +34,7 @@ class Fl_Widget;
|
||||
A drawing surface that's susceptible to receive graphical output.
|
||||
Any FLTK application has at any time a current drawing surface to which all drawing requests are directed.
|
||||
The current surface is given by Fl_Surface_Device::surface().
|
||||
When main() begins running, the current drawing surface has been set to the computer's display,
|
||||
When main() begins running, the current drawing surface has been set to the computer's display,
|
||||
an instance of the Fl_Display_Device class.
|
||||
|
||||
A drawing surface other than the computer's display, is typically used as follows:
|
||||
@@ -53,7 +51,7 @@ class Fl_Widget;
|
||||
</ol>
|
||||
For back-compatibility, it is also possible to use the Fl_Surface_Device::set_current() member function
|
||||
to change the current drawing surface, once to the new surface, once to the previous one.
|
||||
|
||||
|
||||
Class Fl_Surface_Device can also be derived to define new kinds of graphical output
|
||||
usable with FLTK drawing functions.
|
||||
An example would be to draw to a PDF file. This would require to create a new class,
|
||||
@@ -105,7 +103,7 @@ public:
|
||||
|
||||
/**
|
||||
This plugin socket allows the integration of new device drivers for special
|
||||
window or screen types.
|
||||
window or screen types.
|
||||
This class is not intended for use outside the FLTK library.
|
||||
It is currently used to provide an automated printing
|
||||
service and screen capture for OpenGL windows, if linked with fltk_gl.
|
||||
@@ -130,7 +128,3 @@ public:
|
||||
};
|
||||
|
||||
#endif // Fl_Device_H
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+8
-14
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Dial header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -27,14 +25,14 @@
|
||||
#endif
|
||||
|
||||
// values for type():
|
||||
#define FL_NORMAL_DIAL 0 /**< type() for dial variant with dot */
|
||||
#define FL_LINE_DIAL 1 /**< type() for dial variant with line */
|
||||
#define FL_FILL_DIAL 2 /**< type() for dial variant with filled arc */
|
||||
#define FL_NORMAL_DIAL 0 /**< type() for dial variant with dot */
|
||||
#define FL_LINE_DIAL 1 /**< type() for dial variant with line */
|
||||
#define FL_FILL_DIAL 2 /**< type() for dial variant with filled arc */
|
||||
|
||||
/**
|
||||
The Fl_Dial widget provides a circular dial to control a
|
||||
single floating point value.
|
||||
<P ALIGN=CENTER>\image html dial.png
|
||||
<P ALIGN=CENTER>\image html dial.png
|
||||
\image latex dial.png "Fl_Dial" width=4cm
|
||||
Use type() to set the type of the dial to:
|
||||
<UL>
|
||||
@@ -63,7 +61,7 @@ public:
|
||||
and label string. The default type is FL_NORMAL_DIAL.
|
||||
*/
|
||||
Fl_Dial(int x,int y,int w,int h, const char *l = 0);
|
||||
/**
|
||||
/**
|
||||
Sets Or gets the angles used for the minimum and maximum values. The default
|
||||
values are 45 and 315 (0 degrees is straight down and the angles
|
||||
progress clockwise). Normally angle1 is less than angle2, but if you
|
||||
@@ -82,7 +80,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+5
-11
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Double-buffered window header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -50,13 +48,13 @@ public:
|
||||
void hide();
|
||||
void flush();
|
||||
~Fl_Double_Window();
|
||||
|
||||
|
||||
/**
|
||||
Creates a new Fl_Double_Window widget using the given
|
||||
position, size, and label (title) string.
|
||||
*/
|
||||
Fl_Double_Window(int W, int H, const char *l = 0);
|
||||
|
||||
|
||||
/**
|
||||
See Fl_Double_Window::Fl_Double_Window(int w, int h, const char *label = 0)
|
||||
*/
|
||||
@@ -65,7 +63,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+5
-11
@@ -1,6 +1,4 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
*
|
||||
* Windows DLL export .
|
||||
*
|
||||
* Copyright 1998-2018 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
* the file "COPYING" which should have been included with this file. If this
|
||||
* file is missing or damaged, see the license at:
|
||||
*
|
||||
* http://www.fltk.org/COPYING.php
|
||||
* https://www.fltk.org/COPYING.php
|
||||
*
|
||||
* Please report all bugs and problems on the following page:
|
||||
* Please see the following page on how to report bugs and issues:
|
||||
*
|
||||
* http://www.fltk.org/str.php
|
||||
* https://www.fltk.org/bugs.php
|
||||
*/
|
||||
|
||||
#ifndef Fl_Export_H
|
||||
@@ -25,9 +23,9 @@
|
||||
|
||||
# if defined(FL_DLL)
|
||||
# ifdef FL_LIBRARY
|
||||
# define FL_EXPORT __declspec(dllexport)
|
||||
# define FL_EXPORT __declspec(dllexport)
|
||||
# else
|
||||
# define FL_EXPORT __declspec(dllimport)
|
||||
# define FL_EXPORT __declspec(dllimport)
|
||||
# endif /* FL_LIBRARY */
|
||||
# elif __GNUC__ >= 4
|
||||
# define FL_EXPORT __attribute__ ((visibility ("default")))
|
||||
@@ -36,7 +34,3 @@
|
||||
# endif /* FL_DLL */
|
||||
|
||||
#endif /* !Fl_Export_H */
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
*/
|
||||
|
||||
+22
-28
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// FileBrowser definitions.
|
||||
//
|
||||
// Copyright 1999-2010 by Michael Sweet.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -37,17 +35,17 @@
|
||||
|
||||
/** The Fl_File_Browser widget displays a list of filenames, optionally with file-specific icons. */
|
||||
class FL_EXPORT Fl_File_Browser : public Fl_Browser {
|
||||
|
||||
int filetype_;
|
||||
const char *directory_;
|
||||
uchar iconsize_;
|
||||
const char *pattern_;
|
||||
|
||||
int full_height() const;
|
||||
int item_height(void *) const;
|
||||
int item_width(void *) const;
|
||||
void item_draw(void *, int, int, int, int) const;
|
||||
int incr_height() const { return (item_height(0)); }
|
||||
int filetype_;
|
||||
const char *directory_;
|
||||
uchar iconsize_;
|
||||
const char *pattern_;
|
||||
|
||||
int full_height() const;
|
||||
int item_height(void *) const;
|
||||
int item_width(void *) const;
|
||||
void item_draw(void *, int, int, int, int) const;
|
||||
int incr_height() const { return (item_height(0)); }
|
||||
|
||||
public:
|
||||
enum { FILES, DIRECTORIES };
|
||||
@@ -59,34 +57,34 @@ public:
|
||||
Fl_File_Browser(int, int, int, int, const char * = 0);
|
||||
|
||||
/** Sets or gets the size of the icons. The default size is 20 pixels. */
|
||||
uchar iconsize() const { return (iconsize_); };
|
||||
uchar iconsize() const { return (iconsize_); };
|
||||
/** Sets or gets the size of the icons. The default size is 20 pixels. */
|
||||
void iconsize(uchar s) { iconsize_ = s; redraw(); };
|
||||
void iconsize(uchar s) { iconsize_ = s; redraw(); };
|
||||
|
||||
/**
|
||||
Sets or gets the filename filter. The pattern matching uses
|
||||
the fl_filename_match()
|
||||
function in FLTK.
|
||||
*/
|
||||
void filter(const char *pattern);
|
||||
void filter(const char *pattern);
|
||||
/**
|
||||
Sets or gets the filename filter. The pattern matching uses
|
||||
the fl_filename_match()
|
||||
function in FLTK.
|
||||
*/
|
||||
const char *filter() const { return (pattern_); };
|
||||
const char *filter() const { return (pattern_); };
|
||||
|
||||
/**
|
||||
Loads the specified directory into the browser. If icons have been
|
||||
loaded then the correct icon is associated with each file in the list.
|
||||
|
||||
|
||||
<P>The sort argument specifies a sort function to be used with
|
||||
fl_filename_list().
|
||||
*/
|
||||
int load(const char *directory, Fl_File_Sort_F *sort = fl_numericsort);
|
||||
int load(const char *directory, Fl_File_Sort_F *sort = fl_numericsort);
|
||||
|
||||
Fl_Fontsize textsize() const { return Fl_Browser::textsize(); };
|
||||
void textsize(Fl_Fontsize s) { Fl_Browser::textsize(s); iconsize_ = (uchar)(3 * s / 2); };
|
||||
void textsize(Fl_Fontsize s) { Fl_Browser::textsize(s); iconsize_ = (uchar)(3 * s / 2); };
|
||||
|
||||
/**
|
||||
Sets or gets the file browser type, FILES or
|
||||
@@ -94,18 +92,14 @@ public:
|
||||
files and directories are shown. Otherwise only directories are
|
||||
shown.
|
||||
*/
|
||||
int filetype() const { return (filetype_); };
|
||||
int filetype() const { return (filetype_); };
|
||||
/**
|
||||
Sets or gets the file browser type, FILES or
|
||||
DIRECTORIES. When set to FILES, both
|
||||
files and directories are shown. Otherwise only directories are
|
||||
shown.
|
||||
*/
|
||||
void filetype(int t) { filetype_ = t; };
|
||||
void filetype(int t) { filetype_ = t; };
|
||||
};
|
||||
|
||||
#endif // !_Fl_File_Browser_H_
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+48
-54
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Fl_File_Chooser dialog for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2015 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
// =======================================================================
|
||||
// DO NOT EDIT FL/Fl_File_Chooser.H and src/Fl_File_Chooser.cxx !!!
|
||||
@@ -47,24 +45,24 @@
|
||||
|
||||
class FL_EXPORT Fl_File_Chooser {
|
||||
public:
|
||||
enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };
|
||||
enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };
|
||||
private:
|
||||
static Fl_Preferences *prefs_;
|
||||
void (*callback_)(Fl_File_Chooser*, void *);
|
||||
void *data_;
|
||||
char directory_[FL_PATH_MAX];
|
||||
char pattern_[FL_PATH_MAX];
|
||||
char preview_text_[2048];
|
||||
int type_;
|
||||
void favoritesButtonCB();
|
||||
void favoritesCB(Fl_Widget *w);
|
||||
void fileListCB();
|
||||
void fileNameCB();
|
||||
void newdir();
|
||||
static void previewCB(Fl_File_Chooser *fc);
|
||||
void showChoiceCB();
|
||||
void update_favorites();
|
||||
void update_preview();
|
||||
static Fl_Preferences *prefs_;
|
||||
void (*callback_)(Fl_File_Chooser*, void *);
|
||||
void *data_;
|
||||
char directory_[FL_PATH_MAX];
|
||||
char pattern_[FL_PATH_MAX];
|
||||
char preview_text_[2048];
|
||||
int type_;
|
||||
void favoritesButtonCB();
|
||||
void favoritesCB(Fl_Widget *w);
|
||||
void fileListCB();
|
||||
void fileNameCB();
|
||||
void newdir();
|
||||
static void previewCB(Fl_File_Chooser *fc);
|
||||
void showChoiceCB();
|
||||
void update_favorites();
|
||||
void update_preview();
|
||||
public:
|
||||
Fl_File_Chooser(const char *d, const char *p, int t, const char *title);
|
||||
private:
|
||||
@@ -131,10 +129,10 @@ public:
|
||||
void callback(void (*cb)(Fl_File_Chooser *, void *), void *d = 0);
|
||||
void color(Fl_Color c);
|
||||
Fl_Color color();
|
||||
int count();
|
||||
void directory(const char *d);
|
||||
int count();
|
||||
void directory(const char *d);
|
||||
char * directory();
|
||||
void filter(const char *p);
|
||||
void filter(const char *p);
|
||||
const char * filter();
|
||||
int filter_value();
|
||||
void filter_value(int f);
|
||||
@@ -145,15 +143,15 @@ public:
|
||||
const char * label();
|
||||
void ok_label(const char *l);
|
||||
const char * ok_label();
|
||||
void preview(int e);
|
||||
int preview() const { return previewButton->value(); };
|
||||
void preview(int e);
|
||||
int preview() const { return previewButton->value(); };
|
||||
private:
|
||||
void showHidden(int e);
|
||||
void remove_hidden_files();
|
||||
void showHidden(int e);
|
||||
void remove_hidden_files();
|
||||
public:
|
||||
void rescan();
|
||||
void rescan_keep_filename();
|
||||
void show();
|
||||
void rescan();
|
||||
void rescan_keep_filename();
|
||||
void show();
|
||||
int shown();
|
||||
void textcolor(Fl_Color c);
|
||||
Fl_Color textcolor();
|
||||
@@ -165,72 +163,72 @@ public:
|
||||
int type();
|
||||
void * user_data() const;
|
||||
void user_data(void *d);
|
||||
const char *value(int f = 1);
|
||||
void value(const char *filename);
|
||||
const char *value(int f = 1);
|
||||
void value(const char *filename);
|
||||
int visible();
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *add_favorites_label;
|
||||
static const char *add_favorites_label;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *all_files_label;
|
||||
static const char *all_files_label;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *custom_filter_label;
|
||||
static const char *custom_filter_label;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *existing_file_label;
|
||||
static const char *existing_file_label;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *favorites_label;
|
||||
static const char *favorites_label;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *filename_label;
|
||||
static const char *filename_label;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *filesystems_label;
|
||||
static const char *filesystems_label;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *manage_favorites_label;
|
||||
static const char *manage_favorites_label;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *new_directory_label;
|
||||
static const char *new_directory_label;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *new_directory_tooltip;
|
||||
static const char *new_directory_tooltip;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *preview_label;
|
||||
static const char *preview_label;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *save_label;
|
||||
static const char *save_label;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *show_label;
|
||||
static const char *show_label;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *hidden_label;
|
||||
static const char *hidden_label;
|
||||
/**
|
||||
the sort function that is used when loading
|
||||
the contents of a directory.
|
||||
*/
|
||||
static Fl_File_Sort_F *sort;
|
||||
static Fl_File_Sort_F *sort;
|
||||
private:
|
||||
Fl_Widget* ext_group;
|
||||
Fl_Widget* ext_group;
|
||||
public:
|
||||
Fl_Widget* add_extra(Fl_Widget* gr);
|
||||
};
|
||||
@@ -239,7 +237,3 @@ FL_EXPORT char *fl_file_chooser(const char *message,const char *pat,const char *
|
||||
FL_EXPORT void fl_file_chooser_callback(void (*cb)(const char*));
|
||||
FL_EXPORT void fl_file_chooser_ok_label(const char*l);
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+51
-57
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Fl_File_Icon definitions.
|
||||
//
|
||||
// Copyright 1999-2010 by Michael Sweet.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -33,61 +31,61 @@
|
||||
// Special color value for the icon color.
|
||||
//
|
||||
|
||||
# define FL_ICON_COLOR (Fl_Color)0xffffffff /**< icon color [background?]*/
|
||||
# define FL_ICON_COLOR (Fl_Color)0xffffffff /**< icon color [background?]*/
|
||||
|
||||
|
||||
//
|
||||
// Fl_File_Icon class...
|
||||
//
|
||||
|
||||
/**
|
||||
The Fl_File_Icon class manages icon images that can be used
|
||||
/**
|
||||
The Fl_File_Icon class manages icon images that can be used
|
||||
as labels in other widgets and as icons in the FileBrowser widget.
|
||||
*/
|
||||
class FL_EXPORT Fl_File_Icon { //// Icon data
|
||||
class FL_EXPORT Fl_File_Icon { //// Icon data
|
||||
|
||||
static Fl_File_Icon *first_; // Pointer to first icon/filetype
|
||||
Fl_File_Icon *next_; // Pointer to next icon/filetype
|
||||
const char *pattern_; // Pattern string
|
||||
int type_; // Match only if directory or file?
|
||||
int num_data_; // Number of data elements
|
||||
int alloc_data_; // Number of allocated elements
|
||||
short *data_; // Icon data
|
||||
static Fl_File_Icon *first_; // Pointer to first icon/filetype
|
||||
Fl_File_Icon *next_; // Pointer to next icon/filetype
|
||||
const char *pattern_; // Pattern string
|
||||
int type_; // Match only if directory or file?
|
||||
int num_data_; // Number of data elements
|
||||
int alloc_data_; // Number of allocated elements
|
||||
short *data_; // Icon data
|
||||
|
||||
public:
|
||||
|
||||
enum // File types
|
||||
enum // File types
|
||||
{
|
||||
ANY, // Any kind of file
|
||||
PLAIN, // Only plain files
|
||||
FIFO, // Only named pipes
|
||||
DEVICE, // Only character and block devices
|
||||
LINK, // Only symbolic links
|
||||
DIRECTORY // Only directories
|
||||
ANY, // Any kind of file
|
||||
PLAIN, // Only plain files
|
||||
FIFO, // Only named pipes
|
||||
DEVICE, // Only character and block devices
|
||||
LINK, // Only symbolic links
|
||||
DIRECTORY // Only directories
|
||||
};
|
||||
|
||||
enum // Data opcodes
|
||||
enum // Data opcodes
|
||||
{
|
||||
END, // End of primitive/icon
|
||||
COLOR, // Followed by color value (2 shorts)
|
||||
LINE, // Start of line
|
||||
CLOSEDLINE, // Start of closed line
|
||||
POLYGON, // Start of polygon
|
||||
OUTLINEPOLYGON, // Followed by outline color (2 shorts)
|
||||
VERTEX // Followed by scaled X,Y
|
||||
END, // End of primitive/icon
|
||||
COLOR, // Followed by color value (2 shorts)
|
||||
LINE, // Start of line
|
||||
CLOSEDLINE, // Start of closed line
|
||||
POLYGON, // Start of polygon
|
||||
OUTLINEPOLYGON, // Followed by outline color (2 shorts)
|
||||
VERTEX // Followed by scaled X,Y
|
||||
};
|
||||
|
||||
Fl_File_Icon(const char *p, int t, int nd = 0, short *d = 0);
|
||||
~Fl_File_Icon();
|
||||
|
||||
short *add(short d);
|
||||
short *add(short d);
|
||||
|
||||
/**
|
||||
Adds a color value to the icon array, returning a pointer to it.
|
||||
\param[in] c color value
|
||||
*/
|
||||
short *add_color(Fl_Color c)
|
||||
{ short *d = add((short)COLOR); add((short)(c >> 16)); add((short)c); return (d); }
|
||||
short *add_color(Fl_Color c)
|
||||
{ short *d = add((short)COLOR); add((short)(c >> 16)); add((short)c); return (d); }
|
||||
|
||||
/**
|
||||
Adds a vertex value to the icon array, returning a pointer to it.
|
||||
@@ -95,8 +93,8 @@ class FL_EXPORT Fl_File_Icon { //// Icon data
|
||||
The origin (0.0) is in the lower-lefthand corner of the icon.
|
||||
\param[in] x, y vertex coordinates
|
||||
*/
|
||||
short *add_vertex(int x, int y)
|
||||
{ short *d = add((short)VERTEX); add((short)x); add((short)y); return (d); }
|
||||
short *add_vertex(int x, int y)
|
||||
{ short *d = add((short)VERTEX); add((short)x); add((short)y); return (d); }
|
||||
|
||||
/**
|
||||
Adds a vertex value to the icon array, returning a pointer to it.
|
||||
@@ -104,35 +102,35 @@ class FL_EXPORT Fl_File_Icon { //// Icon data
|
||||
The origin (0.0) is in the lower-lefthand corner of the icon.
|
||||
\param[in] x, y vertex coordinates
|
||||
*/
|
||||
short *add_vertex(float x, float y)
|
||||
{ short *d = add((short)VERTEX); add((short)(x * 10000.0));
|
||||
add((short)(y * 10000.0)); return (d); }
|
||||
short *add_vertex(float x, float y)
|
||||
{ short *d = add((short)VERTEX); add((short)(x * 10000.0));
|
||||
add((short)(y * 10000.0)); return (d); }
|
||||
|
||||
/** Clears all icon data from the icon.*/
|
||||
void clear() { num_data_ = 0; }
|
||||
void clear() { num_data_ = 0; }
|
||||
|
||||
void draw(int x, int y, int w, int h, Fl_Color ic, int active = 1);
|
||||
void draw(int x, int y, int w, int h, Fl_Color ic, int active = 1);
|
||||
|
||||
void label(Fl_Widget *w);
|
||||
void label(Fl_Widget *w);
|
||||
|
||||
static void labeltype(const Fl_Label *o, int x, int y, int w, int h, Fl_Align a);
|
||||
void load(const char *f);
|
||||
int load_fti(const char *fti);
|
||||
int load_image(const char *i);
|
||||
static void labeltype(const Fl_Label *o, int x, int y, int w, int h, Fl_Align a);
|
||||
void load(const char *f);
|
||||
int load_fti(const char *fti);
|
||||
int load_image(const char *i);
|
||||
|
||||
/** Returns next file icon object. See Fl_File_Icon::first() */
|
||||
Fl_File_Icon *next() { return (next_); }
|
||||
Fl_File_Icon *next() { return (next_); }
|
||||
|
||||
/** Returns the filename matching pattern for the icon.*/
|
||||
const char *pattern() { return (pattern_); }
|
||||
const char *pattern() { return (pattern_); }
|
||||
|
||||
/** Returns the number of words of data used by the icon.*/
|
||||
int size() { return (num_data_); }
|
||||
int size() { return (num_data_); }
|
||||
|
||||
/**
|
||||
Returns the filetype associated with the icon, which can be one of the
|
||||
following:
|
||||
|
||||
|
||||
\li Fl_File_Icon::ANY, any kind of file.
|
||||
\li Fl_File_Icon::PLAIN, plain files.
|
||||
\li Fl_File_Icon::FIFO, named pipes.
|
||||
@@ -140,20 +138,16 @@ class FL_EXPORT Fl_File_Icon { //// Icon data
|
||||
\li Fl_File_Icon::LINK, symbolic links.
|
||||
\li Fl_File_Icon::DIRECTORY, directories.
|
||||
*/
|
||||
int type() { return (type_); }
|
||||
int type() { return (type_); }
|
||||
|
||||
/** Returns the data array for the icon.*/
|
||||
short *value() { return (data_); }
|
||||
short *value() { return (data_); }
|
||||
|
||||
static Fl_File_Icon *find(const char *filename, int filetype = ANY);
|
||||
|
||||
/** Returns a pointer to the first icon in the list.*/
|
||||
static Fl_File_Icon *first() { return (first_); }
|
||||
static void load_system_icons(void);
|
||||
static void load_system_icons(void);
|
||||
};
|
||||
|
||||
#endif // !_Fl_Fl_File_Icon_H_
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+19
-26
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// File_Input header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@@ -10,11 +8,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -36,7 +34,7 @@
|
||||
FL_WHEN_RELEASE callback won't be called if the directory clicked
|
||||
is the same as the current one.
|
||||
|
||||
<P align=CENTER> \image html Fl_File_Input.png </P>
|
||||
<P align=CENTER> \image html Fl_File_Input.png </P>
|
||||
\image latex Fl_File_Input.png "Fl_File_Input" width=6cm
|
||||
|
||||
\note As all Fl_Input derived objects, Fl_File_Input may call its callback
|
||||
@@ -45,15 +43,15 @@
|
||||
to avoid reentrant calls if you plan to show another window or dialog box in the callback.
|
||||
*/
|
||||
class FL_EXPORT Fl_File_Input : public Fl_Input {
|
||||
|
||||
char ok_entry_;
|
||||
uchar down_box_;
|
||||
short buttons_[200];
|
||||
short pressed_;
|
||||
|
||||
void draw_buttons();
|
||||
int handle_button(int event);
|
||||
void update_buttons();
|
||||
char ok_entry_;
|
||||
uchar down_box_;
|
||||
short buttons_[200];
|
||||
short pressed_;
|
||||
|
||||
void draw_buttons();
|
||||
int handle_button(int event);
|
||||
void update_buttons();
|
||||
|
||||
public:
|
||||
|
||||
@@ -66,9 +64,9 @@ protected:
|
||||
|
||||
public:
|
||||
/** Gets the box type used for the navigation bar. */
|
||||
Fl_Boxtype down_box() const { return (Fl_Boxtype)down_box_; }
|
||||
Fl_Boxtype down_box() const { return (Fl_Boxtype)down_box_; }
|
||||
/** Sets the box type to use for the navigation bar. */
|
||||
void down_box(Fl_Boxtype b) { down_box_ = b; }
|
||||
void down_box(Fl_Boxtype b) { down_box_ = b; }
|
||||
|
||||
/**
|
||||
Gets the current error color.
|
||||
@@ -79,7 +77,7 @@ public:
|
||||
\deprecated Will be removed in FLTK 1.5.0 or higher.
|
||||
\todo Remove Fl_File_Input::errorcolor() in FLTK 1.5.0 or higher.
|
||||
*/
|
||||
Fl_Color errorcolor() const { return FL_RED; }
|
||||
Fl_Color errorcolor() const { return FL_RED; }
|
||||
|
||||
/**
|
||||
Sets the current error color to \p c.
|
||||
@@ -89,21 +87,16 @@ public:
|
||||
\deprecated Will be removed in FLTK 1.5.0 or higher.
|
||||
\todo Remove Fl_File_Input::errorcolor(Fl_Color) in FLTK 1.5.0 or higher.
|
||||
*/
|
||||
void errorcolor(Fl_Color c) {}
|
||||
void errorcolor(Fl_Color c) {}
|
||||
|
||||
int value(const char *str);
|
||||
int value(const char *str, int len);
|
||||
int value(const char *str);
|
||||
int value(const char *str, int len);
|
||||
|
||||
/**
|
||||
Returns the current value, which is a pointer to an internal buffer
|
||||
and is valid only until the next event is handled.
|
||||
*/
|
||||
const char *value() { return Fl_Input_::value(); }
|
||||
const char *value() { return Fl_Input_::value(); }
|
||||
};
|
||||
|
||||
#endif // !Fl_File_Input_H
|
||||
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+3
-9
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Filled dial header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -32,7 +30,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+3
-9
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Filled slider header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -31,7 +29,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+3
-9
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Floating point input header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2011 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -41,7 +39,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+4
-10
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Forms bitmap header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -24,7 +22,7 @@
|
||||
|
||||
#include "Fl_Bitmap.H"
|
||||
|
||||
/**
|
||||
/**
|
||||
Forms compatibility Bitmap Image Widget
|
||||
*/
|
||||
class FL_EXPORT Fl_FormsBitmap : public Fl_Widget {
|
||||
@@ -41,7 +39,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+3
-9
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Forms pixmap header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -48,7 +46,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+18
-24
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Forms free header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -26,33 +24,33 @@
|
||||
#include "Fl_Widget.H"
|
||||
#endif
|
||||
|
||||
#define FL_NORMAL_FREE 1 /**< normal event handling */
|
||||
#define FL_SLEEPING_FREE 2 /**< deactivate event handling */
|
||||
#define FL_INPUT_FREE 3 /**< accepts FL_FOCUS events */
|
||||
#define FL_CONTINUOUS_FREE 4 /**< repeated timeout handling */
|
||||
#define FL_ALL_FREE 5 /**< FL_INPUT_FREE and FL_CONTINOUS_FREE */
|
||||
#define FL_NORMAL_FREE 1 /**< normal event handling */
|
||||
#define FL_SLEEPING_FREE 2 /**< deactivate event handling */
|
||||
#define FL_INPUT_FREE 3 /**< accepts FL_FOCUS events */
|
||||
#define FL_CONTINUOUS_FREE 4 /**< repeated timeout handling */
|
||||
#define FL_ALL_FREE 5 /**< FL_INPUT_FREE and FL_CONTINOUS_FREE */
|
||||
|
||||
/** appropriate signature for handle function */
|
||||
typedef int (*FL_HANDLEPTR)(Fl_Widget *, int , float, float, char);
|
||||
|
||||
/**
|
||||
Emulation of the Forms "free" widget.
|
||||
|
||||
|
||||
This emulation allows the free demo to run, and appears to be useful for
|
||||
porting programs written in Forms which use the free widget or make
|
||||
subclasses of the Forms widgets.
|
||||
|
||||
There are five types of free, which determine when the handle function
|
||||
is called:
|
||||
|
||||
|
||||
\li \c FL_NORMAL_FREE normal event handling.
|
||||
\li \c FL_SLEEPING_FREE deactivates event handling (widget is inactive).
|
||||
\li \c FL_INPUT_FREE accepts FL_FOCUS events.
|
||||
\li \c FL_CONTINUOUS_FREE sets a timeout callback 100 times a second and
|
||||
provides an FL_STEP event. This has obvious
|
||||
detrimental effects on machine performance.
|
||||
detrimental effects on machine performance.
|
||||
\li \c FL_ALL_FREE same as FL_INPUT_FREE and FL_CONTINUOUS_FREE.
|
||||
|
||||
|
||||
*/
|
||||
class FL_EXPORT Fl_Free : public Fl_Widget {
|
||||
FL_HANDLEPTR hfunc;
|
||||
@@ -66,15 +64,11 @@ public:
|
||||
};
|
||||
|
||||
// old event names for compatibility:
|
||||
#define FL_MOUSE FL_DRAG /**< for backward compatibility */
|
||||
#define FL_DRAW 100 /**< for backward compatibility [UNUSED]*/
|
||||
#define FL_STEP 101 /**< for backward compatibility */
|
||||
#define FL_FREEMEM 102 /**< for backward compatibility [UNUSED]*/
|
||||
#define FL_FREEZE 103 /**< for backward compatibility [UNUSED]*/
|
||||
#define FL_THAW 104 /**< for backward compatibility [UNUSED]*/
|
||||
#define FL_MOUSE FL_DRAG /**< for backward compatibility */
|
||||
#define FL_DRAW 100 /**< for backward compatibility [UNUSED]*/
|
||||
#define FL_STEP 101 /**< for backward compatibility */
|
||||
#define FL_FREEMEM 102 /**< for backward compatibility [UNUSED]*/
|
||||
#define FL_FREEZE 103 /**< for backward compatibility [UNUSED]*/
|
||||
#define FL_THAW 104 /**< for backward compatibility [UNUSED]*/
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+3
-9
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// GIF image header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2020 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -42,7 +40,3 @@ protected:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+22
-28
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// OpenGL header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2016 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -28,7 +26,7 @@ class Fl_Gl_Choice; // structure to hold result of glXChooseVisual
|
||||
class Fl_Gl_Window_Driver;
|
||||
/**
|
||||
The Fl_Gl_Window widget sets things up so OpenGL works.
|
||||
|
||||
|
||||
It also keeps an OpenGL "context" for that window, so that changes to the
|
||||
lighting and projection may be reused between redraws. Fl_Gl_Window
|
||||
also flushes the OpenGL streams and swaps buffers after draw() returns.
|
||||
@@ -42,7 +40,7 @@ class Fl_Gl_Window_Driver;
|
||||
Please note that the FLTK drawing and clipping functions
|
||||
will not work inside an Fl_Gl_Window. All drawing
|
||||
should be done using OpenGL calls exclusively.
|
||||
|
||||
|
||||
\see \ref opengl_highdpi
|
||||
|
||||
\note FLTK 1.4 introduces a driver system for graphic calls. It is now possible
|
||||
@@ -81,9 +79,9 @@ public:
|
||||
int handle(int);
|
||||
/** Returns a pointer to the window's Fl_Gl_Window_Driver object */
|
||||
Fl_Gl_Window_Driver *gl_driver() {return pGlWindowDriver;}
|
||||
|
||||
|
||||
/**
|
||||
Is turned off when FLTK creates a new context for this window or
|
||||
Is turned off when FLTK creates a new context for this window or
|
||||
when the window resizes, and is turned on \e after draw() is called.
|
||||
You can use this inside your draw() method to avoid unnecessarily
|
||||
initializing the OpenGL context. Just do this:
|
||||
@@ -100,28 +98,28 @@ public:
|
||||
... draw your geometry here ...
|
||||
}
|
||||
\endcode
|
||||
|
||||
|
||||
You can turn valid() on by calling valid(1). You
|
||||
should only do this after fixing the transformation inside a draw()
|
||||
or after make_current(). This is done automatically after
|
||||
or after make_current(). This is done automatically after
|
||||
draw() returns.
|
||||
*/
|
||||
char valid() const {return valid_f_ & 1;}
|
||||
/**
|
||||
See char Fl_Gl_Window::valid() const
|
||||
See char Fl_Gl_Window::valid() const
|
||||
*/
|
||||
void valid(char v) {if (v) valid_f_ |= 1; else valid_f_ &= 0xfe;}
|
||||
void invalidate();
|
||||
|
||||
/**
|
||||
Will only be set if the
|
||||
Will only be set if the
|
||||
OpenGL context is created or recreated. It differs from
|
||||
Fl_Gl_Window::valid() which is also set whenever the context
|
||||
changes size.
|
||||
*/
|
||||
char context_valid() const {return valid_f_ & 2;}
|
||||
/**
|
||||
See char Fl_Gl_Window::context_valid() const
|
||||
See char Fl_Gl_Window::context_valid() const
|
||||
*/
|
||||
void context_valid(char v) {if (v) valid_f_ |= 2; else valid_f_ &= 0xfd;}
|
||||
|
||||
@@ -139,7 +137,7 @@ public:
|
||||
/**
|
||||
Set or change the OpenGL capabilites of the window. The value can be
|
||||
any of the following OR'd together:
|
||||
|
||||
|
||||
- \c FL_RGB - RGB color (not indexed)
|
||||
- \c FL_RGB8 - RGB color with at least 8 bits of each color
|
||||
- \c FL_INDEX - Indexed mode
|
||||
@@ -151,14 +149,14 @@ public:
|
||||
- \c FL_STENCIL - stencil buffer
|
||||
- \c FL_MULTISAMPLE - multisample antialiasing
|
||||
- \c FL_OPENGL3 - use OpenGL version 3.0 or more.
|
||||
|
||||
|
||||
FL_RGB and FL_SINGLE have a value of zero, so they
|
||||
are "on" unless you give FL_INDEX or FL_DOUBLE.
|
||||
|
||||
|
||||
If the desired combination cannot be done, FLTK will try turning off
|
||||
FL_MULTISAMPLE. If this also fails the show() will call
|
||||
Fl::error() and not show the window.
|
||||
|
||||
|
||||
You can change the mode while the window is displayed. This is most
|
||||
useful for turning double-buffering on and off. Under X this will
|
||||
cause the old X window to be destroyed and a new one to be created. If
|
||||
@@ -166,14 +164,14 @@ public:
|
||||
window to blink, raise to the top, and be de-iconized, and the xid()
|
||||
will change, possibly breaking other code. It is best to make the GL
|
||||
window a child of another window if you wish to do this!
|
||||
|
||||
|
||||
mode() must not be called within draw() since it
|
||||
changes the current context.
|
||||
|
||||
|
||||
The FL_OPENGL3 flag is required to access OpenGL version 3 or more
|
||||
under the X11 and MacOS platforms; it's optional under Windows.
|
||||
See more details in \ref opengl3.
|
||||
|
||||
|
||||
\version the <tt>FL_OPENGL3</tt> flag appeared in version 1.3.4
|
||||
*/
|
||||
int mode(int a) {return mode(a,0);}
|
||||
@@ -204,7 +202,7 @@ public:
|
||||
|
||||
// Note: Doxygen docs in Fl_Widget.H to avoid redundancy.
|
||||
virtual Fl_Gl_Window* as_gl_window() {return this;}
|
||||
|
||||
|
||||
float pixels_per_unit();
|
||||
/** Gives the window width in OpenGL pixels.
|
||||
When an Fl_Gl_Window is mapped to a HighDPI display, the value given by Fl_Gl_Window::w()
|
||||
@@ -226,10 +224,10 @@ public:
|
||||
\version 1.3.4
|
||||
*/
|
||||
int pixel_h() { return int(pixels_per_unit() * h() + 0.5f); }
|
||||
|
||||
|
||||
~Fl_Gl_Window();
|
||||
/**
|
||||
Creates a new Fl_Gl_Window widget using the given size, and label string.
|
||||
Creates a new Fl_Gl_Window widget using the given size, and label string.
|
||||
The default boxtype is FL_NO_BOX. The default mode is FL_RGB|FL_DOUBLE|FL_DEPTH.
|
||||
*/
|
||||
Fl_Gl_Window(int W, int H, const char *l=0) : Fl_Window(W,H,l) {init();}
|
||||
@@ -244,7 +242,3 @@ public:
|
||||
};
|
||||
|
||||
#endif // Fl_Gl_Window_H
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+9
-15
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Definition of classes Fl_Graphics_Driver, Fl_Surface_Device, Fl_Display_Device
|
||||
// for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@@ -10,11 +8,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/**
|
||||
@@ -64,9 +62,9 @@ struct Fl_Fontdesc;
|
||||
drawing operations (e.g., fl_rectf()) that operate on the current drawing surface (see Fl_Surface_Device).
|
||||
Drawing operations are functionally presented in \ref drawing and as function lists
|
||||
in the \ref fl_drawings and \ref fl_attributes modules.
|
||||
|
||||
|
||||
<tt>Fl_Surface_Device::surface()->driver()</tt>
|
||||
gives at any time the graphics driver used by all drawing operations.
|
||||
gives at any time the graphics driver used by all drawing operations.
|
||||
For compatibility with older FLTK versions, the \ref fl_graphics_driver global variable gives the same result.
|
||||
Its value changes when
|
||||
drawing operations are directed to another drawing surface by Fl_Surface_Device::push_current() /
|
||||
@@ -130,7 +128,7 @@ and
|
||||
draw_fixed(Fl_RGB_Image *,....) because scale-and-draw may require function Alphablend()
|
||||
from MSIMG32.DLL. In the absence of that, the draw_rgb() implementation calls
|
||||
Fl_Graphics_Driver::draw_rgb() which runs Fl_GDI_Graphics_Driver::draw_fixed(Fl_RGB_Image*,...).
|
||||
|
||||
|
||||
Graphics drivers also implement cache(Fl_Pixmap*), cache(Fl_Bitmap*) and cache(Fl_RGB_Image*)
|
||||
to compute the cached form of all image types, and uncache(Fl_RGB_Image *,...),
|
||||
uncache_pixmap(fl_uintptr_t) and delete_bitmask(Fl_Bitmask) to destroy cached image forms.
|
||||
@@ -235,7 +233,7 @@ protected:
|
||||
static Fl_Offscreen get_offscreen_and_delete_image_surface(Fl_Image_Surface*);
|
||||
/** For internal library use only */
|
||||
static void draw_empty(Fl_Image* img, int X, int Y) {img->draw_empty(X, Y);}
|
||||
|
||||
|
||||
Fl_Graphics_Driver();
|
||||
void cache_size(Fl_Image *img, int &width, int &height);
|
||||
static unsigned need_pixmap_bg_color;
|
||||
@@ -402,10 +400,10 @@ struct Fl_Fontdesc {
|
||||
- scale the cached offscreen of image objects
|
||||
- scale the pixel arrays used when performing direct image draws
|
||||
- call the member functions of a platform-specific,
|
||||
Fl_Scalable_Graphics_Driver-derived class that do the drawings with adequately
|
||||
Fl_Scalable_Graphics_Driver-derived class that do the drawings with adequately
|
||||
scaled coordinates. The member functions are named with the _unscaled suffix.
|
||||
- scale and unscale the clipping region.
|
||||
|
||||
|
||||
This class is presently used by the X11 and Windows platforms to support HiDPI displays.
|
||||
In the future, it may also be used by other platforms.
|
||||
*/
|
||||
@@ -492,7 +490,3 @@ protected:
|
||||
\}
|
||||
\endcond
|
||||
*/
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+14
-20
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Group header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2017 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -52,7 +50,7 @@ class FL_EXPORT Fl_Group : public Fl_Widget {
|
||||
|
||||
int navigation(int);
|
||||
static Fl_Group *current_;
|
||||
|
||||
|
||||
// unimplemented copy ctor and assignment operator
|
||||
Fl_Group(const Fl_Group&);
|
||||
Fl_Group& operator=(const Fl_Group&);
|
||||
@@ -84,7 +82,7 @@ public:
|
||||
Fl_Widget* child(int n) const {return array()[n];}
|
||||
int find(const Fl_Widget*) const;
|
||||
/**
|
||||
See int Fl_Group::find(const Fl_Widget *w) const
|
||||
See int Fl_Group::find(const Fl_Widget *w) const
|
||||
*/
|
||||
int find(const Fl_Widget& o) const {return find(&o);}
|
||||
Fl_Widget* const* array() const;
|
||||
@@ -98,7 +96,7 @@ public:
|
||||
virtual ~Fl_Group();
|
||||
void add(Fl_Widget&);
|
||||
/**
|
||||
See void Fl_Group::add(Fl_Widget &w)
|
||||
See void Fl_Group::add(Fl_Widget &w)
|
||||
*/
|
||||
void add(Fl_Widget* o) {add(*o);}
|
||||
void insert(Fl_Widget&, int i);
|
||||
@@ -117,7 +115,7 @@ public:
|
||||
void clear();
|
||||
|
||||
/**
|
||||
See void Fl_Group::resizable(Fl_Widget *box)
|
||||
See void Fl_Group::resizable(Fl_Widget *box)
|
||||
*/
|
||||
void resizable(Fl_Widget& o) {resizable_ = &o;}
|
||||
/**
|
||||
@@ -132,11 +130,11 @@ public:
|
||||
\image html resizebox1.png
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
\image html resizebox2.png
|
||||
|
||||
|
||||
\image latex resizebox1.png "before resize" width=4cm
|
||||
|
||||
|
||||
\image latex resizebox2.png "after resize" width=4.85cm
|
||||
|
||||
The resizable may be set to the group itself, in which case all the
|
||||
@@ -152,7 +150,7 @@ public:
|
||||
*/
|
||||
void resizable(Fl_Widget* o) {resizable_ = o;}
|
||||
/**
|
||||
See void Fl_Group::resizable(Fl_Widget *box)
|
||||
See void Fl_Group::resizable(Fl_Widget *box)
|
||||
*/
|
||||
Fl_Widget* resizable() const {return resizable_;}
|
||||
/**
|
||||
@@ -164,7 +162,7 @@ public:
|
||||
/**
|
||||
Controls whether the group widget clips the drawing of
|
||||
child widgets to its bounding box.
|
||||
|
||||
|
||||
Set \p c to 1 if you want to clip the child widgets to the
|
||||
bounding box.
|
||||
|
||||
@@ -204,7 +202,7 @@ public:
|
||||
/**
|
||||
This is a dummy class that allows you to end a Fl_Group in a constructor list of a
|
||||
class:
|
||||
\code
|
||||
\code
|
||||
class MyClass {
|
||||
Fl_Group group;
|
||||
Fl_Button button_in_group;
|
||||
@@ -218,7 +216,7 @@ public:
|
||||
end(),
|
||||
button_outside_group(10,120,60,30) {
|
||||
[..ctor code..]
|
||||
}
|
||||
}
|
||||
\endcode
|
||||
*/
|
||||
class FL_EXPORT Fl_End {
|
||||
@@ -228,7 +226,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+6
-12
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Fl_Help_Dialog dialog for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2015 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
// ========================================================================
|
||||
// DO NOT EDIT FL/Fl_Help_Dialog.H and src/Fl_Help_Dialog.cxx !!!
|
||||
@@ -36,11 +34,11 @@
|
||||
#include <FL/Fl_Help_View.H>
|
||||
|
||||
class FL_EXPORT Fl_Help_Dialog {
|
||||
int index_;
|
||||
int max_;
|
||||
int index_;
|
||||
int max_;
|
||||
int line_[100]; // FIXME: we must remove those static numbers
|
||||
char file_[100][FL_PATH_MAX]; // FIXME: we must remove those static numbers
|
||||
int find_pos_;
|
||||
int find_pos_;
|
||||
public:
|
||||
Fl_Help_Dialog();
|
||||
private:
|
||||
@@ -84,7 +82,3 @@ public:
|
||||
int y();
|
||||
};
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+104
-110
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Help Viewer widget definitions.
|
||||
//
|
||||
// Copyright 1997-2010 by Easy Software Products.
|
||||
@@ -10,11 +8,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -45,15 +43,15 @@ typedef const char *(Fl_Help_Func)(Fl_Widget *, const char *);
|
||||
//
|
||||
|
||||
struct Fl_Help_Block {
|
||||
const char *start, // Start of text
|
||||
*end; // End of text
|
||||
uchar border; // Draw border?
|
||||
Fl_Color bgcolor; // Background color
|
||||
int x, // Indentation/starting X coordinate
|
||||
y, // Starting Y coordinate
|
||||
w, // Width
|
||||
h; // Height
|
||||
int line[32]; // Left starting position for each line
|
||||
const char *start, // Start of text
|
||||
*end; // End of text
|
||||
uchar border; // Draw border?
|
||||
Fl_Color bgcolor; // Background color
|
||||
int x, // Indentation/starting X coordinate
|
||||
y, // Starting Y coordinate
|
||||
w, // Width
|
||||
h; // Height
|
||||
int line[32]; // Left starting position for each line
|
||||
};
|
||||
|
||||
//
|
||||
@@ -61,12 +59,12 @@ struct Fl_Help_Block {
|
||||
//
|
||||
/** Definition of a link for the html viewer. */
|
||||
struct Fl_Help_Link {
|
||||
char filename[192], ///< Reference filename
|
||||
name[32]; ///< Link target (blank if none)
|
||||
int x, ///< X offset of link text
|
||||
y, ///< Y offset of link text
|
||||
w, ///< Width of link text
|
||||
h; ///< Height of link text
|
||||
char filename[192], ///< Reference filename
|
||||
name[32]; ///< Link target (blank if none)
|
||||
int x, ///< X offset of link text
|
||||
y, ///< Y offset of link text
|
||||
w, ///< Width of link text
|
||||
h; ///< Height of link text
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -93,22 +91,22 @@ struct FL_EXPORT Fl_Help_Font_Stack {
|
||||
nfonts_ = 0;
|
||||
}
|
||||
|
||||
void init(Fl_Font f, Fl_Fontsize s, Fl_Color c) {
|
||||
void init(Fl_Font f, Fl_Fontsize s, Fl_Color c) {
|
||||
nfonts_ = 0;
|
||||
elts_[nfonts_].set(f, s, c);
|
||||
fl_font(f, s);
|
||||
fl_font(f, s);
|
||||
fl_color(c);
|
||||
}
|
||||
/** Gets the top (current) element on the stack. */
|
||||
void top(Fl_Font &f, Fl_Fontsize &s, Fl_Color &c) { elts_[nfonts_].get(f, s, c); }
|
||||
/** Pushes the font style triplet on the stack, also calls fl_font() & fl_color() adequately */
|
||||
void push(Fl_Font f, Fl_Fontsize s, Fl_Color c) {
|
||||
void push(Fl_Font f, Fl_Fontsize s, Fl_Color c) {
|
||||
if (nfonts_ < MAX_FL_HELP_FS_ELTS-1) nfonts_ ++;
|
||||
elts_[nfonts_].set(f, s, c);
|
||||
fl_font(f, s); fl_color(c);
|
||||
fl_font(f, s); fl_color(c);
|
||||
}
|
||||
/** Pops from the stack the font style triplet and calls fl_font() & fl_color() adequately */
|
||||
void pop(Fl_Font &f, Fl_Fontsize &s, Fl_Color &c) {
|
||||
void pop(Fl_Font &f, Fl_Fontsize &s, Fl_Color &c) {
|
||||
if (nfonts_ > 0) nfonts_ --;
|
||||
top(f, s, c);
|
||||
fl_font(f, s); fl_color(c);
|
||||
@@ -117,15 +115,15 @@ struct FL_EXPORT Fl_Help_Font_Stack {
|
||||
size_t count() const {return nfonts_;} // Gets the current number of fonts in the stack
|
||||
|
||||
protected:
|
||||
size_t nfonts_; ///< current number of fonts in stack
|
||||
size_t nfonts_; ///< current number of fonts in stack
|
||||
Fl_Help_Font_Style elts_[MAX_FL_HELP_FS_ELTS]; ///< font elements
|
||||
};
|
||||
|
||||
/** Fl_Help_Target structure */
|
||||
|
||||
struct Fl_Help_Target {
|
||||
char name[32]; ///< Target name
|
||||
int y; ///< Y offset of target
|
||||
char name[32]; ///< Target name
|
||||
int y; ///< Y offset of target
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -193,42 +191,42 @@ struct Fl_Help_Target {
|
||||
- yen Yuml yuml
|
||||
|
||||
*/
|
||||
class FL_EXPORT Fl_Help_View : public Fl_Group { // Help viewer widget
|
||||
|
||||
enum { RIGHT = -1, CENTER, LEFT }; ///< Alignments
|
||||
class FL_EXPORT Fl_Help_View : public Fl_Group { // Help viewer widget
|
||||
|
||||
char title_[1024]; ///< Title string
|
||||
Fl_Color defcolor_, ///< Default text color
|
||||
bgcolor_, ///< Background color
|
||||
textcolor_, ///< Text color
|
||||
linkcolor_; ///< Link color
|
||||
Fl_Font textfont_; ///< Default font for text
|
||||
Fl_Fontsize textsize_; ///< Default font size
|
||||
const char *value_; ///< HTML text value
|
||||
Fl_Help_Font_Stack fstack_; ///< font stack management
|
||||
int nblocks_, ///< Number of blocks/paragraphs
|
||||
ablocks_; ///< Allocated blocks
|
||||
Fl_Help_Block *blocks_; ///< Blocks
|
||||
enum { RIGHT = -1, CENTER, LEFT }; ///< Alignments
|
||||
|
||||
Fl_Help_Func *link_; ///< Link transform function
|
||||
char title_[1024]; ///< Title string
|
||||
Fl_Color defcolor_, ///< Default text color
|
||||
bgcolor_, ///< Background color
|
||||
textcolor_, ///< Text color
|
||||
linkcolor_; ///< Link color
|
||||
Fl_Font textfont_; ///< Default font for text
|
||||
Fl_Fontsize textsize_; ///< Default font size
|
||||
const char *value_; ///< HTML text value
|
||||
Fl_Help_Font_Stack fstack_; ///< font stack management
|
||||
int nblocks_, ///< Number of blocks/paragraphs
|
||||
ablocks_; ///< Allocated blocks
|
||||
Fl_Help_Block *blocks_; ///< Blocks
|
||||
|
||||
int nlinks_, ///< Number of links
|
||||
alinks_; ///< Allocated links
|
||||
Fl_Help_Link *links_; ///< Links
|
||||
Fl_Help_Func *link_; ///< Link transform function
|
||||
|
||||
int ntargets_, ///< Number of targets
|
||||
atargets_; ///< Allocated targets
|
||||
Fl_Help_Target *targets_; ///< Targets
|
||||
int nlinks_, ///< Number of links
|
||||
alinks_; ///< Allocated links
|
||||
Fl_Help_Link *links_; ///< Links
|
||||
|
||||
char directory_[FL_PATH_MAX];///< Directory for current file
|
||||
char filename_[FL_PATH_MAX]; ///< Current filename
|
||||
int topline_, ///< Top line in document
|
||||
leftline_, ///< Lefthand position
|
||||
size_, ///< Total document length
|
||||
hsize_, ///< Maximum document width
|
||||
scrollbar_size_; ///< Size for both scrollbars
|
||||
Fl_Scrollbar scrollbar_, ///< Vertical scrollbar for document
|
||||
hscrollbar_; ///< Horizontal scrollbar
|
||||
int ntargets_, ///< Number of targets
|
||||
atargets_; ///< Allocated targets
|
||||
Fl_Help_Target *targets_; ///< Targets
|
||||
|
||||
char directory_[FL_PATH_MAX];///< Directory for current file
|
||||
char filename_[FL_PATH_MAX]; ///< Current filename
|
||||
int topline_, ///< Top line in document
|
||||
leftline_, ///< Lefthand position
|
||||
size_, ///< Total document length
|
||||
hsize_, ///< Maximum document width
|
||||
scrollbar_size_; ///< Size for both scrollbars
|
||||
Fl_Scrollbar scrollbar_, ///< Vertical scrollbar for document
|
||||
hscrollbar_; ///< Horizontal scrollbar
|
||||
|
||||
static int selection_first;
|
||||
static int selection_last;
|
||||
@@ -251,24 +249,24 @@ class FL_EXPORT Fl_Help_View : public Fl_Group { // Help viewer widget
|
||||
void pushfont(Fl_Font f, Fl_Fontsize s, Fl_Color c) {fstack_.push(f, s, c);}
|
||||
void popfont(Fl_Font &f, Fl_Fontsize &s, Fl_Color &c) {fstack_.pop(f, s, c);}
|
||||
|
||||
Fl_Help_Block *add_block(const char *s, int xx, int yy, int ww, int hh, uchar border = 0);
|
||||
void add_link(const char *n, int xx, int yy, int ww, int hh);
|
||||
void add_target(const char *n, int yy);
|
||||
static int compare_targets(const Fl_Help_Target *t0, const Fl_Help_Target *t1);
|
||||
int do_align(Fl_Help_Block *block, int line, int xx, int a, int &l);
|
||||
Fl_Help_Block *add_block(const char *s, int xx, int yy, int ww, int hh, uchar border = 0);
|
||||
void add_link(const char *n, int xx, int yy, int ww, int hh);
|
||||
void add_target(const char *n, int yy);
|
||||
static int compare_targets(const Fl_Help_Target *t0, const Fl_Help_Target *t1);
|
||||
int do_align(Fl_Help_Block *block, int line, int xx, int a, int &l);
|
||||
protected:
|
||||
void draw();
|
||||
void draw();
|
||||
private:
|
||||
void format();
|
||||
void format_table(int *table_width, int *columns, const char *table);
|
||||
void free_data();
|
||||
int get_align(const char *p, int a);
|
||||
const char *get_attr(const char *p, const char *n, char *buf, int bufsize);
|
||||
Fl_Color get_color(const char *n, Fl_Color c);
|
||||
void format();
|
||||
void format_table(int *table_width, int *columns, const char *table);
|
||||
void free_data();
|
||||
int get_align(const char *p, int a);
|
||||
const char *get_attr(const char *p, const char *n, char *buf, int bufsize);
|
||||
Fl_Color get_color(const char *n, Fl_Color c);
|
||||
Fl_Shared_Image *get_image(const char *name, int W, int H);
|
||||
int get_length(const char *l);
|
||||
int get_length(const char *l);
|
||||
public:
|
||||
int handle(int);
|
||||
int handle(int);
|
||||
private:
|
||||
|
||||
void hv_draw(const char *t, int x, int y, int entity_extra_length = 0);
|
||||
@@ -284,72 +282,72 @@ public:
|
||||
Fl_Help_View(int xx, int yy, int ww, int hh, const char *l = 0);
|
||||
~Fl_Help_View();
|
||||
/** Returns the current directory for the text in the buffer. */
|
||||
const char *directory() const { if (directory_[0]) return (directory_);
|
||||
else return ((const char *)0); }
|
||||
const char *directory() const { if (directory_[0]) return (directory_);
|
||||
else return ((const char *)0); }
|
||||
/** Returns the current filename for the text in the buffer. */
|
||||
const char *filename() const { if (filename_[0]) return (filename_);
|
||||
else return ((const char *)0); }
|
||||
int find(const char *s, int p = 0);
|
||||
const char *filename() const { if (filename_[0]) return (filename_);
|
||||
else return ((const char *)0); }
|
||||
int find(const char *s, int p = 0);
|
||||
/**
|
||||
This method assigns a callback function to use when a link is
|
||||
followed or a file is loaded (via Fl_Help_View::load()) that
|
||||
requires a different file or path.
|
||||
|
||||
|
||||
The callback function receives a pointer to the Fl_Help_View
|
||||
widget and the URI or full pathname for the file in question.
|
||||
It must return a pathname that can be opened as a local file or NULL:
|
||||
|
||||
|
||||
\code
|
||||
const char *fn(Fl_Widget *w, const char *uri);
|
||||
\endcode
|
||||
|
||||
|
||||
The link function can be used to retrieve remote or virtual
|
||||
documents, returning a temporary file that contains the actual
|
||||
data. If the link function returns NULL, the value of
|
||||
the Fl_Help_View widget will remain unchanged.
|
||||
|
||||
|
||||
If the link callback cannot handle the URI scheme, it should
|
||||
return the uri value unchanged or set the value() of the widget
|
||||
before returning NULL.
|
||||
*/
|
||||
void link(Fl_Help_Func *fn) { link_ = fn; }
|
||||
int load(const char *f);
|
||||
void resize(int,int,int,int);
|
||||
void link(Fl_Help_Func *fn) { link_ = fn; }
|
||||
int load(const char *f);
|
||||
void resize(int,int,int,int);
|
||||
/** Gets the size of the help view. */
|
||||
int size() const { return (size_); }
|
||||
void size(int W, int H) { Fl_Widget::size(W, H); }
|
||||
int size() const { return (size_); }
|
||||
void size(int W, int H) { Fl_Widget::size(W, H); }
|
||||
/** Sets the default text color. */
|
||||
void textcolor(Fl_Color c) { if (textcolor_ == defcolor_) textcolor_ = c; defcolor_ = c; }
|
||||
void textcolor(Fl_Color c) { if (textcolor_ == defcolor_) textcolor_ = c; defcolor_ = c; }
|
||||
/** Returns the current default text color. */
|
||||
Fl_Color textcolor() const { return (defcolor_); }
|
||||
Fl_Color textcolor() const { return (defcolor_); }
|
||||
/** Sets the default text font. */
|
||||
void textfont(Fl_Font f) { textfont_ = f; format(); }
|
||||
void textfont(Fl_Font f) { textfont_ = f; format(); }
|
||||
/** Returns the current default text font. */
|
||||
Fl_Font textfont() const { return (textfont_); }
|
||||
/** Sets the default text size. */
|
||||
void textsize(Fl_Fontsize s) { textsize_ = s; format(); }
|
||||
void textsize(Fl_Fontsize s) { textsize_ = s; format(); }
|
||||
/** Gets the default text size. */
|
||||
Fl_Fontsize textsize() const { return (textsize_); }
|
||||
/** Returns the current document title, or NULL if there is no title. */
|
||||
const char *title() { return (title_); }
|
||||
void topline(const char *n);
|
||||
void topline(int);
|
||||
const char *title() { return (title_); }
|
||||
void topline(const char *n);
|
||||
void topline(int);
|
||||
/** Returns the current top line in pixels. */
|
||||
int topline() const { return (topline_); }
|
||||
void leftline(int);
|
||||
int topline() const { return (topline_); }
|
||||
void leftline(int);
|
||||
/** Gets the left position in pixels. */
|
||||
int leftline() const { return (leftline_); }
|
||||
void value(const char *val);
|
||||
int leftline() const { return (leftline_); }
|
||||
void value(const char *val);
|
||||
/** Returns the current buffer contents. */
|
||||
const char *value() const { return (value_); }
|
||||
const char *value() const { return (value_); }
|
||||
void clear_selection();
|
||||
void select_all();
|
||||
/**
|
||||
Gets the current size of the scrollbars' troughs, in pixels.
|
||||
|
||||
If this value is zero (default), this widget will use the
|
||||
If this value is zero (default), this widget will use the
|
||||
Fl::scrollbar_size() value as the scrollbar's width.
|
||||
|
||||
|
||||
\returns Scrollbar size in pixels, or 0 if the global Fl::scrollbar_size() is being used.
|
||||
\see Fl::scrollbar_size(int)
|
||||
*/
|
||||
@@ -360,28 +358,24 @@ public:
|
||||
Sets the pixel size of the scrollbars' troughs to \p newSize, in pixels.
|
||||
|
||||
Normally you should not need this method, and should use
|
||||
Fl::scrollbar_size(int) instead to manage the size of ALL
|
||||
your widgets' scrollbars. This ensures your application
|
||||
Fl::scrollbar_size(int) instead to manage the size of ALL
|
||||
your widgets' scrollbars. This ensures your application
|
||||
has a consistent UI, is the default behavior, and is normally
|
||||
what you want.
|
||||
|
||||
Only use THIS method if you really need to override the global
|
||||
scrollbar size. The need for this should be rare.
|
||||
|
||||
|
||||
Setting \p newSize to the special value of 0 causes the widget to
|
||||
track the global Fl::scrollbar_size(), which is the default.
|
||||
|
||||
|
||||
\param[in] newSize Sets the scrollbar size in pixels.\n
|
||||
If 0 (default), scrollbar size tracks the global Fl::scrollbar_size()
|
||||
\see Fl::scrollbar_size()
|
||||
*/
|
||||
void scrollbar_size(int newSize) {
|
||||
scrollbar_size_ = newSize;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#endif // !Fl_Help_View_H
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+4
-10
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Hold browser header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -25,7 +23,7 @@
|
||||
#include "Fl_Browser.H"
|
||||
|
||||
/**
|
||||
The Fl_Hold_Browser is a subclass of Fl_Browser which lets the user
|
||||
The Fl_Hold_Browser is a subclass of Fl_Browser which lets the user
|
||||
select a single item, or no items by clicking on the empty space.
|
||||
|
||||
\image html fl_hold_browser.png "Fl_Hold_Browser"
|
||||
@@ -49,7 +47,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Horizontal fill slider header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -30,7 +28,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Horizontal "nice" slider header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -30,7 +28,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+3
-9
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Horizontal slider header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2011 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -39,7 +37,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Horizontal value slider header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -30,7 +28,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+19
-25
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Image header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2017 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/** \file
|
||||
@@ -44,19 +42,19 @@ enum Fl_RGB_Scaling {
|
||||
|
||||
/**
|
||||
\brief Base class for image caching, scaling and drawing.
|
||||
|
||||
|
||||
Fl_Image is the base class used for caching, scaling and drawing all kinds of images
|
||||
in FLTK. This class keeps track of common image data such as the pixels,
|
||||
colormap, width, height, and depth. Virtual methods are used to provide
|
||||
in FLTK. This class keeps track of common image data such as the pixels,
|
||||
colormap, width, height, and depth. Virtual methods are used to provide
|
||||
type-specific image handling.
|
||||
|
||||
|
||||
Each image possesses two (width, height) pairs. 1) The width and height of the
|
||||
image raw data are returned by data_w() and data_h(). These values are set
|
||||
when the image is created and remain unchanged. 2) The width and height
|
||||
of the area filled by the image when it gets drawn are returned by w() and h().
|
||||
The values are equal to data_w() and data_h() when the image is created,
|
||||
and can be changed by the scale() member function.
|
||||
|
||||
|
||||
Since the Fl_Image class does not support image
|
||||
drawing by itself, calling the draw() method results in
|
||||
a box with an X in it being drawn instead.
|
||||
@@ -67,7 +65,7 @@ public:
|
||||
static const int ERR_NO_IMAGE = -1;
|
||||
static const int ERR_FILE_ACCESS = -2;
|
||||
static const int ERR_FORMAT = -3;
|
||||
|
||||
|
||||
private:
|
||||
int w_, h_, d_, ld_, count_;
|
||||
int data_w_, data_h_;
|
||||
@@ -108,7 +106,7 @@ protected:
|
||||
to account for the extra data per line.
|
||||
*/
|
||||
void ld(int LD) {ld_ = LD;}
|
||||
/**
|
||||
/**
|
||||
Sets the current array pointer and count of pointers in the array.
|
||||
*/
|
||||
void data(const char * const *p, int c) {data_ = p; count_ = c;}
|
||||
@@ -120,7 +118,7 @@ protected:
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
/**
|
||||
Returns the current image drawing width in FLTK units.
|
||||
The values of w() and data_w() are identical unless scale() has been called
|
||||
after which they may differ.
|
||||
@@ -233,10 +231,10 @@ public:
|
||||
/**
|
||||
Draws the image to the current drawing surface with a bounding box.
|
||||
Arguments <tt>X,Y,W,H</tt> specify
|
||||
a bounding box for the image, with the origin
|
||||
a bounding box for the image, with the origin
|
||||
(upper-left corner) of the image offset by the \c cx
|
||||
and \c cy arguments.
|
||||
|
||||
|
||||
In other words: <tt>fl_push_clip(X,Y,W,H)</tt> is applied,
|
||||
the image is drawn with its upper-left corner at <tt>X-cx,Y-cy</tt> and its own width and height,
|
||||
<tt>fl_pop_clip</tt><tt>()</tt> is applied.
|
||||
@@ -256,7 +254,7 @@ public:
|
||||
static void RGB_scaling(Fl_RGB_Scaling);
|
||||
// get RGB image scaling method
|
||||
static Fl_RGB_Scaling RGB_scaling();
|
||||
|
||||
|
||||
// set the image drawing size
|
||||
virtual void scale(int width, int height, int proportional = 1, int can_expand = 0);
|
||||
/** Sets what algorithm is used when resizing a source image to draw it.
|
||||
@@ -320,17 +318,17 @@ public:
|
||||
virtual void label(Fl_Menu_Item*m);
|
||||
virtual void uncache();
|
||||
/** Sets the maximum allowed image size in bytes when creating an Fl_RGB_Image object.
|
||||
|
||||
|
||||
The image size in bytes of an Fl_RGB_Image object is the value of the product w() * h() * d().
|
||||
If this product exceeds size, the created object of a derived class of Fl_RGB_Image
|
||||
If this product exceeds size, the created object of a derived class of Fl_RGB_Image
|
||||
won't be loaded with the image data.
|
||||
This does not apply to direct RGB image creation with
|
||||
This does not apply to direct RGB image creation with
|
||||
Fl_RGB_Image::Fl_RGB_Image(const uchar *bits, int W, int H, int D, int LD).
|
||||
The default max_size() value is essentially infinite.
|
||||
The default max_size() value is essentially infinite.
|
||||
*/
|
||||
static void max_size(size_t size) { max_size_ = size;}
|
||||
/** Returns the maximum allowed image size in bytes when creating an Fl_RGB_Image object.
|
||||
|
||||
|
||||
\sa void Fl_RGB_Image::max_size(size_t)
|
||||
*/
|
||||
static size_t max_size() {return max_size_;}
|
||||
@@ -343,7 +341,3 @@ public:
|
||||
};
|
||||
|
||||
#endif // !Fl_Image_H
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+11
-17
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Draw-to-image code for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2016 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
#ifndef Fl_Image_Surface_H
|
||||
@@ -25,17 +23,17 @@
|
||||
#include <FL/platform_types.h> // for Fl_Offscreen
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
\brief Directs all graphics requests to an Fl_Image.
|
||||
|
||||
|
||||
After creation of an Fl_Image_Surface object, make it the current drawing
|
||||
surface calling Fl_Surface_Device::push_current(), and all
|
||||
subsequent graphics requests will be recorded in the image. It's possible to
|
||||
draw widgets (using Fl_Image_Surface::draw()) or to use any of the
|
||||
subsequent graphics requests will be recorded in the image. It's possible to
|
||||
draw widgets (using Fl_Image_Surface::draw()) or to use any of the
|
||||
\ref fl_drawings or the \ref fl_attributes. Finally, call image() on the object
|
||||
to obtain a newly allocated Fl_RGB_Image object.
|
||||
Fl_Gl_Window objects can be drawn in the image as well.
|
||||
|
||||
|
||||
Usage example:
|
||||
\code
|
||||
// this is the widget that you want to draw into an image
|
||||
@@ -43,12 +41,12 @@
|
||||
|
||||
// create an Fl_Image_Surface object
|
||||
Fl_Image_Surface *image_surface = new Fl_Image_Surface(g->w(), g->h());
|
||||
|
||||
|
||||
// direct all further graphics requests to the image
|
||||
Fl_Surface_Device::push_current(image_surface);
|
||||
|
||||
// draw a white background
|
||||
fl_color(FL_WHITE);
|
||||
fl_color(FL_WHITE);
|
||||
fl_rectf(0, 0, g->w(), g->h());
|
||||
|
||||
// draw the g widget in the image
|
||||
@@ -59,7 +57,7 @@
|
||||
|
||||
// direct graphics requests back to their previous destination
|
||||
Fl_Surface_Device::pop_current();
|
||||
|
||||
|
||||
// delete the image_surface object, but not the image itself
|
||||
delete image_surface;
|
||||
\endcode
|
||||
@@ -125,7 +123,3 @@ protected:
|
||||
*/
|
||||
|
||||
#endif // Fl_Image_Surface_H
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+13
-19
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Input header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -40,16 +38,16 @@
|
||||
<TABLE WIDTH="90%" BORDER="1" SUMMARY="Fl_Input keyboard and mouse bindings.">
|
||||
<CAPTION ALIGN="TOP">Keyboard and mouse bindings.</CAPTION>
|
||||
<TR><TD NOWRAP="NOWRAP" WIDTH="1%">
|
||||
<B>Mouse button 1</B>
|
||||
<B>Mouse button 1</B>
|
||||
</TD><TD>
|
||||
Moves the cursor to this point.
|
||||
Drag selects characters.
|
||||
Double click selects words.
|
||||
Moves the cursor to this point.
|
||||
Drag selects characters.
|
||||
Double click selects words.
|
||||
Triple click selects all line.
|
||||
Shift+click extends the selection.
|
||||
When you select text it is automatically copied to the selection buffer.
|
||||
</TD></TR><TR><TD NOWRAP="NOWRAP">
|
||||
<B>Mouse button 2</B>
|
||||
<B>Mouse button 2</B>
|
||||
</TD><TD>
|
||||
Insert the selection buffer at the point clicked.
|
||||
You can also select a region and replace it with the selection buffer
|
||||
@@ -124,7 +122,7 @@
|
||||
<TD NOWRAP="NOWRAP"><B> Command-V </B></TD>
|
||||
<TD>
|
||||
<B>Paste the clipboard.</B> <BR>
|
||||
(Macs keyboards don't have "Insert" keys,
|
||||
(Macs keyboards don't have "Insert" keys,
|
||||
but if they did, Shift-Insert would work)
|
||||
|
||||
</TD></TR><TR>
|
||||
@@ -140,16 +138,16 @@
|
||||
<TD NOWRAP="NOWRAP"><B> Command-Z </B></TD>
|
||||
<TD>
|
||||
<B>Undo.</B> <BR>
|
||||
This is a single-level undo mechanism, but all adjacent
|
||||
This is a single-level undo mechanism, but all adjacent
|
||||
deletions and insertions are concatenated into a single "undo".
|
||||
Often this will undo a lot more than you expected.
|
||||
Often this will undo a lot more than you expected.
|
||||
|
||||
</TD></TR><TR>
|
||||
<TD NOWRAP="NOWRAP"><B> Shift-^Z </B></TD>
|
||||
<TD NOWRAP="NOWRAP"><B> Shift-Command-Z </B></TD>
|
||||
<TD>
|
||||
<B>Redo.</B> <BR>
|
||||
Currently same behavior as ^Z.
|
||||
Currently same behavior as ^Z.
|
||||
Reserved for future multilevel undo/redo.
|
||||
|
||||
</TD></TR><TR>
|
||||
@@ -264,8 +262,4 @@ public:
|
||||
Fl_Input(int,int,int,int,const char * = 0);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
#endif
|
||||
|
||||
+53
-59
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Input base class header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2015 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -26,18 +24,18 @@
|
||||
#include "Fl_Widget.H"
|
||||
#endif
|
||||
|
||||
#define FL_NORMAL_INPUT 0
|
||||
#define FL_FLOAT_INPUT 1
|
||||
#define FL_INT_INPUT 2
|
||||
#define FL_HIDDEN_INPUT 3
|
||||
#define FL_MULTILINE_INPUT 4
|
||||
#define FL_SECRET_INPUT 5
|
||||
#define FL_INPUT_TYPE 7
|
||||
#define FL_INPUT_READONLY 8
|
||||
#define FL_NORMAL_OUTPUT (FL_NORMAL_INPUT | FL_INPUT_READONLY)
|
||||
#define FL_MULTILINE_OUTPUT (FL_MULTILINE_INPUT | FL_INPUT_READONLY)
|
||||
#define FL_INPUT_WRAP 16
|
||||
#define FL_MULTILINE_INPUT_WRAP (FL_MULTILINE_INPUT | FL_INPUT_WRAP)
|
||||
#define FL_NORMAL_INPUT 0
|
||||
#define FL_FLOAT_INPUT 1
|
||||
#define FL_INT_INPUT 2
|
||||
#define FL_HIDDEN_INPUT 3
|
||||
#define FL_MULTILINE_INPUT 4
|
||||
#define FL_SECRET_INPUT 5
|
||||
#define FL_INPUT_TYPE 7
|
||||
#define FL_INPUT_READONLY 8
|
||||
#define FL_NORMAL_OUTPUT (FL_NORMAL_INPUT | FL_INPUT_READONLY)
|
||||
#define FL_MULTILINE_OUTPUT (FL_MULTILINE_INPUT | FL_INPUT_READONLY)
|
||||
#define FL_INPUT_WRAP 16
|
||||
#define FL_MULTILINE_INPUT_WRAP (FL_MULTILINE_INPUT | FL_INPUT_WRAP)
|
||||
#define FL_MULTILINE_OUTPUT_WRAP (FL_MULTILINE_INPUT | FL_INPUT_READONLY | FL_INPUT_WRAP)
|
||||
|
||||
/**
|
||||
@@ -54,16 +52,16 @@
|
||||
setting type() to one of the following values:
|
||||
|
||||
\code
|
||||
#define FL_NORMAL_INPUT 0
|
||||
#define FL_FLOAT_INPUT 1
|
||||
#define FL_INT_INPUT 2
|
||||
#define FL_MULTILINE_INPUT 4
|
||||
#define FL_SECRET_INPUT 5
|
||||
#define FL_INPUT_TYPE 7
|
||||
#define FL_INPUT_READONLY 8
|
||||
#define FL_NORMAL_OUTPUT (FL_NORMAL_INPUT | FL_INPUT_READONLY)
|
||||
#define FL_MULTILINE_OUTPUT (FL_MULTILINE_INPUT | FL_INPUT_READONLY)
|
||||
#define FL_INPUT_WRAP 16
|
||||
#define FL_NORMAL_INPUT 0
|
||||
#define FL_FLOAT_INPUT 1
|
||||
#define FL_INT_INPUT 2
|
||||
#define FL_MULTILINE_INPUT 4
|
||||
#define FL_SECRET_INPUT 5
|
||||
#define FL_INPUT_TYPE 7
|
||||
#define FL_INPUT_READONLY 8
|
||||
#define FL_NORMAL_OUTPUT (FL_NORMAL_INPUT | FL_INPUT_READONLY)
|
||||
#define FL_MULTILINE_OUTPUT (FL_MULTILINE_INPUT | FL_INPUT_READONLY)
|
||||
#define FL_INPUT_WRAP 16
|
||||
#define FL_MULTILINE_INPUT_WRAP (FL_MULTILINE_INPUT | FL_INPUT_WRAP)
|
||||
#define FL_MULTILINE_OUTPUT_WRAP (FL_MULTILINE_INPUT | FL_INPUT_READONLY | FL_INPUT_WRAP)
|
||||
\endcode
|
||||
@@ -113,8 +111,8 @@ class FL_EXPORT Fl_Input_ : public Fl_Widget {
|
||||
If \p position_ equals \p mark_, no text is selected */
|
||||
int mark_;
|
||||
|
||||
/** \internal Behavior of Tab key in multiline input widget.
|
||||
If enabled (default) Tab causes focus nav, otherwise Tab is inserted
|
||||
/** \internal Behavior of Tab key in multiline input widget.
|
||||
If enabled (default) Tab causes focus nav, otherwise Tab is inserted
|
||||
as a character. */
|
||||
int tab_nav_;
|
||||
|
||||
@@ -180,7 +178,7 @@ protected:
|
||||
|
||||
/* Find the start of a line. */
|
||||
int line_start(int i) const;
|
||||
|
||||
|
||||
/* Find the end of a line. */
|
||||
int line_end(int i) const;
|
||||
|
||||
@@ -238,8 +236,8 @@ public:
|
||||
This function returns the current value, which is a pointer
|
||||
to the internal buffer and is valid only until the next event is
|
||||
handled.
|
||||
|
||||
\return pointer to an internal buffer - do not free() this
|
||||
|
||||
\return pointer to an internal buffer - do not free() this
|
||||
\see Fl_Input_::value(const char*)
|
||||
*/
|
||||
const char* value() const {return value_;}
|
||||
@@ -248,9 +246,9 @@ public:
|
||||
Fl_Char index(int i) const;
|
||||
|
||||
/**
|
||||
Returns the number of bytes in value().
|
||||
|
||||
This may be greater than <tt>strlen(value())</tt> if there are
|
||||
Returns the number of bytes in value().
|
||||
|
||||
This may be greater than <tt>strlen(value())</tt> if there are
|
||||
\c nul characters in the text.
|
||||
|
||||
\return number of bytes in the text
|
||||
@@ -283,7 +281,7 @@ public:
|
||||
*/
|
||||
int position() const {return position_;}
|
||||
|
||||
/** Gets the current selection mark.
|
||||
/** Gets the current selection mark.
|
||||
\return index into the text */
|
||||
int mark() const {return mark_;}
|
||||
|
||||
@@ -298,9 +296,9 @@ public:
|
||||
*/
|
||||
int position(int p) {return position(p, p);}
|
||||
|
||||
/** Sets the current selection mark.
|
||||
/** Sets the current selection mark.
|
||||
mark(n) is the same as <tt>position(position(),n)</tt>.
|
||||
\param m new index of the mark
|
||||
\param m new index of the mark
|
||||
\return 0 if the mark did not change
|
||||
\see position(), position(int, int) */
|
||||
int mark(int m) {return position(position(), m);}
|
||||
@@ -377,11 +375,11 @@ public:
|
||||
\see Fl_Button::shortcut() */
|
||||
int shortcut() const {return shortcut_;}
|
||||
|
||||
/**
|
||||
/**
|
||||
Sets the shortcut key associated with this widget.
|
||||
Pressing the shortcut key gives text editing focus to this widget.
|
||||
\param [in] s new shortcut keystroke
|
||||
\see Fl_Button::shortcut()
|
||||
\param [in] s new shortcut keystroke
|
||||
\see Fl_Button::shortcut()
|
||||
*/
|
||||
void shortcut(int s) {shortcut_ = s;}
|
||||
|
||||
@@ -414,52 +412,52 @@ public:
|
||||
\see textcolor() */
|
||||
void textcolor(Fl_Color n) {textcolor_ = n;}
|
||||
|
||||
/** Gets the color of the cursor.
|
||||
/** Gets the color of the cursor.
|
||||
\return the current cursor color */
|
||||
Fl_Color cursor_color() const {return cursor_color_;}
|
||||
|
||||
/** Sets the color of the cursor.
|
||||
/** Sets the color of the cursor.
|
||||
The default color for the cursor is \c FL_BLACK.
|
||||
\param [in] n the new cursor color */
|
||||
void cursor_color(Fl_Color n) {cursor_color_ = n;}
|
||||
|
||||
/** Gets the input field type.
|
||||
/** Gets the input field type.
|
||||
\return the current input type */
|
||||
int input_type() const {return type() & FL_INPUT_TYPE; }
|
||||
|
||||
/** Sets the input field type.
|
||||
/** Sets the input field type.
|
||||
A redraw() is required to reformat the input field.
|
||||
\param [in] t new input type */
|
||||
void input_type(int t) { type((uchar)(t | readonly())); }
|
||||
|
||||
/** Gets the read-only state of the input field.
|
||||
/** Gets the read-only state of the input field.
|
||||
\return non-zero if this widget is read-only */
|
||||
int readonly() const { return type() & FL_INPUT_READONLY; }
|
||||
|
||||
/** Sets the read-only state of the input field.
|
||||
/** Sets the read-only state of the input field.
|
||||
\param [in] b if \p b is 0, the text in this widget can be edited by the user */
|
||||
void readonly(int b) { if (b) type((uchar)(type() | FL_INPUT_READONLY));
|
||||
else type((uchar)(type() & ~FL_INPUT_READONLY)); }
|
||||
|
||||
/**
|
||||
Gets the word wrapping state of the input field.
|
||||
Gets the word wrapping state of the input field.
|
||||
Word wrap is only functional with multi-line input fields.
|
||||
*/
|
||||
int wrap() const { return type() & FL_INPUT_WRAP; }
|
||||
|
||||
/**
|
||||
Sets the word wrapping state of the input field.
|
||||
Sets the word wrapping state of the input field.
|
||||
Word wrap is only functional with multi-line input fields.
|
||||
*/
|
||||
void wrap(int b) { if (b) type((uchar)(type() | FL_INPUT_WRAP));
|
||||
else type((uchar)(type() & ~FL_INPUT_WRAP)); }
|
||||
|
||||
/**
|
||||
Sets whether the Tab key does focus navigation,
|
||||
Sets whether the Tab key does focus navigation,
|
||||
or inserts tab characters into Fl_Multiline_Input.
|
||||
|
||||
By default this flag is enabled to provide the 'normal' behavior
|
||||
most users expect; Tab navigates focus to the next widget.
|
||||
By default this flag is enabled to provide the 'normal' behavior
|
||||
most users expect; Tab navigates focus to the next widget.
|
||||
To inserting an actual Tab character, users can use Ctrl-I
|
||||
or copy/paste.
|
||||
|
||||
@@ -468,8 +466,8 @@ public:
|
||||
only the mouse can be used to navigate to the next field.
|
||||
|
||||
History: This flag was provided for backwards support of FLTK's old 1.1.x
|
||||
behavior where Tab inserts a tab character instead of navigating
|
||||
focus to the next widget. This behavior was unique to Fl_Multiline_Input.
|
||||
behavior where Tab inserts a tab character instead of navigating
|
||||
focus to the next widget. This behavior was unique to Fl_Multiline_Input.
|
||||
With the advent of Fl_Text_Editor, this old behavior has been deprecated.
|
||||
|
||||
\param [in] val If \p val is 1, Tab advances focus (default).<BR>
|
||||
@@ -496,8 +494,4 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// An input/chooser widget.
|
||||
// ______________ ____
|
||||
// | || __ |
|
||||
@@ -14,11 +12,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -184,7 +182,3 @@ public:
|
||||
};
|
||||
|
||||
#endif // !Fl_Input_Choice_H
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
+3
-9
@@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Integer input header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@@ -40,7 +38,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user