ToolMap
Loading...
Searching...
No Matches
listgenreport_status.h
1/***************************************************************************
2 listgenreport_status.h
3 Enhance the listgenreport class with a status bar
4 -------------------
5 copyright : (C) 2007 CREALP Lucien Schreiber
6 ***************************************************************************/
7
8/***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16
17// comment doxygen
18
19#ifndef NAME_H
20#define NAME_H
21
22// For compilers that support precompilation, includes "wx/wx.h".
23#include <wx/wxprec.h>
24
25// Include wxWidgets' headers
26#ifndef WX_PRECOMP
27#include <wx/wx.h>
28#endif
29
30#include "listgenreport.h"
31
32enum TM_STATUS_FIELD {
34 STATUS_FIELD_ITEM_COUNT = 1,
36 STATUS_FIELD_ITEM_SELECTED = 2,
38 STATUS_FIELD_ITEM_BOTH = 3
39};
40
41/***************************************************************************/
51 private:
52 // private members
53 wxStatusBar* m_status;
54
55 wxString m_TextField1;
56 wxString m_TextField2;
57
58 // private functions
59 void InitMembers();
60
61 // event functions
62 void OnSelectionChange(wxListEvent& event);
63
64 protected:
65 public:
66 // constructor
67 ListGenReportWithStatus(wxWindow* parent, wxWindowID id, wxArrayString* pColsName, wxArrayInt* pColsSize = nullptr,
68 wxSize size = wxDefaultSize);
69
70 // status setter and getter
71 void SetStatusBar(wxStatusBar* status);
72
73 wxStatusBar* GetStatusBar() {
74 return m_status;
75 }
76
77 // set the status text
78 void SetTextFields(const wxString& field1 = wxEmptyString, const wxString& field2 = wxEmptyString);
79
80 // update the status
81 bool UpdateStatus(int iField = STATUS_FIELD_ITEM_BOTH);
82
83 // re-implement for adding / deleting update process
84 virtual void AddItem();
85
86 virtual void DeleteItem();
87};
88
89#endif
Definition listgenreport.h:319
Enhance the ListGenReportWithDialog for supporting status bar.
Definition listgenreport_status.h:50
virtual void AddItem()
Re-implement the AddItem.
Definition listgenreport_status.cpp:119
void SetStatusBar(wxStatusBar *status)
Set the status bar.
Definition listgenreport_status.cpp:57
virtual void DeleteItem()
Re-implement the DeleteItem.
Definition listgenreport_status.cpp:147
void SetTextFields(const wxString &field1=wxEmptyString, const wxString &field2=wxEmptyString)
Set the fields messages.
Definition listgenreport_status.cpp:74
bool UpdateStatus(int iField=STATUS_FIELD_ITEM_BOTH)
Update the status bar text.
Definition listgenreport_status.cpp:92