PageRenderTime 23ms CodeModel.GetById 17ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/src/ui/Text.hx

http://github.com/blackdog66/bdog-gtk
Haxe | 28 lines | 21 code | 7 blank | 0 comment | 0 complexity | 99438e5a9091654d933f7caa6b3dd650 MD5 | raw file
 1
 2package ui;
 3
 4import gtk.Model;
 5import gtk.Gtk;
 6import gtk.Glade;
 7
 8class Text extends Widget {
 9
10  public function new(id:String) {
11    super(id);
12  }
13    
14  public static function
15  fromGlade(glade:GladeXml,name:String,fn:Text->Void) {
16    Ui.getGladeWidget(glade,name,function(w) {
17        fn(new Text(w));
18      });
19  }
20  
21  public function set(s:String) {
22    Gtk.entrySetText(id,s);
23  }
24
25  public function get(fn:String->Void) {
26    Gtk.entryGetText(id,fn);
27  }
28}