1 #ifndef QEMU_GUI_CONSOLE_H
2 #define QEMU_GUI_CONSOLE_H
4 #include <wx/textctrl.h>
18 class ConsolePanel
: public wxPanel
{
21 * Creates a new ConsolePanel.
23 * @param parent The wxWindow parent.
25 ConsolePanel(wxWindow
*parent
, QemuVM
*vm
);
28 * Destructs this ConsolePanel.
33 * Gets called if new input is entered, if the return value
34 * evaluates to true then the input box is cleared otherwhise
37 bool Notify(const wxString
&);
40 * Set the process whose output should be captured
42 void SetProcess(PipedProcess
*process
);
45 * Enable/Disables the input box
51 * Text control which displays the console output
56 * Text control which takes the input
61 * Sizer to control the size of the widgets
66 MonitorSocket
*socket
;
68 PipedProcess
*process
;
74 * adds the text to the console when the user has pressed
75 * enter and sends it to the associated process
77 void AppendConsoleInput(const wxString
&);
79 * displays whatever the captured process sends to its
82 void AppendConsoleOutput(const wxString
&);
83 void AppendConsoleError(const wxString
&);
85 * event handlers which are connected to the piped process
87 void HandleConsoleInput(wxCommandEvent
&);
88 void HandleConsoleOutput(wxCommandEvent
&);
89 void HandleProcessCreation(wxCommandEvent
&);
90 void HandleProcessTermination(wxCommandEvent
&);
95 class InputTextCtrl
: public wxTextCtrl
98 InputTextCtrl(ConsolePanel
*parent
);
99 void OnKeyDown(wxKeyEvent
& event
);
101 DECLARE_EVENT_TABLE()