Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

build_progress_dialog Class Reference

A process dialog customized for plucker-build processes. More...

#include <build_progress_dialog.h>

Inheritance diagram for build_progress_dialog:

process_progress_dialog details_progress_dialog wxDialog List of all members.

Public Methods

  build_progress_dialog (wxWindow *parent, const wxArrayString &channel_sections_array, const wxArrayString &commandline_array, long stream_kind=optionPROCESS_PROGRESS_DIALOG_STDOUT_STREAM_KIND|optionPROCESS_PROGRESS_DIALOG_STDERR_STREAM_KIND, wxSignal kill_signal=wxSIGKILL, bool automatically_close_when_done=TRUE, const wxString &show_hide_listbox_configuration_key=wxEmptyString, const wxString &log_filename=wxEmptyString, long force_commandline_autoclose=0, const wxString &log_path=wxEmptyString, long scroll_history=optionDETAILS_PROGRESS_LISTBOX_RECOMMENDED_SCROLL_HISTORY)
  Constructor.

virtual  ~build_progress_dialog ()
  Destructor.

virtual bool  on_before_execute_commandline_array ()
  Virtual: optional action to do before starting execution of the commandline array.

virtual bool  on_before_execute_commandline_array_item (size_t commandline_array_index)
  Virtual: optional action to do before start execution of a commandline in array.

virtual bool  on_after_commandline_array_item_execution_finished (size_t commandline_array_index)
  Virtual: optional action to do after a commandline in the array has terminated.

virtual bool  on_after_commandline_array_executions_finished ()
  Virtual: optional action to de after all commands's processes have terminated.

void  on_process_generated_an_output_line (long stream_kind, const wxString &line_text, size_t commandline_array_index)
  The vital function to override: actions to do when process made a line of output.

void  action_to_do_after_dialog_finishes_closing ()
  Clean up any actions after the dialog EndModal()s. Called from on_close().

void  custom_kill (long pid, wxSignal sig, wxKillError *krc)
  An optional custom kill for the process instead of a stock wxKill().


Detailed Description

A process dialog customized for plucker-build processes.

Manages plucker-build processes, updating progress guages and statictext according to the output lines, sets the updated time of a channel when it completes, installs all of the channels when successfully execute all processes. For verbosity=0 channels it sets the stream_kind to none, so that program won't freeze--for all others, it sets the stream_kind to stderr.

Since derived from derived from process_progress_dialog, see that class for a description of the virtual functions and parameters.


Constructor & Destructor Documentation

build_progress_dialog::build_progress_dialog wxWindow *    parent,
const wxArrayString &    channel_sections_array,
const wxArrayString &    commandline_array,
long    stream_kind = optionPROCESS_PROGRESS_DIALOG_STDOUT_STREAM_KIND|optionPROCESS_PROGRESS_DIALOG_STDERR_STREAM_KIND,
wxSignal    kill_signal = wxSIGKILL,
bool    automatically_close_when_done = TRUE,
const wxString &    show_hide_listbox_configuration_key = wxEmptyString,
const wxString &    log_filename = wxEmptyString,
long    force_commandline_autoclose = 0,
const wxString &    log_path = wxEmptyString,
long    scroll_history = optionDETAILS_PROGRESS_LISTBOX_RECOMMENDED_SCROLL_HISTORY
 

Constructor.

Parameters:
channel_sections_array  Array of channel sections
See also:
process_progress_dialog::process_progress_dialog() for rest.

Member Function Documentation

void build_progress_dialog::action_to_do_after_dialog_finishes_closing   [virtual]
 

Clean up any actions after the dialog EndModal()s. Called from on_close().

Needed for MSW to drop in something to terminate program if this is the only window, as otherwise app doesn't seem to quit

Reimplemented from process_progress_dialog.

void build_progress_dialog::custom_kill long    pid,
wxSignal    sig,
wxKillError *    krc
[virtual]
 

An optional custom kill for the process instead of a stock wxKill().

See wxKill() for parameter list

Reimplemented from process_progress_dialog.

virtual bool build_progress_dialog::on_after_commandline_array_executions_finished   [virtual]
 

Virtual: optional action to de after all commands's processes have terminated.

Returns :
TRUE if there was no error.

Reimplemented from process_progress_dialog.

virtual bool build_progress_dialog::on_after_commandline_array_item_execution_finished size_t    commandline_array_index [virtual]
 

Virtual: optional action to do after a commandline in the array has terminated.

Parameters:
commandline_array_index  The index of the commandline_array.
Returns :
TRUE if there was no error.

Reimplemented from process_progress_dialog.

virtual bool build_progress_dialog::on_before_execute_commandline_array   [virtual]
 

Virtual: optional action to do before starting execution of the commandline array.

Returns :
TRUE if there was no error.

Reimplemented from process_progress_dialog.

virtual bool build_progress_dialog::on_before_execute_commandline_array_item size_t    commandline_array_index [virtual]
 

Virtual: optional action to do before start execution of a commandline in array.

Parameters:
commandline_array_index  The index of the commandline_array.
Returns :
TRUE if there was no error.

Reimplemented from process_progress_dialog.

void build_progress_dialog::on_process_generated_an_output_line long    stream_kind,
const wxString &    line_text,
size_t    commandline_array_index
[virtual]
 

The vital function to override: actions to do when process made a line of output.

Most likely you are going to want to parse the added line and based on what the line said, append_line_to_listbox() (or not), set_gauge(), or set_statictext() or maybe throw up a message box or something else.

The Default is to just call_append_line_to_listbox() and then keep going, but you'll probably want to override with what you want it to do.

Parameters:
stream_kind  the kind of stream that was added. Either optionPROCESS_PROGRESS_DIALOG_STDOUT_STREAM_KIND (stdout) or optionPROCESS_PROGRESS_DIALOG_STDERR_STREAM_KIND (stderr). This allows you to do one thing for an line from one kind of stream, and another for another kind of stream.
line_text  The output string line from that stream.
commandline_array_index  Index of the command array that generated this line, (in case you want to handle them differently).

Reimplemented from process_progress_dialog.