text widget question.

Hello All, Need some text widget advice.

I writing a GUI and would like to include a 'command line window' - A
terminal-like interface to take keyboard input and provide text output
(log style output).

Looking for a simpler text widget that GtkText.

I am currently using a GtkText for output and an GtkEntry for input. And
this almost works, but getting the focus into the Entry is a pain. I would
like it to be a single window. N-1 lines for a scrolling log, and the last
line for keyboard input. And I will add line editing, and history (like

Some question:

1. Easy solution: Can take GtkText input (key_press_event), and just
send these keys to the GtkEntry (as if the user typed them)?

2.Is there a better widget to used. I like to used it in a curses-like fashion ie:

  wmove(wn,11,11); wprintw(wn, "%-3d", spl->pr.numarray);
  wmove(wn,12,11); wprintw(wn, "%-3d", spl->pr.ndr);
  wmove(wn,13,11); wprintw(wn, "%d", spl->pr.cbmode);

With color too. ( I know about drawing_areas, but I would like
the window to support the X mouse copy function (Right mouse key)).

3. Or can I just fork a color-tty task in a GTK window, that act like an
embedded color terminal window. Then I can take my old curses-program have
it part of my GUI.

Would appreciate any advice & thanks,


| Tony Denault                        | Internet: denault irtf ifa hawaii edu |
| NASA IRTF, Institute of Astronomy   |                 Phone: (808) 974-4206 |
| 1175 Manono St., Bldg 393           |                   Fax: (808) 974-4207 |
| Hilo, Hawaii 96720                  |                                       |

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]