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

@ -11,6 +11,7 @@
#include <wx/combo.h>
#include <wx/popupwin.h>
#include <wx/checkbox.h>
#include "Preset.hpp"
#include "wxExtensions.hpp"
@ -69,11 +70,21 @@ struct Option {
struct FoundOption {
wxString label;
wxString marked_label;
wxString tooltip;
size_t option_idx {0};
int outScore {0};
void get_label(const char** out_text) const;
void get_marked_label(const char** out_text) const;
void get_marked_label_and_tooltip(const char** label, const char** tooltip) const;
};
struct OptionViewParameters
{
bool type {false};
bool category {false};
bool group {true };
int hovered_id {-1};
};
class OptionsSearcher
@ -96,11 +107,10 @@ class OptionsSearcher
};
size_t options_size() const { return options.size(); }
size_t found_size() const { return found.size(); }
size_t found_size() const { return found.size(); }
public:
bool category{ false };
bool group{ true };
OptionViewParameters view_params;
void init(std::vector<InputInfo> input_values);
void apply(DynamicPrintConfig *config,