app.toolbar_content_toggleitem("note_maximize")
.icon0(UiIconSet::ViewFullscreen.as_str())
.icon1(UiIconSet::ViewRestore.as_str())
- .varname("notebook_dual_view")
.action("notebook_view_changed")
+ .varname("note_maximized")
.create();
app.toolbar_add_default("new_notebook", ToolbarItemPosition::SidebarLeft);
modified: bool,
+ #[bind("note_maximized")]
+ pub note_maximized: UiInteger,
+
#[bind("note_type")]
pub note_type: UiInteger,
title_end: -1,
modified: false,
+ note_maximized: Default::default(),
note_type: Default::default(),
text: Default::default(),
info: Default::default(),
/// Handles any attachment status change, which includes if this note is
/// directly attached or detached, but also if any parent attachment status changes
#[action]
- pub fn attachment_status_changed(&mut self, _event: &ActionEvent) -> Option<()>{
+ pub fn attachment_status_changed(&mut self, _event: &mut ActionEvent) -> Option<()>{
let doc = self.doc.get_doc()?;
- if doc.ctx.is_attached_to_obj() {
+ if let Some(mut obj) = doc.ctx.get_parent_object() {
// attached to an obj also means, this note is visible and the editor should
// require the lock for this note
// self.lock should always be none here
doc.ctx.unset_state(AppStates::NoteShowInfo as i32);
}
}
+
+ let val = self.note_maximized.get();
+ obj.splitview_set_visible(0, val == 0);
} else {
// clean self.lock, however don't clean self.vhandle
self.lock = None;
}
self.extract_title = false;
}
+
+ #[action]
+ pub fn notebook_view_changed(&mut self, event: &mut ActionEvent) {
+ let Some(obj) = &mut event.obj else {
+ return;
+ };
+ let Some(doc) = self.doc.get_doc() else {
+ return;
+ };
+
+ obj.splitview_set_visible(0, event.intval == 0);
+ doc.ctx.set_state(AppStates::NoteMaximized as i32);
+ }
}
fn generate_title(s: &str) -> Option<(&str, usize)> {
use ui_rs::ui::*;
use entity::note::{Model as Note};
-use crate::AppStates;
use crate::backend::{BackendHandle, BroadcastMessage, NoteId, NoteTitleUpdate, NoteUpdate};
use crate::note::new_note_id;
use crate::window::NavigationItem;
if let EventType::ListSelection(s) = event.event_type {
let result = self.select_note_from(NoteSelectFrom::ListSelection(s), true);
- obj.splitview_set_visible(0, false);
+ //obj.splitview_set_visible(0, false);
self.view.set(1);
// in case select_note_from didn't return a result, the note was already selected
// and no new navigation item was added
}
self.select_note_from(NoteSelectFrom::NavigationItem(nav.clone()), false);
- obj.splitview_set_visible(0, !nav.note_maximized);
- self.view.set(nav.note_maximized as i64);
- }
-
- #[action]
- pub fn notebook_view_changed(&mut self, event: &mut ActionEvent) {
- let Some(obj) = &mut event.obj else {
- return;
- };
-
- obj.splitview_set_visible(0, event.intval == 0);
+ //obj.splitview_set_visible(0, !nav.note_maximized);
+ //self.view.set(nav.note_maximized as i64);
}
pub fn update_note_title(&mut self, update: &NoteTitleUpdate) {
let notebook_doc = nb.get_doc(&e.data.backend);
e.obj.ctx.attach(¬ebook_doc);
e.data.selected_notebook = Some(notebook_doc);
- e.obj.splitview_set_visible(0, !nav.note_maximized);
+ //e.obj.splitview_set_visible(0, !nav.note_maximized);
e.data.navigation.push(nav);
}
ListCheck,
Checkbox,
Star,
+ ViewReveal,
ViewConceal,
Settings,
MediaPlay,
use std::any::Any;
use std::ffi::{c_char, c_int, c_void, CStr, CString};
-use crate::ui::{action_event_wrapper, event, ffi, simple_event_wrapper, ui_object_get_context, ui_object_get_windowdata, ui_reg_destructor, ui_remove_destructor, untyped_event_wrapper, ActionEventWrapper, Event, EventWrapper, SimpleEventWrapper, SubList, UntypedEventWrapper, RUST_TYPED_OBJECT_BOX_ANY};
+use crate::ui::{action_event_wrapper, event, ffi, simple_event_wrapper, ui_object_get_context, ui_object_get_windowdata, ui_reg_destructor, ui_remove_destructor, untyped_event_wrapper, ActionEventWrapper, Event, EventWrapper, NoAppData, SimpleEventWrapper, SubList, UntypedEventWrapper, RUST_TYPED_OBJECT_BOX_ANY};
use std::marker::PhantomData;
use std::mem;
}
}
+ pub fn get_parent_object(&self) -> Option<UiObject<NoAppData>> {
+ unsafe {
+ let obj_ptr = ui_context_get_parent_obj(self.ptr);
+ if !obj_ptr.is_null() {
+ return Some(UiObject::from_ptr(obj_ptr));
+ }
+ }
+ None
+ }
+
pub fn list<T>(&self) -> UiList<T> {
let mut ls = UiList::<T>::default();
ls.init(self, None);
}
}
+
impl<T: UiModel + UiActions> UiDoc<T> {
fn from_ptr(ptr: *mut c_void) -> UiDoc<T> {
unsafe {
}
}
+
impl<T> Clone for UiObjRef<T> {
fn clone(&self) -> Self {
UiObjRef::from_ptr(*self.ptr)
pub struct UiDocRef<T: UiModel + UiActions> {
ptr: Box<*mut c_void>,
+ orig_ptr: *mut c_void,
_data: PhantomData<T>
}
impl<T: UiModel + UiActions> UiDocRef<T> {
fn from_ptr(doc_ptr: *mut c_void) -> UiDocRef<T> {
- let obj_ref = UiDocRef { ptr: Box::new(doc_ptr), _data: PhantomData };
+ let obj_ref = UiDocRef { ptr: Box::new(doc_ptr), orig_ptr: doc_ptr, _data: PhantomData };
if !doc_ptr.is_null() {
let ctx = unsafe { ui_document_context(doc_ptr) };
unsafe {
fn ui_context_obj(ctx: *mut ffi::UiContext) -> *mut ffi::UiObject;
fn ui_context_is_attached(ctx: *mut ffi::UiContext) -> c_int;
fn ui_context_is_attached_to_obj(ctx: *mut ffi::UiContext) -> c_int;
+ fn ui_context_get_parent_obj(ctx: *mut ffi::UiContext) -> *mut ffi::UiObject;
fn ui_add_action(ctx: *mut ffi::UiContext, name: *const c_char, callback: UiCallback, data: *mut c_void);
NSImage* ui_cocoa_named_icon(const char *name) {
NSString *imageName = [[NSString alloc] initWithUTF8String:name];
- NSString *imgName = [standardIconNames objectForKey:imageName];
- if(imgName) {
- imageName = imgName;
- }
- return [NSImage imageNamed:imageName];
+ //NSString *imgName = [standardIconNames objectForKey:imageName];
+ //if(imgName) {
+ // imageName = imgName;
+ //}
+ //return [NSImage imageNamed:imageName];
+ return [NSImage imageWithSystemSymbolName:imageName accessibilityDescription:nil];
}
static UIIMAGE create_image(NSImage *image) {
uic_context_detach_all(ctx);
+ printf("cxMempoolFree %p\n", ctx);
cxMempoolFree(ctx->mp);
}
doc_ctx->onattach(&event, doc_ctx->onattachdata);
}
uic_check_state_widgets(ui_context_toplevel_parent(ctx));
- uic_send_status_change(doc_ctx);
+ UiObject *obj = ui_context_get_parent_obj(ctx);
+ uic_send_status_change(doc_ctx, obj);
+
+ UiContext *obj_ctx = uic_obj_context(ctx);
+ if(obj_ctx) {
+ ui_update_action_bindings(obj_ctx);
+ }
}
static void uic_context_unbind_vars(UiContext *ctx) {
uic_context_unbind_vars(doc_ctx); // unbind all doc/subdoc vars from the parent
doc_ctx->parent = NULL;
- ui_update_action_bindings(ctx);
+ UiContext *obj_ctx = uic_obj_context(ctx);
+ if(obj_ctx) {
+ ui_update_action_bindings(obj_ctx);
+ }
if(doc_ctx->ondetach) {
UiEvent event;
memset(&event, 0, sizeof(UiEvent));
}
uic_check_state_widgets(ui_context_toplevel_parent(ctx));
- uic_send_status_change(doc_ctx);
+ uic_send_status_change(doc_ctx, NULL);
ui_document_unref(document);
}
i = cxListIterator(ls);
cx_foreach(void *, doc, i) {
uic_context_detach_document(ctx, doc);
- uic_send_status_change(ui_document_context(doc));
+ uic_send_status_change(ui_document_context(doc), NULL);
}
cxListFree(ls);
ui_update_action_bindings(ctx);
}
-static void send_status_change(UiContext *ctx, UiEvent *event) {
+static void send_status_change(UiContext *ctx, UiEvent *event, UiObject *obj) {
CxIterator i = cxListIterator(ctx->documents);
cx_foreach(void *, doc, i) {
UiContext *doc_ctx = ui_document_context(doc);
if(doc_ctx->onattachmentstatuschange) {
- event->obj = doc_ctx->obj;
+ event->obj = doc_ctx->obj ? doc_ctx->obj : obj;
event->window = event->obj ? event->obj->window : NULL;
event->document = doc_ctx->self_doc ? doc_ctx->self_doc : doc_ctx->document;
doc_ctx->onattachmentstatuschange(event, doc_ctx->onattachmentstatuschangedata);
}
if(ctx->onattachmentstatuschange) {
- event->obj = ctx->obj;
+ event->obj = ctx->obj ? ctx->obj : obj;
event->window = event->obj ? event->obj->window : NULL;
event->document = ctx->self_doc ? ctx->self_doc : ctx->document;
ctx->onattachmentstatuschange(event, ctx->onattachmentstatuschangedata);
}
}
-void uic_send_status_change(UiContext *ctx) {
+void uic_send_status_change(UiContext *ctx, UiObject *obj) {
UiEvent event;
memset(&event, 0, sizeof(UiEvent));
- send_status_change(ctx, &event);
+ send_status_change(ctx, &event, obj);
}
}
int ui_context_is_attached_to_obj(UiContext *ctx) {
+ return uic_obj_context(ctx) != NULL;
+}
+
+UIEXPORT UiObject* ui_context_get_parent_obj(UiContext *ctx) {
+ UiContext *obj_ctx = uic_obj_context(ctx);
+ return obj_ctx ? obj_ctx->obj : NULL;
+}
+
+UiContext* uic_obj_context(UiContext *ctx) {
if(ctx->obj) {
- return TRUE;
+ return ctx;
}
if(ctx->parent == NULL) {
- return FALSE;
+ return NULL;
}
- return ui_context_is_attached_to_obj(ctx->parent);
+ return uic_obj_context(ctx->parent);
}
void uic_context_detach_context(UiContext *ctx, UiContext *doc_ctx); // TODO
void uic_context_detach_all(UiContext *ctx);
-void uic_send_status_change(UiContext *ctx);
+void uic_send_status_change(UiContext *ctx, UiObject *obj);
UiVar* uic_get_var(UiContext *ctx, const char *name);
UiVar* uic_get_var_t(UiContext *ctx, const char *name, UiVarType type);
void uic_add_state_widget_i(UiContext *ctx, void *widget, ui_enablefunc enable, const int *states, size_t numstates);
void uic_remove_state_widget(UiContext *ctx, void *widget);
+UiContext* uic_obj_context(UiContext *ctx);
+
UIEXPORT void ui_context_onattach(UiContext *ctx, ui_callback cb, void *data);
UIEXPORT void ui_context_ondetach(UiContext *ctx, ui_callback cb, void *data);
UIEXPORT void ui_context_onattachmentstatuschange(UiContext *ctx, ui_callback cb, void *data);
UIEXPORT int ui_context_is_attached(UiContext *ctx);
UIEXPORT int ui_context_is_attached_to_obj(UiContext *ctx);
+UIEXPORT UiObject* ui_context_get_parent_obj(UiContext *ctx);
#ifdef __cplusplus
}
UiContext *ctx = ui_document_context(doc);
if(ctx) {
if(--ctx->ref == 0) {
+ printf("doc destroy %p ctx %p\n", doc, ctx);
uic_context_destroy(ctx, doc);
}
}
case UI_ICON_ID_LIST_BULLET : return UI_ICON_LIST_BULLET ;
case UI_ICON_ID_LIST_ORDERED : return UI_ICON_LIST_ORDERED;
case UI_ICON_ID_LIST_CHECK : return UI_ICON_LIST_CHECK;
+ case UI_ICON_ID_CHECKBOX : return UI_ICON_CHECKBOX;
+ case UI_ICON_ID_STAR : return UI_ICON_STAR;
+ case UI_ICON_ID_VIEW_REVEAL : return UI_ICON_VIEW_REVEAL;
+ case UI_ICON_ID_VIEW_CONCEAL : return UI_ICON_VIEW_CONCEAL;
+ case UI_ICON_ID_SETTINGS : return UI_ICON_SETTINGS;
+ case UI_ICON_ID_MEDIA_PLAY : return UI_ICON_MEDIA_PLAY;
+ case UI_ICON_ID_MEDIA_STOP : return UI_ICON_MEDIA_STOP;
+ case UI_ICON_ID_MEDIA_PAUSE : return UI_ICON_MEDIA_PAUSE;
+ case UI_ICON_ID_MEDIA_SEEK_BACKWARD : return UI_ICON_MEDIA_SEEK_BACKWARD;
+ case UI_ICON_ID_MEDIA_SEEK_FORWARD : return UI_ICON_MEDIA_SEEK_FORWARD;
+ case UI_ICON_ID_MEDIA_SKIP_BACKWARD : return UI_ICON_MEDIA_SKIP_BACKWARD;
+ case UI_ICON_ID_MEDIA_SKIP_FORWARD : return UI_ICON_MEDIA_SKIP_FORWARD;
+ case UI_ICON_ID_CALL_START : return UI_ICON_CALL_START;
+ case UI_ICON_ID_CALL_STOP : return UI_ICON_CALL_STOP;
+ case UI_ICON_ID_CALL_INCOMING : return UI_ICON_CALL_INCOMING;
+ case UI_ICON_ID_CALL_OUTGOING : return UI_ICON_CALL_OUTGOING;
+ case UI_ICON_ID_MICROPHONE_ON : return UI_ICON_MICROPHONE_ON;
+ case UI_ICON_ID_MICROPHONE_OFF : return UI_ICON_MICROPHONE_OFF;
+ case UI_ICON_ID_LOCKED : return UI_ICON_LOCKED;
+ case UI_ICON_ID_UNLOCKED : return UI_ICON_UNLOCKED;
+ case UI_ICON_ID_SECURE : return UI_ICON_SECURE;
+ case UI_ICON_ID_INSECURE : return UI_ICON_INSECURE;
}
return NULL;
}
gtk_widget_set_tooltip_text(widget, tooltip);
button->widget = widget;
+ if(args->action) {
+ uic_bind_action(obj->ctx, args->action, widget, (ui_enablefunc)ui_set_enabled);
+ UiAction *ui_action = uic_resolve_action(obj->ctx, args->action);
+ if(!ui_action) {
+ ui_set_enabled(widget, FALSE);
+ }
+ }
+
if(args->toggled_by_state != 0) {
CxList *ls = cxArrayListCreate(NULL, sizeof(int), 1);
cxListAdd(ls, &args->toggled_by_state);
#define UI_ICON_LIST_BULLET "view-list-bullet"
#define UI_ICON_LIST_ORDERED "view-list-ordered"
#define UI_ICON_LIST_CHECK "checkbox-checked"
+#define UI_ICON_CHECKBOX "checkbox-checked"
+#define UI_ICON_STAR "starred"
+#define UI_ICON_VIEW_REVEAL "view-reveal"
+#define UI_ICON_VIEW_CONCEAL "view-conceal"
+#define UI_ICON_SETTINGS "applications-system"
+#define UI_ICON_MEDIA_PLAY "media-playback-start"
+#define UI_ICON_MEDIA_STOP "media-playback-stop"
+#define UI_ICON_MEDIA_PAUSE "media-playback-pause"
+#define UI_ICON_MEDIA_SEEK_BACKWARD "media-seek-backward"
+#define UI_ICON_MEDIA_SEEK_FORWARD "media-seek-forward"
+#define UI_ICON_MEDIA_SKIP_BACKWARD "media-skip-backward"
+#define UI_ICON_MEDIA_SKIP_FORWARD "media-skip-forward"
+#define UI_ICON_CALL_START "call-start"
+#define UI_ICON_CALL_STOP "call-stop"
+#define UI_ICON_CALL_INCOMING "call-incoming"
+#define UI_ICON_CALL_OUTGOING "call-outgoing"
+#define UI_ICON_MICROPHONE_ON "microphone-sensitivity-high"
+#define UI_ICON_MICROPHONE_OFF "microphone-disabled"
+#define UI_ICON_LOCKED "changes-allow"
+#define UI_ICON_UNLOCKED "changes-prevent"
+#define UI_ICON_SECURE "channel-secure"
+#define UI_ICON_INSECURE "channel-insecure"
+
#endif /* UI_GTK */
#define UI_ICON_LIST_BULLET "view-list-bullet"
#define UI_ICON_LIST_ORDERED "view-list-ordered"
#define UI_ICON_LIST_CHECK "checkbox-checked"
+#define UI_ICON_CHECKBOX "checkbox-checked"
+#define UI_ICON_STAR "starred"
+#define UI_ICON_VIEW_REVEAL "view-reveal"
+#define UI_ICON_VIEW_CONCEAL "view-conceal"
+#define UI_ICON_SETTINGS "applications-system"
+#define UI_ICON_MEDIA_PLAY "media-playback-start"
+#define UI_ICON_MEDIA_STOP "media-playback-stop"
+#define UI_ICON_MEDIA_PAUSE "media-playback-pause"
+#define UI_ICON_MEDIA_SEEK_BACKWARD "media-seek-backward"
+#define UI_ICON_MEDIA_SEEK_FORWARD "media-seek-forward"
+#define UI_ICON_MEDIA_SKIP_BACKWARD "media-skip-backward"
+#define UI_ICON_MEDIA_SKIP_FORWARD "media-skip-forward"
+#define UI_ICON_CALL_START "call-start"
+#define UI_ICON_CALL_STOP "call-stop"
+#define UI_ICON_CALL_INCOMING "call-incoming"
+#define UI_ICON_CALL_OUTGOING "call-outgoing"
+#define UI_ICON_MICROPHONE_ON "microphone-sensitivity-high"
+#define UI_ICON_MICROPHONE_OFF "microphone-disabled"
+#define UI_ICON_LOCKED "changes-allow"
+#define UI_ICON_UNLOCKED "changes-prevent"
+#define UI_ICON_SECURE "channel-secure"
+#define UI_ICON_INSECURE "channel-insecure"
#endif /* UI_QT */
#define UI_ICON_LIST_BULLET "list.bullet"
#define UI_ICON_LIST_ORDERED "list.number"
#define UI_ICON_LIST_CHECK "checklist"
+#define UI_ICON_CHECKBOX "checkmark.square"
+#define UI_ICON_STAR "star"
+#define UI_ICON_VIEW_REVEAL "eye"
+#define UI_ICON_VIEW_CONCEAL "eye.slash"
+#define UI_ICON_SETTINGS "gearshape"
+#define UI_ICON_MEDIA_PLAY "play.fill"
+#define UI_ICON_MEDIA_STOP "stop.fill"
+#define UI_ICON_MEDIA_PAUSE "pause.fill"
+#define UI_ICON_MEDIA_SEEK_BACKWARD "backward.fill"
+#define UI_ICON_MEDIA_SEEK_FORWARD "forward.fill"
+#define UI_ICON_MEDIA_SKIP_BACKWARD "backward.end.fill"
+#define UI_ICON_MEDIA_SKIP_FORWARD "forward.end.fill"
+#define UI_ICON_CALL_START "phone"
+#define UI_ICON_CALL_STOP "phone.down"
+#define UI_ICON_CALL_INCOMING "phone.arrow.down.left"
+#define UI_ICON_CALL_OUTGOING "phone.arrow.up.right"
+#define UI_ICON_MICROPHONE_ON "microphone"
+#define UI_ICON_MICROPHONE_OFF "microphone.slash"
+#define UI_ICON_LOCKED "lock"
+#define UI_ICON_UNLOCKED "lock.open"
+#define UI_ICON_SECURE "lock"
+#define UI_ICON_INSECURE "lock.trianglebadge.exclamationmark"
#endif /* UI_COCOA */
#define UI_ICON_LIST_BULLET ""
#define UI_ICON_LIST_ORDERED ""
#define UI_ICON_LIST_CHECK ""
+#define UI_ICON_CHECKBOX ""
+#define UI_ICON_STAR ""
+#define UI_ICON_VIEW_REVEAL ""
+#define UI_ICON_VIEW_CONCEAL ""
+#define UI_ICON_SETTINGS ""
+#define UI_ICON_MEDIA_PLAY ""
+#define UI_ICON_MEDIA_STOP ""
+#define UI_ICON_MEDIA_PAUSE ""
+#define UI_ICON_MEDIA_SEEK_BACKWARD ""
+#define UI_ICON_MEDIA_SEEK_FORWARD ""
+#define UI_ICON_MEDIA_SKIP_BACKWARD ""
+#define UI_ICON_MEDIA_SKIP_FORWARD ""
+#define UI_ICON_CALL_START ""
+#define UI_ICON_CALL_STOP ""
+#define UI_ICON_CALL_INCOMING ""
+#define UI_ICON_CALL_OUTGOING ""
+#define UI_ICON_MICROPHONE_ON ""
+#define UI_ICON_MICROPHONE_OFF ""
+#define UI_ICON_LOCKED ""
+#define UI_ICON_UNLOCKED ""
+#define UI_ICON_SECURE ""
+#define UI_ICON_INSECURE ""
#endif /* UI_MOTIF */
#define UI_ICON_LIST_BULLET ""
#define UI_ICON_LIST_ORDERED ""
#define UI_ICON_LIST_CHECK ""
+#define UI_ICON_CHECKBOX ""
+#define UI_ICON_STAR ""
+#define UI_ICON_VIEW_REVEAL ""
+#define UI_ICON_VIEW_CONCEAL ""
+#define UI_ICON_SETTINGS ""
+#define UI_ICON_MEDIA_PLAY ""
+#define UI_ICON_MEDIA_STOP ""
+#define UI_ICON_MEDIA_PAUSE ""
+#define UI_ICON_MEDIA_SEEK_BACKWARD ""
+#define UI_ICON_MEDIA_SEEK_FORWARD ""
+#define UI_ICON_MEDIA_SKIP_BACKWARD ""
+#define UI_ICON_MEDIA_SKIP_FORWARD ""
+#define UI_ICON_CALL_START ""
+#define UI_ICON_CALL_STOP ""
+#define UI_ICON_CALL_INCOMING ""
+#define UI_ICON_CALL_OUTGOING ""
+#define UI_ICON_MICROPHONE_ON ""
+#define UI_ICON_MICROPHONE_OFF ""
+#define UI_ICON_LOCKED ""
+#define UI_ICON_UNLOCKED ""
+#define UI_ICON_SECURE ""
+#define UI_ICON_INSECURE ""
#endif /* UI_MOTIF */
UI_ICON_ID_TEXT_UNDERLINE,
UI_ICON_ID_LIST_BULLET,
UI_ICON_ID_LIST_ORDERED,
- UI_ICON_ID_LIST_CHECK
+ UI_ICON_ID_LIST_CHECK,
+ UI_ICON_ID_CHECKBOX,
+ UI_ICON_ID_STAR,
+ UI_ICON_ID_VIEW_REVEAL,
+ UI_ICON_ID_VIEW_CONCEAL,
+ UI_ICON_ID_SETTINGS,
+ UI_ICON_ID_MEDIA_PLAY,
+ UI_ICON_ID_MEDIA_STOP,
+ UI_ICON_ID_MEDIA_PAUSE,
+ UI_ICON_ID_MEDIA_SEEK_BACKWARD,
+ UI_ICON_ID_MEDIA_SEEK_FORWARD,
+ UI_ICON_ID_MEDIA_SKIP_BACKWARD,
+ UI_ICON_ID_MEDIA_SKIP_FORWARD,
+ UI_ICON_ID_CALL_START,
+ UI_ICON_ID_CALL_STOP,
+ UI_ICON_ID_CALL_INCOMING,
+ UI_ICON_ID_CALL_OUTGOING,
+ UI_ICON_ID_MICROPHONE_ON,
+ UI_ICON_ID_MICROPHONE_OFF,
+ UI_ICON_ID_LOCKED,
+ UI_ICON_ID_UNLOCKED,
+ UI_ICON_ID_SECURE,
+ UI_ICON_ID_INSECURE
};
UIEXPORT UiIcon* ui_icon(const char* name, size_t size);