LDKUILayoutSize
typedef struct LDKUILayoutSize{
LDKUISizeMode mode;
float value;
}LDKUILayoutSize;
typedef struct LDKUILayoutSize{
LDKUISizeMode mode;
float value;
}LDKUILayoutSize;
typedef LDKSizef LDKUISize;
typedef enum LDKUISizeMode{
LDK_UI_SIZE_PIXELS=0,
LDK_UI_SIZE_PERCENT=1,
LDK_UI_SIZE_FILL=2,
LDK_UI_SIZE_AUTO=3,
}LDKUISizeMode;
#define LDK_UI_AREA_HEADER_HEIGHT 34.0f
#define LDK_UI_DEFAULT_CONTROL_HEIGHT 22.0f
#define LDK_UI_DEFAULT_CONTROL_WIDTH 16.0f
#define LDK_UI_SCROLLBAR_SIZE 12.0f
#define LDK_UI_TAB_BAR_HEIGHT 34.0f
#define LDK_UI_TAB_BAR_MENU_BUTTON_WIDTH 24.0f
#define LDK_UI_TAB_BAR_TAB_HEIGHT 34.0f
#define LDK_UI_TITLE_BAR_HEIGHT 24.0f
#define LDK_UI_TREE_NODE_CHEVRON_WIDTH 10.0f
#define LDK_UI_TREE_NODE_INDENT_WIDTH 8.0f
Create a UI layout size that fills available space.
LDK_API LDKUILayoutSize ldk_ui_fill(void);
The resulting size.
Create a percentage-based UI layout size.
LDK_API LDKUILayoutSize ldk_ui_percent(float value);
float valueThe resulting size.
Create a pixel-based UI layout size.
LDK_API LDKUILayoutSize ldk_ui_px(float value);
float valueThe resulting size.
Draw and interact with a resize handle horizontal control.
LDK_API float ldk_ui_resize_handle_horizontal(
LDKUIContext *ctx,
float value,
float min_value,
float max_value
);
LDKUIContext *ctxfloat valuefloat min_valuefloat max_valueThe resulting value.
Draw and interact with a resize handle vertical control.
LDK_API float ldk_ui_resize_handle_vertical(
LDKUIContext *ctx,
float value,
float min_value,
float max_value
);
LDKUIContext *ctxfloat valuefloat min_valuefloat max_valueThe resulting value.
Set the height constraint for the next UI item.
LDK_API void ldk_ui_set_next_height(
LDKUIContext *ctx,
LDKUILayoutSize height
);
LDKUIContext *ctxLDKUILayoutSize heightSet the minimum size for the next UI item.
LDK_API void ldk_ui_set_next_min_size(
LDKUIContext *ctx,
float width,
float height
);
LDKUIContext *ctxfloat widthfloat heightSet width and height constraints for the next UI item.
LDK_API void ldk_ui_set_next_size(
LDKUIContext *ctx,
LDKUILayoutSize width,
LDKUILayoutSize height
);
LDKUIContext *ctxLDKUILayoutSize widthLDKUILayoutSize heightSet the layout weight of the next UI item.
LDK_API void ldk_ui_set_next_weight(
LDKUIContext *ctx,
float weight
);
LDKUIContext *ctxfloat weightSet the width constraint for the next UI item.
LDK_API void ldk_ui_set_next_width(
LDKUIContext *ctx,
LDKUILayoutSize width
);
LDKUIContext *ctxLDKUILayoutSize width