wex v24.10.0
|
Offers a process, capturing execution output. More...
#include <wex/vcs/process.h>
Public Member Functions | |
process () | |
Default constructor. | |
virtual void | show_output (const std::string &caption=std::string()) const |
Shows stdout or stderr from system on the shell component. | |
bool | async_system (const process_data &data) override |
Override methods. | |
int | system (const process_data &data) override |
See factory::process. | |
bool | write (const std::string &text) override |
Writes text to stdin of process. | |
auto * | get_frame () |
Returns the frame. | |
Public Member Functions inherited from wex::factory::process | |
process () | |
Default constructor. | |
virtual | ~process () |
Destructor, stops running process. | |
void | async_sleep_for (const std::chrono::milliseconds &ms) |
Sleeps for some milliseconds time. | |
const process_data & | data () const |
Returns last or current data used by async_system or system. | |
bool | is_debug () const |
Is this a debug process. | |
bool | is_running () const |
Is this process running. | |
void | set_handler_dbg (wxEvtHandler *eh) |
Sets debug event handler. | |
void | set_handler_out (wxEvtHandler *eh) |
Sets out event handler. | |
const auto & | std_err () const |
Returns the stderr. | |
const auto & | std_out () const |
Returns the stdout. | |
Static Public Member Functions | |
static int | config_dialog (const data::window &data=data::window()) |
Shows a config dialog, allowing you to set the command and folder. | |
static auto * | get_shell () |
Returns the shell component (might be nullptr if prepare_output is not yet invoked). | |
static shell * | prepare_output (wxWindow *parent) |
Construct the shell component, and returns it. | |
Offers a process, capturing execution output.
|
overridevirtual |
Override methods.
See factory::process. Return value is false if process could not execute, or if config dialog was invoked and cancelled, or prepare_output not yet invoked.
Reimplemented from wex::factory::process.
|
static |
Shows a config dialog, allowing you to set the command and folder.
Returns dialog return code.
|
virtual |
Shows stdout or stderr from system on the shell component.
You can override this method to e.g. prepare a lexer on get_shell before calling this base method.
Reimplemented in wex::vcs_entry.
|
overridevirtual |
Writes text to stdin of process.
The response stdout is collected in the shell.
Reimplemented from wex::factory::process.