#include #include #include #include #include "wincomp.h" #include "textcomp.h" /** Test the TextArea component for debugging without having to * run from Java. */ main(int argc,char **argv) { Keyboard kbd(stdin); bmsApp app(64); Toolkit tk(-1); Dialog dlg(0); TextArea ta; tk.addComponent(&dlg,1); tk.addComponent(&ta,2); ta.setEditable(true); dlg.add(&ta); dlg.reshape(20,6,40,12); ta.reshape(1,1,38,10); ta.show(true); dlg.show(true); if (argc > 1) { BufFile bf(argv[1]); int n = bf.size(); for (int i = 0; i < n; ++i) { ta.append(bf[i]); ta.append('\n'); } } app.setfocus(&dlg); app.run(); return 0; }