Skip to content
An experimental Go cross platform UI library.
Branch: master
Clone or download
Latest commit f85e0a9 Oct 28, 2015
Permalink
Type Name Latest commit message Commit time
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
.travis.yml
LICENSE
README.md
VERSION
adapter_base.go
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
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
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
default_adapter.go
direction.go Replace linear layout Orientation with new Direction. Mar 25, 2015
driver.go
drop_down_list.go
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
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
image.go
keyboard_controller.go
keyboard_event.go Initial drop of GXUI Feb 26, 2015
keyboard_key.go
keyboard_modifier.go Initial drop of GXUI Feb 26, 2015
keystroke_event.go
label.go
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
mouse_controller.go
mouse_event.go
mouse_state.go
orientation.go
panel_holder.go
pen.go Initial drop of GXUI Feb 26, 2015
polygon.go
progress_bar.go Update import paths. Mar 16, 2015
scroll_bar.go
scroll_layout.go
simple_event.go
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
text_selection_list.go Update import paths. Mar 16, 2015
text_selection_list_test.go
textbox.go Misc fixes and improvements to TextBoxes. Mar 16, 2015
textbox_controller.go
textbox_controller_test.go
texture.go
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
utils.go
viewport.go window position minor changes Jul 23, 2015
while_attached.go Re-implement the TreeToListAdapter, change TreeAdapter interface. Jul 15, 2015
window.go

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.

You can’t perform that action at this time.