/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
- package ui;
- import gtk.Model;
- import gtk.Gtk;
- import gtk.Glade;
- class TextBuffer extends Widget {
- public static function New(fn:TextBuffer->Void) {
- Gtk.textBufferNew(null,function(tb) {
- trace("Got new text buffer "+tb);
- fn(new TextBuffer(tb));
- });
- }
-
- public function new(id:String) {
- super(id);
- }
-
- public function setText(s:String) {
- Gtk.textBufferSetText(id,s,s.length);
- }
-
- }