Class Widget¶
Defined in File Widget.h
Inheritance Relationships¶
Derived Types¶
public SmartPeak::FilePicker(Class FilePicker)public SmartPeak::GenericGraphicWidget(Class GenericGraphicWidget)public SmartPeak::GenericTableWidget(Class GenericTableWidget)public SmartPeak::GenericTextWidget(Class GenericTextWidget)public SmartPeak::GenericTreeWidget(Class GenericTreeWidget)public SmartPeak::ParametersTableWidget(Class ParametersTableWidget)public SmartPeak::Report(Class Report)public SmartPeak::Workflow(Class Workflow)public SmartPeak::WorkflowStepWidget(Class WorkflowStepWidget)
Class Documentation¶
-
class
SmartPeak::Widget¶ Abstract base class for all panes, windows, and widgets.
TODO: potential refactors
Add unit tests for
makeCheckedRows
Subclassed by SmartPeak::FilePicker, SmartPeak::GenericGraphicWidget, SmartPeak::GenericTableWidget, SmartPeak::GenericTextWidget, SmartPeak::GenericTreeWidget, SmartPeak::ParametersTableWidget, SmartPeak::Report, SmartPeak::Workflow, SmartPeak::WorkflowStepWidget
Public Functions
-
Widget() = default¶
-
virtual
~Widget() = default¶
-
virtual void
draw() = 0¶ Interface to show the widget
NOTE: free to override in inherited implmementations
Public Static Functions
-
static void
FilterPopup(const char *popuop_id, ImGuiTextFilter &filter, const Eigen::Tensor<std::string, 1> &column, bool *checked, const std::vector<std::pair<std::string, std::vector<size_t>>> &values_indices)¶ Method to make a filter and search popup
- Parameters
[in] popup_id: Sequence handler[in] filter: Text filters[in] colum: Column of text items to filter[inout] checked: Vector of boolean values indicating if the column is filtered or not[in] values_indices: Map containing unique row entries and their duplicate indices
-
static void
SortButton(const char *button_id, const Eigen::Tensor<std::string, 1> &headers, Eigen::Tensor<std::string, 2> &columns, const int n_col, bool *checked, std::vector<std::vector<std::pair<std::string, std::vector<size_t>>>> &columns_indices, bool sort_asc = true)¶ Method to make a sort button
- Parameters
[in] button_id: button ID[in] headers: Table headers[inout] columns: Table columns[inout] checked: Vector of boolean values indicating if the column is filtered or not[inout] columns_indices: A vector of maps containing unique row entries and their duplicate indices[in] sort_asc: Whether to sort in ascending order or descending order
-
static void
makeFilters(const Eigen::Tensor<std::string, 1> &headers, const Eigen::Tensor<std::string, 2> &columns, std::vector<std::vector<std::pair<std::string, std::vector<size_t>>>> &columns_indices, std::vector<ImGuiTextFilter> &filter)¶ Helper method to make the filters and value_indices needed for
FilterPopup- Parameters
[in] headers: Table headers[in] columns: Table columns[out] columns_indices: A vector of maps containing unique row entries and their duplicate indices[out] filter: Vector of ImGuiTextFilters