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

details_progress_listbox Class Reference

A list box used in the progress_dialog. More...

#include <details_progress_listbox.h>

Inheritance diagram for details_progress_listbox:

wxListBox List of all members.

Public Methods

  details_progress_listbox (wxWindow *parent, wxWindowID id=-1, const wxString &log_filename=wxEmptyString, const wxString &log_path=wxEmptyString, long scroll_history=optionDETAILS_PROGRESS_LISTBOX_RECOMMENDED_SCROLL_HISTORY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, int n=0, const wxString choices[]=NULL, long style=wxLB_EXTENDED|wxLB_HSCROLL|wxLB_ALWAYS_SB, const wxValidator &validator=wxDefaultValidator, const wxString &name="a_details_progress_listbox")
  Constructor.

  details_progress_listbox ()
  ~details_progress_listbox ()
  Destructor.

void  append_using_scroll_history (const wxString &item)
  Append() but wil scroll off the top line if past the max scroll history.

bool  export_to_file ()
  Handles the exporation of the listbox contents to a user specified file.


Protected Methods

void  popup_menu (wxMouseEvent &event)
  Pops up a menu.

void  on_copy_menu_event (wxCommandEvent &event)
  Code to execute when user selects 'Copy' from the context-sensitive menu.

void  on_clear_menu_event (wxCommandEvent &event)
  Code to execute when user selects 'Clear' from the context-sensitive menu.

void  on_select_all_menu_event (wxCommandEvent &event)
  Code to execute when user selects 'Select All' from the context-sensitive menu.


Protected Attributes

wxWindow *  m_parent
  Parent window.

wxArrayInt  m_selected_row_numbers_array
  An array of selected rows to copy (so don't have to look it up twice).

wxString  m_log_filename
  Passed default filename of the log file when user wants to export.

wxString  m_log_path
  Passed default path of the log file when user wants to export.

long  m_scroll_history
  Store the scroll history (number of lines that can be in the listbox at once).


Detailed Description

A list box used in the progress_dialog.

It can take data recieved from piped_process and display it inside the listbox.


Constructor & Destructor Documentation

details_progress_listbox::details_progress_listbox wxWindow *    parent,
wxWindowID    id = -1,
const wxString &    log_filename = wxEmptyString,
const wxString &    log_path = wxEmptyString,
long    scroll_history = optionDETAILS_PROGRESS_LISTBOX_RECOMMENDED_SCROLL_HISTORY,
const wxPoint &    pos = wxDefaultPosition,
const wxSize &    size = wxDefaultSize,
int    n = 0,
const wxString    choices[] = NULL,
long    style = wxLB_EXTENDED|wxLB_HSCROLL|wxLB_ALWAYS_SB,
const wxValidator &    validator = wxDefaultValidator,
const wxString &    name = "a_details_progress_listbox"
 

Constructor.

Parameters:
parent  The parent window. May be NULL.
id  The id of the details_progress_listbox. Will usually be -1 unless multiple of them on the same dialog.
log_filename  Filename of the process logfile. A plkrFILE_FRIENDLY_DATETIME_STAMP in the string will replace with a file-friendly datetime string. If using DATETIMESTAMP, recommended to keep the rest of name below 11 characters total if need Macintosh 31-character limit requirement.
log_path  Default path of the logfile in dialog. Default of wxEmptyString means the current directory.
scroll_history  Number of lines to keep in the listbox at one time. After this, newly appended lines will remove the topmost line. Can be a number, or can use one of the options* to get a recommended for OS or an infinite one.
pos  The pixel position of the listbox on its parent window
size  The pixel size of the listbox
n  Number of strings to initialize in the control
choices  An array of strings to initialize the control
style  Style of the listbox. See wxWindows wxListBox docs for details.
validator  Window validor. See wxWindows docs for details.
name  Windows name (rarely used).

Member Function Documentation

void details_progress_listbox::append_using_scroll_history const wxString &    item
 

Append() but wil scroll off the top line if past the max scroll history.

Parameters:
item  The [text] item to append.
bool details_progress_listbox::export_to_file  
 

Handles the exporation of the listbox contents to a user specified file.

This is called when user clicks the 'Export to File' button on the side of the progress_dialog .

Returns :
TRUE if operation was successful.