/src/ui/Label.hx

http://github.com/blackdog66/bdog-gtk · Haxe · 24 lines · 18 code · 6 blank · 0 comment · 0 complexity · 3f089cc92c47d157361a085b3b26aa76 MD5 · raw file

  1. package ui;
  2. import gtk.Model;
  3. import gtk.Gtk;
  4. import gtk.Glade;
  5. class Label extends Widget {
  6. public function new(id:String) {
  7. super(id);
  8. }
  9. public static function
  10. fromGlade(glade:GladeXml,name:String,fn:Label->Void) {
  11. Ui.getGladeWidget(glade,name,function(w) {
  12. fn(new Label(w));
  13. });
  14. }
  15. public function label(s:String) {
  16. Gtk.labelSetText(id,s);
  17. }
  18. }