6#include <unordered_map>
56 const int* width = m_widths.Find(
id);
57 return width ? *width : 0;
86 std::chrono::steady_clock::time_point
lastTime{};
98 DockDropZoneAnim m_dropZoneAnim{};
132 void EndFrame() { m_triggerRects.EndFrame(); m_windowRects.EndFrame(); }
134 size_t Size()
const {
return m_triggerRects.Size() + m_windowRects.Size(); }
Dock tab drag state: the dragged tab and the drop-zone overlay animation.
Definition gui_subsystem_state.h:91
DockDropZoneAnim & DropZoneAnim()
Definition gui_subsystem_state.h:94
DockTabDragInfo & Info()
Definition gui_subsystem_state.h:93
Per-ID state kept between frames for the elements still built: an entry not written for kKeepFrames f...
Definition gui_recent_id_map.h:25
In-place rename of a tree / list / grid row (F2, Ctrl+Shift+Click or a slow re-click); the target row...
Definition gui_subsystem_state.h:24
void Cancel()
Ends the rename without touching the buffer.
Definition gui_subsystem_state.h:40
bool firstFrame
Set on the frame the rename starts, when a commit left over from an earlier edit must not end it; cle...
Definition gui_subsystem_state.h:30
void Start(tachyon::ID id, std::string *buffer, std::string_view text)
Starts renaming row id: buffer is set to text and edited in place.
Definition gui_subsystem_state.h:34
tachyon::ID targetID
the row being renamed
Definition gui_subsystem_state.h:26
bool isActive
Definition gui_subsystem_state.h:27
std::string * editBuffer
the caller's buffer the field edits
Definition gui_subsystem_state.h:31
Slider track widths written by the sliders' custom draws and read next frame (keyboard step sizes,...
Definition gui_subsystem_state.h:49
int GetWidth(tachyon::ID id)
0 until the slider has drawn once.
Definition gui_subsystem_state.h:53
RecentIDMap< int > & Widths()
For the custom-draw lambdas to write into.
Definition gui_subsystem_state.h:61
void EndFrame()
Once per frame: the widths of sliders no longer shown go after a while.
Definition gui_subsystem_state.h:64
IconID
Handle for an icon registered with ITextSystem::RegisterIconFromSVG / RegisterIconFromSVGFile.
Definition gui_style_text.h:15
@ Invalid
Definition gui_style_text.h:15
Definition gui_logging.h:24
The drop-zone overlay shown while a dock tab is dragged; it slides between zones.
Definition gui_subsystem_state.h:82
IntRect currentRect
interpolated rect, the one drawn
Definition gui_subsystem_state.h:84
std::chrono::steady_clock::time_point lastTime
Definition gui_subsystem_state.h:86
IntRect targetRect
destination rect
Definition gui_subsystem_state.h:85
bool hasTarget
the previous frame showed the overlay
Definition gui_subsystem_state.h:83
Set when a dock tab drag starts, so any target leaf can emit a phantom tab during construction.
Definition gui_subsystem_state.h:73
int tabWidth
the dragged tab's width at drag start, pixels
Definition gui_subsystem_state.h:77
tachyon::ID panelID
Definition gui_subsystem_state.h:74
std::string title
Definition gui_subsystem_state.h:75
IconID icon
Definition gui_subsystem_state.h:76
One press that may become a drag, with what every control does around it: the focus and the capture o...
Definition gui_gesture.h:60
bool IsHeld() const noexcept
Definition gui_gesture.h:64
A 64-bit element ID whose bit layout depends on its IDMode.
Definition gui_id.h:23
static constexpr ID Invalid()
The "no element" ID (all bits zero); also the default for optional ID parameters.
Definition gui_id.h:66
Definition gui_base_types.h:406
Integer 2D vector.
Definition gui_base_types.h:18