MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::SceneObjectsListDrawer Class Reference

class for drawing a list of scene objects (and handling interaction with it) More...

#include <MRSceneObjectsListDrawer.h>

+ Inheritance diagram for MR::SceneObjectsListDrawer:

Public Member Functions

virtual ~SceneObjectsListDrawer ()=default
 
virtual MRVIEWER_API void draw (float height)
 
void setShowNewSelectedObjects (bool show)
 set flag of the object visibility activation after selection
 
bool getShowNewSelectedObjects ()
 get flag of the object visibility activation after selection
 
void setDeselectNewHiddenObjects (bool deselect)
 set flag of deselect object after hidden
 
bool getDeselectNewHiddenObjects ()
 get flag of deselect object after hidden
 
MRVIEWER_API void changeSelection (bool isDown, bool isShift)
 
MRVIEWER_API void changeVisible (bool isDown)
 
MRVIEWER_API void selectAllObjects ()
 select all selectable objects
 
MRVIEWER_API void setLeavesVisibility (bool visible)
 set visible flag all selectable objects
 
MRVIEWER_API void setObjectTreeState (const Object *obj, bool open)
 set object collapse state (hiding children)
 
MRVIEWER_API void expandObjectTreeAndScroll (const Object *obj)
 expands all objs parents in tree and scroll scene tree window so selection becomes visible
 
MRVIEWER_API void allowSceneReorder (bool allow)
 set possibility change object order
 
MRVIEWER_API void setNextFrameFixScroll (int skipFrames=1)
 helper method for fix scroll position after change available height
 

Protected Types

typedef int ImGuiTreeNodeFlags
 

Protected Member Functions

virtual MRVIEWER_API void drawCustomObjectPrefixInScene_ (const Object &, bool)
 
virtual MRVIEWER_API void drawSceneContextMenu_ (const std::vector< std::shared_ptr< Object > > &, const std::string &)
 
virtual MRVIEWER_API float drawCustomTreeObjectProperties_ (Object &obj, bool onlyCalcHeight)
 
virtual MRVIEWER_API bool collapsingHeader_ (const std::string &uniqueName, ImGuiTreeNodeFlags flags)
 override this to customize CollapsingHeader draw
 
virtual MRVIEWER_API std::string objectLineStrId_ (const Object &object, const std::string &uniqueStr)
 
virtual MRVIEWER_API bool drawObject_ (Object &object, const std::string &uniqueStr, int depth)
 override this to customize whole object line
 
virtual MRVIEWER_API bool drawSkippedObject_ (Object &object, const std::string &uniqueStr, int depth)
 draw dummy container for skipped object
 
MRVIEWER_API bool drawObjectCollapsingHeader_ (Object &object, const std::string &uniqueStr, bool hasRealChildren)
 function that draws collapsing header and process click on it
 
MRVIEWER_API void processItemClick_ (Object &object, const std::vector< std::shared_ptr< Object > > &selected)
 function that do click logic on object line (select/deselect/rename/open context)
 
MRVIEWER_API void makeDragDropSource_ (const std::vector< std::shared_ptr< Object > > &payload)
 payload object will be moved
 
MRVIEWER_API bool needDragDropTarget_ ()
 checking the need to draw a target
 
MRVIEWER_API void makeDragDropTarget_ (Object &target, bool before, bool betweenLine, const std::string &uniqueStr)
 
MRVIEWER_API void drawObjectVisibilityCheckbox_ (Object &object, const std::string &uniqueStr)
 draw visibility checkbox and call ImGui::SameLine at the end
 

Protected Attributes

bool showNewSelectedObjects_ = true
 
bool deselectNewHiddenObjects_ = false
 
std::unordered_map< const Object *, bool > sceneOpenCommands_
 

Detailed Description

class for drawing a list of scene objects (and handling interaction with it)


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