(
size_t(item) >=
m_Data.size())
139 return m_Data[index].m_Severity;
141 return m_Data[index].m_SeqId;
143 return m_Data[index].m_Title;
145 return m_Data[index].m_ErrMsg;
163 static autocompare_fn = [](
autoitemA,
autoitemB,
boolascending) {
164 returnascending ? itemA < itemB : itemA > itemB;
170}
else if(revert_direction) {
175auto itemA = m_Data[indexA];
176auto itemB = m_Data[indexB];
180return compare_fn(itemA.m_Severity, itemB.m_Severity, m_Ascending);
182return compare_fn(itemA.m_SeqId, itemB.m_SeqId, m_Ascending);
184return compare_fn(itemA.m_Title, itemB.m_Title, m_Ascending);
186return compare_fn(itemA.m_ErrMsg, itemB.m_ErrMsg, m_Ascending);
194: wxListCtrl(parent, id, pos,
size, style)
200font.SetUnderlined(
true);
204wxInitAllImageHandlers();
205 static boolbitmap_registered =
false;
206 if(!bitmap_registered)
210bitmap_registered =
true;
220InsertColumn(0,
_(
" "), wxLIST_FORMAT_LEFT, 16);
221InsertColumn(1,
_(
" Severity"), wxLIST_FORMAT_LEFT);
222InsertColumn(2,
_(
"Sequence"), wxLIST_FORMAT_LEFT);
223InsertColumn(3,
_(
"Error title"), wxLIST_FORMAT_LEFT);
224InsertColumn(4,
_(
"Message & Object Description"), wxLIST_FORMAT_LEFT, 750);
272 if(sorted_col > 0) {
278 if(GetItemCount() > 0) {
279SetColumnWidth(0, wxLIST_AUTOSIZE_USEHEADER);
280SetColumnWidth(1, wxLIST_AUTOSIZE_USEHEADER);
281SetColumnWidth(2, wxLIST_AUTOSIZE);
282SetColumnWidth(3, wxLIST_AUTOSIZE);
283SetColumnWidth(4, wxLIST_AUTOSIZE);
286SetColumnWidth(0, wxLIST_AUTOSIZE_USEHEADER);
287SetColumnWidth(1, wxLIST_AUTOSIZE_USEHEADER);
288SetColumnWidth(2, wxLIST_AUTOSIZE_USEHEADER);
289SetColumnWidth(3, wxLIST_AUTOSIZE_USEHEADER);
290SetColumnWidth(4, wxLIST_AUTOSIZE_USEHEADER);
297item.SetMask(wxLIST_MASK_IMAGE);
313 longselected_data_index;
315 if(selected_index != -1) {
319SetItemState(selected_index, 0, wxLIST_STATE_SELECTED);
322 autosort_by_col =
event.GetColumn();
325 if(sorted_col != sort_by_col && sorted_col > 0) {
327item.SetMask(wxLIST_MASK_IMAGE);
329this->SetColumn(sorted_col, item);
338item.SetMask(wxLIST_MASK_IMAGE);
344 if(selected_index != -1) {
346SetItemState(index_to_select, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
347EnsureVisible(index_to_select);
353 returnGetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
359 returnfind(ordered_indices.begin(), ordered_indices.end(), data_index) - ordered_indices.begin();
vector< long > m_OrderedIndices
vector to store ordered indices
string GetDataByCol(long item, long column) const
CErrorData & operator=(const CErrorData &other)
string GetItemText(long item) const
void SortByColumn(long col, bool revert_direction)
wxItemAttr m_SelectAttr
the item attribute for the selectable row
long x_FindIndexOfDataIndex(long data_index) const
virtual wxItemAttr * OnGetItemAttr(long item) const override
long x_GetSelectedIndex() const
virtual int OnGetItemImage(long item) const override
string GetItemText(long item) const
void SetData(CRef< CErrorData > error_data)
void OnColumnClicked(wxListEvent &event)
virtual wxString OnGetItemText(long item, long column) const override
CErrorListCtrl(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxLC_REPORT|wxLC_VIRTUAL)
CRef< CErrorData > m_ListData
wxImageList * m_imageListSmall
long GetActualIndex(long item) const
virtual void RegisterFileAlias(const wxArtID &anId, const wxArtClient &aClient, const wxSize &aSize, const wxString &aName, long aType=wxBITMAP_TYPE_ANY, int anIndex=-1)
static const char * empty_xpm[]
static const char * down_xpm[]
static const char * up_xpm[]
static const char * column
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
constexpr auto sort(_Init &&init)
const struct ncbi::grid::netcache::search::fields::SIZE size
wxFileArtProvider * GetDefaultFileArtProvider()
wxString ToWxString(const string &s)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4