mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 21:58:03 -06:00
Search: Implemented "Option type" checkbox for imGui window on Plater
+ code refactoring
This commit is contained in:
parent
3b88dc2688
commit
83782e59b6
8 changed files with 82 additions and 49 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue