32 #ifndef INTERACTIVE_MARKER_MENU_HANDLER 33 #define INTERACTIVE_MARKER_MENU_HANDLER 35 #include <visualization_msgs/MenuEntry.h> 39 #include <boost/function.hpp> 40 #include <boost/unordered_map.hpp> 65 EntryHandle
insert(
const std::string &title,
const FeedbackCallback &feedback_cb );
68 EntryHandle
insert(
const std::string &title,
69 const uint8_t command_type = visualization_msgs::MenuEntry::FEEDBACK,
70 const std::string &command=
"" );
73 EntryHandle
insert( EntryHandle parent,
const std::string &title,
74 const FeedbackCallback &feedback_cb );
77 EntryHandle
insert( EntryHandle parent,
const std::string &title,
78 const uint8_t command_type = visualization_msgs::MenuEntry::FEEDBACK,
79 const std::string &command=
"" );
82 bool setVisible( EntryHandle handle,
bool visible );
100 bool getTitle( EntryHandle handle, std::string &title )
const;
116 void processFeedback(
const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback );
122 std::vector<visualization_msgs::MenuEntry>& entries_out,
123 EntryHandle parent_handle );
125 visualization_msgs::MenuEntry
makeEntry(
EntryContext& context, EntryHandle handle, EntryHandle parent_handle );
EntryHandle doInsert(const std::string &title, const uint8_t command_type, const std::string &command, const FeedbackCallback &feedback_cb)
bool pushMenuEntries(std::vector< EntryHandle > &handles_in, std::vector< visualization_msgs::MenuEntry > &entries_out, EntryHandle parent_handle)
visualization_msgs::MenuEntry makeEntry(EntryContext &context, EntryHandle handle, EntryHandle parent_handle)
bool getCheckState(EntryHandle handle, CheckState &check_state) const
void processFeedback(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
boost::shared_ptr< interactive_markers::InteractiveMarkerServer > server
std::vector< EntryHandle > sub_entries
bool apply(InteractiveMarkerServer &server, const std::string &marker_name)
FeedbackCallback feedback_cb
bool setVisible(EntryHandle handle, bool visible)
Specify if an entry should be visible or hidden.
bool setCheckState(EntryHandle handle, CheckState check_state)
Specify if an entry is checked or can't be checked at all.
bool getTitle(EntryHandle handle, std::string &title) const
EntryHandle insert(const std::string &title, const FeedbackCallback &feedback_cb)
Insert top-level entry with feedback function.
visualization_msgs::InteractiveMarkerFeedbackConstPtr FeedbackConstPtr
boost::function< void(const FeedbackConstPtr &) > FeedbackCallback
std::set< std::string > managed_markers_
bool reApply(InteractiveMarkerServer &server)
Re-apply to all markers that this was applied to previously.
std::vector< EntryHandle > top_level_handles_
EntryHandle current_handle_
boost::unordered_map< EntryHandle, EntryContext > entry_contexts_