Skip to content

Commit b7a3a5d

Browse files
committed
add comment
1 parent 74722d4 commit b7a3a5d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/ruis/style/styled.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2525

2626
namespace ruis {
2727

28+
/**
29+
* @brief A styled value.
30+
* This class is used to represent a value which can be either a direct value or a reference to a style value.
31+
* Style values are stored in style_provider and can be shared between multiple styled values.
32+
* @tparam value_type - type of the value.
33+
* It can be any type, but it is recommended to use simple types like int, float, color, length, etc. or resources like font, image, etc.
34+
* If value_type is a resource type (i.e. derived from ruis::resource) then styled will hold a shared_ptr to the resource,
35+
* otherwise it will hold the value directly.
36+
*/
2837
// TODO: make a concept which requires value_type::make_from(tml::forest)
2938
// Or value type can be derived from ruis::resource
3039
template <typename value_type>

0 commit comments

Comments
 (0)