Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Platform-native GUI library for Go.
Go C Objective-C
branch: master
Failed to load latest commit information.
examples Updated the widget gallery example to use the new Table without Image…
gtkdtp G_ADD_PRIVATE() is too new; wrote in the correct form for GLib 2.32. …
gtkpopover More GTK+ Popover work. I should probably make this a proper widget.
mergeback ...in with the new.
popover Split out all Windows header file inclusion into a single wininclude_…
proposals ...in with the new.
wintable More TODOs.
LICENSE Added license and README.
README.md Split the rewrite into a new repository.
area.go go fmt. Precursor to bug report filing.
area_darwin.go Merged new container/sizing stuff.
area_darwin.m ...in with the new.
area_unix.go Merged new container/sizing stuff.
area_windows.c Merged new container/sizing stuff.
area_windows.go More TODOs.
assortednotes.md Out with the old...
basicctrls.go More TODOs.
basicctrls_darwin.m Implemented TextField.ReadOnly() on Mac OS X. Began standardizing win…
basicctrls_windows.c Started adding TextField.ReadOnly() and implemented it (mostly) on Wi…
button_darwin.go Merged new container/sizing stuff.
button_unix.go Merged new container/sizing stuff.
button_windows.go Merged new container/sizing stuff.
checkbox_darwin.go Merged new container/sizing stuff.
checkbox_unix.go Merged new container/sizing stuff.
checkbox_windows.go Merged new container/sizing stuff.
comctl32_windows.c Began the Windows Table integration.
common_darwin.go ...in with the new.
common_darwin.m Started the OS X implementation of Textbox.
common_unix.go ...in with the new.
common_windows.c Fixed up appearance of read-only TextFields on Windows.
common_windows.go go fmt. Precursor to bug report filing.
compatibility.md Updated compatibility.md now that GTK+ 3.16 is officially out.
container.go Merged new container/sizing stuff.
container_darwin.go Added the initial implementaiton of Spinbox on Mac OS X. It doesn't q…
container_darwin.m Restructured container on Mac OS X likewise. Still have to test.
container_unix.c Migrated the GTK+ backend to the new new container system in which co…
container_unix.go Migrated the GTK+ backend to the new new container system in which co…
container_windows.c Removed the gouicontainer window class from the Windows backend; it i…
container_windows.go Removed the gouicontainer window class from the Windows backend; it i…
control.go Reimplemented Control.containerShow()/Control.containerHide(). Will b…
control_darwin.go Merged new container/sizing stuff.
control_darwin.m Used the alignment rect instead of the frame for laying out and sizin…
control_unix.go Merged new container/sizing stuff.
control_windows.c ...in with the new.
control_windows.go Reimplemented Control.containerShow()/Control.containerHide(). Will b…
dialog.go ...in with the new.
dialog_darwin.go ...in with the new.
dialog_darwin.m ...in with the new.
dialog_unix.go go fmt. Precursor to bug report filing.
dialog_windows.c Resolved TODO about OpenFile() on GTK+ returning NULL.
dialog_windows.go ...in with the new.
doc.go ...in with the new.
events_darwin.go ...in with the new.
events_notdarwin.go ...in with the new.
future More TODOs.
grid.go Removed container from SimpleGrid and Grid. This is necessary to do n…
group_darwin.go Fixed Mac OS X issues.
group_unix.go More TODOs.
group_windows.go Fixed Group on Windows not sending events to children. I /think/ we'r…
gtk_unix.h ...in with the new.
image_darwin.m Migrated the Mac OS X Table implementation. Untested due to VM issues.
image_unix.go Removed residual ImageList references.
image_windows.c Fixed the other build errors. Awesome, Go's linker won't recognize th…
init_windows.c ...in with the new.
label_darwin.go Merged new container/sizing stuff.
label_unix.go Merged new container/sizing stuff.
label_windows.go Added Textbox and implemented it on Windows.
objc_darwin.h Migrated the Mac OS X Table implementation. Untested due to VM issues.
prevlib.tar Out with the old...
progressbar_darwin.go Implemented ProgressBar on Mac OS X.
progressbar_unix.go Actually added GTK+ ProgressBar this time.
progressbar_windows.go Started the Windows ProgressBar implemetnation. There's still an impo…
scrapped ...in with the new.
simplegrid.go Removed container from SimpleGrid and Grid. This is necessary to do n…
spinbox_darwin.go Added Spinbox.OnChanged() and implemented it on GTK+ and Mac OS X. Im…
spinbox_darwin.m Added Spinbox.OnChanged() and implemented it on GTK+ and Mac OS X. Im…
spinbox_unix.go Added Spinbox.OnChanged() and implemented it on GTK+ and Mac OS X. Im…
spinbox_windows.go Fixed up Spinbox appearance on Windows.
stack.go De-container-ized Stack.
tab_darwin.go Fixed Mac OS X issues.
tab_darwin.m ...in with the new.
tab_unix.go Migrated the GTK+ backend to the new new container system in which co…
tab_windows.c Okay, REALLY fixed the redraw issues now. A few wacky drawing issues …
tab_windows.go More TODOs.
table.go Added provisions for giving Table columns custom titles. Will now imp…
table_darwin.go Implemented Table column names on all platforms. Updates #40.
table_darwin.m Migrated the Mac OS X Table implementation. Untested due to VM issues.
table_unix.c Fixed Tables on GTK+ not updating properly. Should have done this age…
table_unix.go Implemented Table column names on all platforms. Updates #40.
table_windows.c Added tableSetSelection to the new Windows Table and hooked it up to …
table_windows.go Implemented Table column names on all platforms. Updates #40.
textbox_darwin.go Added Mac OS X Textbox Go-side implementation. Doesn't quite work yet.
textbox_unix.go Implemented Textbox on GTK+.
textbox_windows.go Added Textbox and implemented it on Windows.
textfield_darwin.go Implemented TextField.ReadOnly() on Mac OS X. Began standardizing win…
textfield_unix.go Implemented TextField.ReadOnly() on GTK+.
textfield_windows.go More TODOs.
uitask.go go fmt. Precursor to bug report filing.
uitask_darwin.go ...in with the new.
uitask_darwin.m ...in with the new.
uitask_unix.go go fmt. Precursor to bug report filing.
uitask_windows.c More Windows window class logic simplification. This will be needed f…
uitask_windows.go Fixed many build errors. Not done yet.
warningpopover_darwin.m More TODOs.
winapi_windows.h Removed residual ImageList references.
window.go Merged new container/sizing stuff.
window_darwin.go Fixed Mac OS X issues.
window_darwin.m Restructured container on Mac OS X likewise. Still have to test.
window_unix.go Migrated the GTK+ backend to the new new container system in which co…
window_windows.c Okay, REALLY fixed the redraw issues now. A few wacky drawing issues …
window_windows.go Began migrating the Windows code away from using container entirely. …
wininclude_windows.h Fixed Windows build. More TODOs. Still not working...
yz_icons_test.go More ImageList removal.
yz_repaint_test.go Merged new container/sizing stuff.
zz_test.go Added provisions for giving Table columns custom titles. Will now imp…

README.md

ui: platform-native GUI library for Go

NOTE

ui is currently being rewritten for stability. The guts of the package will now be in C. For progress updates, see the new repo for the C backend.

Feature requests wanted! (Really; IDK what to add next!)

This is a library that aims to provide simple GUI software development in Go. It runs on/requires:

  • Windows: cgo, MinGW-w64 (see note below), Windows XP and newer
    • Note: Notice I specifically said MinGW-w64 here. This is important: regular MinGW is missing various recent header files which package ui uses, and thus won't build with it. Make sure your MinGW is that version instead. If you're running on Windows and are not sure what to download, get the mingw-builds distribution.
  • Mac OS X: cgo, Mac OS X 10.7 and newer
  • other Unixes: cgo, GTK+ 3.4 and newer

Go 1.4 RC1 or newer (including Go tip/master/direct from the source repository) is required. This is due to a variety of compiler and linker bugs on Windows and Mac OS X spanning the Go 1.3 release family.

(this README needs some work)

Be sure to have at least each outermost Window escaping to the heap until a good resolution to Go issue 8310 comes out.

prevlib.tar contains the previous version of the library as it stood when I restarted; don't bother using it.

Documentation

The in-code documentation needs improvement. I have written a tutorial in the Wiki.

Updates

21 February 2015
Implemented Table column headers as a uicolumn: struct tag.

This will probably be the last change for a while; I want to redo the backend again.

19 February 2015
ImageList is now gone; you simply store *image.RGBAs in your Table data structure and they'll work.

Alongside this change is the introduction of a new backend for Table on Windows that should be more flexible than the standard list view control. This control is implemented in the wintable/ folder; it is implemented in C and will one day be spun off into its own project for general-purpose use. I have tried to make it work as much like the standard list view control as possible, and it mostly works fine. That being said, there are still issues and incompletenesses. Please feel free to report any issues you may have found (though watch the TODOs in the source; I may know about the issue already).

5 November 2014
TextFields can now be marked as read-only (non-editable). Textboxes will gain this ability soon.

4 November 2014
Added two new controls, Spinbox (which allows numeric entry with up and down buttons) and ProgressBar (which measures progress). Both aren't fully fleshed out, but are good enough for general use now.

28 October 2014
Mac OS X resizing issues should be (mostly?) fixed now. Textbox still doesn't work right...

24 October 2014
Textbox, a multi-line version of TextField, has been added. (Note that it may not work properly on Mac OS X; this is being investigated.) In addition, excess space around controls on Mac OS X should be settled now.

18 October 2014
The container system was rewritten entirely. You can now set a margin on Windows and Groups and spacing between controls ("padding") on Stacks, Grids, and SimpleGrids. Margins on Tabs will come soon. The work needed to change this will make future additions (like Popover and Spinbox) easier/more sensible. (The Mac OS X code is still glitchy; mind the dust.)

As part of the change, standalone Labels have been removed. All Labels now behave like standalone labels. A new layout container, Form, will be introduced in the near future to allow proper layout of widgets with labels.

3 September 2014
The new GtkGrid-style Grid is now implemented! See its documentation for more details. Also, debugging spew has been removed.

31 August 2014
Grid is now renamed SimpleGrid in preparation for implementing a more GtkGrid-like Grid. Mind the change.

Screenshots

The example widget gallery on GTK+ in the Adwaita theme (3.13/master):

widget gallery example

Something went wrong with that request. Please try again.