finished renaming things

This commit is contained in:
2026-01-09 06:03:59 +05:00
parent a60172ef9a
commit 4150a609e2
9 changed files with 67 additions and 67 deletions

View File

@@ -78,7 +78,6 @@ enum {
TimKey_Tab = 9,
TimKey_Enter = 13,
TimKey_Escape = 27,
/* printable utf8 characters */
TimKey_Insert = -1,
TimKey_Delete = -2,
TimKey_Home = -3,
@@ -90,6 +89,7 @@ enum {
TimKey_Left = -9,
TimKey_Right = -10,
};
// key code or 32-bit unicode char
typedef i32 TimKey;
#pragma endregion
@@ -222,36 +222,36 @@ void tim_frame(i32 x, i32 y, i32 w, i32 h, u64 color);
// text label
// str : text - supports multiple lines
// color: background, text
void label(cstr s, i32 x, i32 y, i32 w, i32 h, u64 color);
void tim_label(cstr s, i32 x, i32 y, i32 w, i32 h, u64 color);
// button - returns true on click
// color: frame, background, text
bool button(cstr txt, i32 x, i32 y, i32 w, i32 h, u64 color);
bool tim_button(cstr txt, i32 x, i32 y, i32 w, i32 h, u64 color);
// check box - returns true when clicked
// txt : text label
// state: persistent state, 0 unchecked, -1 semi checked, !0: checked
// color: check, background, text
bool check(cstr txt, i32* state, i32 x, i32 y, i32 w, u64 color);
bool tim_checkbox(cstr txt, i32* state, i32 x, i32 y, i32 w, u64 color);
// radio button - return true when clicked
// txt : text label
// state: persistent state, selected if *state == v
// v : value
// color: radio, background, text
bool radio(cstr txt, i32* state, i32 v, i32 x, i32 y, i32 w, u64 color);
bool tim_radiobutton(cstr txt, i32* state, i32 v, i32 x, i32 y, i32 w, u64 color);
/// text edit - value in state
/// @param e persistent edit state, use TimEditState_init() to create new state
/// @param color frame, background, text
/// @return key id or 0
i32 edit(TimEditState* e, i32 x, i32 y, i32 w, u64 color);
i32 tim_edit(TimEditState* e, i32 x, i32 y, i32 w, u64 color);
void TimEditState_init(TimEditState* e, i32 capacity, cstr initial_content);
void edit_insert(TimEditState* e, cstr s);
void TimEditState_insert(TimEditState* e, cstr s);
void edit_delete(TimEditState* e);
void TimEditState_delete(TimEditState* e);
#pragma endregion