26#include <ftxui/component/component.hpp>
27#include <ftxui/dom/elements.hpp>
136 std::function<
void()> create_item);
140 std::function<
void()> create_item);
KitListBaseApp()
Default constructor.
std::string filename
The current filename the Model was loaded from.
std::vector< std::string > category_menu_entries
The menu entries for the catalog list.
::ftxui::Component copy_category_container
Component for modal dialog for copying items to categories.
::ftxui::Component item_action_dialog()
Component to display options for removing or deleting checked items.
KitListFtxui()
Default constructor.
std::vector< std::shared_ptr< Category > > current_categories
The current list of Category instances.
bool refresh_category_container
When true, the category container needs to be refreshed.
void do_refresh_select_category_list()
refreshes the select category list.
std::string item_name
Updated by new_item_component.
bool refresh_select_category_list
When true, the select category list needs to be refreshed.
int selected_filter
Maintained by dropdown giving choices of Model::state_filter.
::ftxui::Component new_item_component(std::function< void()> cancel, std::function< void()> create_item)
Component for modal dialog for the user to create a new Item.
::ftxui::Component item_action_container
Component for modal dialog for delete or removing items.
std::string category_name
Updated by new_category_component.
::ftxui::Component copy_items_dialog()
Modal dialog for selecting target categories.
bool refresh_copy_item_category_container
When true, the copy items to category container needs to be refreshed.
bool show_save
Whether the Save button is shown.
virtual void category_entry_changed(const std::shared_ptr< Category > category) override
Called when a Category name has changed.
bool item_checked
Updated by new_item_component.
::ftxui::Component select_category_list()
Component displaying a list of all categories with a checkbox.
::ftxui::Component new_category_component(std::function< void()> cancel, std::function< void()> create_item)
Component for modal dialog for the user to create a new Category.
int run(const std::string filename)
The main run loop.
Layer
Indicates the different layers of the application.
std::vector< SelectCategory > selected_categories
int menu_selected_category
The index position in the list of category menu items.
virtual void item_entry_changed(const std::shared_ptr< Item > item) override
Called when a Item instance's state has changed.
A namespace for the FTXUI user interface.
An element used in lists for selecting categories.
std::shared_ptr< Category > category