> Could someone kindly point me into the right direction or
> give an simple example of this kinda idea of multiple lines
> of input click send then display to a output which could be
> stacked up?
Not quite sure if this is what you want, but here's a simple fluid file
that might get you started...
Save this a something.fl, then generate the .cxx/.h files with
fluid -c something.fl
Then build the test with fltk-config
fltk-config --compile something.cxx
-------------
# data file for the Fltk User Interface Designer (fluid)
version 1.0110
header_name {.h}
code_name {.cxx}
Function {} {open
} {
Fl_Window main_win {
label {Text Buffer Demo} open
xywh {496 252 665 538} type Double visible
} {
Fl_Input txt_in {
label {input:}
xywh {25 25 620 194} type Multiline align 5
}
Fl_Browser txt_out {
label output
xywh {30 290 620 230} type Multi align 5
}
Fl_Button {} {
label quit
callback {main_win->hide();}
xywh {25 226 66 28}
}
Fl_Button up_bt {
label Update
callback {char line[128];
char *in = (char*)txt_in->value();
int idx = 0;
while(*in){
if((*in == '\\n') || (*in == '\\r')) {
line[idx] = 0;
txt_out->add(line);
idx = 0;
in++;
}
else {
line[idx++] = *in++;
}
}
line[idx] = 0;
txt_out->add(line);
txt_in->value(0); // clear the input
// put the focus back...
Fl::focus(txt_in);
// done...} selected
xywh {580 227 66 28}
}
}
}
-------------
SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14
3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk