|
wex
v21.04.0
|
Offers popup menu with copy/paste, printing. More...
#include <wex/grid.h>

Public Member Functions | |
| 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 IsAllowedDropSelection, and drops the data. More... | |
| void | empty_selection () |
| Empties selected cells. | |
| bool | find_next (const std::string &text, bool forward=true) |
| 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_drag_selection () |
| This one is invoked before dragging, and you can indicate whether you like the current selection to be dragged elsewhere. More... | |
| bool | is_allowed_drop_selection (const wxGridCellCoords &drop_coords, const std::string &data) |
| This is invoked after dragging and before anything is really dropped. More... | |
| 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, and allows you to override default here (which simply calls SetCellValue). More... | |
| 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. More... | |
Protected Member Functions | |
| virtual void | build_popup_menu (menu &menu) |
| Virtual Interface. More... | |
Offers popup menu with copy/paste, printing.
It also offers drag/drop functionality.
|
protectedvirtual |
Virtual Interface.
Builds the popup menu.
Reimplemented in wex::grid_statistics< T >, and wex::grid_statistics< int >.
| bool wex::grid::drop_selection | ( | const wxGridCellCoords & | drop_coords, |
| const std::string & | data | ||
| ) |
This one is invoked after IsAllowedDropSelection, and drops the data.
Default it calls set_cells_value. If you return true, the selection is correctly dropped, and the (old) selection is emptied and cleared to simulate dragging.
| bool wex::grid::is_allowed_drag_selection | ( | ) |
This one is invoked before dragging, and you can indicate whether you like the current selection to be dragged elsewhere.
Default it is allowed.
| bool wex::grid::is_allowed_drop_selection | ( | const wxGridCellCoords & | drop_coords, |
| const std::string & | data | ||
| ) |
This is invoked after dragging and before anything is really dropped.
Default it checks for each cell whether it is read-only, etc.
| void wex::grid::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, and allows you to override default here (which simply calls SetCellValue).
So it is on a cell basis, whereas the DropSelection is on a range basis.
| void wex::grid::use_drag_and_drop | ( | bool | use | ) |
Specify whether you want to use drag/drop.
Default it is used.