X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdropdown.cpp;h=e9634f5e676f781675c646c9e0d4f3a65a9841c5;hb=2bdaf4955fdb94e73704adcdcf0adc2b353f0ff0;hp=bcd501950a08aee01f584c925725717c5b83223b;hpb=1c5148b7b63e1ba84073355702972caf6fe83b7e;p=libs%2Fgltk.git diff --git a/source/dropdown.cpp b/source/dropdown.cpp index bcd5019..e9634f5 100644 --- a/source/dropdown.cpp +++ b/source/dropdown.cpp @@ -1,7 +1,7 @@ /* $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 */ @@ -69,6 +69,17 @@ int Dropdown::get_selected_index() const 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) @@ -89,17 +100,6 @@ void Dropdown::button_press(int x, int y, unsigned btn) } } -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();