Go Web UI Toolkit - Public Releases and Development

Overview

Welcome!

GoDoc Build Status Go Report Card

Gowut (Go Web UI Toolkit) is a full-featured, easy to use, platform independent Web UI Toolkit written in pure Go, no platform dependent native code is linked or called.

For documentation please visit the Gowut Wiki.

Development takes place in the dev branch.

Quick install

To quickly install (or update to) the latest version, type:

go get -u github.com/icza/gowut/...

Quick test

To quickly test it and see it in action, run the following example applications.

Let's assume you're in the root of the Gowut project:

cd $GOPATH/src/github.com/icza/gowut

1. Showcase of Features.

This one auto-opens itself in your default browser.

go run _examples/showcase/showcase.go

The Showcase of Features is also available live: https://gowut-demo.herokuapp.com/show

2. A single window example.

This one auto-opens itself in your default browser.

go run _examples/simple/simple_demo.go

And this is how it looks:

Full App Screenshot

3. Login window example with session management.

Change directory so that the demo can read the test cert and key files:

cd _examples/login
go run login_demo.go

Open the page https://localhost:3434/guitest/ in your browser to see it.

Godoc of Gowut

You can read the godoc of Gowut online here:

http://godoc.org/github.com/icza/gowut/gwu

+1 / Star Gowut!

Issues
  • using SetColSpan/SetRowSpan produce unnalligned tables

    using SetColSpan/SetRowSpan produce unnalligned tables

    opened by djadala 14
  • Event handler (ETypeFocus) for panel never actives when tabPanel selects the panel

    Event handler (ETypeFocus) for panel never actives when tabPanel selects the panel

    I have a Panel in a TabPanel that I want to update went the panel becomes visible. The can occur if its TabPanel's tab is clicked on or when SetSelected() is called. Whenever either of these occur I want to update the panel. Using an event handler for ETypeFocus seems like the correct way to go but does not work. Looking at the code I believe that SetSelected() in TabPanel.go should include code to activate such a handler if present but it does not currently do so.

    If this is the correct direction, I'd be happy to put together a pull request.

    opened by willauld 7
  • go get issue

    go get issue

    Hi,

    i get this error:

    go get -u github.com/icza/gowut
    package github.com/icza/gowut
        imports github.com/icza/gowut: no buildable Go source files in /Users/geri/Work/gopath
    
    opened by geraldstanje 7
  • Session cookie seems to ignore server's port, which causes issues when a user opens multiple applications from the same host in the same browser

    Session cookie seems to ignore server's port, which causes issues when a user opens multiple applications from the same host in the same browser

    I have two applications running on a backend server. They open their gowut servers on different ports (same IP/hostname). I open a browser and connect to the first app and authenticate, everything is ok. Starting a second browser instance/tab and authenticating to the second application stops the first browser session from working. There are no errors, and re-authenticating fixes it but breaks the other session. However if I use a different browser to connect to the second application, everything works as expected and both applications work as intended.

    enhancement 
    opened by Bl4cksunLtd 6
  • ETypeMousedown event name not consistent with other event names

    ETypeMousedown event name not consistent with other event names

    https://github.com/icza/gowut/blob/7dde321edeeb14de3c4f665436fc5a698863cf48/gwu/event.go#L38

    Hi, it should be ETypeMouseDown, in all other event names last word is upper case.

    Regards.

    opened by djadala 4
  • Can Session closing generate an event?

    Can Session closing generate an event?

    I use sessions in my application. However, when the session expires, the gui is unresponsive. I would like to update/replace the gui contents when the session expires with a button that says something like "Start again", which starts a new session and presents the starting state of the gui. I have tried a number of things but have not been able to do this.

    As the Session.Removed(gwu.Session) does not expose any functions of use (those in Event like Event.ReloadWin(string)) I don't see how I can do this...

    Thanks, Glen

    opened by gnewton 3
  • Custom path handler for OAuth2 auth flow?

    Custom path handler for OAuth2 auth flow?

    I'd like to use OAuth2 Authentication Flow (esp. OpenID Connect) for user authentication. It needs a redirect URL to handle the token exchange. Either Server should expose a Handle(http.Handler) function (become a Muxer), or expose its ServeHTTP method (become a http.Handler).

    opened by tgulacsi 3
  • make  images undraggable

    make images undraggable

    https://github.com/icza/gowut/blob/7dde321edeeb14de3c4f665436fc5a698863cf48/gwu/image.go#L52

    Hi, i'm annoyed with dragable images, is it good idea to make images undraggable ? strImgCl = []byte(`" draggable="false">`)

    If not, just close issue and sorry for noise.

    Regards

    opened by djadala 2
  • Race Condition with login_demo.go

    Race Condition with login_demo.go

    Starting with,

    sudo go run -race login_demo.go

    Then logging in from two separate Clients and then waiting for the sessions to timeout yields the attached log file.

    racelog.txt

    bug 
    opened by rhedile 2
  • How to update contents of a listbox

    How to update contents of a listbox

    Is there a way to amend the contents of a listbox during an event called from the same page? I'd like a refresh button that would rebuild the contents of a listbox based on the current values in a slice on the server. I can do this with a textbox using tb.SetText(var) followed by marking the tb as dirty but cant work out how to do this for a list box.

    I've managed to achieve this by doing a .Remove(listbox) then creating a new listbox with the new values, adding it to the parent container then marking the parent container dirty. I could do this as the parent container was a table, but not sure how you would reinsert it into the middle of a normal panel? Adding a SetContents(slice) as a listbox method would make things a lot simpler.

    enhancement 
    opened by Bl4cksunLtd 2
  • nil pointer dereference in gwu.Table.Clear()

    nil pointer dereference in gwu.Table.Clear()

    If a table is constructed without all cells being populated, it will display fine, but the lack of cell contents causes a nil pointer dereference when performing a Clear() operation at table.go+169

    Wrapping that line in an if c2 != nil {} solves the problem for me, but I don't know if that's the proper way to address the issue.

    bug 
    opened by TheSeeker 2
  • DatePicker and Menu

    DatePicker and Menu

    Am new for Golang and find this as an extraordinary product. We are planning to use Gowut for our product. Will you continue this further and provide more widgets (Datepicker and Menu very importantly) and keep this upgraded to Golang versions? Please share your views.

    opened by simplepearls 4
  • Add SetWindowNotFoundHandler similarly SetAppRootHandler in server

    Add SetWindowNotFoundHandler similarly SetAppRootHandler in server

    In server.go in serveHTTP there is a code:

    	if win == nil {
    		// Invalid window name, render an error message with a link to the window list
    		w.Header().Set("Content-Type", "text/html; charset=utf-8")
    		w.WriteHeader(http.StatusNotFound)
    		NewWriter(w).Writess("<html><body>Window for name <b>'", winName, `'</b> not found. See the <a href="`, s.appPath, `">Window list</a>.</body></html>`)
    		return
    	}
    

    Please make an opportunity to appoint the handler for formation of the page of a nonexistent window.

    enhancement 
    opened by Garykom 1
  • Issue#9

    Issue#9

    Since file input mechanism is requested by many (issues#9), I made it.

    Now you can add an input box that accepts file path in the following manner.

    win := gwu.NewWindow("main", "test")
    tb := gwu.NewFileInputBox("file input box")
    win.Add(tb)
    
    opened by KMimura 2
  • fatal error: concurrent map writes

    fatal error: concurrent map writes

    Hello,

    I get the above panic when I try and mark two things dirty at nearly the same time. I can fix the above myself by changing my program but I think it would be good for you to implement a locking system if at all possible to prevent this.

    Thank you!

    opened by Brett-Kavanaugh 1
  • Synchronous call of XMLHttpRequest is not good

    Synchronous call of XMLHttpRequest is not good

    Warning in the browser console:

    [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.

    gowut-v1.3.0.js:244 :

    xhr.open("GET", _pathSessCheck, false); // synch call (else we can't catch connection error)
    

    Maybe there is an option to make the call asynchronous to avoid problems with the browser hang when the connection is lost during a call?

    opened by fpawel 1
Releases(v1.4.0)
  • v1.4.0(Oct 2, 2018)

    Changes and new features in v1.4.0:

    • New SessIDCookieName() and SetSessIDCookieName() methods in Server to get / set the cookie name used to store the Gowut session ID. Useful if you plan to run multiple Gowut servers on the same computer with the same app path (on different ports); you can set different session ID cookie names so they won't collide (#42).

    • Added ETypeMouseDown constant, identical to ETypeMousedown.

    • Fixed an issue where Table.Clear() could panic if table contained nil components (#23).

    • Mouse coordinates in events did not take the body's scroll offset into account, this is fixed now. Event.Mouse() and Event.MouseWin() now return proper coordinates.

    Source code(tar.gz)
    Source code(zip)
  • v1.3.0(Sep 26, 2017)

    Changes and new features in v1.3.0:

    • Added ListBox.Values() and ListBox.SetValues() methods to read / change items of a ListBox.
    • Fixed a number of data race issues at server session handling.
    • Moved the Showcase of Features live demo to: https://gowut-demo.herokuapp.com/show
    Source code(tar.gz)
    Source code(zip)
  • v1.2.2(Jan 17, 2017)

    Changes and new features in v1.2.2:

    • Moved the Showcase of Features live demo to: http://iczapp.com:3434/gowut-demo/show
    • Added -appName, -addr and -autoOpen flags to the Showcase of Features demo.
    • Added a missing check if a Server logger is set before using it.
    • Optimized Writer.
    Source code(tar.gz)
    Source code(zip)
  • v1.2.1(Jan 17, 2017)

    Changes and new features in v1.2.1:

    • Replaced home page with the Gowut Wiki: https://github.com/icza/gowut/wiki
    • Changed copyright year.
    • Other minor changes and improvements.
    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Jan 17, 2017)

    Changes and new features in v1.2.0:

    • BREAKING CHANGES! Renamed several interfaces and methods to conform to Go naming conventions. Gometalinter now gives 0 warnings. Sorry. Better sooner than later. The changes are the following:
      • Comp
        • Id() => ID()
      • Container
        • ById() => ByID()
      • HasUrl => HasURL
        • Url() => URL()
        • SetUrl() => SetURL()
      • Html => HTML
        • NewHtml() => NewHTML()
        • Html() => HTML()
        • SetHtml() => SetHTML()
      • Server
        • AppUrl() => AppURL()
        • AddRootHeadHtml() => AddRootHeadHTML()
        • RemoveRootHeadHtml() => RemoveRootHeadHTML()
      • Session
        • Id() => ID()
      • Window
        • AddHeadHtml() => AddHeadHTML()
        • RemoveHeadHtml() => RemoveHeadHTML()
        • SetFocusedCompId() => SetFocusedCompID()
    • Renamed github.com/icza/gowut/examples to _examples, making it excluded from build tools by default. You can still run the examples using "go run".
    • Window list has been rewritten to use Gowut components.
    • Encoded form of AppPath is used when specifying Cookie paths. For details, see issue #27.
    • Session creation and removal messages are now only logged with log.Println() if no logger is set at the Server. For details, see https://github.com/icza/gowut.dev/issues/7
    • Development of gowut has moved from gowut.dev project to the dev branch of the gowut project.
    Source code(tar.gz)
    Source code(zip)
  • v1.1.2(Jan 17, 2017)

    Changes and new features in v1.1.2:

    • Many code optimization, code formatting and grammar fixing to have an A+ Go Report Card rating! https://goreportcard.com/report/github.com/icza/gowut
    Source code(tar.gz)
    Source code(zip)
  • v1.1.1(Jan 17, 2017)

    Changes and new features in v1.1.1:

    -Improvement: HTTP request and response writers are now exposed with Events. See issue #19. Not directly, but they are available after a type assertion. See HasRequestResponse type.

    -Fix: when something was selected in a ListBox, it was impossible to deselect everything from the UI. See issue #20.

    -Fix: open web page with xdg-open in linux

    -Other minor changes, improvements and optimization.

    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Jan 17, 2017)

    Changes and new features in v1.1.0:

    • A new SessMonitor component which can be used to monitor and display session timeout and network connectivity at the client side without interacting with the session.
    • New method in Server: SetAppRootHandler(). With this you can now set your own logic to provide response to the app root path (when no window name is specified). The default function renders the window list, including authenticated windows and session creators - with clickable links.
    • New method in Window: RemoveHeadHtml() which removes an HTML head text that was previously added with AddHeadHtml().
    • New methods in Server: AddRootHeadHtml() and RemoveRootHeadHtml(). These are similar to Window.AddHeadHtml() and Window.RemoveHeadHtml(), but these relate to extra head HTML text that are rendered for the window list page (app root).
    • Showcase of feature demo app improvements.
    • Other minor changes, improvements and optimization.
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Jan 17, 2017)

    Changes and new features in v1.0.0:

    • Exported a new Writer which is used to render components. A value of this Writer is passed to Comp.Render(). It is now possible to use components implemented entirely by you (this Writer is the last piece that was not exported previously), or you can now change the Render() implementation.
    • Renamed all identifiers (constants and variables) to conform to the Go naming conventions (from UPPER_CASE to CamelCase). This is a backward incompatible change. Renaming rule is simple and consistent, for example CLR_RED => ClrRed, ETYPE_CLICK => ETypeClick etc.
    • New methods in Server: SetHeader() and Header(). You can use these to set HTTP response headers that will be added to all responses. For antecedent, see issue #10.
    • Table.Add() now only ensures the table has enough rows, and enough cells in the row. Previously it called Table.EnsureSize() if the cell was nonexistent.
    • New methods in Table: Trim() and TrimRow(). These come handy for example if the table contains cells where colspan > 1 is set. By calling this method we can ensure no empty cells will be rendered at the end of such rows. For antecedent, see issue #11.
    • Made changes to make it work on Google App Engine (GAE). Gowut and the Gowut "Showcase of Features" demo app can now be run on GAE. Live demo is available here: https://gowut-demo.appspot.com/show
    • Other minor changes, improvements and optimization.
    Source code(tar.gz)
    Source code(zip)
  • v0.9.0(Jan 17, 2017)

    Changes and new features in v0.9.0:

    • Migration from code.google.com to github.com. Changed/replaced all URLs to point to github.com.
    • Fixed issue #4.
    • Optimization.
    Source code(tar.gz)
    Source code(zip)
  • v0.8.0(Jan 17, 2017)

    Changes and new features in v0.8.0:

    • Significant event system improvements.
      • Event types are now categorized. This category can be accessed with EventType.Category(). Events that existed before fall under the ECAT_GENERAL category. These can be used/added to any components.
      • 2 new event types in the ECAT_WINDOW category: ETYPE_WIN_LOAD and ETYPE_WIN_UNLOAD. These can be used to detect the window load and unload events. They are to be used for Window only.
      • A new event type in the ECAT_INTERNAL category: ETYPE_STATE_CHANGE. This is an internal event type which is related to state changes in component internals such as changing selected tab (TabPanel) or expanding/collapsing an Expander.
        These internal events usually have a parent event designating the source sub-component (such as a tab component of a TabPanel or the header component of an Expander) and the mouse coordinates for example.
    • Event sending from clients are now asynchronous (instead of synchronous). The GUI Server implements proper RW locking. Component re-rendering is still synchronous (to avoid browser specific DOM rendering errors).
    • Server now has an AddStaticDir() method which can be used to register a folder whose content will be served (recursively) by the server when requested. For example you can place your images, custom CSS files and any other static content in a folder, tell the Server about this folder with the AddStaticDir() method, and you can reference these files in your components.
    • A new component: Timer. You can use this to generate a timed event or a series of timed events periodically. Practical uses include refreshing a component periodically, or checking if a Window is still open.
    • Set a max age for the gwu session id cookie (to preserve session id after browser restart).
    • The 'Showcase of Features' example app has been updated to demonstrate the new features.
    • Other minor changes, improvements and more optimization.
    Source code(tar.gz)
    Source code(zip)
  • v0.7.0(Jan 17, 2017)

    Changes and new features in v0.7.0:

    • A new example application: "Showcase of Features". The application is written using Gowut (of course) and showcases the component library. You can start it by typing (from the root of your GOPATH):

      go run src/code.google.com/p/gowut/examples/showcase.go
      
    • New component: Expander Expander shows and hides a content component when clicking on the header component.

    • A new TableView interface which defines methods associated with a component rendered into a table. Allows changing border, cell spacing, cell padding and default horizontal and vertical alignment for example. Used for: Panel, Table, TabPanel (and TabBar)

    • Added many new methods and constants to the style builder.

    • Panel improvements:

      • Constructors to create panels initialized with a different layout, e.g. NewHorizontalPanel().
      • New helper methods to add space consumer components.
      • New methods as part of the TableView.
    • Changed CSS styles (beautified) of many components.

    • CheckBox and RadioButton now have additional style classes for the disabled state.

    • "Mass" code optimization.

    • Other minor changes, improvements and bug fixes.

    Source code(tar.gz)
    Source code(zip)
  • v0.6.0(Jan 17, 2017)

    This is the first public release. Main features include:

    • A component library to assemble your user interfaces with
    • A GUI server which serves browser clients
    • Session management
    • Automatic event handling and dispatching
    • (CSS) Style builder to easily manipulate the style of components
    • Many features are yet to come, but I think it's worth sharing it with the World.
    Source code(tar.gz)
    Source code(zip)
Owner
András Belicza
Earn $100 and help me by using my DigitalOcean ref link: https://m.do.co/c/7bdc66c1fe73
András Belicza
UIKit - A declarative, reactive GUI toolkit for build cross platform apps with web technology with single codebase

UIKit - A declarative, reactive GUI toolkit for build cross platform apps with web technology with single codebase

zhuah 106 Apr 18, 2022
A Windows GUI toolkit for the Go Programming Language

About Walk Walk is a "Windows Application Library Kit" for the Go Programming Language. Its primarily useful for Desktop GUI development, but there is

Alexander Neumann 6.1k Jun 24, 2022
pure go, cross-platform, MIT-licensed ui toolkit for developers

duit - developer ui toolkit WARNING: this library is work in progress. backwards incompatible changes will be made. details duit is a pure go (*), cro

Mechiel Lukkien 849 Jun 24, 2022
GUI toolkit for go

Mostly-immediate-mode GUI library for Go. Source port to go of an early version of nuklear. ⚠️ Subject to backwards incompatible changes. ⚠️ ⚠️ Featur

Alessandro Arzilli 722 Jun 23, 2022
A unified graphical user experience toolkit for Go desktop applications

Unison A unified graphical user experience toolkit for Go desktop applications. macOS, Windows, and Linux are supported. Required setup Unison is buil

Richard Wilkes 14 Jun 17, 2022
A minimal material design based UI toolkit for Tiny Go projects

A minimal material design based UI toolkit for Tiny Go projects.

null 26 May 20, 2022
Golang bindings of Sciter: the Embeddable HTML/CSS/script engine for modern UI development

Go bindings for Sciter Check this page for other language bindings (Delphi / D / Go / .NET / Python / Rust). Attention The ownership of project is tra

Terra Informatica Software, Inc 2.4k Jun 29, 2022
A cross-platform app-development module for Go.

The cross-platform Go module for building apps (pronounced klo-va-seed). Usecases As a lightweight alternative to Electron Write your frontend and nat

Qlova Limited 93 Jun 18, 2022
Production Ready GO - Development Workspace

dev_ProdGO Production Ready GO - Development Workspace Install and Check Version MacOS $brew install go/golang $go version $mkdir -p $HOME/go/{bin,sr

null 0 Jan 6, 2022
A package to build progressive web apps with Go programming language and WebAssembly.

go-app is a package to build progressive web apps (PWA) with Go programming language and WebAssembly. It uses a declarative syntax that allows creatin

Maxence Charriere 6.2k Jun 29, 2022
Create desktop apps using Go and Web Technologies.

Build desktop applications using Go & Web Technologies. The traditional method of providing web interfaces to Go programs is via a built-in web server

Wails 7.7k Jun 26, 2022
Pglet - Web UI framework for backend developers

Pglet - Web UI framework for backend developers

Web UI framework for backend developers 569 Jun 22, 2022
Flutter on Windows, MacOS and Linux - based on Flutter Embedding, Go and GLFW.

go-flutter - A package that brings Flutter to the desktop Purpose Flutter allows you to build beautiful native apps on iOS and Android from a single c

null 5.3k Jun 28, 2022
Slice and dice your TMUX windows and panes

Chaakoo is a wrapper over TMUX that can create sessions, windows and panes from a grid based layout. The idea here is inspired by the CSS grid template areas.

Pallav Jha 83 May 9, 2022
Built Virtual Operating System and integrated application like calculator, gallery app , weather app, and text editor.

Virtual Operating System Built Virtual Operating System and integrated application like calculator, gallery app , weather app, and text editor. Langua

null 0 Nov 2, 2021
Native Go (golang) Graphical Interface system (2D and 3D), built on GoKi tree framework

GoGi is part of the GoKi Go language (golang) full strength tree structure system (ki = 木 = tree in Japanese) package gi is a scenegraph-based 2D and

GoKi 1k Jun 24, 2022
Tiny cross-platform webview library for C/C++/Golang. Uses WebKit (Gtk/Cocoa) and Edge (Windows)

webview A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs. Also, there are Rust bindings, Python bindings, Ni

webview 10.2k Jun 24, 2022
The X Go Binding is a low-level API to communicate with the X server. It is modeled on XCB and supports many X extensions.

Note that this project is largely unmaintained as I don't have the time to do or support more development. Please consider using this fork instead: ht

Andrew Gallant 444 Jun 18, 2022
A utility library to make use of the X Go Binding easier. (Implements EWMH and ICCCM specs, key binding support, etc.)

xgbutil is a utility library designed to work with the X Go Binding. This project's main goal is to make various X related tasks easier. For example,

Andrew Gallant 179 May 26, 2022