wex v24.10.0
|
Offers a class to show statistics on a grid. More...
#include <wex/ui/grid-statistics.h>
Public Member Functions | |
grid_statistics (const std::vector< std::pair< const std::string, T > > &v={}, const data::window &data=data::window().style(wxWANTS_CHARS)) | |
Constructor. | |
void | clear () override |
Clears statistics and grid. | |
const auto & | get_keys () const |
Returns keys. | |
const T | set (const std::string &key, T value) override |
Sets key to value, and refreshes grid. | |
grid * | show (bool hide_row_labels=true, bool hide_col_labels=true) |
Shows the statistics as a grid window on the parent, and specify whether to show row labels and col labels. | |
Public Member Functions inherited from wex::grid | |
grid (const data::window &data=data::window().style(wxWANTS_CHARS)) | |
Default constructor. | |
bool | copy_selected_cells_to_clipboard () const |
Copy from selected cells. | |
bool | drop_selection (const wxGridCellCoords &drop_coords, const std::string &data) |
This one is invoked after is_allowed_drop_selection, and drops the data. | |
void | empty_selection () |
Empties selected cells. | |
bool | find_next (const data::find &f) |
Finds next. | |
const std::string | get_cells_value () const |
Get text from all cells. | |
const std::string | get_find_string () const |
Updates find replace text. | |
const std::string | get_selected_cells_value () const |
Get text from selected cells. | |
bool | is_allowed_drop_selection (const wxGridCellCoords &drop_coords, const std::string &data) |
This is invoked after dragging and before anything is really dropped. | |
void | paste_cells_from_clipboard () |
Paste starting at current grid cursor. | |
void | print () |
Prints the grid. | |
void | print_preview () |
Previews the grid. | |
void | set_cell_value (const wxGridCellCoords &coords, const std::string &data) |
This one is called by empty_selection, set_cells_value, and so during drag/drop as well. | |
void | set_cells_value (const wxGridCellCoords &start_coords, const std::string &data) |
Fill cells with text starting at a cel. | |
void | use_drag_and_drop (bool use) |
Specify whether you want to use drag/drop. | |
Public Member Functions inherited from wex::factory::grid | |
virtual | ~grid ()=default |
Destructor. | |
Public Member Functions inherited from wex::statistics< T > | |
statistics (const std::vector< std::pair< const std::string, T > > &v={}) | |
Default constructor. | |
virtual | ~statistics ()=default |
Destructor. | |
statistics & | operator+= (const statistics &s) |
Adds other statistics. | |
const T | dec (const std::string &key, T dec_value=1) |
Decrements key with value. | |
bool | empty () const |
Returns true if items are empty. | |
const std::string | get () const |
Returns all items as a string. | |
const T | get (const std::string &key) const |
Returns value for specified key. | |
const auto & | get_items () const |
Returns the items. | |
const T | inc (const std::string &key, T inc_value=1) |
Increments key with value. | |
Protected Member Functions | |
void | build_popup_menu (menu &menu) override |
Builds the popup menu. | |
Offers a class to show statistics on a grid.
|
inline |
Shows the statistics as a grid window on the parent, and specify whether to show row labels and col labels.
Returns the window that is created, or is activated, if it already was created.
hide_row_labels | show row labels (i.e. row numbers) |
hide_col_labels | show col labels (Item, Value) |