Added is_visible_r() for consistency w/is_visible()
This commit is contained in:
parent
741d58757b
commit
f950b93e9c
@ -392,7 +392,16 @@ public:
|
|||||||
int is_visible() const {
|
int is_visible() const {
|
||||||
return(is_flag(VISIBLE));
|
return(is_flag(VISIBLE));
|
||||||
}
|
}
|
||||||
int visible_r() const;
|
/// See if item and all its parents are open() and visible().
|
||||||
|
/// Alias for is_visible_r().
|
||||||
|
/// \returns
|
||||||
|
/// 1 -- item and its parents are open() and visible()
|
||||||
|
/// 0 -- item (or one of its parents) are not visible or close()ed.
|
||||||
|
///
|
||||||
|
int visible_r() const {
|
||||||
|
return(is_visible_r());
|
||||||
|
}
|
||||||
|
int is_visible_r() const;
|
||||||
|
|
||||||
/// Set the item's user icon to an Fl_Image. Use '0' to disable.
|
/// Set the item's user icon to an Fl_Image. Use '0' to disable.
|
||||||
/// No internal copy is made, caller must manage icon's memory.
|
/// No internal copy is made, caller must manage icon's memory.
|
||||||
|
@ -1433,9 +1433,9 @@ Fl_Tree_Item *Fl_Tree_Item::prev_displayed(Fl_Tree_Prefs &prefs) {
|
|||||||
/// See if item and all its parents are open() and visible().
|
/// See if item and all its parents are open() and visible().
|
||||||
/// \returns
|
/// \returns
|
||||||
/// 1 -- item and its parents are open() and visible()
|
/// 1 -- item and its parents are open() and visible()
|
||||||
/// 0 -- item (or one of its parents) are invisible or close()ed.
|
/// 0 -- item or one of its parents are either not visible() or close()ed.
|
||||||
///
|
///
|
||||||
int Fl_Tree_Item::visible_r() const {
|
int Fl_Tree_Item::is_visible_r() const {
|
||||||
if ( !visible() ) return(0);
|
if ( !visible() ) return(0);
|
||||||
for (const Fl_Tree_Item *p=parent(); p; p=p->parent())// move up through parents
|
for (const Fl_Tree_Item *p=parent(); p; p=p->parent())// move up through parents
|
||||||
if (!p->visible() || p->is_close()) return(0); // any parent not visible or closed?
|
if (!p->visible() || p->is_close()) return(0); // any parent not visible or closed?
|
||||||
|
Loading…
Reference in New Issue
Block a user