Commit Graph
1295 Commits
Author SHA1 Message Date
Liu 90dbba2cdd feat(widgets): migrate textinput editing to the stb_textedit kernel
- vendor stb_textedit and add the textedit core with canonical text
- map edit indices to pd_text layout for caret, selection and hit testing
- support caret movement, selection, clipboard, undo/redo, password,
  read-only and multiline editing
- render selections with the accent color and configurable text color
- fix caret scaling, input-group repaint and zero-size reflow regressions
- add integration tests, a preview page and internals notes
2026-11-22 20:11:20 +08:00
Liu b0c031f8dc feat: add window icon support
- Add ptk_window_set_icons with Win32 WM_SETICON, X11 _NET_WM_ICON and fb no-op.

- Add LCUI window/default icon APIs, DPI-aware HICON selection and pre-rendered built-in icon assets.

- Add pandagl memory image readers and fix bilinear zoom edge sampling.

- Cover file/data icons, defaults and high-DPI sizes with integration tests.
2026-11-21 23:26:34 +08:00
Liu 093a6a1e35 feat: add explicit window lifecycle and per-window event routing
- add the window API and lifecycle design specs
- lcui_init no longer creates a window; settings loading is explicit
- add lcui_window_* create/bind/geometry/state/show/close api
- replace display modes with window options and quit-on-last-window
- add per-window event scopes and window-based pointer/keyboard routing
- keep pending updates for widgets appended during a frame
- migrate examples, tests, previews and internals docs
- remove default-scope focus and mouseover getters
2026-11-16 00:03:50 +08:00
Liu 029d5c4e22 feat(widgets): add button group widget
- add button-group, button-group-text and button-group-separator
  prototypes with orientation and separator APIs
- mark direct children as geometry items, keep select, popover and
  dropdown wrappers out of the border geometry and clean up on unlink
- theme the group for the nova style, covering nested groups, select,
  input group and first/last edge rules
- add integration tests for factories, marking, geometry, input flex
  and trigger wrappers
- add zh-CN documentation, field tables, sidebar entry and C/XML/TSX
  examples for every section
2026-11-08 00:20:39 +08:00
Liu a23c16f5c5 feat(widgets): add input group widget 2026-11-08 00:20:36 +08:00
Liu 3dda91be11 feat(widgets): add accordion widget 2026-11-08 00:20:33 +08:00
Liu c575d7fab5 refactor(worker): internalize worker task queue
- move the worker queue into src/lcui_worker.c
- expose only lcui_worker_* from <LCUI/worker.h>
- reuse the global async queue in anchor
- fix double unlock, active-state race and cancel target
- add worker integration tests
2026-11-08 00:20:29 +08:00
Liu ef42f0894c refactor(ui): move router widgets into core widgets
- move router-link and router-view into src/widgets
- add <LCUI/widgets/router.h> and aggregate it in widgets.h
- remove the libui-router target and package
2026-11-08 00:20:29 +08:00
Liu 263c62e531 feat(widgets): add breadcrumb widget
- add the breadcrumb family: root, list, item, link, page, separator, ellipsis
- build from a path with a per-call label provider, append_item/append, or explicit data-path items
- collapse overflowing items while keeping as many trailing nodes as fit; the ellipsis opens a Portal-based dropdown
- emit change with the clicked node key; pages, disabled items, and custom append content never emit
- add theme rules, integration tests, a preview scene, and zh-CN docs with C/XML/TSX demos
2026-11-08 00:20:26 +08:00
Liu f226404554 feat(widgets): add sidebar widget 2026-11-02 22:31:25 +08:00
Liu ba50322e22 feat(widgets): add dropdown menu widget 2026-11-02 22:31:24 +08:00
Liu 898a96cb8c feat(widgets): add collapsible widget 2026-11-02 22:31:23 +08:00
Liu 49e719995c feat(widgets): add attachment widget 2026-11-02 22:31:17 +08:00
Liu 7e5350a883 fix(widgets): bind late data dialog triggers 2026-11-02 22:31:16 +08:00
Liu 860b1f1289 feat(widgets): add card widget 2026-11-02 22:31:16 +08:00
Liu ccad5ef131 feat(widgets): add toast widget 2026-11-02 22:31:15 +08:00
Liu 47014c5dbb feat(widgets): add popover widget 2026-10-28 23:40:31 +08:00
Liu 2ac38a6ca6 feat(widgets): add tooltip widget
Add Tooltip/TooltipTrigger/TooltipContent, data-tooltip attributes, Portal placement with border arrow, C attach helpers, docs, and tests.
2026-10-28 23:40:30 +08:00
Liu 1e48b886a0 feat(widgets): add progress label and value 2026-10-18 15:42:32 +08:00
Liu 323b641bbc feat(widgets): add groups, scrolling, alignment and checkmark to select 2026-10-18 15:42:25 +08:00
Liu a1078ff201 feat(widgets): add spinner and shimmer widgets 2026-10-18 15:42:23 +08:00
Liu 8876c70f93 feat(widgets): add dialog and alert-dialog widgets 2026-10-18 15:42:21 +08:00
Liu 20ac4484b9 feat(widgets): add empty widget 2026-10-18 15:42:19 +08:00
Liu a805852558 feat(widgets): add item widget 2026-10-18 15:42:18 +08:00
Liu b674004673 feat(widgets): add alert widget 2026-10-17 21:16:54 +08:00
Liu 6b7a4d41de feat(widgets): add badge widget 2026-10-17 21:16:53 +08:00
Liu 7154337944 feat(widgets): add button variants, sizes and themed styles with docs 2026-10-17 21:16:51 +08:00
Liu 92b46eee10 feat(widgets): add icon widget 2026-10-17 21:16:50 +08:00
Liu 10b3665071 feat(widgets): add portal and select widget 2026-10-17 21:16:38 +08:00
Liu 13c32f98a3 feat(widgets): add field widget 2026-10-17 21:16:34 +08:00
Liu fd23dd079f feat(widgets): add radio-group widget 2026-10-17 21:16:28 +08:00
Liu 8f77b1f32e feat(widgets): add checkbox widget 2026-10-17 21:16:26 +08:00
Liu 38aab01ec6 feat(widgets): add label widget 2026-08-05 22:42:29 +08:00
Liu 6cd01b468e chore: update copyright comment 2026-08-05 22:42:22 +08:00
Liu 2ccb6aa151 feat: add progress widget 2026-08-05 22:42:20 +08:00
Liu d48c8cc259 feat(settings): add custom string settings API
Expose lcui_settings_get_string / lcui_settings_set_string for reading
and writing custom [section] key-value pairs. Writes mark the settings
dirty; persistence requires a subsequent lcui_settings_flush() call.
2026-08-05 22:42:18 +08:00
Liu 7f9f52b904 chore: update copyright and email 2026-08-05 22:42:16 +08:00
Liu 4bb0d51cd5 feat(settings): schema-driven serialization and window state persistence
- Per-window state with [window.<id>] sections in settings.ini
- Settings module split into rendering and window_state subsystems
- Schema-driven (de)serialization with DEFINE_SETTING_INT/BOOL_FIELD macros
- Listener-based change notification via deserialize/serialize callbacks
- Integration tests for get/set, validation, and bind/restore lifecycle
2026-08-05 22:42:14 +08:00
Copilot cc0b79fccb feat: update settings APIs and add persistent configuration support (#329)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-08-05 22:42:03 +08:00
Liu 2404c535f3 refactor(ui-router): extract router widgets into a new lib
Create lib/ui-router/ as a thin UI binding layer between libui and librouter, exposing the router-link and router-view widgets under <ui_router/...>.

* Move src/widgets/router_{link,view}.c and the matching public headers into lib/ui-router/src and lib/ui-router/include.

* Drop include/LCUI/widgets/router_{link,view}.h and the corresponding entries in include/LCUI/widgets.h; src/lcui_widgets.c now pulls registrations from <ui_router.h>.

* Wire libui-router into the root xmake.lua add_includedirs and lcui add_deps chain; libui-router depends on yutil + libui + librouter only.

* tests/integration/test_router.c stays at the integration layer (router widgets exercise text inheritance and other libui internals); only its #include set is updated to use <ui_router.h>.

* Bump CHANGELOG and add bilingual lib/ui-router/README.
2026-08-05 22:41:13 +08:00
Liu 20b24cb9fc refactor(app): drop app_ prefix from public API
BREAKING CHANGE: lcui_app_get_fps -> lcui_get_fps,
lcui_app_set_frame_rate_cap -> lcui_set_fps_cap,
settings.frame_rate_cap -> settings.fps_cap.
lcui_app_init, lcui_app_destroy, lcui_app_process_events
removed from public header — use lcui_init, lcui_destroy,
lcui_run instead.
2026-08-05 22:41:07 +08:00
Liu e6506fca90 feat(app): add lcui_request_frame and animation timer driver 2026-08-05 22:40:07 +08:00
Liu 940a0fc33a chore: update copyright 2025-01-05 23:29:56 +08:00
Liu 4ad7d8a4fb feat: font alias 2025-01-05 23:08:45 +08:00
Liu 24f3192b9a refactor: update LCUI's dependencies on ui-widgets and ui-router 2024-12-29 23:37:24 +08:00
Liu 6851e9aef3 refactor: change type naming style 2024-12-22 23:14:13 +08:00
Liu fbd6d9f990 feat: support canceling tasks
BREAKING CHANGE: The data structure and function parameters related to the worker library have been changed
2024-12-07 13:30:30 +08:00
Liu bdd7cb5f75 feat: merge libtimer into libptk
BREAKING CHANGE: lcui_set_timeout -> ptk_set_timeout, lcui_set_interval -> ptk_set_interval
2024-12-07 13:30:29 +08:00
Liu 20ae97a1a2 feat: lib/platform -> lib/ptk
BREAKING CHANGE: lib/platform -> lib/ptk, and the naming style of
libplatform has changed to have a `ptk_` prefix.
2024-12-07 13:30:29 +08:00
Liu 375e03bd36 feat: replace custom bool type with bool type in stdbool.h 2024-12-07 13:30:28 +08:00