ui/wpf/label.c

Fri, 15 Nov 2024 21:16:18 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Fri, 15 Nov 2024 21:16:18 +0100
branch
newapi
changeset 383
03599608d555
parent 101
1c943d43fa81
permissions
-rw-r--r--

add UiObject reference counting (GTK)

101
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1 #include <stdio.h>
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
2 #include <stdlib.h>
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
3
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
4 #include "label.h"
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
5 #include "container.h"
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
6 #include "../../ucx/mempool.h"
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
7 #include "../common/context.h"
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
8 #include "../common/object.h"
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
9
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
10 UIWIDGET ui_label(UiObject *obj, char *label) {
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
11 return UIlabel(uic_get_current_container(obj), label, 2);
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
12 }
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
13
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
14 UIWIDGET ui_llabel(UiObject *obj, char *label) {
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
15 return UIlabel(uic_get_current_container(obj), label, 0);
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
16 }
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
17
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
18 UIWIDGET ui_rlabel(UiObject *obj, char *label) {
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
19 return UIlabel(uic_get_current_container(obj), label, 1);
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
20 }
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
21
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
22 UIWIDGET ui_space(UiObject *obj) {
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
23 return UIspace(uic_get_current_container(obj));
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
24 }
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
25
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
26 UIWIDGET ui_separator(UiObject *obj) {
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
27 return UIseparator(uic_get_current_container(obj));
1c943d43fa81 implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
28 }

mercurial