.. _program_listing_file_src_flamegpu_visualiser_PanelVis.cpp: Program Listing for File PanelVis.cpp ===================================== |exhale_lsh| :ref:`Return to documentation for file ` (``src/flamegpu/visualiser/PanelVis.cpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #include #include "flamegpu/visualiser/PanelVis.h" namespace flamegpu { namespace visualiser { PanelVis::PanelVis(std::shared_ptr _m, std::shared_ptr _environment) : env_properties(_environment->properties) , m(std::move(_m)) { // Rebuild added_properties for (const auto &element : m->ui_elements) { if (const EnvPropertyElement* p = dynamic_cast(element.get())) { added_properties.insert({p->name, p->index}); } } } void PanelVis::newSection(const std::string& header_text, bool begin_open) { std::unique_ptr ptr = std::make_unique(header_text, begin_open); m->ui_elements.push_back(std::move(ptr)); } void PanelVis::newEndSection() { std::unique_ptr ptr = std::make_unique(); m->ui_elements.push_back(std::move(ptr)); } void PanelVis::newStaticLabel(const std::string& label_text) { std::unique_ptr ptr = std::make_unique(label_text); m->ui_elements.push_back(std::move(ptr)); } void PanelVis::newSeparator() { std::unique_ptr ptr = std::make_unique(); m->ui_elements.push_back(std::move(ptr)); } } // namespace visualiser } // namespace flamegpu