You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FEAT: introducing _native GOB widgets_ for Windows OS.
It's just an initial _proof of concept_. Using the existing `gob!` type as a holder of native GUI widgets. At this moment there are *partially* supported these native widgets: `button`, `check`, `radio`, `group-box`, `field`, `area`, `text`, `slider` and `date-time` (which so far works more like a date picker only).
Known issues:
* the native widgets are not converted to image, when using `to-image window-gob`.
* it looks there is a memory leak in the compositor as opening/closing multiple windows has growing memory effect. This is probably not directly related to native widgets as I can see it with just an image too.
* it's possible to append widgets into another widget's `pane`, but the position is not relative to the parent.
* there is no helper for creating a native gobs tree (no `layout`).
* there are still some output logs as this is really more just an experiment (and my learning playground).
Simple example displaying field and a button with event handler:
```
handle-events [
name: 'gob-example
priority: 60
handler: func [event][
print ["view-event:" event/type event/offset event/gob]
if switch event/type [
close [true]
key [event/key = escape]
] [
unhandle-events self
unview event/window
return none
]
switch event/type [
click
change [
print ["Field data:" mold fld/data]
]
]
none
]
]
btn: make gob! [size: 200x29 offset: 20x20 widget: [button "hello"]]
fld: make gob! [size: 200x29 offset: 20x50 widget: [field "world"]]
win: make gob! [size: 240x99 offset: 90x99 pane: [btn fld]]
view/as-is win
```
0 commit comments