]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/dropdown.cpp
Rearrange members
[libs/gltk.git] / source / dropdown.cpp
index bcd501950a08aee01f584c925725717c5b83223b..e9634f5e676f781675c646c9e0d4f3a65a9841c5 100644 (file)
@@ -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();