Search: Implemented "Option type" checkbox for imGui window on Plater

+ code refactoring
This commit is contained in:
YuSanka 2020-04-20 21:46:16 +02:00
parent 3b88dc2688
commit 83782e59b6
8 changed files with 82 additions and 49 deletions

View file

@ -8,6 +8,10 @@
#include "libslic3r/Point.hpp"
namespace Slic3r {namespace Search {
struct OptionViewParameters;
}}
class wxString;
class wxMouseEvent;
class wxKeyEvent;
@ -74,8 +78,8 @@ public:
bool slider_float(const wxString& label, float* v, float v_min, float v_max, const char* format = "%.3f", float power = 1.0f);
bool combo(const wxString& label, const std::vector<std::string>& options, int& selection); // Use -1 to not mark any option as selected
bool undo_redo_list(const ImVec2& size, const bool is_undo, bool (*items_getter)(const bool, int, const char**), int& hovered, int& selected);
void search_list(const ImVec2& size, bool (*items_getter)(int, const char**), char* search_str,
bool& category, bool& group, size_t& hovered_id, size_t& selected, bool& edited, bool& check_changed);
void search_list(const ImVec2& size, bool (*items_getter)(int, const char** label, const char** tooltip), char* search_str,
Search::OptionViewParameters& view_params, int& selected, bool& edited, bool& check_changed);
void disabled_begin(bool disabled);
void disabled_end();