Added new method Fl_Tree_Item::event_on_item()
This commit is contained in:
parent
3340b33bf1
commit
62e39e5559
@ -452,6 +452,7 @@ public:
|
||||
//////////////////
|
||||
const Fl_Tree_Item* find_clicked(const Fl_Tree_Prefs &prefs, int yonly=0) const;
|
||||
Fl_Tree_Item* find_clicked(const Fl_Tree_Prefs &prefs, int yonly=0);
|
||||
int event_on_item(const Fl_Tree_Prefs &prefs) const;
|
||||
int event_on_collapse_icon(const Fl_Tree_Prefs &prefs) const;
|
||||
int event_on_user_icon(const Fl_Tree_Prefs &prefs) const;
|
||||
int event_on_label(const Fl_Tree_Prefs &prefs) const;
|
||||
|
@ -1218,8 +1218,12 @@ int Fl_Tree_Item::event_on_user_icon(const Fl_Tree_Prefs &prefs) const {
|
||||
return 1; // must be inside usericon by elimination
|
||||
}
|
||||
|
||||
/// Was event anywhere on the item?
|
||||
int Fl_Tree_Item::event_on_item(const Fl_Tree_Prefs &prefs) const {
|
||||
return(event_inside(_xywh) ? 1 : 0);
|
||||
}
|
||||
|
||||
/// Was event on the label() of this item?
|
||||
///
|
||||
int Fl_Tree_Item::event_on_label(const Fl_Tree_Prefs &prefs) const {
|
||||
if ( is_visible() && is_active() ) {
|
||||
return(event_inside(_label_xywh) ? 1 : 0);
|
||||
|
Loading…
Reference in New Issue
Block a user