MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::BasicClickableRectUiRenderTask Class Referenceabstract

#include <MRViewer/MRRenderClickableRect.h>

Inheritance diagram for MR::BasicClickableRectUiRenderTask:

Public Member Functions

 BasicClickableRectUiRenderTask ()=default
 BasicClickableRectUiRenderTask (const BasicClickableRectUiRenderTask &other)
 Don't assign the memebers (except the base), because we want to preserve the state across frames.
BasicClickableRectUiRenderTaskoperator= (const BasicClickableRectUiRenderTask &other)
virtual ~BasicClickableRectUiRenderTask ()=default
virtual void onClick ()=0
 This is called when the click happens.
void earlyBackwardPass (const BackwardPassParams &backParams) override
 This is what ultimately calls onClick() if the certain conditions hold.
Public Member Functions inherited from MR::BasicUiRenderTask
virtual ~BasicUiRenderTask ()=default
 BasicUiRenderTask ()=default
 BasicUiRenderTask (const BasicUiRenderTask &)=default
 BasicUiRenderTask (BasicUiRenderTask &&)=default
BasicUiRenderTaskoperator= (const BasicUiRenderTask &)=default
BasicUiRenderTaskoperator= (BasicUiRenderTask &&)=default
virtual void renderPass ()=0
 This is the main rendering pass.

Public Attributes

ImVec2 clickableCornerA
 Set those to set the clickable area. Zero both to hovers and clicks.
ImVec2 clickableCornerB
bool enabled = true
bool isHovered = false
 Read these to decide how to render.
bool isActive = false
Public Attributes inherited from MR::BasicUiRenderTask
float renderTaskDepth = 0
 The tasks are sorted by this depth, descending (larger depth = further away).

Additional Inherited Members

Public Types inherited from MR::BasicUiRenderTask
enum class  InteractionMask { InteractionMask::mouseHover = 1 << 0 , InteractionMask::mouseScroll = 1 << 1 }

Detailed Description

This is a helper base class for writing BasicUiRenderTasks that let you click a rectangle in the scene. Note, this task relies on preserving state between the frames.


The documentation for this class was generated from the following file: