mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Replace PerlCallbacks with events in GLCanvas3d et al.
This commit is contained in:
parent
e9d26d1a8e
commit
770d944283
14 changed files with 197 additions and 933 deletions
|
@ -16,9 +16,18 @@ namespace Slic3r {
|
|||
namespace GUI {
|
||||
|
||||
|
||||
wxDEFINE_EVENT(EVT_GLTOOLBAR_ADD, wxCommandEvent);
|
||||
wxDEFINE_EVENT(EVT_GLTOOLBAR_DELETE, wxCommandEvent);
|
||||
wxDEFINE_EVENT(EVT_GLTOOLBAR_TODO_MORE, wxCommandEvent);
|
||||
wxDEFINE_EVENT(EVT_GLTOOLBAR_ADD, SimpleEvent);
|
||||
wxDEFINE_EVENT(EVT_GLTOOLBAR_DELETE, SimpleEvent);
|
||||
wxDEFINE_EVENT(EVT_GLTOOLBAR_DELETE_ALL, SimpleEvent);
|
||||
wxDEFINE_EVENT(EVT_GLTOOLBAR_ARRANGE, SimpleEvent);
|
||||
wxDEFINE_EVENT(EVT_GLTOOLBAR_MORE, SimpleEvent);
|
||||
wxDEFINE_EVENT(EVT_GLTOOLBAR_FEWER, SimpleEvent);
|
||||
wxDEFINE_EVENT(EVT_GLTOOLBAR_SPLIT, SimpleEvent);
|
||||
wxDEFINE_EVENT(EVT_GLTOOLBAR_CUT, SimpleEvent);
|
||||
wxDEFINE_EVENT(EVT_GLTOOLBAR_SETTINGS, SimpleEvent);
|
||||
wxDEFINE_EVENT(EVT_GLTOOLBAR_LAYERSEDITING, SimpleEvent);
|
||||
wxDEFINE_EVENT(EVT_GLTOOLBAR_SELECTBYPARTS, SimpleEvent);
|
||||
|
||||
|
||||
GLToolbarItem::Data::Data()
|
||||
: name("")
|
||||
|
@ -57,10 +66,7 @@ const std::string& GLToolbarItem::get_tooltip() const
|
|||
|
||||
void GLToolbarItem::do_action(wxEvtHandler *target)
|
||||
{
|
||||
// if (m_data.action_callback != nullptr)
|
||||
// m_data.action_callback->call();
|
||||
|
||||
wxPostEvent(target, wxCommandEvent(m_data.action_event));
|
||||
wxPostEvent(target, SimpleEvent(m_data.action_event));
|
||||
}
|
||||
|
||||
bool GLToolbarItem::is_enabled() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue