![]() |
Inviwo 0.9.12-pre
Inviwo documentation
|
Public Types | |
| using | ContextMenuCallback |
| using | ToolTipCallback = std::function<void(std::string_view)> |
Public Member Functions | |
| virtual InteractionEvent * | clone () const override=0 |
| const ContextMenuCallback & | getContexMenuCallback () const |
| const ToolTipCallback & | getToolTipCallback () const |
| InteractionEvent (const InteractionEvent &rhs)=default | |
| InteractionEvent (KeyModifiers modifiers=KeyModifiers(flags::empty)) | |
| KeyModifiers | modifiers () const |
| InteractionEvent & | operator= (const InteractionEvent &that)=default |
| void | setContextMenuCallback (ContextMenuCallback callback) |
| void | setModifiers (KeyModifiers modifiers) |
| void | setToolTip (std::string_view tooltip) const |
| void | setToolTipCallback (ToolTipCallback callback) |
| void | showContextMenu (std::span< ContextMenuEntry > entries, ContextMenuCategories categories=ContextMenuCategory::Callback) |
| Public Member Functions inherited from inviwo::Event | |
| template<typename EventType> | |
| EventType * | getAs () |
| template<typename EventType> | |
| const EventType * | getAs () const |
| const std::vector< Processor * > & | getVisitedProcessors () const |
| bool | hasBeenUsed () const |
| virtual uint64_t | hash () const =0 |
| bool | hasVisitedProcessor (Processor *) const |
| bool | markAsUnused () |
| bool | markAsUsed () |
| void | markAsVisited (Event &) |
| bool | markAsVisited (Processor *) |
| virtual void | print (fmt::memory_buffer &buff) const =0 |
| bool | setUsed (bool isUsed) |
| virtual bool | shouldPropagateTo (Inport *inport, Processor *processor, Outport *source) |
Protected Attributes | |
| ContextMenuCallback | contextMenuCallback_ |
| KeyModifiers | modifiers_ |
| ToolTipCallback | tooltip_ |
Additional Inherited Members | |
| Protected Member Functions inherited from inviwo::Event | |
| Event (const Event &rhs)=default | |
| Event & | operator= (const Event &that)=default |
| using inviwo::InteractionEvent::ContextMenuCallback |
|
overridepure virtual |
Implements inviwo::Event.
| void inviwo::InteractionEvent::setToolTip | ( | std::string_view | tooltip | ) | const |
Display a tool tip using the optionally set tool tip callback. If no tool tip callback is set, the function does nothing. The supported formation depends on the used back end, but simple html is usually supported. Calling the function with an empty sting will hide any existing tool tip.
| void inviwo::InteractionEvent::setToolTipCallback | ( | ToolTipCallback | callback | ) |
Set a tool tip call back function. The function should display a tool tip with the given string at the position of the event. This function is usually called by the originating event canvas, and not any regular user code.
| void inviwo::InteractionEvent::showContextMenu | ( | std::span< ContextMenuEntry > | entries, |
| ContextMenuCategories | categories = ContextMenuCategory::Callback ) |
Show a context menu at the current mouse position. The custom menu entries are added before any other default actions based on categories. When any of the custom menu actions in the entries is triggered, a ContexMenuEvent with the corresponding entry ID will be propagated through the processor network.
| entries | list of custom menu items |
| categories | determines which menu actions should be included in the context menu |