-void List::button_press(int x, int y, unsigned btn)
-{
- if(slider->get_geometry().is_inside(x, y))
- {
- const Geometry &sgeom=slider->get_geometry();
- slider->button_press(x-sgeom.x, y-sgeom.y, btn);
- slider_active=true;
- }
- else if(btn==1)
- {
- const GL::Font *const font=style->get_font();
- const unsigned row_height=static_cast<unsigned>((font->get_ascent()-font->get_descent())*font->get_default_size());
-
- if(items_part)
- y+=items_part->get_margin().top;
-
- unsigned i=(geom.h-1-y)/row_height;
- if(i<n_visible && first+i<items.size())
- {
- sel_index=first+i;
-
- signal_item_selected.emit(sel_index, items[sel_index]);
- }
- }
-}
-
-void List::button_release(int x, int y, unsigned btn)
-{
- if(slider_active)
- {
- const Geometry &sgeom=slider->get_geometry();
- slider->button_release(x-sgeom.x, y-sgeom.y, btn);
- slider_active=false;
- }
-}
-
-void List::pointer_motion(int x, int y)
-{
- if(slider_active)
- {
- const Geometry &sgeom=slider->get_geometry();
- slider->pointer_motion(x-sgeom.x, y-sgeom.y);
- }
-}
-