mirror of
https://github.com/fltk/fltk.git
synced 2025-12-16 09:35:24 +08:00
Replaced 10302 with 10301 for FLTK_ABI_VERSION
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9706 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -6,7 +6,7 @@ CHANGES IN FLTK 1.3.2
|
|||||||
called with the old label() (STR #2836)
|
called with the old label() (STR #2836)
|
||||||
|
|
||||||
1.3.2 ABI FEATURES
|
1.3.2 ABI FEATURES
|
||||||
(To enable the following ABI features, put: #define FLTK_ABI_VERSION 10302
|
(To enable the following ABI features, put: #define FLTK_ABI_VERSION 10301
|
||||||
at the top of your FL/Enumerations.H and rebuild FLTK and your app)
|
at the top of your FL/Enumerations.H and rebuild FLTK and your app)
|
||||||
|
|
||||||
- Fl_Tree optimized to support large trees (eg. 100k items):
|
- Fl_Tree optimized to support large trees (eg. 100k items):
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
* in the current patch release of FLTK. ** Use for static builds only! **
|
* in the current patch release of FLTK. ** Use for static builds only! **
|
||||||
* For more info on this macro, see: http://fltk.org/cmp.php#FLTK_ABI_VERSION
|
* For more info on this macro, see: http://fltk.org/cmp.php#FLTK_ABI_VERSION
|
||||||
*/
|
*/
|
||||||
//#define FLTK_ABI_VERSION 10302
|
//#define FLTK_ABI_VERSION 10301
|
||||||
|
|
||||||
# include "Fl_Export.H"
|
# include "Fl_Export.H"
|
||||||
# include "fl_types.h"
|
# include "fl_types.h"
|
||||||
|
|||||||
@@ -367,7 +367,7 @@ protected:
|
|||||||
the image offset by the cx and cy arguments.
|
the image offset by the cx and cy arguments.
|
||||||
*/
|
*/
|
||||||
virtual void draw(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy) {}
|
virtual void draw(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy) {}
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
virtual
|
virtual
|
||||||
#endif
|
#endif
|
||||||
void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy);
|
void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy);
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ protected:
|
|||||||
int y_offset;
|
int y_offset;
|
||||||
/** \brief The constructor */
|
/** \brief The constructor */
|
||||||
Fl_Paged_Device() : Fl_Surface_Device(NULL), x_offset(0), y_offset(0) {};
|
Fl_Paged_Device() : Fl_Surface_Device(NULL), x_offset(0), y_offset(0) {};
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
public:
|
public:
|
||||||
/** \brief The destructor */
|
/** \brief The destructor */
|
||||||
virtual ~Fl_Paged_Device() {};
|
virtual ~Fl_Paged_Device() {};
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ class FL_EXPORT Fl_Pixmap : public Fl_Image {
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
#if FLTK_ABI_VERSION < 10302
|
#if FLTK_ABI_VERSION < 10301
|
||||||
static // a static member is needed for ABI compatibility
|
static // a static member is needed for ABI compatibility
|
||||||
#endif
|
#endif
|
||||||
UINT pixmap_bg_color; // RGB color used for pixmap background
|
UINT pixmap_bg_color; // RGB color used for pixmap background
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class FL_EXPORT Fl_Spinner : public Fl_Group {
|
|||||||
double step_; // Amount to add/subtract for up/down
|
double step_; // Amount to add/subtract for up/down
|
||||||
const char *format_; // Format string
|
const char *format_; // Format string
|
||||||
|
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
// NEW
|
// NEW
|
||||||
protected:
|
protected:
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ private:
|
|||||||
|
|
||||||
int _auto_drag;
|
int _auto_drag;
|
||||||
int _selecting;
|
int _selecting;
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
int _scrollbar_size;
|
int _scrollbar_size;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1070,7 +1070,7 @@ public:
|
|||||||
void callback(Fl_Widget*, void*);
|
void callback(Fl_Widget*, void*);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
// NEW
|
// NEW
|
||||||
/**
|
/**
|
||||||
Gets the current size of the scrollbars' troughs, in pixels.
|
Gets the current size of the scrollbars' troughs, in pixels.
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ public:
|
|||||||
static Fl_Color textcolor() { return textcolor_; }
|
static Fl_Color textcolor() { return textcolor_; }
|
||||||
/** Sets the color of the text in the tooltip. The default is black. */
|
/** Sets the color of the text in the tooltip. The default is black. */
|
||||||
static void textcolor(Fl_Color c) { textcolor_ = c; }
|
static void textcolor(Fl_Color c) { textcolor_ = c; }
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
/** Gets the amount of extra space left/right of the tooltip's text. Default is 3. */
|
/** Gets the amount of extra space left/right of the tooltip's text. Default is 3. */
|
||||||
static int margin_width() { return margin_width_; }
|
static int margin_width() { return margin_width_; }
|
||||||
/** Sets the amount of extra space left/right of the tooltip's text. Default is 3. */
|
/** Sets the amount of extra space left/right of the tooltip's text. Default is 3. */
|
||||||
@@ -119,7 +119,7 @@ private:
|
|||||||
static Fl_Font font_;
|
static Fl_Font font_;
|
||||||
static Fl_Fontsize size_;
|
static Fl_Fontsize size_;
|
||||||
static Fl_Widget* widget_; //!< Keeps track of the current target widget
|
static Fl_Widget* widget_; //!< Keeps track of the current target widget
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
static int margin_width_; //!< distance around tooltip text left+right
|
static int margin_width_; //!< distance around tooltip text left+right
|
||||||
static int margin_height_; //!< distance around tooltip text top+bottom
|
static int margin_height_; //!< distance around tooltip text top+bottom
|
||||||
static int wrap_width_; //!< maximum width of tooltip text before it word wraps
|
static int wrap_width_; //!< maximum width of tooltip text before it word wraps
|
||||||
|
|||||||
10
FL/Fl_Tree.H
10
FL/Fl_Tree.H
@@ -300,7 +300,7 @@ enum Fl_Tree_Reason {
|
|||||||
FL_TREE_REASON_NONE=0, ///< unknown reason
|
FL_TREE_REASON_NONE=0, ///< unknown reason
|
||||||
FL_TREE_REASON_SELECTED, ///< an item was selected
|
FL_TREE_REASON_SELECTED, ///< an item was selected
|
||||||
FL_TREE_REASON_DESELECTED, ///< an item was de-selected
|
FL_TREE_REASON_DESELECTED, ///< an item was de-selected
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
FL_TREE_REASON_RESELECTED, ///< an item was re-selected (e.g. double-clicked)
|
FL_TREE_REASON_RESELECTED, ///< an item was re-selected (e.g. double-clicked)
|
||||||
#endif /*FLTK_ABI_VERSION*/
|
#endif /*FLTK_ABI_VERSION*/
|
||||||
FL_TREE_REASON_OPENED, ///< an item was opened
|
FL_TREE_REASON_OPENED, ///< an item was opened
|
||||||
@@ -316,7 +316,7 @@ class FL_EXPORT Fl_Tree : public Fl_Group {
|
|||||||
Fl_Tree_Prefs _prefs; // all the tree's settings
|
Fl_Tree_Prefs _prefs; // all the tree's settings
|
||||||
int _scrollbar_size; // size of scrollbar trough
|
int _scrollbar_size; // size of scrollbar trough
|
||||||
|
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
// NEW:
|
// NEW:
|
||||||
Fl_Tree_Item *_lastselect;
|
Fl_Tree_Item *_lastselect;
|
||||||
#else /*FLTK_ABI_VERSION*/
|
#else /*FLTK_ABI_VERSION*/
|
||||||
@@ -420,7 +420,7 @@ public:
|
|||||||
void marginleft(int val);
|
void marginleft(int val);
|
||||||
int margintop() const;
|
int margintop() const;
|
||||||
void margintop(int val);
|
void margintop(int val);
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
int marginbottom() const;
|
int marginbottom() const;
|
||||||
void marginbottom(int val);
|
void marginbottom(int val);
|
||||||
#endif /*FLTK_ABI_VERSION*/
|
#endif /*FLTK_ABI_VERSION*/
|
||||||
@@ -432,7 +432,7 @@ public:
|
|||||||
void usericonmarginleft(int val);
|
void usericonmarginleft(int val);
|
||||||
int labelmarginleft() const;
|
int labelmarginleft() const;
|
||||||
void labelmarginleft(int val);
|
void labelmarginleft(int val);
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
int widgetmarginleft() const;
|
int widgetmarginleft() const;
|
||||||
void widgetmarginleft(int val);
|
void widgetmarginleft(int val);
|
||||||
#endif /*FLTK_ABI_VERSION*/
|
#endif /*FLTK_ABI_VERSION*/
|
||||||
@@ -456,7 +456,7 @@ public:
|
|||||||
void selectbox(Fl_Boxtype val);
|
void selectbox(Fl_Boxtype val);
|
||||||
Fl_Tree_Select selectmode() const;
|
Fl_Tree_Select selectmode() const;
|
||||||
void selectmode(Fl_Tree_Select val);
|
void selectmode(Fl_Tree_Select val);
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
Fl_Tree_Item_Reselect_Mode item_reselect_mode() const;
|
Fl_Tree_Item_Reselect_Mode item_reselect_mode() const;
|
||||||
void item_reselect_mode(Fl_Tree_Item_Reselect_Mode mode);
|
void item_reselect_mode(Fl_Tree_Item_Reselect_Mode mode);
|
||||||
Fl_Tree_Item_Draw_Mode item_draw_mode() const;
|
Fl_Tree_Item_Draw_Mode item_draw_mode() const;
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class FL_EXPORT Fl_Tree_Item {
|
|||||||
ACTIVE = 1<<2, ///> item is active
|
ACTIVE = 1<<2, ///> item is active
|
||||||
SELECTED = 1<<3, ///> item is selected
|
SELECTED = 1<<3, ///> item is selected
|
||||||
};
|
};
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
// NEW
|
// NEW
|
||||||
unsigned short _flags; // misc flags
|
unsigned short _flags; // misc flags
|
||||||
#else /*FLTK_ABI_VERSION*/
|
#else /*FLTK_ABI_VERSION*/
|
||||||
@@ -81,7 +81,7 @@ class FL_EXPORT Fl_Tree_Item {
|
|||||||
Fl_Tree_Item_Array _children; // array of child items
|
Fl_Tree_Item_Array _children; // array of child items
|
||||||
Fl_Tree_Item *_parent; // parent item (=0 if root)
|
Fl_Tree_Item *_parent; // parent item (=0 if root)
|
||||||
void *_userdata; // user data that can be associated with an item
|
void *_userdata; // user data that can be associated with an item
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
Fl_Tree_Item *_prev_sibling; // previous sibling (same level)
|
Fl_Tree_Item *_prev_sibling; // previous sibling (same level)
|
||||||
Fl_Tree_Item *_next_sibling; // next sibling (same level)
|
Fl_Tree_Item *_next_sibling; // next sibling (same level)
|
||||||
#endif /*FLTK_ABI_VERSION*/
|
#endif /*FLTK_ABI_VERSION*/
|
||||||
@@ -350,7 +350,7 @@ public:
|
|||||||
|
|
||||||
// Protected methods
|
// Protected methods
|
||||||
protected:
|
protected:
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
/// Set a flag to an on or off value. val is 0 or 1.
|
/// Set a flag to an on or off value. val is 0 or 1.
|
||||||
inline void set_flag(unsigned short flag,int val) {
|
inline void set_flag(unsigned short flag,int val) {
|
||||||
if ( val ) _flags |= flag; else _flags &= ~flag;
|
if ( val ) _flags |= flag; else _flags &= ~flag;
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public:
|
|||||||
return(_total);
|
return(_total);
|
||||||
}
|
}
|
||||||
/// Swap the two items at index positions \p ax and \p bx.
|
/// Swap the two items at index positions \p ax and \p bx.
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
// NEW -- code moved to .cxx
|
// NEW -- code moved to .cxx
|
||||||
void swap(int ax, int bx);
|
void swap(int ax, int bx);
|
||||||
#else /*FLTK_ABI_VERSION*/
|
#else /*FLTK_ABI_VERSION*/
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ enum Fl_Tree_Select {
|
|||||||
///< with SHIFT, CTRL or mouse drags.
|
///< with SHIFT, CTRL or mouse drags.
|
||||||
};
|
};
|
||||||
|
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
/// \enum Fl_Tree_Item_Reselect_Mode
|
/// \enum Fl_Tree_Item_Reselect_Mode
|
||||||
/// Defines the ways an item can be (re) selected
|
/// Defines the ways an item can be (re) selected
|
||||||
/// via item_reselect_mode().
|
/// via item_reselect_mode().
|
||||||
@@ -106,13 +106,13 @@ class FL_EXPORT Fl_Tree_Prefs {
|
|||||||
Fl_Fontsize _labelsize; // label's font size
|
Fl_Fontsize _labelsize; // label's font size
|
||||||
int _margintop; // --
|
int _margintop; // --
|
||||||
int _marginleft; // |- tree's controllable margins
|
int _marginleft; // |- tree's controllable margins
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
int _marginbottom; // --
|
int _marginbottom; // --
|
||||||
#endif
|
#endif
|
||||||
int _openchild_marginbottom; // extra space below an open child tree
|
int _openchild_marginbottom; // extra space below an open child tree
|
||||||
int _usericonmarginleft; // space to left of user icon (if any)
|
int _usericonmarginleft; // space to left of user icon (if any)
|
||||||
int _labelmarginleft; // space to left of label
|
int _labelmarginleft; // space to left of label
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
int _widgetmarginleft; // space to left of widget
|
int _widgetmarginleft; // space to left of widget
|
||||||
#endif
|
#endif
|
||||||
int _connectorwidth; // connector width (right of open/close icon)
|
int _connectorwidth; // connector width (right of open/close icon)
|
||||||
@@ -130,7 +130,7 @@ class FL_EXPORT Fl_Tree_Prefs {
|
|||||||
Fl_Tree_Sort _sortorder; // none, ascening, descending, etc.
|
Fl_Tree_Sort _sortorder; // none, ascening, descending, etc.
|
||||||
Fl_Boxtype _selectbox; // selection box type
|
Fl_Boxtype _selectbox; // selection box type
|
||||||
Fl_Tree_Select _selectmode; // selection mode
|
Fl_Tree_Select _selectmode; // selection mode
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
Fl_Tree_Item_Reselect_Mode _itemreselectmode; // controls item selection callback() behavior
|
Fl_Tree_Item_Reselect_Mode _itemreselectmode; // controls item selection callback() behavior
|
||||||
Fl_Tree_Item_Draw_Mode _itemdrawmode; // controls how items draw label + widget()
|
Fl_Tree_Item_Draw_Mode _itemdrawmode; // controls how items draw label + widget()
|
||||||
#endif /*FLTK_ABI_VERSION*/
|
#endif /*FLTK_ABI_VERSION*/
|
||||||
@@ -152,7 +152,7 @@ public:
|
|||||||
inline Fl_Color item_labelfgcolor() const { return(_labelfgcolor); }
|
inline Fl_Color item_labelfgcolor() const { return(_labelfgcolor); }
|
||||||
/// Set the default label foreground color
|
/// Set the default label foreground color
|
||||||
inline void item_labelfgcolor(Fl_Color val) { _labelfgcolor = val; }
|
inline void item_labelfgcolor(Fl_Color val) { _labelfgcolor = val; }
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
/// Get the default label background color.
|
/// Get the default label background color.
|
||||||
/// This returns the Fl_Tree::color() unless item_labelbgcolor()
|
/// This returns the Fl_Tree::color() unless item_labelbgcolor()
|
||||||
/// has been set explicitly.
|
/// has been set explicitly.
|
||||||
@@ -216,7 +216,7 @@ public:
|
|||||||
inline void margintop(int val) {
|
inline void margintop(int val) {
|
||||||
_margintop = val;
|
_margintop = val;
|
||||||
}
|
}
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
/// Get the bottom margin's value in pixels.
|
/// Get the bottom margin's value in pixels.
|
||||||
/// This is the extra distance the vertical scroller lets you travel.
|
/// This is the extra distance the vertical scroller lets you travel.
|
||||||
inline int marginbottom() const {
|
inline int marginbottom() const {
|
||||||
@@ -252,7 +252,7 @@ public:
|
|||||||
inline void labelmarginleft(int val) {
|
inline void labelmarginleft(int val) {
|
||||||
_labelmarginleft = val;
|
_labelmarginleft = val;
|
||||||
}
|
}
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
/// Get the widget()'s left margin value in pixels
|
/// Get the widget()'s left margin value in pixels
|
||||||
inline int widgetmarginleft() const {
|
inline int widgetmarginleft() const {
|
||||||
return(_widgetmarginleft);
|
return(_widgetmarginleft);
|
||||||
@@ -391,7 +391,7 @@ public:
|
|||||||
inline void selectmode(Fl_Tree_Select val) {
|
inline void selectmode(Fl_Tree_Select val) {
|
||||||
_selectmode = val;
|
_selectmode = val;
|
||||||
}
|
}
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
/// Returns the current item re/selection mode
|
/// Returns the current item re/selection mode
|
||||||
Fl_Tree_Item_Reselect_Mode item_reselect_mode() const {
|
Fl_Tree_Item_Reselect_Mode item_reselect_mode() const {
|
||||||
return _itemreselectmode;
|
return _itemreselectmode;
|
||||||
|
|||||||
@@ -52,19 +52,19 @@ class FL_EXPORT Fl_Window : public Fl_Group {
|
|||||||
// Note: we must use separate statements for each of the following 4 variables,
|
// Note: we must use separate statements for each of the following 4 variables,
|
||||||
// with the static attribute, otherwise MS VC++ 2008/2010 complains :-(
|
// with the static attribute, otherwise MS VC++ 2008/2010 complains :-(
|
||||||
// AlbrechtS 04/2012
|
// AlbrechtS 04/2012
|
||||||
#if FLTK_ABI_VERSION < 10302
|
#if FLTK_ABI_VERSION < 10301
|
||||||
static // when these members are static, ABI compatibility with 1.3.0 is respected
|
static // when these members are static, ABI compatibility with 1.3.0 is respected
|
||||||
#endif
|
#endif
|
||||||
int no_fullscreen_x;
|
int no_fullscreen_x;
|
||||||
#if FLTK_ABI_VERSION < 10302
|
#if FLTK_ABI_VERSION < 10301
|
||||||
static // when these members are static, ABI compatibility with 1.3.0 is respected
|
static // when these members are static, ABI compatibility with 1.3.0 is respected
|
||||||
#endif
|
#endif
|
||||||
int no_fullscreen_y;
|
int no_fullscreen_y;
|
||||||
#if FLTK_ABI_VERSION < 10302
|
#if FLTK_ABI_VERSION < 10301
|
||||||
static // when these members are static, ABI compatibility with 1.3.0 is respected
|
static // when these members are static, ABI compatibility with 1.3.0 is respected
|
||||||
#endif
|
#endif
|
||||||
int no_fullscreen_w;
|
int no_fullscreen_w;
|
||||||
#if FLTK_ABI_VERSION < 10302
|
#if FLTK_ABI_VERSION < 10301
|
||||||
static // when these members are static, ABI compatibility with 1.3.0 is respected
|
static // when these members are static, ABI compatibility with 1.3.0 is respected
|
||||||
#endif
|
#endif
|
||||||
int no_fullscreen_h;
|
int no_fullscreen_h;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
#define PI 3.14159
|
#define PI 3.14159
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
class MyTable : public Fl_Table {
|
class MyTable : public Fl_Table {
|
||||||
char *mode;
|
char *mode;
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ void Fl_Double_Window::show() {
|
|||||||
\param pixmap offscreen buffer containing the rectangle to copy
|
\param pixmap offscreen buffer containing the rectangle to copy
|
||||||
\param srcx,srcy origin in offscreen buffer of rectangle to copy
|
\param srcx,srcy origin in offscreen buffer of rectangle to copy
|
||||||
*/
|
*/
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
void fl_copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy) {
|
void fl_copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy) {
|
||||||
fl_graphics_driver->copy_offscreen(x, y, w, h, pixmap, srcx, srcy);
|
fl_graphics_driver->copy_offscreen(x, y, w, h, pixmap, srcx, srcy);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ void Fl_GDI_Graphics_Driver::draw(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if FLTK_ABI_VERSION < 10302
|
#if FLTK_ABI_VERSION < 10301
|
||||||
UINT Fl_Pixmap::pixmap_bg_color = 0;
|
UINT Fl_Pixmap::pixmap_bg_color = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ Fl_Table::Fl_Table(int X, int Y, int W, int H, const char *l) : Fl_Group(X,Y,W,H
|
|||||||
current_row = -1;
|
current_row = -1;
|
||||||
select_row = -1;
|
select_row = -1;
|
||||||
select_col = -1;
|
select_col = -1;
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
_scrollbar_size = 0;
|
_scrollbar_size = 0;
|
||||||
#endif
|
#endif
|
||||||
box(FL_THIN_DOWN_FRAME);
|
box(FL_THIN_DOWN_FRAME);
|
||||||
@@ -480,7 +480,7 @@ void Fl_Table::recalc_dimensions() {
|
|||||||
// First pass: can hide via window size?
|
// First pass: can hide via window size?
|
||||||
int hidev = (table_h <= tih);
|
int hidev = (table_h <= tih);
|
||||||
int hideh = (table_w <= tiw);
|
int hideh = (table_w <= tiw);
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
// NEW
|
// NEW
|
||||||
int scrollsize = _scrollbar_size ? _scrollbar_size : Fl::scrollbar_size();
|
int scrollsize = _scrollbar_size ? _scrollbar_size : Fl::scrollbar_size();
|
||||||
#else
|
#else
|
||||||
@@ -561,7 +561,7 @@ void Fl_Table::table_resized() {
|
|||||||
// Vertical scrollbar
|
// Vertical scrollbar
|
||||||
float vscrolltab = ( table_h == 0 || tih > table_h ) ? 1 : (float)tih / table_h;
|
float vscrolltab = ( table_h == 0 || tih > table_h ) ? 1 : (float)tih / table_h;
|
||||||
float hscrolltab = ( table_w == 0 || tiw > table_w ) ? 1 : (float)tiw / table_w;
|
float hscrolltab = ( table_w == 0 || tiw > table_w ) ? 1 : (float)tiw / table_w;
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
// NEW
|
// NEW
|
||||||
int scrollsize = _scrollbar_size ? _scrollbar_size : Fl::scrollbar_size();
|
int scrollsize = _scrollbar_size ? _scrollbar_size : Fl::scrollbar_size();
|
||||||
#else
|
#else
|
||||||
@@ -1147,7 +1147,7 @@ void Fl_Table::set_selection(int row_top, int col_left, int row_bot, int col_rig
|
|||||||
// Then tell the group to draw over us.
|
// Then tell the group to draw over us.
|
||||||
//
|
//
|
||||||
void Fl_Table::draw() {
|
void Fl_Table::draw() {
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
// NEW
|
// NEW
|
||||||
int scrollsize = _scrollbar_size ? _scrollbar_size : Fl::scrollbar_size();
|
int scrollsize = _scrollbar_size ? _scrollbar_size : Fl::scrollbar_size();
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ Fl_Color Fl_Tooltip::color_ = fl_color_cube(FL_NUM_RED - 1,
|
|||||||
Fl_Color Fl_Tooltip::textcolor_ = FL_BLACK;
|
Fl_Color Fl_Tooltip::textcolor_ = FL_BLACK;
|
||||||
Fl_Font Fl_Tooltip::font_ = FL_HELVETICA;
|
Fl_Font Fl_Tooltip::font_ = FL_HELVETICA;
|
||||||
Fl_Fontsize Fl_Tooltip::size_ = -1;
|
Fl_Fontsize Fl_Tooltip::size_ = -1;
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
int Fl_Tooltip::margin_width_ = 3;
|
int Fl_Tooltip::margin_width_ = 3;
|
||||||
int Fl_Tooltip::margin_height_ = 3;
|
int Fl_Tooltip::margin_height_ = 3;
|
||||||
int Fl_Tooltip::wrap_width_ = 400;
|
int Fl_Tooltip::wrap_width_ = 400;
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ Fl_Tree::Fl_Tree(int X, int Y, int W, int H, const char *L) : Fl_Group(X,Y,W,H,L
|
|||||||
_callback_reason = FL_TREE_REASON_NONE;
|
_callback_reason = FL_TREE_REASON_NONE;
|
||||||
_scrollbar_size = 0; // 0: uses Fl::scrollbar_size()
|
_scrollbar_size = 0; // 0: uses Fl::scrollbar_size()
|
||||||
|
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
// NEW
|
// NEW
|
||||||
_lastselect = 0;
|
_lastselect = 0;
|
||||||
#else /*FLTK_ABI_VERSION*/
|
#else /*FLTK_ABI_VERSION*/
|
||||||
@@ -148,7 +148,7 @@ int Fl_Tree::handle(int e) {
|
|||||||
char is_shift = Fl::event_state() & FL_SHIFT ? 1 : 0;
|
char is_shift = Fl::event_state() & FL_SHIFT ? 1 : 0;
|
||||||
char is_ctrl = Fl::event_state() & FL_CTRL ? 1 : 0;
|
char is_ctrl = Fl::event_state() & FL_CTRL ? 1 : 0;
|
||||||
char is_command = Fl::event_state() & FL_COMMAND ? 1 : 0; // ctrl on win/lin, 'Command' on mac
|
char is_command = Fl::event_state() & FL_COMMAND ? 1 : 0; // ctrl on win/lin, 'Command' on mac
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
// NEW: data inside Fl_Tree
|
// NEW: data inside Fl_Tree
|
||||||
#else /*FLTK_ABI_VERSION*/
|
#else /*FLTK_ABI_VERSION*/
|
||||||
// OLD:
|
// OLD:
|
||||||
@@ -477,7 +477,7 @@ int Fl_Tree::draw_tree() {
|
|||||||
|
|
||||||
// Show vertical scrollbar?
|
// Show vertical scrollbar?
|
||||||
{
|
{
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
// NEW
|
// NEW
|
||||||
int SY = Y + _prefs.marginbottom();
|
int SY = Y + _prefs.marginbottom();
|
||||||
#else /*FLTK_ABI_VERSION*/
|
#else /*FLTK_ABI_VERSION*/
|
||||||
@@ -1150,7 +1150,7 @@ int Fl_Tree::select(Fl_Tree_Item *item, int docallback) {
|
|||||||
redraw();
|
redraw();
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
// NEW
|
// NEW
|
||||||
if ( alreadySelected ) {
|
if ( alreadySelected ) {
|
||||||
if ( (item_reselect_mode() == FL_TREE_SELECTABLE_ALWAYS) && docallback ) {
|
if ( (item_reselect_mode() == FL_TREE_SELECTABLE_ALWAYS) && docallback ) {
|
||||||
@@ -1319,7 +1319,7 @@ int Fl_Tree::select_only(Fl_Tree_Item *selitem, int docallback) {
|
|||||||
int changed = 0;
|
int changed = 0;
|
||||||
for ( Fl_Tree_Item *item = first(); item; item = item->next() ) {
|
for ( Fl_Tree_Item *item = first(); item; item = item->next() ) {
|
||||||
if ( item == selitem ) {
|
if ( item == selitem ) {
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
// NEW
|
// NEW
|
||||||
if ( item->is_selected() ) { // already selected?
|
if ( item->is_selected() ) { // already selected?
|
||||||
if ( item_reselect_mode() == FL_TREE_SELECTABLE_ALWAYS ) {
|
if ( item_reselect_mode() == FL_TREE_SELECTABLE_ALWAYS ) {
|
||||||
@@ -1510,7 +1510,7 @@ void Fl_Tree::margintop(int val) {
|
|||||||
redraw();
|
redraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
/// Get the amount of white space (in pixels) that should appear
|
/// Get the amount of white space (in pixels) that should appear
|
||||||
/// below the last visible item when the vertical scroller is scrolled to the bottom.
|
/// below the last visible item when the vertical scroller is scrolled to the bottom.
|
||||||
///
|
///
|
||||||
@@ -1578,7 +1578,7 @@ void Fl_Tree::labelmarginleft(int val) {
|
|||||||
_prefs.labelmarginleft(val);
|
_prefs.labelmarginleft(val);
|
||||||
redraw();
|
redraw();
|
||||||
}
|
}
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
/// Get the amount of white space (in pixels) that should appear
|
/// Get the amount of white space (in pixels) that should appear
|
||||||
/// to the left of the child fltk widget (if any).
|
/// to the left of the child fltk widget (if any).
|
||||||
int Fl_Tree::widgetmarginleft() const {
|
int Fl_Tree::widgetmarginleft() const {
|
||||||
@@ -1748,7 +1748,7 @@ void Fl_Tree::selectmode(Fl_Tree_Select val) {
|
|||||||
_prefs.selectmode(val);
|
_prefs.selectmode(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
/// Returns the current item re/selection mode
|
/// Returns the current item re/selection mode
|
||||||
Fl_Tree_Item_Reselect_Mode Fl_Tree::item_reselect_mode() const {
|
Fl_Tree_Item_Reselect_Mode Fl_Tree::item_reselect_mode() const {
|
||||||
return(_prefs.item_reselect_mode());
|
return(_prefs.item_reselect_mode());
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ Fl_Tree_Item::Fl_Tree_Item(const Fl_Tree_Prefs &prefs) {
|
|||||||
_labelfgcolor = prefs.labelfgcolor();
|
_labelfgcolor = prefs.labelfgcolor();
|
||||||
_labelbgcolor = prefs.labelbgcolor();
|
_labelbgcolor = prefs.labelbgcolor();
|
||||||
_widget = 0;
|
_widget = 0;
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
_flags = OPEN|VISIBLE|ACTIVE;
|
_flags = OPEN|VISIBLE|ACTIVE;
|
||||||
#else /*FLTK_ABI_VERSION*/
|
#else /*FLTK_ABI_VERSION*/
|
||||||
_open = 1;
|
_open = 1;
|
||||||
@@ -67,7 +67,7 @@ Fl_Tree_Item::Fl_Tree_Item(const Fl_Tree_Prefs &prefs) {
|
|||||||
_usericon = 0;
|
_usericon = 0;
|
||||||
_userdata = 0;
|
_userdata = 0;
|
||||||
_parent = 0;
|
_parent = 0;
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
_prev_sibling = 0;
|
_prev_sibling = 0;
|
||||||
_next_sibling = 0;
|
_next_sibling = 0;
|
||||||
#endif /*FLTK_ABI_VERSION*/
|
#endif /*FLTK_ABI_VERSION*/
|
||||||
@@ -92,7 +92,7 @@ Fl_Tree_Item::Fl_Tree_Item(const Fl_Tree_Item *o) {
|
|||||||
_labelfgcolor = o->labelfgcolor();
|
_labelfgcolor = o->labelfgcolor();
|
||||||
_labelbgcolor = o->labelbgcolor();
|
_labelbgcolor = o->labelbgcolor();
|
||||||
_widget = o->widget();
|
_widget = o->widget();
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
_flags = o->_flags;
|
_flags = o->_flags;
|
||||||
#else /*FLTK_ABI_VERSION*/
|
#else /*FLTK_ABI_VERSION*/
|
||||||
_open = o->_open;
|
_open = o->_open;
|
||||||
@@ -115,7 +115,7 @@ Fl_Tree_Item::Fl_Tree_Item(const Fl_Tree_Item *o) {
|
|||||||
_usericon = o->usericon();
|
_usericon = o->usericon();
|
||||||
_userdata = o->user_data();
|
_userdata = o->user_data();
|
||||||
_parent = o->_parent;
|
_parent = o->_parent;
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
_prev_sibling = 0; // do not copy ptrs! use update_prev_next()
|
_prev_sibling = 0; // do not copy ptrs! use update_prev_next()
|
||||||
_next_sibling = 0; // do not copy ptrs! use update_prev_next()
|
_next_sibling = 0; // do not copy ptrs! use update_prev_next()
|
||||||
#endif /*FLTK_ABI_VERSION*/
|
#endif /*FLTK_ABI_VERSION*/
|
||||||
@@ -126,7 +126,7 @@ Fl_Tree_Item::Fl_Tree_Item(const Fl_Tree_Item *o) {
|
|||||||
///
|
///
|
||||||
void Fl_Tree_Item::show_self(const char *indent) const {
|
void Fl_Tree_Item::show_self(const char *indent) const {
|
||||||
if ( label() ) {
|
if ( label() ) {
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
printf("%s-%s (%d children, this=%p, parent=%p, prev=%p, next=%p, depth=%d)\n",
|
printf("%s-%s (%d children, this=%p, parent=%p, prev=%p, next=%p, depth=%d)\n",
|
||||||
indent,label(),children(),(void*)this, (void*)_parent,
|
indent,label(),children(),(void*)this, (void*)_parent,
|
||||||
_prev_sibling, _next_sibling, depth());
|
_prev_sibling, _next_sibling, depth());
|
||||||
@@ -576,7 +576,7 @@ int Fl_Tree_Item::calc_item_height(const Fl_Tree_Prefs &prefs) const {
|
|||||||
fl_font(_labelfont, _labelsize); // fl_descent() needs this :/
|
fl_font(_labelfont, _labelsize); // fl_descent() needs this :/
|
||||||
H = _labelsize + fl_descent() + 1; // at least one pixel space below descender
|
H = _labelsize + fl_descent() + 1; // at least one pixel space below descender
|
||||||
}
|
}
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
if ( widget() &&
|
if ( widget() &&
|
||||||
(prefs.item_draw_mode() & FL_TREE_ITEM_HEIGHT_FROM_WIDGET) &&
|
(prefs.item_draw_mode() & FL_TREE_ITEM_HEIGHT_FROM_WIDGET) &&
|
||||||
H < widget()->h()) {
|
H < widget()->h()) {
|
||||||
@@ -648,7 +648,7 @@ void Fl_Tree_Item::draw(int X, int &Y, int W, Fl_Widget *tree,
|
|||||||
int wx = label_x;
|
int wx = label_x;
|
||||||
int wy = bg_y;
|
int wy = bg_y;
|
||||||
int ww = widget()->w(); // use widget's width
|
int ww = widget()->w(); // use widget's width
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
int wh = (prefs.item_draw_mode() & FL_TREE_ITEM_HEIGHT_FROM_WIDGET)
|
int wh = (prefs.item_draw_mode() & FL_TREE_ITEM_HEIGHT_FROM_WIDGET)
|
||||||
? widget()->h() : H;
|
? widget()->h() : H;
|
||||||
if ( _label &&
|
if ( _label &&
|
||||||
@@ -660,7 +660,7 @@ void Fl_Tree_Item::draw(int X, int &Y, int W, Fl_Widget *tree,
|
|||||||
fl_font(_labelfont, _labelsize); // fldescent() needs this
|
fl_font(_labelfont, _labelsize); // fldescent() needs this
|
||||||
int lw=0, lh=0;
|
int lw=0, lh=0;
|
||||||
fl_measure(_label,lw,lh); // get box around text (including white space)
|
fl_measure(_label,lw,lh); // get box around text (including white space)
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
// NEW
|
// NEW
|
||||||
wx += (lw + prefs.widgetmarginleft());
|
wx += (lw + prefs.widgetmarginleft());
|
||||||
#else /*FLTK_ABI_VERSION*/
|
#else /*FLTK_ABI_VERSION*/
|
||||||
@@ -735,7 +735,7 @@ void Fl_Tree_Item::draw(int X, int &Y, int W, Fl_Widget *tree,
|
|||||||
prefs.usericon()->draw(uicon_x,uicon_y);
|
prefs.usericon()->draw(uicon_x,uicon_y);
|
||||||
}
|
}
|
||||||
// Draw label
|
// Draw label
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
if ( _label &&
|
if ( _label &&
|
||||||
( !widget() ||
|
( !widget() ||
|
||||||
(prefs.item_draw_mode() & FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET) ) )
|
(prefs.item_draw_mode() & FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET) ) )
|
||||||
@@ -874,7 +874,7 @@ Fl_Tree_Item *Fl_Tree_Item::next() {
|
|||||||
if ( c->has_children() ) {
|
if ( c->has_children() ) {
|
||||||
return(c->child(0));
|
return(c->child(0));
|
||||||
}
|
}
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
// NEW
|
// NEW
|
||||||
while ( ( p = c->parent() ) != NULL ) { // loop upwards through parents
|
while ( ( p = c->parent() ) != NULL ) { // loop upwards through parents
|
||||||
if ( c->_next_sibling ) // not last child?
|
if ( c->_next_sibling ) // not last child?
|
||||||
@@ -901,7 +901,7 @@ Fl_Tree_Item *Fl_Tree_Item::next() {
|
|||||||
/// \returns the previous item in the tree, or 0 if there's no item above this one (hit the root).
|
/// \returns the previous item in the tree, or 0 if there's no item above this one (hit the root).
|
||||||
///
|
///
|
||||||
Fl_Tree_Item *Fl_Tree_Item::prev() {
|
Fl_Tree_Item *Fl_Tree_Item::prev() {
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
// NEW
|
// NEW
|
||||||
if ( !parent() ) return(0); // hit root? done
|
if ( !parent() ) return(0); // hit root? done
|
||||||
if ( !_prev_sibling ) { // are we first child?
|
if ( !_prev_sibling ) { // are we first child?
|
||||||
@@ -955,7 +955,7 @@ Fl_Tree_Item *Fl_Tree_Item::prev() {
|
|||||||
/// \returns item's next sibling, or 0 if none.
|
/// \returns item's next sibling, or 0 if none.
|
||||||
///
|
///
|
||||||
Fl_Tree_Item *Fl_Tree_Item::next_sibling() {
|
Fl_Tree_Item *Fl_Tree_Item::next_sibling() {
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
// NEW
|
// NEW
|
||||||
return(_next_sibling);
|
return(_next_sibling);
|
||||||
#else /*FLTK_ABI_VERSION*/
|
#else /*FLTK_ABI_VERSION*/
|
||||||
@@ -977,7 +977,7 @@ Fl_Tree_Item *Fl_Tree_Item::next_sibling() {
|
|||||||
/// \returns This item's previous sibling, or 0 if none.
|
/// \returns This item's previous sibling, or 0 if none.
|
||||||
///
|
///
|
||||||
Fl_Tree_Item *Fl_Tree_Item::prev_sibling() {
|
Fl_Tree_Item *Fl_Tree_Item::prev_sibling() {
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
// NEW
|
// NEW
|
||||||
return(_prev_sibling);
|
return(_prev_sibling);
|
||||||
#else /*FLTK_ABI_VERSION*/
|
#else /*FLTK_ABI_VERSION*/
|
||||||
@@ -995,7 +995,7 @@ Fl_Tree_Item *Fl_Tree_Item::prev_sibling() {
|
|||||||
/// Call this whenever items in the array are added/removed/moved/swapped.
|
/// Call this whenever items in the array are added/removed/moved/swapped.
|
||||||
///
|
///
|
||||||
void Fl_Tree_Item::update_prev_next(int index) {
|
void Fl_Tree_Item::update_prev_next(int index) {
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
// NEW
|
// NEW
|
||||||
int pchildren = parent() ? parent()->children() : 0;
|
int pchildren = parent() ? parent()->children() : 0;
|
||||||
int index_prev = index-1;
|
int index_prev = index-1;
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ int Fl_Tree_Item_Array::remove(Fl_Tree_Item *item) {
|
|||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
/// Swap the two items at index positions \p ax and \p bx.
|
/// Swap the two items at index positions \p ax and \p bx.
|
||||||
void Fl_Tree_Item_Array::swap(int ax, int bx) {
|
void Fl_Tree_Item_Array::swap(int ax, int bx) {
|
||||||
Fl_Tree_Item *asave = _items[ax];
|
Fl_Tree_Item *asave = _items[ax];
|
||||||
|
|||||||
@@ -125,13 +125,13 @@ Fl_Tree_Prefs::Fl_Tree_Prefs() {
|
|||||||
_labelsize = FL_NORMAL_SIZE;
|
_labelsize = FL_NORMAL_SIZE;
|
||||||
_marginleft = 6;
|
_marginleft = 6;
|
||||||
_margintop = 3;
|
_margintop = 3;
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
_marginbottom = 20;
|
_marginbottom = 20;
|
||||||
#endif /*FLTK_ABI_VERSION*/
|
#endif /*FLTK_ABI_VERSION*/
|
||||||
_openchild_marginbottom = 0;
|
_openchild_marginbottom = 0;
|
||||||
_usericonmarginleft = 3;
|
_usericonmarginleft = 3;
|
||||||
_labelmarginleft = 3;
|
_labelmarginleft = 3;
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
_widgetmarginleft = 3;
|
_widgetmarginleft = 3;
|
||||||
#endif /*FLTK_ABI_VERSION*/
|
#endif /*FLTK_ABI_VERSION*/
|
||||||
_linespacing = 0;
|
_linespacing = 0;
|
||||||
@@ -152,7 +152,7 @@ Fl_Tree_Prefs::Fl_Tree_Prefs() {
|
|||||||
_sortorder = FL_TREE_SORT_NONE;
|
_sortorder = FL_TREE_SORT_NONE;
|
||||||
_selectbox = FL_FLAT_BOX;
|
_selectbox = FL_FLAT_BOX;
|
||||||
_selectmode = FL_TREE_SELECT_SINGLE;
|
_selectmode = FL_TREE_SELECT_SINGLE;
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
_itemreselectmode = FL_TREE_SELECTABLE_ONCE;
|
_itemreselectmode = FL_TREE_SELECTABLE_ONCE;
|
||||||
_itemdrawmode = FL_TREE_ITEM_DRAW_DEFAULT;
|
_itemdrawmode = FL_TREE_ITEM_DRAW_DEFAULT;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ void Fl_Window::_Fl_Window() {
|
|||||||
resizable(0);
|
resizable(0);
|
||||||
size_range_set = 0;
|
size_range_set = 0;
|
||||||
minw = maxw = minh = maxh = 0;
|
minw = maxw = minh = maxh = 0;
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
no_fullscreen_x = 0;
|
no_fullscreen_x = 0;
|
||||||
no_fullscreen_y = 0;
|
no_fullscreen_y = 0;
|
||||||
no_fullscreen_w = w();
|
no_fullscreen_w = w();
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#if FLTK_ABI_VERSION < 10302
|
#if FLTK_ABI_VERSION < 10301
|
||||||
int Fl_Window::no_fullscreen_x = 0;
|
int Fl_Window::no_fullscreen_x = 0;
|
||||||
int Fl_Window::no_fullscreen_y = 0;
|
int Fl_Window::no_fullscreen_y = 0;
|
||||||
int Fl_Window::no_fullscreen_w = 0;
|
int Fl_Window::no_fullscreen_w = 0;
|
||||||
|
|||||||
28
test/tree.fl
28
test/tree.fl
@@ -48,7 +48,7 @@ Function {reason_as_name(Fl_Tree_Reason reason)} {
|
|||||||
case FL_TREE_REASON_DESELECTED: return("deselected");
|
case FL_TREE_REASON_DESELECTED: return("deselected");
|
||||||
case FL_TREE_REASON_OPENED: return("opened");
|
case FL_TREE_REASON_OPENED: return("opened");
|
||||||
case FL_TREE_REASON_CLOSED: return("closed");
|
case FL_TREE_REASON_CLOSED: return("closed");
|
||||||
\#if FLTK_ABI_VERSION >= 10302
|
\#if FLTK_ABI_VERSION >= 10301
|
||||||
case FL_TREE_REASON_RESELECTED: return("reselected");
|
case FL_TREE_REASON_RESELECTED: return("reselected");
|
||||||
\#endif
|
\#endif
|
||||||
default: return("???");
|
default: return("???");
|
||||||
@@ -288,7 +288,7 @@ Function {GetTreeMarginBottom()} {
|
|||||||
comment {Get the current 'margin bottom' size
|
comment {Get the current 'margin bottom' size
|
||||||
Handles this as an ABI feature..} open return_type int
|
Handles this as an ABI feature..} open return_type int
|
||||||
} {
|
} {
|
||||||
code {\#if FLTK_ABI_VERSION >= 10302
|
code {\#if FLTK_ABI_VERSION >= 10301
|
||||||
return tree->marginbottom();
|
return tree->marginbottom();
|
||||||
\#else
|
\#else
|
||||||
return 0;
|
return 0;
|
||||||
@@ -299,7 +299,7 @@ Function {GetTreeWidgetMarginLeft()} {
|
|||||||
comment {Get the current 'margin bottom' size
|
comment {Get the current 'margin bottom' size
|
||||||
Handles this as an ABI feature..} open return_type int
|
Handles this as an ABI feature..} open return_type int
|
||||||
} {
|
} {
|
||||||
code {\#if FLTK_ABI_VERSION >= 10302
|
code {\#if FLTK_ABI_VERSION >= 10301
|
||||||
return tree->widgetmarginleft();
|
return tree->widgetmarginleft();
|
||||||
\#else
|
\#else
|
||||||
return 0;
|
return 0;
|
||||||
@@ -399,7 +399,7 @@ tree->redraw();}
|
|||||||
Fl_Value_Slider marginbottom_slider {
|
Fl_Value_Slider marginbottom_slider {
|
||||||
label {marginbottom()}
|
label {marginbottom()}
|
||||||
user_data tree
|
user_data tree
|
||||||
callback {\#if FLTK_ABI_VERSION >= 10302
|
callback {\#if FLTK_ABI_VERSION >= 10301
|
||||||
// NEW
|
// NEW
|
||||||
int val = (int)marginbottom_slider->value();
|
int val = (int)marginbottom_slider->value();
|
||||||
tree->marginbottom(val);
|
tree->marginbottom(val);
|
||||||
@@ -408,7 +408,7 @@ tree->redraw();
|
|||||||
// OLD
|
// OLD
|
||||||
marginbottom_slider->deactivate(); // deactivate if this ABI feature is disabled
|
marginbottom_slider->deactivate(); // deactivate if this ABI feature is disabled
|
||||||
marginbottom_slider->tooltip("DISABLED.\\n"
|
marginbottom_slider->tooltip("DISABLED.\\n"
|
||||||
"Set FLTK_ABI_VERSION to 10302 (or higher)\\n"
|
"Set FLTK_ABI_VERSION to 10301 (or higher)\\n"
|
||||||
"to get this feature");
|
"to get this feature");
|
||||||
\#endif}
|
\#endif}
|
||||||
tooltip {Changes the bottom margin for the tree
|
tooltip {Changes the bottom margin for the tree
|
||||||
@@ -454,14 +454,14 @@ tree->redraw();}
|
|||||||
Fl_Value_Slider widgetmarginleft_slider {
|
Fl_Value_Slider widgetmarginleft_slider {
|
||||||
label {widgetmarginleft()}
|
label {widgetmarginleft()}
|
||||||
user_data tree
|
user_data tree
|
||||||
callback {\#if FLTK_ABI_VERSION >= 10302
|
callback {\#if FLTK_ABI_VERSION >= 10301
|
||||||
int val = (int)widgetmarginleft_slider->value();
|
int val = (int)widgetmarginleft_slider->value();
|
||||||
tree->widgetmarginleft(val);
|
tree->widgetmarginleft(val);
|
||||||
tree->redraw();
|
tree->redraw();
|
||||||
\#else
|
\#else
|
||||||
widgetmarginleft_slider->deactivate();
|
widgetmarginleft_slider->deactivate();
|
||||||
widgetmarginleft_slider->tooltip("DISABLED.\\n"
|
widgetmarginleft_slider->tooltip("DISABLED.\\n"
|
||||||
"Set FLTK_ABI_VERSION to 10302 (or higher)\\n"
|
"Set FLTK_ABI_VERSION to 10301 (or higher)\\n"
|
||||||
"to get this feature");
|
"to get this feature");
|
||||||
\#endif}
|
\#endif}
|
||||||
tooltip {Changes the margin to the left of child FLTK widget()} xywh {505 160 155 16} type Horizontal color 46 selection_color 1 labelsize 10 align 4 textsize 9
|
tooltip {Changes the margin to the left of child FLTK widget()} xywh {505 160 155 16} type Horizontal color 46 selection_color 1 labelsize 10 align 4 textsize 9
|
||||||
@@ -647,7 +647,7 @@ switch ( selectmode_chooser->value() ) {
|
|||||||
}
|
}
|
||||||
Fl_Choice reselectmode_chooser {
|
Fl_Choice reselectmode_chooser {
|
||||||
label {Item Reselect Mode}
|
label {Item Reselect Mode}
|
||||||
callback {\#if FLTK_ABI_VERSION >= 10302
|
callback {\#if FLTK_ABI_VERSION >= 10301
|
||||||
// NEW
|
// NEW
|
||||||
// Set reselection mode
|
// Set reselection mode
|
||||||
switch ( reselectmode_chooser->value() ) {
|
switch ( reselectmode_chooser->value() ) {
|
||||||
@@ -658,7 +658,7 @@ switch ( reselectmode_chooser->value() ) {
|
|||||||
// OLD
|
// OLD
|
||||||
reselectmode_chooser->deactivate(); // deactivate if this ABI feature is disabled
|
reselectmode_chooser->deactivate(); // deactivate if this ABI feature is disabled
|
||||||
reselectmode_chooser->tooltip("DISABLED.\\n"
|
reselectmode_chooser->tooltip("DISABLED.\\n"
|
||||||
"Set FLTK_ABI_VERSION to 10302 (or higher)\\n"
|
"Set FLTK_ABI_VERSION to 10301 (or higher)\\n"
|
||||||
"to get this feature");
|
"to get this feature");
|
||||||
window->redraw(); // deactivated
|
window->redraw(); // deactivated
|
||||||
\#endif}
|
\#endif}
|
||||||
@@ -727,7 +727,7 @@ tree->visible_focus(onoff);}
|
|||||||
}
|
}
|
||||||
Fl_Check_Button labelandwidget_radio {
|
Fl_Check_Button labelandwidget_radio {
|
||||||
label {Show label + widget}
|
label {Show label + widget}
|
||||||
callback {\#if FLTK_ABI_VERSION >= 10302
|
callback {\#if FLTK_ABI_VERSION >= 10301
|
||||||
// NEW
|
// NEW
|
||||||
int flags = tree->item_draw_mode();
|
int flags = tree->item_draw_mode();
|
||||||
if ( labelandwidget_radio->value() )
|
if ( labelandwidget_radio->value() )
|
||||||
@@ -740,7 +740,7 @@ tree->redraw();
|
|||||||
// OLD
|
// OLD
|
||||||
labelandwidget_radio->deactivate(); // deactivate if this ABI feature is disabled
|
labelandwidget_radio->deactivate(); // deactivate if this ABI feature is disabled
|
||||||
labelandwidget_radio->tooltip("DISABLED.\\n"
|
labelandwidget_radio->tooltip("DISABLED.\\n"
|
||||||
"Set FLTK_ABI_VERSION to 10302 (or higher)\\n"
|
"Set FLTK_ABI_VERSION to 10301 (or higher)\\n"
|
||||||
"to get this feature");
|
"to get this feature");
|
||||||
window->redraw(); // deactivated
|
window->redraw(); // deactivated
|
||||||
\#endif}
|
\#endif}
|
||||||
@@ -751,7 +751,7 @@ When enabled, widget should appear to the right of the item's label. By default,
|
|||||||
}
|
}
|
||||||
Fl_Check_Button itemheightfromwidget_radio {
|
Fl_Check_Button itemheightfromwidget_radio {
|
||||||
label {Item h() from widget}
|
label {Item h() from widget}
|
||||||
callback {\#if FLTK_ABI_VERSION >= 10302
|
callback {\#if FLTK_ABI_VERSION >= 10301
|
||||||
// NEW
|
// NEW
|
||||||
int flags = tree->item_draw_mode();
|
int flags = tree->item_draw_mode();
|
||||||
if ( itemheightfromwidget_radio->value() )
|
if ( itemheightfromwidget_radio->value() )
|
||||||
@@ -764,7 +764,7 @@ tree->redraw();
|
|||||||
// OLD
|
// OLD
|
||||||
itemheightfromwidget_radio->deactivate(); // deactivate if this ABI feature is disabled
|
itemheightfromwidget_radio->deactivate(); // deactivate if this ABI feature is disabled
|
||||||
itemheightfromwidget_radio->tooltip("DISABLED.\\n"
|
itemheightfromwidget_radio->tooltip("DISABLED.\\n"
|
||||||
"Set FLTK_ABI_VERSION to 10302 (or higher)\\n"
|
"Set FLTK_ABI_VERSION to 10301 (or higher)\\n"
|
||||||
"to get this feature");
|
"to get this feature");
|
||||||
window->redraw(); // deactivated
|
window->redraw(); // deactivated
|
||||||
\#endif}
|
\#endif}
|
||||||
@@ -1664,7 +1664,7 @@ helpwin->show();} selected
|
|||||||
}
|
}
|
||||||
code {// Initialize Tree
|
code {// Initialize Tree
|
||||||
tree->root_label("ROOT");
|
tree->root_label("ROOT");
|
||||||
\#if FLTK_ABI_VERSION >= 10302
|
\#if FLTK_ABI_VERSION >= 10301
|
||||||
tree->item_reselect_mode(FL_TREE_SELECTABLE_ALWAYS);
|
tree->item_reselect_mode(FL_TREE_SELECTABLE_ALWAYS);
|
||||||
\#endif
|
\#endif
|
||||||
RebuildTree();
|
RebuildTree();
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ class ScrollBarSizeTest : public Fl_Group {
|
|||||||
if ( strcmp(label,"A: Scroll Size") == 0 ) {
|
if ( strcmp(label,"A: Scroll Size") == 0 ) {
|
||||||
brow_a->scrollbar_size(val);
|
brow_a->scrollbar_size(val);
|
||||||
tree_a->scrollbar_size(val);
|
tree_a->scrollbar_size(val);
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
// NEW
|
// NEW
|
||||||
table_a->scrollbar_size(val);
|
table_a->scrollbar_size(val);
|
||||||
#endif
|
#endif
|
||||||
@@ -206,7 +206,7 @@ public:
|
|||||||
"Scrollbar's size should change interactively as size sliders are changed.\n"
|
"Scrollbar's size should change interactively as size sliders are changed.\n"
|
||||||
"Changing 'Global Scroll Size' should affect all three browser's scrollbars UNLESS\n"
|
"Changing 'Global Scroll Size' should affect all three browser's scrollbars UNLESS\n"
|
||||||
"the 'A: Scroll Size' slider is changed, in which case its value will take precedence\n"
|
"the 'A: Scroll Size' slider is changed, in which case its value will take precedence\n"
|
||||||
#if FLTK_ABI_VERSION >= 10302
|
#if FLTK_ABI_VERSION >= 10301
|
||||||
"for the 'A' group of widgets.");
|
"for the 'A' group of widgets.");
|
||||||
#else
|
#else
|
||||||
"for the 'A' group of widgets. (NOTE: 'table_a' does not currently support this)");
|
"for the 'A' group of widgets. (NOTE: 'table_a' does not currently support this)");
|
||||||
|
|||||||
Reference in New Issue
Block a user