Photon Editor Library 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
UIPropertyLayout.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <SDL/TSdlAnyInstance.h>
6
7#include <vector>
8#include <string>
9#include <string_view>
10
11namespace ph::editor
12{
13
14class UIProperty;
15
17{
18public:
19 static UIPropertyLayout makeLinearListing(SdlNonConstInstance instance, std::string groupName = "");
20
21 UIPropertyLayout& addGroup(UIPropertyGroup group, bool shouldPrepend = false);
22 UIPropertyLayout& addGroups(const UIPropertyLayout& groups, bool shouldPrepend = false);
23 UIPropertyGroup* findGroup(std::string_view groupName);
24 UIPropertyGroup& findOrCreateGroup(std::string_view groupName, bool shouldPrepend = false);
25 UIProperty* findPropertyInGroup(std::string_view groupName, std::string_view propName);
26 void clear();
27
28 auto begin() noexcept -> typename std::vector<UIPropertyGroup>::iterator;
29 auto begin() const noexcept -> typename std::vector<UIPropertyGroup>::const_iterator;
30 auto end() noexcept -> typename std::vector<UIPropertyGroup>::iterator;
31 auto end() const noexcept -> typename std::vector<UIPropertyGroup>::const_iterator;
32
33private:
34 std::vector<UIPropertyGroup> m_groups;
35};
36
37inline auto UIPropertyLayout::begin() noexcept
38-> typename std::vector<UIPropertyGroup>::iterator
39{
40 return m_groups.begin();
41}
42
43inline auto UIPropertyLayout::begin() const noexcept
44-> typename std::vector<UIPropertyGroup>::const_iterator
45{
46 return m_groups.begin();
47}
48
49inline auto UIPropertyLayout::end() noexcept
50-> typename std::vector<UIPropertyGroup>::iterator
51{
52 return m_groups.end();
53}
54
55inline auto UIPropertyLayout::end() const noexcept
56-> typename std::vector<UIPropertyGroup>::const_iterator
57{
58 return m_groups.end();
59}
60
61}// end namespace ph::editor
Definition UIPropertyGroup.h:13
Definition UIProperty.h:12
Definition UIPropertyLayout.h:17
UIProperty * findPropertyInGroup(std::string_view groupName, std::string_view propName)
Definition UIPropertyLayout.cpp:149
UIPropertyGroup * findGroup(std::string_view groupName)
Definition UIPropertyLayout.cpp:115
void clear()
Definition UIPropertyLayout.cpp:158
auto end() noexcept -> typename std::vector< UIPropertyGroup >::iterator
Definition UIPropertyLayout.h:49
UIPropertyLayout & addGroups(const UIPropertyLayout &groups, bool shouldPrepend=false)
Definition UIPropertyLayout.cpp:95
auto begin() noexcept -> typename std::vector< UIPropertyGroup >::iterator
Definition UIPropertyLayout.h:37
UIPropertyLayout & addGroup(UIPropertyGroup group, bool shouldPrepend=false)
Definition UIPropertyLayout.cpp:81
UIPropertyGroup & findOrCreateGroup(std::string_view groupName, bool shouldPrepend=false)
Definition UIPropertyLayout.cpp:127
static UIPropertyLayout makeLinearListing(SdlNonConstInstance instance, std::string groupName="")
Definition UIPropertyLayout.cpp:53
Definition ph_editor.h:10
Definition TWeakHandle.h:113