An experimental Go cross platform UI library.
Go
Latest commit f85e0a9 Oct 28, 2015 @ben-clayton ben-clayton Update README.md
Permalink
Failed to load latest commit information.
drivers/gl Add package summary for drivers/gl package. Sep 6, 2015
gxfont gxui/gxfont: add a fixed-width font Mar 21, 2015
interval Replace asserts with conditionals and panics. Mar 17, 2015
math minor edit of a comment in math/mat2.go Mar 20, 2015
mixins Merge pull request #153 from Mr4x/master Aug 30, 2015
samples Changed comment to show columns, rows in the correct order for SetGri… Sep 29, 2015
testing Initial drop of GXUI Feb 26, 2015
themes Updated gofmt Aug 30, 2015
.travis.yml Remove go-tip again from travis build Jul 16, 2015
LICENSE Add LICENSE, VERSION and add something to README Feb 26, 2015
README.md Update README.md Oct 28, 2015
VERSION Add LICENSE, VERSION and add something to README Feb 26, 2015
adapter_base.go Add recreateControls flag to the OnDataChanged list/tree event. Aug 24, 2015
adapter_item.go TreeAdapter cleanup attempt #2 - Add advanced 'open-file-dialog' sample. Mar 25, 2015
alignment.go Replace linear layout Orientation with new Direction. Mar 25, 2015
brush.go Initial drop of GXUI Feb 26, 2015
bubble_overlay.go Update import paths. Mar 16, 2015
button.go Initial drop of GXUI Feb 26, 2015
canvas.go Rip out refCounted from the driver. Aug 4, 2015
channeled_event.go Initial drop of GXUI Feb 26, 2015
code_editor.go Improve the CodeEditor interface for syntax layers. Mar 16, 2015
code_syntax_layer.go Improve the CodeEditor interface for syntax layers. Mar 16, 2015
color.go Update import paths. Mar 16, 2015
container.go Move Relayout() and Redraw() from Container to Parent interface. Aug 24, 2015
control.go Move Relayout() and Redraw() from Container to Parent interface. Aug 24, 2015
control_list.go Initial drop of GXUI Feb 26, 2015
debug.go Fix gofmt and go vet issues. May 28, 2015
default_adapter.go Add recreateControls flag to the OnDataChanged list/tree event. Aug 24, 2015
direction.go Replace linear layout Orientation with new Direction. Mar 25, 2015
driver.go Add AssertUIGoroutine to the Driver interface. Jun 26, 2015
drop_down_list.go TreeAdapter cleanup attempt #2 - Add advanced 'open-file-dialog' sample. Mar 25, 2015
event.go Initial drop of GXUI Feb 26, 2015
event_base.go Fix crash when passing nil values into events Jul 8, 2015
event_test.go Fix crash when passing nil values into events Jul 8, 2015
filtered_list_adapter.go Fix / tidy comments Mar 21, 2015
filtered_list_adapter_test.go Replace AdapterItemIds with AdapterItems. Mar 20, 2015
focus_controller.go Move Relayout() and Redraw() from Container to Parent interface. Aug 24, 2015
focusable.go Moar documentation! Jul 16, 2015
font.go all: always do text layout with runes Mar 24, 2015
image.go Replace Image Polygon getter/setter with Canvas. Apr 9, 2015
keyboard_controller.go Initial drop of GXUI Feb 26, 2015
keyboard_event.go Initial drop of GXUI Feb 26, 2015
keyboard_key.go Initial drop of GXUI Feb 26, 2015
keyboard_modifier.go Initial drop of GXUI Feb 26, 2015
keystroke_event.go Initial drop of GXUI Feb 26, 2015
label.go Add Font() / SetFont() to labels Apr 1, 2015
linear_layout.go Document LinearLayout Apr 3, 2015
list.go Add recreateControls flag to the OnDataChanged list/tree event. Aug 24, 2015
mouse_button.go restore MouseButton and add MouseState instead Apr 22, 2015
mouse_controller.go restore MouseButton and add MouseState instead Apr 22, 2015
mouse_event.go restore MouseButton and add MouseState instead Apr 22, 2015
mouse_state.go Fix gofmt and go vet issues. May 28, 2015
orientation.go Replace linear layout Orientation with new Direction. Mar 25, 2015
panel_holder.go Initial drop of GXUI Feb 26, 2015
pen.go Initial drop of GXUI Feb 26, 2015
polygon.go Update import paths. Mar 16, 2015
progress_bar.go Update import paths. Mar 16, 2015
scroll_bar.go Initial drop of GXUI Feb 26, 2015
scroll_layout.go Initial drop of GXUI Feb 26, 2015
simple_event.go Initial drop of GXUI Feb 26, 2015
size_mode.go Replace linear layout Orientation with new Direction. Mar 25, 2015
splitter_layout.go Initial drop of GXUI Feb 26, 2015
table_layout.go Gofmt and renaming GridLayout->TableLayout Aug 30, 2015
text_selection.go Initial drop of GXUI Feb 26, 2015
text_selection_list.go Update import paths. Mar 16, 2015
text_selection_list_test.go Update import paths. Mar 16, 2015
textbox.go Misc fixes and improvements to TextBoxes. Mar 16, 2015
textbox_controller.go Update import paths. Mar 16, 2015
textbox_controller_test.go Fix tests. Mar 18, 2015
texture.go Rip out refCounted from the driver. Aug 4, 2015
theme.go Gofmt and renaming GridLayout->TableLayout Aug 30, 2015
tooltip_controller.go Don't panic if a control is detached just before a tooltip is shown Jul 8, 2015
tree.go Add recreateControls flag to the OnDataChanged list/tree event. Aug 24, 2015
utils.go Fix gofmt and go vet issues. May 28, 2015
viewport.go window position minor changes Jul 23, 2015
while_attached.go Re-implement the TreeToListAdapter, change TreeAdapter interface. Jul 15, 2015
window.go window position minor changes Jul 23, 2015

README.md

GXUI - A Go cross platform UI library.

Join the chat at https://gitter.im/google/gxui Build Status GoDoc

Notice:

Unfortunately due to a shortage of hours in a day, GXUI is no longer maintained.

If you're looking for a GUI library for your next Go project, check out these alternatives.

Disclaimer

The code is mostly undocumented, and is certainly not idiomatic Go.

This is not an official Google product (experimental or otherwise), it is just code that happens to be owned by Google.

Dependencies

Linux:

In order to build GXUI on linux, you will need the following packages installed:

sudo apt-get install libxi-dev libxcursor-dev libxrandr-dev libxinerama-dev mesa-common-dev libgl1-mesa-dev libxxf86vm-dev

Common:

After setting up GOPATH (see Go documentation), you can then fetch the GXUI library and its dependencies:

go get -u github.com/google/gxui/...

Samples

Samples can be found in gxui/samples.

To build all samples run:

go install github.com/google/gxui/samples/...

And they will be built into GOPATH/bin.

If you add GOPATH/bin to your PATH, you can simply type the name of a sample to run it. For example: image_viewer.

Web

gxui code is cross platform and can be compiled using GopherJS to JavaScript, allowing it to run in browsers with WebGL support. To do so, you'll need the GopherJS compiler and some additional dependencies:

go get -u github.com/gopherjs/gopherjs
go get -u -d -tags=js github.com/google/gxui/...

Afterwards, you can try the samples by running gopherjs serve command and opening http://localhost:8080/github.com/google/gxui/samples/ in a browser.

Fonts

Many of the samples require a font to render text. The dark theme (and currently the only theme) uses Roboto. This is built into the gxfont package.

Make sure to mention this font in any notices file distributed with your application.

Contributing

GXUI was written by a couple of Googlers as an experiment and is now unmaintained.

Contributions, however small, will require the author to have signed the Google Individual Contributor License Agreement.

The CLA is necessary mainly because you own the copyright to your changes, even after your contribution becomes part of our codebase, so we need your permission to use and distribute your code. We also need to be sure of various other things—for instance that you'll tell us if you know that your code infringes on other people's patents. You don't have to sign the CLA until after you've submitted your code for review and a member has approved it, but you must do it before we can put your code into our codebase. Before you start working on a larger contribution, you should get in touch with us first through the issue tracker with your idea so that we can help out and possibly guide you. Coordinating up front makes it much easier to avoid frustration later on.