/* $Id$
This file is part of libmspgltk
-Copyright © 2007-2009 Mikko Rasa, Mikkosoft Productions
+Copyright © 2007-2011 Mikko Rasa, Mikkosoft Productions
Distributed under the LGPL
*/
return list.get_selected_index();
}
+void Dropdown::render_special(const Part &part) const
+{
+ if(part.get_name()=="text")
+ {
+ if(list.get_selected_index()>=0)
+ Text(*style, list.get_selected()).render(part, geom);
+ }
+ else if(part.get_name()=="list" && dropped)
+ list.render();
+}
+
void Dropdown::button_press(int x, int y, unsigned btn)
{
if(dropped)
}
}
-void Dropdown::render_special(const Part &part) const
-{
- if(part.get_name()=="text")
- {
- if(list.get_selected_index()>=0)
- Text(*style, list.get_selected()).render(part, geom);
- }
- else if(part.get_name()=="list" && dropped)
- list.render();
-}
-
void Dropdown::on_geometry_change()
{
resize_list();
void Dropdown::Loader::item(const string &str)
{
- dynamic_cast<Dropdown &>(wdg).append(str);
+ dynamic_cast<Dropdown &>(obj).append(str);
}
} // namespace GLtk