mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-30 06:12:12 +00:00
ENH: StateHandler as wxEvtHandler and attach child
Change-Id: I1183b97983907f297888d81809be60e3016ae305
This commit is contained in:
@@ -26,24 +26,36 @@ public:
|
||||
public:
|
||||
StateHandler(wxWindow * owner);
|
||||
|
||||
~StateHandler();
|
||||
|
||||
public:
|
||||
void attach(StateColor const & color);
|
||||
|
||||
void attach(std::vector<StateColor const *> const & colors);
|
||||
|
||||
void attach_child(wxWindow *child);
|
||||
|
||||
void remove_child(wxWindow *child);
|
||||
|
||||
void update_binds();
|
||||
|
||||
int states() const { return states_ | states2_; }
|
||||
|
||||
private:
|
||||
void changed(wxEvent & event);
|
||||
StateHandler(StateHandler * parent, wxWindow *owner);
|
||||
|
||||
void changed(wxEvent &event);
|
||||
|
||||
void changed(int state2);
|
||||
|
||||
private:
|
||||
wxWindow * owner_;
|
||||
std::vector<StateColor const *> colors_;
|
||||
int bind_states_ = 0;
|
||||
int states_ = 0;
|
||||
int states2_ = 0;
|
||||
int states2_ = 0; // from children
|
||||
std::vector<std::unique_ptr<StateHandler>> children_;
|
||||
StateHandler * parent_ = nullptr;
|
||||
};
|
||||
|
||||
#endif // !slic3r_GUI_StateHandler_hpp_
|
||||
|
||||
Reference in New Issue
Block a user