Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
242d26c
[feature] text-chunk based:
mrsrina Jul 20, 2025
f87ce95
[feature] text-chunk based complete
mrsrina Jul 24, 2025
c0de01f
[update] chunk data access; utf8 sequence reloaded
mrsrina Jul 27, 2025
d27eb12
[update] cursors layers
mrsrina Jul 28, 2025
230c2ee
[deprecated] stupid brain
mrsrina Jul 29, 2025
538e060
[fix] box cursor rendering and selection
mrsrina Aug 3, 2025
206c393
[fix] scrollbar embedded impl was conflicting other-render passes
mrsrina Aug 3, 2025
e08c101
[fix] performance overhead
mrsrina Aug 7, 2025
4fea308
[fix] events not orderning absolute priority
mrsrina Aug 8, 2025
5e0bcb0
[fix] interact by mouse
mrsrina Aug 10, 2025
1dda68a
[fix] textbox text-height standarized
mrsrina Aug 11, 2025
cc38114
[fix] textbox unvisible selected-complete line
mrsrina Aug 14, 2025
bcbfaa6
[update] added basic arrow movement for entry
mrsrina Aug 15, 2025
41fefef
[ref] fixed stupid keyboard
mrsrina Aug 15, 2025
d73fd02
[update] added vertical scrolling on cursor movement
mrsrina Aug 20, 2025
b49bed6
[fix] clamp rect by square but stupid
mrsrina Aug 20, 2025
c6c0add
[update] only-one loop for cursors
mrsrina Aug 23, 2025
ef7fc47
[update] regex options for op(s)
mrsrina Aug 24, 2025
6a9799d
[fix] regex
mrsrina Aug 25, 2025
602052f
[fix] regex search
mrsrina Aug 28, 2025
7a98c09
[update] reg
mrsrina Aug 29, 2025
9d91e4f
[update] added regex movement
mrsrina Sep 1, 2025
ab5c7b4
[fix] select and modifier; new binds
mrsrina Sep 7, 2025
81a959b
[fix] movements for up/down
mrsrina Sep 7, 2025
6648dc5
[update] erase
mrsrina Sep 9, 2025
27eae68
[fix] text swizzle not considering empty-cases; per-line edit
mrsrina Sep 11, 2025
7471e55
[fix] erase
mrsrina Sep 13, 2025
1d2d9b8
[update] insert
mrsrina Sep 13, 2025
98aa846
[fix] glitches on typing/erase
mrsrina Sep 14, 2025
195e38a
[fix] tpyiong at end
mrsrina Sep 19, 2025
6438457
[fix] cursor insert spaces, horizontal-scroll, picking index
mrsrina Sep 20, 2025
8b3abed
[feature] added clipboard functions
mrsrina Sep 21, 2025
c493566
[fix] text glitches
mrsrina Sep 24, 2025
150496a
[fix] hash for line ending
mrsrina Sep 26, 2025
5dcbbd7
[fix] multi-cursor erasing complex glitchy
mrsrina Oct 11, 2025
23bd31f
[fix] erase multi-cursors movement
mrsrina Oct 11, 2025
ad26104
[fix] refresh cursors inline multiline
mrsrina Oct 19, 2025
fc197bb
[fix] multiline insert
mrsrina Oct 29, 2025
6fe9c74
[fix] equals repeated cursors
mrsrina Oct 30, 2025
78c561b
[update] monospaced flag; fixed textbox visual selection
mrsrina Dec 23, 2025
f75fdd2
[fix] inline ab equals cursor fixed
mrsrina Dec 23, 2025
ed8798b
[update] new utf8 utils; fixed last utf8 char issue selection
mrsrina Jan 5, 2026
5ce2cb1
[fix] fixed selection line wsize not returning to zero size
mrsrina Jan 5, 2026
c5b1b95
[fix] fixed crash when invalid utf8 is pasted
mrsrina Jan 5, 2026
a8d5496
[fix] draw font wsize next-line visually
mrsrina Jan 24, 2026
8cb8991
[fix] rendering selection visuals
mrsrina Jan 25, 2026
80f591a
[fix] fixed align position when left/right modifier action
mrsrina Jan 29, 2026
4b78815
[fix] cursor ab equals vibe
mrsrina Jan 29, 2026
dd9e8d4
[feature] linked list to textbox
mrsrina Feb 1, 2026
5145c57
[fix] text chunks wrong insert order when swizzle
mrsrina Feb 5, 2026
7fb8d8c
[fix] meow
mrsrina Feb 27, 2026
b609b8d
[build] hacky for including
mrsrina Feb 27, 2026
ff60ad8
[build] hacky for including
mrsrina Feb 27, 2026
4c8d41a
[build] hacky for including
mrsrina Feb 27, 2026
02afbdd
[build] hacky for including
mrsrina Feb 27, 2026
8721d81
[build] hacky for including
mrsrina Feb 27, 2026
30752f3
[build] hacky for including
mrsrina Feb 27, 2026
122351f
[build] undid hacky
mrsrina Feb 27, 2026
a6c1b7e
[build] removed trash code
mrsrina Feb 27, 2026
6da9be6
[update] listener for input binding
mrsrina Mar 3, 2026
4e09fd7
[update] listener for input binding
mrsrina Mar 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# 1
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Expand Down Expand Up @@ -41,8 +41,6 @@ find_package(Freetype REQUIRED)
file(GLOB_RECURSE HEADER_FILES "include/*.hpp")
file(GLOB_RECURSE SOURCE_FILES "src/*.cpp")

# exclude_files_by_regex(SOURCE_FILES /* regex */)

add_library(
ekg STATIC
${SOURCE_FILES}
Expand All @@ -66,6 +64,7 @@ target_compile_options(
target_compile_definitions(
ekg PRIVATE
EKG_VERSION="${EKG_VERSION}"
EKG_EOF_SYSTEM="${PLATFORM_EOF_SYSTEM}"
)

set_target_properties(
Expand Down
14 changes: 9 additions & 5 deletions cmake/properties.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,19 @@ endif()

if(WIN32 OR EKG_FORCE_WINDOWS)
set(LIBRARY_OUTPUT_PATH "../lib/windows/")
set(PLATFORM "windows")
set(PLATFORM "windows")
set(PLATFORM_EOF_SYSTEM "\\r\\n")
elseif(ANDROID OR EKG_FORCE_ANDROID)
set(LIBRARY_OUTPUT_PATH "${ANDROID_ABI}/")
set(PLATFORM "${ANDROID_ABI}")
set(PLATFORM "${ANDROID_ABI}")
set(PLATFORM_EOF_SYSTEM "\\n")
elseif(EKG_EMSCRIPTEN_BUILD_TYPE)
set(LIBRARY_OUTPUT_PATH "../lib/linux-wasm/")
set(PLATFORM "linux-wasm")
set(PLATFORM "linux-wasm")
set(PLATFORM_EOF_SYSTEM "\\n")
elseif(LINUX OR EKG_FORCE_LINUX)
# WSL is not detected as Linux-based OS, same you use a Linux kernel-based distribution.
# WSL is not detected as Linux-kernel based OS; force is necessary ><
set(LIBRARY_OUTPUT_PATH "../lib/linux/")
set(PLATFORM "linux")
set(PLATFORM "linux")
set(PLATFORM_EOF_SYSTEM "\\n")
endif()
29 changes: 29 additions & 0 deletions include/ekg/core/pools.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
#include "ekg/ui/popup/popup.hpp"
#include "ekg/ui/popup/widget.hpp"

#include "ekg/ui/textbox/textbox.hpp"
#include "ekg/ui/textbox/widget.hpp"

namespace ekg::core {
void registry(ekg::property_t &property);
}
Expand Down Expand Up @@ -80,6 +83,7 @@ namespace ekg::core {
ekg_core_widget_call_impl(ekg::scrollbar_t, widget_descriptor_at, todo); \
ekg_core_widget_call_impl(ekg::slider_t, widget_descriptor_at, todo); \
ekg_core_widget_call_impl(ekg::popup_t, widget_descriptor_at, todo); \
ekg_core_widget_call_impl(ekg::textbox_t, widget_descriptor_at, todo); \
}

#define ekg_core_unique_widget_call(descriptor_t, widget_descriptor_type, widget_descriptor_at, todo) \
Expand Down Expand Up @@ -155,6 +159,9 @@ namespace ekg {

ekg::pool<ekg::property_t> popup_property {};
ekg::pool<ekg::popup_t> popup {};

ekg::pool<ekg::property_t> textbox_property {};
ekg::pool<ekg::textbox_t> textbox {};
} pools;

template<typename t>
Expand Down Expand Up @@ -200,6 +207,10 @@ namespace ekg {
return ekg::io::any_static_cast<t>(
&ekg::pools.popup_property.query(at)
);
case ekg::type::textbox:
return ekg::io::any_static_cast<t>(
&ekg::pools.textbox_property.query(at)
);
}
case ekg::type::button:
return ekg::io::any_static_cast<t>(
Expand All @@ -225,6 +236,10 @@ namespace ekg {
return ekg::io::any_static_cast<t>(
&ekg::pools.popup.query(at)
);
case ekg::type::textbox:
return ekg::io::any_static_cast<t>(
&ekg::pools.textbox.query(at)
);
}

return t::not_found;
Expand Down Expand Up @@ -322,6 +337,20 @@ namespace ekg {
);
}

case ekg::type::textbox: {
ekg_registry_widget_impl(
ekg::textbox_t,
ekg::pools.textbox,
ekg::pools.textbox_property,
false,
{
property.is_childnizate = false;
property.is_children_docknizable = false;
widget.color_scheme = global_theme.textbox_color_scheme;
}
);
}

case ekg::type::stack: {
ekg::stack_t &stack {
ekg::pools.stack.push_back(
Expand Down
4 changes: 2 additions & 2 deletions include/ekg/draw/shape/shape.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ namespace ekg::draw {
void rect(
const ekg::rect_t<float> &rect,
const ekg::rgba_t<uint8_t> &color,
ekg::pixel_thickness_t line_thicnkess,
ekg::pixel_thickness_t line_thickness,
ekg::at_t &sampler_at
);

void rect(
float x, float y, float w, float h,
const ekg::rgba_t<uint8_t> &color,
ekg::pixel_thickness_t line_thicnkess,
ekg::pixel_thickness_t line_thickness,
ekg::at_t &sampler_at
);

Expand Down
2 changes: 2 additions & 0 deletions include/ekg/draw/typography/font.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ namespace ekg::draw {
uint32_t font_size {};
float text_height {};
float non_swizzlable_range {};
float space_wsize {};
FT_Bool ft_bool_kerning {};

bool font_size_changed {};
bool was_initialized {};
bool is_any_functional_font_face_loaded {};
bool is_monospaced {};
public:
void init();
void quit();
Expand Down
6 changes: 5 additions & 1 deletion include/ekg/handler/input.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,11 @@ namespace ekg {
bool has_motion {};
bool was_wheel {};
bool was_typed {};
std::string_view typed {};
};

using input_bind_function_t = ekg::result (*)(std::string_view, bool);

struct input_key_t {
public:
int32_t key {};
Expand All @@ -89,10 +92,11 @@ namespace ekg {

namespace ekg {
ekg::input_info_t &input();
bool fire(std::string_view tag);
bool fired(std::string_view tag);
bool input(std::string_view input);
void bind(std::string_view tag, std::string_view input);
void bind(std::string_view tag, std::vector<std::string_view> inputs);
void listener(ekg::input_bind_function_t input_bind_listener_function);
}

#endif
11 changes: 11 additions & 0 deletions include/ekg/handler/input/handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ namespace ekg::handler {

ekg::timing_t double_interact {};
ekg::timing_t last_time_wheel_was_fired {};
ekg::timing_t cooldown_wheel {};

// prevent too many unoptmized use of string allocations
std::string key_name {};
std::string string_builder {};

ekg::input_bind_function_t input_bind_listener_function {};
public:
ekg::input_info_t input {};
protected:
Expand Down Expand Up @@ -81,6 +88,10 @@ namespace ekg::handler {
bool get_input_state(
std::string_view tag
);

void set_input_bind_listener(
ekg::input_bind_function_t input_bind_listener_function
);
};
}

Expand Down
2 changes: 2 additions & 0 deletions include/ekg/handler/theme.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "ekg/ui/scrollbar/scrollbar.hpp"
#include "ekg/ui/slider/slider.hpp"
#include "ekg/ui/popup/popup.hpp"
#include "ekg/ui/textbox/textbox.hpp"

namespace ekg {
struct theme_t {
Expand All @@ -46,6 +47,7 @@ namespace ekg {
ekg::scrollbar_color_scheme_t scrollbar_color_scheme {};
ekg::slider_color_scheme_t slider_color_scheme {};
ekg::popup_color_scheme_t popup_color_scheme {};
ekg::textbox_color_scheme_t textbox_color_scheme {};
};

ekg::theme_t &theme(std::string tag = "");
Expand Down
1 change: 1 addition & 0 deletions include/ekg/io/descriptor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ namespace ekg {
slider = 8,
label = 9,
popup = 10,
textbox = 11
};
}

Expand Down
6 changes: 3 additions & 3 deletions include/ekg/io/memory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,8 @@ namespace ekg {
**/
namespace ekg {
/**
* Broken heart hash..........
**/
constexpr ekg::id_t not_found {2942656639};
constexpr ekg::id_t not_found {283233071866};

struct at_t {
public:
Expand Down Expand Up @@ -130,7 +129,7 @@ namespace ekg {

descriptor.at.unique_id = this->highest_unique_id++;
descriptor.at.flags = t::type;
descriptor.at.index = index;
descriptor.at.index = index;

return descriptor;
}
Expand All @@ -149,6 +148,7 @@ namespace ekg {
for (size_t it {}; it < size; it++) {
t &descriptor {this->loaded.at(it)};
descriptor.at.index = it;

if (descriptor.at.unique_id == at.unique_id) {
at.index = it;
return descriptor;
Expand Down
Loading
Loading