return result;
}
-Widget *Container::get_child_at(int x, int y)
+Widget *Container::get_child_at(int x, int y) const
{
- for(list<Child *>::iterator i=children.end(); i!=children.begin();)
+ for(list<Child *>::const_iterator i=children.end(); i!=children.begin();)
if((*--i)->widget->is_visible() && (*i)->widget->get_geometry().is_inside(x, y))
return (*i)->widget;
return 0;
}
-Widget *Container::get_descendant_at(int x, int y)
+Widget *Container::get_descendant_at(int x, int y) const
{
Widget *wdg = get_child_at(x, y);
if(Container *cont = dynamic_cast<Container *>(wdg))
}
}
-Widget *Container::get_pointer_target(int x, int y)
+Widget *Container::get_pointer_target(int x, int y) const
{
if(pointer_grabbed)
return pointer_focus;
void reposition_child(Widget &, const Part &) const;
public:
std::list<Widget *> get_children() const;
- Widget *get_child_at(int, int);
- Widget *get_descendant_at(int, int);
+ Widget *get_child_at(int, int) const;
+ Widget *get_descendant_at(int, int) const;
void raise(Widget &);
protected:
virtual void button_release(int, int, unsigned);
virtual void pointer_motion(int, int);
private:
- Widget *get_pointer_target(int, int);
+ Widget *get_pointer_target(int, int) const;
public:
virtual void pointer_leave();
virtual void key_press(unsigned, unsigned);