The new name better represents its actual function.
return true;
}
-void Dropdown::on_geometry_change()
+void Dropdown::on_size_change()
{
if(dropped)
resize_list();
virtual void button_press(int, int, unsigned);
virtual bool navigate(Navigation);
private:
- virtual void on_geometry_change();
+ virtual void on_size_change();
virtual void on_style_change();
void open_list();
rebuild();
}
-void Entry::on_geometry_change()
+void Entry::on_size_change()
{
if(multiline)
check_view_range();
virtual bool navigate(Navigation);
virtual void animate(const Time::TimeDelta &);
private:
- virtual void on_geometry_change();
+ virtual void on_size_change();
virtual void on_style_change();
void move_edit_position(Navigation, bool);
drag(x);
}
-void HSlider::on_geometry_change()
+void HSlider::on_size_change()
{
drag_area_size = geom.w-total_margin;
}
total_margin = margin.left+margin.right;
}
- on_geometry_change();
+ on_size_change();
}
} // namespace GLtk
virtual void button_release(int, int, unsigned);
virtual void pointer_motion(int, int);
private:
- virtual void on_geometry_change();
+ virtual void on_size_change();
virtual void on_style_change();
};
return 0;
}
-void Panel::on_geometry_change()
+void Panel::on_size_change()
{
if(layout)
layout->update();
Widget *find_next_child(int, int, int, int, int) const;
static int compute_delta(int, int, int, int, int);
- virtual void on_geometry_change();
+ virtual void on_size_change();
virtual void on_child_added(Widget &);
virtual void on_child_removed(Widget &);
};
camera.set_orthographic(geom.w, geom.h);
}
-void Root::on_geometry_change()
+void Root::on_size_change()
{
- Panel::on_geometry_change();
+ Panel::on_size_change();
update_camera();
}
void get_touch(unsigned, int &, int &);
void update_camera();
- virtual void on_geometry_change();
+ virtual void on_size_change();
virtual void on_child_added(Widget &);
};
drag(y);
}
-void VSlider::on_geometry_change()
+void VSlider::on_size_change()
{
drag_area_size = geom.h-total_margin;
}
total_margin = margin.bottom+margin.top;
}
- on_geometry_change();
+ on_size_change();
}
} // namespace GLtk
virtual void button_release(int, int, unsigned);
virtual void pointer_motion(int, int);
private:
- virtual void on_geometry_change();
+ virtual void on_size_change();
virtual void on_style_change();
};
geom = g;
if(size_changed)
{
- // TODO maybe rename this to on_size_change
- on_geometry_change();
+ on_size_change();
rebuild();
}
}
virtual bool navigate(Navigation) { return false; }
virtual void animate(const Time::TimeDelta &) { }
protected:
- virtual void on_geometry_change() { }
+ virtual void on_size_change() { on_geometry_change(); }
virtual void on_style_change() { }
virtual void on_reparent() { }
+
+ // Deprecated
+ virtual void on_geometry_change() { }
};
} // namespace GLtk