ToolMap
Loading...
Searching...
No Matches
ListGenReportWithStatus Class Reference

Enhance the ListGenReportWithDialog for supporting status bar. More...

#include <listgenreport_status.h>

Inheritance diagram for ListGenReportWithStatus:
ListGenReportWithDialog ListGenReport ObjectDefinitionList ProjectDefList

Public Member Functions

 ListGenReportWithStatus (wxWindow *parent, wxWindowID id, wxArrayString *pColsName, wxArrayInt *pColsSize=nullptr, wxSize size=wxDefaultSize)
 Constructor.
 
void SetStatusBar (wxStatusBar *status)
 Set the status bar.
 
wxStatusBar * GetStatusBar ()
 
void SetTextFields (const wxString &field1=wxEmptyString, const wxString &field2=wxEmptyString)
 Set the fields messages.
 
bool UpdateStatus (int iField=STATUS_FIELD_ITEM_BOTH)
 Update the status bar text.
 
virtual void AddItem ()
 Re-implement the AddItem.
 
virtual void DeleteItem ()
 Re-implement the DeleteItem.
 
- Public Member Functions inherited from ListGenReportWithDialog
 ListGenReportWithDialog (wxWindow *parent, wxWindowID id, wxSize size=wxDefaultSize)
 
 ListGenReportWithDialog (wxWindow *parent, wxWindowID id, wxArrayString *pColsName, wxArrayInt *pColsSize=nullptr, wxSize size=wxDefaultSize, long style=wxLC_REPORT)
 
virtual int ImportParsedFileToListCtrl (const wxString &filename, const int &FilterIndex)
 Import file data to list.
 
void SetDialog (wxDialog *pDialog)
 
void EditItem ()
 
- Public Member Functions inherited from ListGenReport
void SortListItem (int x_col, int low, int high, int typecol, bool bAscending=TRUE)
 Sort columns.
 
void SwapRow (int x_row1, int x_row2)
 Swap two items value.
 
virtual int Compare (int iColumnCompareType, const wxString &x_strValue1, const wxString &x_strValue2, bool bAscending)
 Compare two values for sorting data.
 
 ListGenReport (wxWindow *parent, wxWindowID id, wxSize size=wxDefaultSize)
 Constructor for derived class.
 
 ListGenReport (wxWindow *parent, wxWindowID id, wxArrayString *pColsName, wxArrayInt *pColsSize=nullptr, wxSize size=wxDefaultSize, long style=wxLC_REPORT)
 Constructor.
 
 ~ListGenReport ()
 Desctructor.
 
void AddItemToList (wxString myValue, int iPosition=-1)
 Add an item to the list.
 
wxString GetItemColText (int iItem, int iCol)
 Get the text of a specified column for a specified item.
 
bool SetItemText (int iItem, int iCol, wxString text)
 Set the text of a specified column for a specified item.
 
long GetSelectedItem ()
 Get the first item selected.
 
void SetSelectedItem (long index)
 
int GetAllSelectedItem (wxArrayLong &results)
 Get all selected item.
 
void MoveItem (int iItem, int iNewPos=0)
 Move item in the list.
 
bool DataToList (ListGenDialog *pdialog, wxArrayString &myValues)
 Change list values using a ListGenDialog.
 
bool DeleteSelectedItem ()
 Delete the selected item.
 
virtual int GetAllDataAsStringArray (wxArrayString &myStringArray, long index)
 Get all data from a row into an array of string.
 
bool ItemExist (long index)
 Check for an item existence.
 
virtual bool EditDataToList (const wxArrayString &myValue, int index=-1)
 Fill list using a string array.
 
int ExportListParsedToFile (const wxString &filename, const int &FilterIndex)
 Export values of a list to a parsed file.
 
int GetColumnClicked (wxWindow *parent, int iIndex, int iBorderMargin)
 Get the column in wich user has clicked.
 
 DECLARE_EVENT_TABLE ()
 

Additional Inherited Members

- Static Public Attributes inherited from ListGenReport
static const int ID_LIST = wxID_ANY
 
- Protected Member Functions inherited from ListGenReportWithDialog
void InitMembers ()
 
virtual void BeforeAdding ()
 
virtual void BeforeDeleting ()
 
virtual void AfterAdding (bool bRealyAddItem)
 
virtual void BeforeEditing ()
 
virtual void AfterEditing (bool bRealyEdited)
 
virtual void AddingValueToArray (wxArrayString &myImportedValues)
 
virtual void OnDoubleClickItem (wxListEvent &event)
 
virtual void OnPressBackSpace (wxListEvent &event)
 
- Protected Member Functions inherited from ListGenReport
void CreateColumns (wxArrayString *pColsName, wxArrayInt *pColsSize=nullptr)
 
virtual void OnContextMenu (wxListEvent &event)
 
void OnMoveItemInList (wxCommandEvent &event)
 
virtual void OnSortColumns (wxListEvent &event)
 Called when user click on the column header.
 
void OnInit ()
 
- Protected Attributes inherited from ListGenReportWithDialog
wxDialog * m_pDialog
 
- Protected Attributes inherited from ListGenReport
ListGenMenum_ListContextMenu
 
TextParserm_ImportParser
 

Detailed Description

Enhance the ListGenReportWithDialog for supporting status bar.

This class is able to automaticaly deals with a status bar updating number of elements status and number of selected items. String displayed is customizable

Todo:
add a code sample for using this class
Author
Lucien Schreiber (c) CREALP 2008
Date
21 May 2008

Constructor & Destructor Documentation

◆ ListGenReportWithStatus()

ListGenReportWithStatus::ListGenReportWithStatus ( wxWindow *  parent,
wxWindowID  id,
wxArrayString *  pColsName,
wxArrayInt *  pColsSize = nullptr,
wxSize  size = wxDefaultSize 
)

Constructor.

See doc of ListGenReportWithDialog for parameters descriptions

Author
Lucien Schreiber (c) CREALP 2008
Date
21 May 2008

Member Function Documentation

◆ AddItem()

void ListGenReportWithStatus::AddItem ( )
virtual

Re-implement the AddItem.

Adding call for updating status bar

Author
Lucien Schreiber (c) CREALP 2008
Date
23 May 2008

Reimplemented from ListGenReportWithDialog.

◆ DeleteItem()

void ListGenReportWithStatus::DeleteItem ( )
virtual

Re-implement the DeleteItem.

Adding call for updating status bar

Author
Lucien Schreiber (c) CREALP 2008
Date
23 May 2008

Reimplemented from ListGenReportWithDialog.

◆ SetStatusBar()

void ListGenReportWithStatus::SetStatusBar ( wxStatusBar *  status)

Set the status bar.

This function must be called after creating a ListGenReportWithStatus object.

Parameters
statuspointer to a valid wxStatusBar object
Author
Lucien Schreiber (c) CREALP 2008
Date
21 May 2008

◆ SetTextFields()

void ListGenReportWithStatus::SetTextFields ( const wxString &  field1 = wxEmptyString,
const wxString &  field2 = wxEmptyString 
)

Set the fields messages.

This function may be used for setting one or two personnalized message for the status bar fields.

Note
Strings must contain the d character. First string will be used for displaying the number of items in the list while the second field is designed for the number of selected items. Passing empty fields mean that we dont want to modify that field.
Parameters
field1Specifiy a text for field 1 of the status bar (see note above)
field2Specify a text for field 2 of the status bar (see note above)
Author
Lucien Schreiber (c) CREALP 2008
Date
21 May 2008

◆ UpdateStatus()

bool ListGenReportWithStatus::UpdateStatus ( int  iField = STATUS_FIELD_ITEM_BOTH)

Update the status bar text.

Parameters
iFieldwich field would you like to update : Allowed values are described in TM_STATUS_FIELD
Returns
Return TRUE if the text was modified, false otherwise
Author
Lucien Schreiber (c) CREALP 2008
Date
23 May 2008

The documentation for this class was generated from the following files: