You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ben Clayton f85e0a97b3 Update README.md 6 years ago
drivers/gl Add package summary for drivers/gl package. 6 years ago
gxfont gxui/gxfont: add a fixed-width font 7 years ago
interval Replace asserts with conditionals and panics. 7 years ago
math minor edit of a comment in math/mat2.go 7 years ago
mixins Merge pull request #153 from Mr4x/master 6 years ago
samples Changed comment to show columns, rows in the correct order for SetGrid() in sample. 6 years ago
testing Initial drop of GXUI 7 years ago
themes Updated gofmt 6 years ago
.travis.yml Remove go-tip again from travis build 6 years ago
LICENSE Add LICENSE, VERSION and add something to README 7 years ago
README.md Update README.md 6 years ago
VERSION Add LICENSE, VERSION and add something to README 7 years ago
adapter_base.go Add recreateControls flag to the OnDataChanged list/tree event. 6 years ago
adapter_item.go TreeAdapter cleanup attempt #2 - Add advanced 'open-file-dialog' sample. 7 years ago
alignment.go Replace linear layout Orientation with new Direction. 7 years ago
brush.go Initial drop of GXUI 7 years ago
bubble_overlay.go Update import paths. 7 years ago
button.go Initial drop of GXUI 7 years ago
canvas.go Rip out refCounted from the driver. 6 years ago
channeled_event.go Initial drop of GXUI 7 years ago
code_editor.go Improve the CodeEditor interface for syntax layers. 7 years ago
code_syntax_layer.go Improve the CodeEditor interface for syntax layers. 7 years ago
color.go Update import paths. 7 years ago
container.go Move Relayout() and Redraw() from Container to Parent interface. 6 years ago
control.go Move Relayout() and Redraw() from Container to Parent interface. 6 years ago
control_list.go Initial drop of GXUI 7 years ago
debug.go Fix gofmt and go vet issues. 6 years ago
default_adapter.go Add recreateControls flag to the OnDataChanged list/tree event. 6 years ago
direction.go Replace linear layout Orientation with new Direction. 7 years ago
driver.go Add AssertUIGoroutine to the Driver interface. 6 years ago
drop_down_list.go TreeAdapter cleanup attempt #2 - Add advanced 'open-file-dialog' sample. 7 years ago
event.go Initial drop of GXUI 7 years ago
event_base.go Fix crash when passing nil values into events 6 years ago
event_test.go Fix crash when passing nil values into events 6 years ago
filtered_list_adapter.go Fix / tidy comments 7 years ago
filtered_list_adapter_test.go Replace AdapterItemIds with AdapterItems. 7 years ago
focus_controller.go Move Relayout() and Redraw() from Container to Parent interface. 6 years ago
focusable.go Moar documentation! 6 years ago
font.go all: always do text layout with runes 7 years ago
image.go Replace Image Polygon getter/setter with Canvas. 7 years ago
keyboard_controller.go Initial drop of GXUI 7 years ago
keyboard_event.go Initial drop of GXUI 7 years ago
keyboard_key.go Initial drop of GXUI 7 years ago
keyboard_modifier.go Initial drop of GXUI 7 years ago
keystroke_event.go Initial drop of GXUI 7 years ago
label.go Add Font() / SetFont() to labels 7 years ago
linear_layout.go Document LinearLayout 7 years ago
list.go Add recreateControls flag to the OnDataChanged list/tree event. 6 years ago
mouse_button.go Initial drop of GXUI 7 years ago
mouse_controller.go Initial drop of GXUI 7 years ago
mouse_event.go restore MouseButton and add MouseState instead 7 years ago
mouse_state.go Fix gofmt and go vet issues. 6 years ago
orientation.go Replace linear layout Orientation with new Direction. 7 years ago
panel_holder.go Initial drop of GXUI 7 years ago
pen.go Initial drop of GXUI 7 years ago
polygon.go Update import paths. 7 years ago
progress_bar.go Update import paths. 7 years ago
scroll_bar.go Initial drop of GXUI 7 years ago
scroll_layout.go Initial drop of GXUI 7 years ago
simple_event.go Initial drop of GXUI 7 years ago
size_mode.go Replace linear layout Orientation with new Direction. 7 years ago
splitter_layout.go Initial drop of GXUI 7 years ago
table_layout.go Gofmt and renaming GridLayout->TableLayout 6 years ago
text_selection.go Initial drop of GXUI 7 years ago
text_selection_list.go Update import paths. 7 years ago
text_selection_list_test.go Update import paths. 7 years ago
textbox.go Misc fixes and improvements to TextBoxes. 7 years ago
textbox_controller.go Update import paths. 7 years ago
textbox_controller_test.go Fix tests. 7 years ago
texture.go Rip out refCounted from the driver. 6 years ago
theme.go Gofmt and renaming GridLayout->TableLayout 6 years ago
tooltip_controller.go Don't panic if a control is detached just before a tooltip is shown 6 years ago
tree.go Add recreateControls flag to the OnDataChanged list/tree event. 6 years ago
utils.go Fix gofmt and go vet issues. 6 years ago
viewport.go window position minor changes 6 years ago
while_attached.go Re-implement the TreeToListAdapter, change TreeAdapter interface. 6 years ago
window.go window position minor changes 6 years ago

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.