Skip to content

Editor → Widget Kit → containers.h

kit::property_row

Syntax

class CONJURE_API property_row final : public layout_host

Inheritance Hierarchy

kit::layout_host → kit::property_row

Constructors

AccessSignatureDescription
publicproperty_row( property_section &section, std::string_view key, const property_row_props &props);Submits the row on the section's next line (the section must be open; a row inside another asserts) and makes it the layout host.

Destructors

AccessSignatureDescription
public~property_row() override;Gives the layout host back to the section.

Variables

AccessNameTypeDefaultDescription
privatemBoundsrect{}
privatemCursorf320.0f
privatemFieldMarksfield_mark_flagsfield_mark_flags::NONE
privatemLineHeightf320.0f
privatemPinPressedboolfalse
privatemPlacedu320
privatemPreviousHostlayout_host *nullptr
privatemSectionproperty_section *nullptr
privatemSlotsproperty_row_slots{}

Functions

Public

bounds

[[nodiscard]] const rect &bounds() const noexcept;

The whole row (every value line).

field_marks

[[nodiscard]] field_mark_flags field_marks() const noexcept;

The marks the row's fields take: PERSISTED when marks.persisted, READ_ONLY for a read-only row, MIXED for a mixed one. Pass them in the fields' props (or with others: marks | INVALID).

line

[[nodiscard]] rect line(
    u32 index) const noexcept;

The values' slot of value line index (ROW tall); the last line for an index past the end.

note

void note(
    std::string_view text,
    colour_token colour = colour_token::FAINT);

An inline note after the values placed so far ("changed by play"): CAPTION in colour, in the rest of the first value line, ellipsised.

pin_pressed

[[nodiscard]] bool pin_pressed() const noexcept;

True in the frame the row's pin was pressed (never while covered).

place

[[nodiscard]] rect place(
    const math::vec2 &size) override;

The next value's rectangle on the first value line: after GAP_ROW (from the second value on), size.x wide (0: the rest of the line), size.y tall centred on the line.

slots

[[nodiscard]] const property_row_slots &slots() const noexcept;

The row's slots.

values

[[nodiscard]] const rect &values() const noexcept;

The values' slot across every line.