-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee72f25
commit 3a2b77c
Showing
24 changed files
with
2,239 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# Title.......: GUIEN | ||
# Author......: Gabor de Mooij (c) copyright 2025 | ||
# Date........: 28 januari 2025 | ||
# License.....: BSD-3/MIT | ||
# Version.....: 1.0 | ||
# | ||
# Description: | ||
# This is a demo program that shows how to use the | ||
# GUI plugin to create a graphical user interface. | ||
# | ||
# Dependencies: | ||
# - supplementen | ||
# - xmltree | ||
# - lvglen | ||
|
||
Program use: (File new: Path supplementen). | ||
Program use: (File new: Path xmltree). | ||
Program use: (File new: Path lvglen). | ||
|
||
>> gui := Gui new. | ||
>> i := 0. | ||
|
||
gui on: ['click'] do: { :info | ||
i add: 1. | ||
(info = 123) true: { | ||
gui xml: (b copy ~counter~: i) name: ['btn'] at: 100. | ||
}. | ||
}. | ||
|
||
>> b := | ||
LVGLEN new | ||
component | ||
elements | ||
view | ||
extends: ['object'], | ||
events: True, | ||
width: ['100%'], | ||
height: ['100%'], | ||
elements | ||
button | ||
events: True, | ||
id: 123, | ||
elements | ||
label | ||
text: ['~counter~'], | ||
close | ||
close | ||
close | ||
close | ||
text. | ||
|
||
>> a := | ||
LVGLEN new | ||
component | ||
elements | ||
view | ||
extends: ['object'], | ||
id: 100, | ||
events: True, | ||
height: ['400px'], | ||
width: ['800px'], | ||
elements | ||
object | ||
events: ['verdadero'], | ||
width: ['100%'], | ||
height: ['100%'], | ||
elements | ||
button | ||
events: True, | ||
id: 123, | ||
elements | ||
label | ||
text: ['CLICK ME!'], | ||
close | ||
close | ||
close | ||
close | ||
close | ||
text. | ||
|
||
gui screen: a. | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# Título.....: GUIES | ||
# Autor......: Gabor de Mooij (c) copyright 2025 | ||
# Fecha......: 2025-01-28 | ||
# Licencia...: BSD-3/MIT | ||
# Versión....: 1.0 | ||
# | ||
# Descripción: | ||
# Este es un programa de demostración que muestra cómo usar el | ||
# complemento GUI para crear una interfaz gráfica de usuario. | ||
# | ||
# Dependencias: | ||
# - supplementoes | ||
# - abrolxml | ||
# - lvgles | ||
|
||
>> gui := Gui nuevo. | ||
>> i := 0. | ||
|
||
Programa utilizar: (Ubicación-del-archivo supplementoes). | ||
Programa utilizar: (Ubicación-del-archivo arbolxml). | ||
Programa utilizar: (Ubicación-del-archivo lvgles). | ||
|
||
gui en: ['click'] hacer: { :info | ||
i añadir: 1. | ||
(info = 123) verdadero: { | ||
gui xml: (b copiar ~contar~: i) nombre: ['btn'] en: 100. | ||
}. | ||
}. | ||
|
||
|
||
|
||
>> b := | ||
LVGLES nuevo | ||
componente | ||
elementos | ||
vista | ||
extiende: ['objeto'], | ||
burbuja-evento: ['verdadero'], | ||
altura: ['100%'], | ||
ancho: ['100%'], | ||
elementos | ||
boton | ||
burbuja-evento: ['verdadero'], | ||
id: 123, | ||
elementos | ||
etiqueta | ||
texto: ['~contar~'], | ||
cerrar | ||
cerrar | ||
cerrar | ||
cerrar | ||
texto. | ||
|
||
>> a := | ||
LVGLES nuevo | ||
componente | ||
elementos | ||
vista | ||
extiende: ['objeto'], | ||
id: 100, | ||
burbuja-evento: ['verdadero'], | ||
altura: ['400px'], | ||
ancho: ['800px'], | ||
elementos | ||
objeto | ||
burbuja-evento: ['verdadero'], | ||
ancho: ['100%'], | ||
altura: ['100%'], | ||
elementos | ||
boton | ||
burbuja-evento: ['verdadero'], | ||
id: 123, | ||
elementos | ||
etiqueta | ||
texto: ['HAZ CLIC'], | ||
cerrar | ||
cerrar | ||
cerrar | ||
cerrar | ||
cerrar | ||
texto. | ||
|
||
Salida escribir: a, detener. | ||
gui pantalla: a. | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
|
||
>> gui := Gui nieuw. | ||
>> i := 0. | ||
|
||
Programma gebruik: ( Bestand nieuw: ['../../../../misc/supplements/nl'] ). | ||
Programma gebruik: ( Bestand nieuw: ['../../extra/nl/lvglnl'] ). | ||
|
||
|
||
gui bij: ['klik'] doen: { :info | ||
i optellen: 1. | ||
Uit schrijf: ['klik!'], stop. | ||
Uit schrijf: info getal, stop. | ||
(info = 123) ja: { | ||
gui xml: (knop kopieer ~teller~: i) name: ['knop'] at: 100. | ||
}. | ||
}. | ||
|
||
>> knop := [' | ||
<component> | ||
<view extends="lv_obj" event_bubble="true" width="100%" height="100%"> | ||
<lv_button id="123" event_bubble="true" > | ||
<lv_label text="~teller~"></lv_label> | ||
</lv_button> | ||
</view> | ||
</component> | ||
']. | ||
|
||
>> xml := XML-boom nieuw. | ||
|
||
|
||
>> xml := [' | ||
<component> | ||
<view extends="lv_obj" id="100" name="knoppie" event_bubble="true" height="400px" width="800px" > | ||
<lv_obj event_bubble="true" width="100%" height="100%"> | ||
<lv_button id="123" event_bubble="true" > | ||
<lv_label text="CLICK ME!"></lv_label> | ||
</lv_button> | ||
</lv_obj> | ||
</view> | ||
</component> | ||
']. | ||
|
||
gui scherm: xml. | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# Titel.......: GUINL | ||
# Auteur......: Gabor de Mooij (c) copyright 2025 | ||
# Datum.......: 28 januari 2025 | ||
# Licentie....: BSD-3/MIT | ||
# Versie......: 1.0 | ||
# | ||
# Beschrijving: | ||
# GUINL is een voorbeeldprogramma van een GUI in Citrine/NL. | ||
# | ||
# Benodigdheden: | ||
# - xmlboom | ||
# - lvglnl | ||
# - supplementnl | ||
|
||
Programma gebruik: ( Bestand nieuw: Bestandslocatie supplementnl ). | ||
Programma gebruik: ( Bestand nieuw: Bestandslocatie xmlboom ). | ||
Programma gebruik: ( Bestand nieuw: Bestandslocatie lvglnl ). | ||
|
||
>> gui := Gui nieuw. | ||
>> i := 0. | ||
|
||
gui bij: ['klik'] doen: { :info | ||
i optellen: 1. | ||
(info = 123) ja: { | ||
gui xml: ( | ||
knopstructuur | ||
tekst | ||
kopieer | ||
~teller~: i | ||
) | ||
naam: ['knop'] | ||
bij: 100. | ||
}. | ||
}. | ||
|
||
>> knopstructuur := LVGLNL nieuw. | ||
|
||
knopstructuur | ||
component | ||
elementen | ||
weergave | ||
baseer-op: ['object'], | ||
interactief: Ja, | ||
breedte: ['100%'], | ||
hoogte: ['100%'], | ||
elementen | ||
knop | ||
id: 123, | ||
interactief: Ja, | ||
elementen | ||
label | ||
tekst: ['~teller~'], | ||
sluit | ||
sluit | ||
sluit | ||
sluit. | ||
|
||
>> boomstructuur := LVGLNL nieuw. | ||
|
||
boomstructuur | ||
component | ||
elementen | ||
weergave | ||
baseer-op: ['object'], | ||
id: 100, | ||
interactief: Ja, | ||
hoogte: ['400px'], | ||
breedte: ['800px'], | ||
elementen | ||
object | ||
interactief: Ja, | ||
breedte: ['100%'], | ||
hoogte: ['100%'], | ||
elementen | ||
knop | ||
interactief: Ja, | ||
id: 123, | ||
elementen | ||
label | ||
tekst: ['klik mij!'], | ||
sluit | ||
sluit | ||
sluit | ||
sluit | ||
sluit. | ||
|
||
gui scherm: boomstructuur tekst. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Title.......: LVGLEN | ||
# Author......: Gabor de Mooij (c) copyright 2025 | ||
# Date........: 28 januari 2025 | ||
# License.....: BSD-3/MIT | ||
# Version.....: 1.0 | ||
# | ||
# Description: | ||
# LVGLEN is an English XML tree to build | ||
# graphical user interfaces with LVGL. | ||
# | ||
# Dependencies: | ||
# - supplementen | ||
# - xmltree | ||
|
||
>> LVGLEN := Object new. | ||
|
||
LVGLEN on: ['new'] do: { | ||
|
||
>> xml := XML-tree new. | ||
|
||
xml | ||
names: ( | ||
List new | ||
object: ['lv_obj'], | ||
button: ['lv_button'], | ||
label: ['lv_label'] | ||
) | ||
attributes: ( | ||
List new | ||
events: ['event_bubble'] | ||
|
||
) | ||
values: ( | ||
List new | ||
True: ['true'], | ||
False: ['false'], | ||
object: ['lv_obj'], | ||
button: ['lv_boton'], | ||
label: ['lv_label'] | ||
). | ||
|
||
<- xml. | ||
}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Title.......: Supplement English Language | ||
# Author......: Gabor de Mooij (c) copyright 2025 | ||
# Date........: 28 januari 2025 | ||
# License.....: BSD-3/MIT | ||
# Version.....: 1.0 | ||
# | ||
# Description: | ||
# This supplement contains extensions for the English language. | ||
|
||
None on: ['otherwise:'] do: { :fallback <- fallback. }. |
Oops, something went wrong.