Classes | |
| struct | donner::editor::AttachedNumericStepperResult |
| One pair of compact step buttons joined to the right edge of a numeric field. More... | |
| struct | donner::editor::NumericPresetPopupPlacement |
| Where a numeric preset popup opens relative to the control it belongs to. More... | |
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
Functions | |
| AttachedNumericStepperResult | donner::editor::RenderAttachedNumericStepper (const char *id, const ImVec2 &fieldMin, const ImVec2 &fieldMax, const EditorTheme &theme) |
| Draw two vertically stacked step buttons with the exact height of the preceding field. | |
| NumericPresetPopupPlacement | donner::editor::PlaceNumericPresetPopup (const Box2d &control, double preferredHeight, double width, const Box2d &bounds, double gap) |
| Choose a preset popup position that never overlaps the control it belongs to. | |
| bool | donner::editor::BeginHybridNumericPresetPopup (const char *popupId, const ImVec2 &fieldMin, const ImVec2 &fieldMax, bool fieldActivated, float maximumHeight) |
| Open a preset popup next to a focused numeric input without stealing its typing focus. | |
Variables | |
| constexpr float | donner::editor::kAttachedNumericStepperWidth = 22.0f |
| Logical width of the stepper pair attached to a numeric input. | |
|
nodiscard |
Open a preset popup next to a focused numeric input without stealing its typing focus.
Call after rendering the input and its attached stepper. The caller must pair a true return with ImGui::EndPopup(). Single-click activation keeps the field editable while expanding the preset choices. Its width matches the numeric field plus attached stepper. It opens below the field when the list fits there, otherwise above, and never covers the field (see donner::editor::PlaceNumericPresetPopup).
| popupId | Stable ImGui popup ID in the caller's current ID scope. |
| fieldMin | Minimum screen-space corner of the numeric input. |
| fieldMax | Maximum screen-space corner of the numeric input. |
| fieldActivated | True only on the input's focus-acquisition frame. |
| maximumHeight | Maximum popup height before its contents scroll. |
|
nodiscard |
Choose a preset popup position that never overlaps the control it belongs to.
The popup opens below the control when its preferred height fits there, otherwise above when it fits there, otherwise on the side with more room with its height reduced so the list scrolls. Horizontally it follows the control's left edge, shifted only to stay inside the bounds when it fits within them.
| control | Screen-space rectangle of the numeric field plus its attached stepper. |
| preferredHeight | Height the popup needs to show all choices, capped by the caller's limit. |
| width | Popup width. |
| bounds | Screen-space rectangle the popup must stay within. |
| gap | Vertical spacing kept between the control and the popup. |
|
nodiscard |
Draw two vertically stacked step buttons with the exact height of the preceding field.
Call immediately after an ImGui numeric input. The pair has no horizontal gap, shares a single outer frame with the input, and keeps its hit boxes independent of the field's value.
| id | Stable ImGui ID scope for this pair. |
| fieldMin | Minimum screen-space corner of the preceding numeric field. |
| fieldMax | Maximum screen-space corner of the preceding numeric field. |
| theme | Active editor colors and corner radius. |