[v3 windows] Update examples. Add example table to STATUS.md

This commit is contained in:
Lea Anthony
2023-06-05 20:34:52 +10:00
parent bb28bdf565
commit fc7952ff3b
3 changed files with 30 additions and 0 deletions
+22
View File
@@ -313,3 +313,25 @@ Built-in plugin support:
| WindowMask | nil | Makes the window the contents of the bitmap |
## Linux Specific
## Examples
| Example | Windows | Linux | Mac |
|--------------|---------|-------|-----|
| binding | | | |
| build | | | |
| clipboard | | | |
| contextmenus | | | |
| dialogs | | | |
| drag-n-drop | | | |
| events | | | |
| frameless | | | |
| kitchensink | | | |
| menu | | | |
| plain | | | |
| plugins | | | |
| screen | | | |
| systray | | | |
| window | | | |
| windowjs | | | |
| wml | | | |
+1
View File
@@ -46,6 +46,7 @@ func main() {
contextMenu := app.NewMenu()
contextMenu.Add("Click Me").OnClick(func(data *application.Context) {
fmt.Printf("Context menu data: %+v\n", data.ContextMenuData())
app.Quit()
})
globalContextMenu := app.NewMenu()
+7
View File
@@ -35,6 +35,13 @@ func main() {
URL: "/",
})
app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{
Title: "HTML TEST",
HTML: "<h1>AWESOME!</h1>",
CSS: `body { background-color: rgba(255, 0, 0, 255); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; user-select: none; -ms-user-select: none; -webkit-user-select: none; } .main { color: white; margin: 20%; }`,
JS: `window.iamhere = function() { console.log("Hello World!"); }`,
})
app.Events.On("clicked", func(_ *application.WailsEvent) {
println("clicked")
})