LDKUIWindow
typedef struct LDKUIWindow LDKUIWindow;
typedef struct LDKUIWindow LDKUIWindow;
typedef enum LDKUIWindowFlags{
LDK_UI_WINDOW_NONE=0,
LDK_UI_WINDOW_TITLE_BAR=1<<0,
LDK_UI_WINDOW_DRAGGABLE=1<<1,
LDK_UI_WINDOW_RESIZABLE=1<<2,
LDK_UI_WINDOW_BORDER=1<<3,
LDK_UI_WINDOW_NO_BG=1<<4,
LDK_UI_WINDOW_CLOSE_BUTTON=1<<5,
LDK_UI_WINDOW_NO_PADDING=1<<6,
LDK_UI_WINDOW_CACHEABLE=1<<7,
LDK_UI_WINDOW_TOOL=LDK_UI_WINDOW_CLOSE_BUTTON|LDK_UI_WINDOW_TITLE_BAR|LDK_UI_WINDOW_DRAGGABLE|LDK_UI_WINDOW_RESIZABLE|LDK_UI_WINDOW_BORDER,
}LDKUIWindowFlags;
typedef struct LDKUIWindowStackEntry LDKUIWindowStackEntry;
#define LDK_UI_MIN_WINDOW_HEIGHT 1
#define LDK_UI_MIN_WINDOW_WIDTH 64.0f
#define LDK_UI_WINDOW_CAPACITY 16
#define LDK_UI_WINDOW_STACK_CAPACITY 16
Begin a UI window.
LDK_API LDKUIRect ldk_ui_begin_window(
LDKUIContext *ctx,
char const *title,
LDKUIRect rect,
u32 flags
);
LDKUIContext *ctxchar const *titleLDKUIRect rectu32 flagsThe resulting rectangle.
Begin a UI window with fixed placement.
LDK_API LDKUIRect ldk_ui_begin_window_fixed(
LDKUIContext *ctx,
char const *title,
LDKUIRect rect,
u32 flags
);
LDKUIContext *ctxchar const *titleLDKUIRect rectu32 flagsThe resulting rectangle.
Begin an optionally closable window with editable geometry.
LDK_API bool ldk_ui_begin_window_open(
LDKUIContext *ctx,
char const *title,
LDKUIRect *rect,
bool *open,
u32 flags
);
LDKUIContext *ctxchar const *titleLDKUIRect *rectbool *openu32 flagsTrue when the UI condition or interaction is active; false otherwise.
Finish building the current UI window.
LDK_API void ldk_ui_end_window(LDKUIContext *ctx);
LDKUIContext *ctxReport whether the current window has requested closure.
LDK_API bool ldk_ui_window_close_requested(LDKUIContext *ctx);
LDKUIContext *ctxTrue when the UI condition or interaction is active; false otherwise.
Determine whether cached window content needs rebuilding.
LDK_API bool ldk_ui_window_content_should_build(LDKUIContext *ctx);
LDKUIContext *ctxTrue if the operation succeeds; false otherwise.
Request focus for the specified UI window.
LDK_API bool ldk_ui_window_focus(
LDKUIContext *ctx,
LDKUIId id
);
LDKUIContext *ctxLDKUIId idTrue if the operation succeeds; false otherwise.
Invalidate cached contents of one UI window.
LDK_API void ldk_ui_window_invalidate(
LDKUIContext *ctx,
LDKUIId id
);
LDKUIContext *ctxLDKUIId idInvalidate cached contents of all UI windows.
LDK_API void ldk_ui_windows_invalidate(LDKUIContext *ctx);
LDKUIContext *ctx