7#define TERMS_IN(COL) (row.COL.find(terms) != std::string::npos)
8#define BG_OPEN(INDEX) game_list->SetItemBackgroundColour(INDEX, *wxGREEN)
9#define BG_DELETE(INDEX) game_list->SetItemBackgroundColour(INDEX, *wxRED)
10#define BG_IMPORT(INDEX) game_list->SetItemBackgroundColour(INDEX, *wxBLUE)
11#define DISPLAY_ALL_ROWS() {for(std::size_t i=0;i<rows.size();i++){DisplayRow(i);}}
14typedef std::string CType;
33 wxListCtrl *game_list;
34 std::vector<long> deleted_games, opened_games, imported_games;
36 void DisplayRow(
long id);
37 void ClearDisplayedRow();
44 long AddGame(CType White,CType Black,CType Event,CType Round, CType Result, CType Eco);
45 void MarkItemAsOpen(
long item);
46 void MarkItemAsDeleted(
long item);
47 void MarkItemAsImported(
long item);
55 void Filter(std::string terms);
A helper class to manage a wxListCtrl that display games.
Definition: GameListManager.hpp:31
void ClearFilter()
Remove all filters.
Definition: GameListManager.cpp:133
void SortBy(short col)
Sort items by the given column.
Definition: GameListManager.cpp:71
long GetItemGameId(long item)
Get the game id from the item id.
Definition: GameListManager.cpp:109
void Filter(std::string terms)
Filter the rows given terms.
Definition: GameListManager.cpp:118
long AddGame(CType White, CType Black, CType Event, CType Round, CType Result, CType Eco)
Add a game to the list.
Definition: GameListManager.cpp:14
std::vector< RType > rows
Accessible outside (DO NOT MODIFY FROM OUTSIDE)
Definition: GameListManager.hpp:40
void Clear()
Clear the state of the GameListManager.
Definition: GameListManager.cpp:43
std::vector< long > GetSelectedItems()
Return the id of the selected items.
Definition: GameListManager.cpp:98
Row item content.
Definition: GameListManager.hpp:17