This is very similar, but not quite identical, to the question I answered here: You can create a GtkTextTag
that makes its contents uneditable, and apply it from the beginning of the buffer up to and including the "> "
prompt.
Then when you receive input, append your output to the buffer and then append a new prompt on the next line, and re-apply the tag to make the whole thing uneditable.
The links in the linked answer show some C code where this is done, even including a prompt. It's not Gtkmm or C++, but it should serve as an illustration.