Update NTK.
[nondaw.git] / FL / Fl_Text_Edit_Window.fl
blob68c8ad24b4a1800f951738c6aa0f2214b0b226cd
1 # data file for the Fltk User Interface Designer (fluid)
2 version 1.0108 
3 header_name {.H} 
4 code_name {.C}
5 decl {\#include <string.h>} {} 
7 widget_class Fl_Text_Edit_Window {open selected
8   xywh {375 272 355 410} type Double resizable
9   code0 {this->size_range( 0, 0, 400, 400 );}
10   class Fl_Window modal visible
11 } {
12   Fl_Box title_box {
13     label {<title>}
14     xywh {5 7 345 45}
15   }
16   Fl_Text_Editor text_editor {
17     xywh {5 58 345 320} resizable
18     code0 {o->buffer( new Fl_Text_Buffer );}
19   }
20   Fl_Group {} {open
21     xywh {5 383 345 27}
22   } {
23     Fl_Return_Button return_button {
24       label {<return>}
25       callback {hide();}
26       xywh {250 383 100 25}
27     }
28     Fl_Box {} {
29       label {<empty>}
30       xywh {5 386 240 19} resizable
31       code0 {o->labeltype( FL_NO_LABEL );}
32     }
33   }
34
36 Function {fl_text_edit( const char *title, const char *button_text, const char *initial_text )} {open C return_type {char *}
37 } {
38   code {Fl_Text_Edit_Window tew( 355, 410, title );
40 tew.return_button->label( button_text );
41 tew.title_box->label( title );
42 tew.text_editor->buffer()->text( initial_text );
44 tew.show();
46 while ( tew.shown() )
47         Fl::wait();
48         
49 return strdup( tew.text_editor->buffer()->text() );} {}
50