OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI::NativeCommands Namespace Reference

Functions

const std::vector< NativeCommand > & catalog ()
AppActionRunResult run (const std::string &key, const std::string &param={})
std::unique_ptr< AppAction > make_action (const NativeCommand &command)

Function Documentation

◆ catalog()

const std::vector< NativeCommand > & Slic3r::GUI::NativeCommands::catalog ( )
658{
659 static const std::vector<NativeCommand> commands = build_command_catalog();
660 return commands;
661}

Referenced by Slic3r::GUI::ActionRegistry::init(), Slic3r::GUI::ActionRegistry::relocalize_builtins(), and run().

Here is the caller graph for this function:

◆ make_action()

std::unique_ptr< AppAction > Slic3r::GUI::NativeCommands::make_action ( const NativeCommand & command)
664{
665 return std::make_unique<CommandAction>(command);
666}

Referenced by Slic3r::GUI::ActionRegistry::init(), and Slic3r::GUI::ActionRegistry::relocalize_builtins().

Here is the caller graph for this function:

◆ run()

AppActionRunResult Slic3r::GUI::NativeCommands::run ( const std::string & key,
const std::string & param = {} )
669{
670 GUI_App& app = wxGetApp();
671 if (app.is_closing())
672 return {};
673 for (const NativeCommand& c : catalog())
674 if (c.key == key)
675 return c.runner(param);
676 return {AppActionRunResult::Level::Info, _L("Unknown command.")};
677}
#define _L(s)
Definition OBJ.cpp:34
Definition GUI_App.hpp:255
bool is_closing() const
Definition GUI_App.hpp:436
const std::vector< NativeCommand > & catalog()
Definition NativeCommands.cpp:657
Definition NativeCommands.hpp:17
@ Info
Definition ActionRegistry.hpp:31

References _L, catalog(), Slic3r::GUI::AppActionRunResult::Info, and Slic3r::GUI::GUI_App::is_closing().

Referenced by Slic3r::GUI::anonymous_namespace{ActionRegistry.cpp}::PlateAction::run(), and Slic3r::GUI::anonymous_namespace{NativeCommands.cpp}::CommandAction::run().

Here is the call graph for this function:
Here is the caller graph for this function: