PageRenderTime 22ms CodeModel.GetById 18ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/src/ui/TextBuffer.hx

http://github.com/blackdog66/bdog-gtk
Haxe | 25 lines | 18 code | 7 blank | 0 comment | 0 complexity | 17ae25605fd2f6ce26d11344a8c2d859 MD5 | raw file
 1
 2package ui;
 3
 4import gtk.Model;
 5import gtk.Gtk;
 6import gtk.Glade;
 7
 8class TextBuffer extends Widget {
 9
10  public static function New(fn:TextBuffer->Void) {
11    Gtk.textBufferNew(null,function(tb) {
12        trace("Got new text buffer "+tb);
13        fn(new TextBuffer(tb));
14      });
15  }
16  
17  public function new(id:String) {
18    super(id);
19  }
20  
21  public function setText(s:String) {
22    Gtk.textBufferSetText(id,s,s.length);
23  }
24  
25}