MeshLib
 
Loading...
Searching...
No Matches
MR::RibbonSceneObjectsListDrawer Class Reference

class for drawing a list of scene objects in RibbonMenu style More...

#include <MRRibbonSceneObjectsListDrawer.h>

+ Inheritance diagram for MR::RibbonSceneObjectsListDrawer:

Public Member Functions

virtual MRVIEWER_API void draw (float height, float scaling) override
 
MRVIEWER_API void initRibbonMenu (RibbonMenu *ribbonMenu)
 
void setCloseContextOnChange (bool deselect)
 set closing scene context menu on any change
 
bool getCloseContextOnChange ()
 get flag closing scene context menu on any change
 
- Public Member Functions inherited from MR::SceneObjectsListDrawer
virtual ~SceneObjectsListDrawer ()=default
 
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 ()
 
MRVIEWER_API void setLeavesVisibility (bool visible)
 
MRVIEWER_API void setObjectTreeState (const Object *obj, bool open)
 set object collapse state (hiding children)
 
MRVIEWER_API void allowSceneReorder (bool allow)
 set possibility change object order
 
MRVIEWER_API void setNextFrameFixScroll ()
 helper method for fix scroll position after change available height
 

Protected Member Functions

virtual MRVIEWER_API void drawCustomObjectPrefixInScene_ (const Object &obj, bool opened) override
 
virtual MRVIEWER_API void drawSceneContextMenu_ (const std::vector< std::shared_ptr< Object > > &selected, const std::string &uniqueStr) override
 
virtual MRVIEWER_API bool collapsingHeader_ (const std::string &uniqueName, ImGuiTreeNodeFlags flags) override
 override this to customize CollapsingHeader draw
 
virtual MRVIEWER_API std::string objectLineStrId_ (const Object &object, const std::string &uniqueStr) override
 
virtual MRVIEWER_API bool drawObject_ (Object &object, const std::string &uniqueStr, int depth) override
 override this to customize whole object line
 
virtual MRVIEWER_API bool drawSkippedObject_ (Object &object, const std::string &uniqueStr, int depth) override
 draw dummy container for skipped object
 
- Protected Member Functions inherited from MR::SceneObjectsListDrawer
virtual MRVIEWER_API float drawCustomTreeObjectProperties_ (Object &obj, bool onlyCalcHeight)
 
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)
 

Additional Inherited Members

- Protected Types inherited from MR::SceneObjectsListDrawer
typedef int ImGuiTreeNodeFlags
 
- Protected Attributes inherited from MR::SceneObjectsListDrawer
bool showNewSelectedObjects_ = true
 
bool deselectNewHiddenObjects_ = false
 
float menuScaling_ = 1.f
 
std::unordered_map< const Object *, bool > sceneOpenCommands_
 

Detailed Description

class for drawing a list of scene objects in RibbonMenu style

Member Function Documentation

◆ collapsingHeader_()

virtual MRVIEWER_API bool MR::RibbonSceneObjectsListDrawer::collapsingHeader_ ( const std::string & uniqueName,
ImGuiTreeNodeFlags flags )
overrideprotectedvirtual

override this to customize CollapsingHeader draw

Reimplemented from MR::SceneObjectsListDrawer.

◆ draw()

virtual MRVIEWER_API void MR::RibbonSceneObjectsListDrawer::draw ( float height,
float scaling )
overridevirtual

Main method for drawing all \detail Not creat window. Use in window block (between ImGui::Begin and ImGui::End)

Reimplemented from MR::SceneObjectsListDrawer.

◆ drawCustomObjectPrefixInScene_()

virtual MRVIEWER_API void MR::RibbonSceneObjectsListDrawer::drawCustomObjectPrefixInScene_ ( const Object & ,
bool  )
overrideprotectedvirtual

override this to customize prefix for objects in scene \detail height should be less or equal ImGui::GetFrameHeight() method should save ImGui::CursorPosY

Reimplemented from MR::SceneObjectsListDrawer.

◆ drawObject_()

virtual MRVIEWER_API bool MR::RibbonSceneObjectsListDrawer::drawObject_ ( Object & object,
const std::string & uniqueStr,
int depth )
overrideprotectedvirtual

override this to customize whole object line

Reimplemented from MR::SceneObjectsListDrawer.

◆ drawSceneContextMenu_()

virtual MRVIEWER_API void MR::RibbonSceneObjectsListDrawer::drawSceneContextMenu_ ( const std::vector< std::shared_ptr< Object > > & ,
const std::string &  )
overrideprotectedvirtual

override this add custom context menu for selected objects uniqueStr need to identify who call context menu

Reimplemented from MR::SceneObjectsListDrawer.

◆ drawSkippedObject_()

virtual MRVIEWER_API bool MR::RibbonSceneObjectsListDrawer::drawSkippedObject_ ( Object & object,
const std::string & uniqueStr,
int depth )
overrideprotectedvirtual

draw dummy container for skipped object

Reimplemented from MR::SceneObjectsListDrawer.

◆ getCloseContextOnChange()

bool MR::RibbonSceneObjectsListDrawer::getCloseContextOnChange ( )
inline

get flag closing scene context menu on any change

◆ initRibbonMenu()

MRVIEWER_API void MR::RibbonSceneObjectsListDrawer::initRibbonMenu ( RibbonMenu * ribbonMenu)

◆ objectLineStrId_()

virtual MRVIEWER_API std::string MR::RibbonSceneObjectsListDrawer::objectLineStrId_ ( const Object & object,
const std::string & uniqueStr )
overrideprotectedvirtual

Reimplemented from MR::SceneObjectsListDrawer.

◆ setCloseContextOnChange()

void MR::RibbonSceneObjectsListDrawer::setCloseContextOnChange ( bool deselect)
inline

set closing scene context menu on any change


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