Go to file
Pietro Gagliardi 9d6d0f9c40 Updated the implementation.md file for Mac OS X. 2014-03-03 18:04:33 -05:00
test Added flags to show the auxiliary test windows in the test program, to make working with just the main window easier. 2014-03-03 15:55:38 -05:00
unmigrated Re-added Windows font grabbing code. I won't use it just yet, since I only now realize I don't actually need it for preferred sizes, but eh 2014-02-24 11:55:38 -05:00
LICENSE Added license and README. 2014-02-17 18:38:50 -05:00
README.md Rewrote the unstable warning at the top of README.md. 2014-02-25 19:19:17 -05:00
bleh_darwin.m Fixed selection grabbing and also append/insert/removal crashes: all were selector name typos. Also some TODOs Now to make this scroll/confine it to a scroll view... 2014-03-03 01:51:54 -05:00
button.go Fixed Mac OS X control placement flipping. This is done by passing the height of the window around setRect() calls to avoid polling the content view frame each time. 2014-03-03 17:44:03 -05:00
callbacks_unix.go Moved to a proper package; main() is now a test and go test -c is used to build. Once I iron out a bug with Windows event handling, I'll add a README. 2014-02-19 11:41:10 -05:00
checkbox.go Fixed Mac OS X control placement flipping. This is done by passing the height of the window around setRect() calls to avoid polling the content view frame each time. 2014-03-03 17:44:03 -05:00
cocoalists Added the beginning of the Mac OS X implementation of Combobox; also added a file to plan out how lists will be implemented/are being implemented. 2014-03-02 17:19:25 -05:00
combobox.go Fixed Mac OS X control placement flipping. This is done by passing the height of the window around setRect() calls to avoid polling the content view frame each time. 2014-03-03 17:44:03 -05:00
comctl_windows.go Removed a stray TODO about a constant in comctl_windows.go. 2014-02-25 13:17:22 -05:00
common_windows.go Added Windows implementation of ProgressBar and the requisite comctl32.dll code. 2014-02-25 08:28:10 -05:00
control.go Fixed Mac OS X control placement flipping. This is done by passing the height of the window around setRect() calls to avoid polling the content view frame each time. 2014-03-03 17:44:03 -05:00
controlcandidates.md Updated a TODO in the control candidates document related to Windows Common Controls. 2014-02-25 21:43:50 -05:00
controls_windows.go Moved to a proper package; main() is now a test and go test -c is used to build. Once I iron out a bug with Windows event handling, I'll add a README. 2014-02-19 11:41:10 -05:00
d32 Added a helper script for building 32-bit darwin binaries. 2014-02-27 20:49:49 -05:00
delegate_darwin.go Fixed Mac OS X control placement flipping. This is done by passing the height of the window around setRect() calls to avoid polling the content view frame each time. 2014-03-03 17:44:03 -05:00
dialog.go Moved to a proper package; main() is now a test and go test -c is used to build. Once I iron out a bug with Windows event handling, I'll add a README. 2014-02-19 11:41:10 -05:00
dialog_darwin.go Added the Mac OS X implementation of messageboxes. 2014-03-02 18:37:25 -05:00
dialog_unix.go Moved to a proper package; main() is now a test and go test -c is used to build. Once I iron out a bug with Windows event handling, I'll add a README. 2014-02-19 11:41:10 -05:00
dialog_windows.go Moved to a proper package; main() is now a test and go test -c is used to build. Once I iron out a bug with Windows event handling, I'll add a README. 2014-02-19 11:41:10 -05:00
grid.go Fixed Mac OS X control placement flipping. This is done by passing the height of the window around setRect() calls to avoid polling the content view frame each time. 2014-03-03 17:44:03 -05:00
gtkcalls_unix.go Added password entry fields; they are the alternate mode of LineEdit. 2014-02-25 15:06:51 -05:00
gtkcasts_unix.go Added GTK+ implementation of ProgressBar and added a ProgressBar to the test program. 2014-02-25 00:49:08 -05:00
implementation.md Updated the implementation.md file for Mac OS X. 2014-03-03 18:04:33 -05:00
init.go Documentation and TODO changes. 2014-03-01 15:23:49 -05:00
init_windows.go Added Windows implementation of ProgressBar and the requisite comctl32.dll code. 2014-02-25 08:28:10 -05:00
label.go Fixed Mac OS X control placement flipping. This is done by passing the height of the window around setRect() calls to avoid polling the content view frame each time. 2014-03-03 17:44:03 -05:00
layoutplan.md Added a new layout plan for Stack. 2014-02-24 10:22:23 -05:00
lineedit.go Fixed Mac OS X control placement flipping. This is done by passing the height of the window around setRect() calls to avoid polling the content view frame each time. 2014-03-03 17:44:03 -05:00
listbox.go Fixed Mac OS X control placement flipping. This is done by passing the height of the window around setRect() calls to avoid polling the content view frame each time. 2014-03-03 17:44:03 -05:00
listbox_darwin.go Split out the code to add a Control to a Mac OS X Window into its own function. 2014-03-03 15:52:39 -05:00
listbox_unix.go Moved to a proper package; main() is now a test and go test -c is used to build. Once I iron out a bug with Windows event handling, I'll add a README. 2014-02-19 11:41:10 -05:00
menus_windows.go Moved to a proper package; main() is now a test and go test -c is used to build. Once I iron out a bug with Windows event handling, I'll add a README. 2014-02-19 11:41:10 -05:00
objc_darwin.go Added initial Mac OS X sysData code. Almost ready for first test build, hopefully? 2014-03-01 13:29:24 -05:00
objc_darwin.h Added Mac OS X ProgressBars. Mac OS X now feature-equal! 2014-03-03 15:32:54 -05:00
plan.md Added version compatibility notes to plan.md. 2014-02-16 16:55:48 -05:00
prefsize_darwin.go Removed a leftover crash guard from the Mac OS X sysData code (in this case sysData.preferredSize()). 2014-03-03 15:45:26 -05:00
prefsize_unix.go Added the preferred widget size basework and its GTK+ implementation. 2014-02-23 20:04:33 -05:00
prefsize_windows.go Added most of the Windows implementation of ProgressBar. Now to grab the comctl32.dll stuff. 2014-02-25 01:02:16 -05:00
progressbar.go Fixed Mac OS X control placement flipping. This is done by passing the height of the window around setRect() calls to avoid polling the content view frame each time. 2014-03-03 17:44:03 -05:00
restrictions.md Windows sysData has been adjusted to deal with child controls. Rather than storing the parent window, it is passed as an argument to sysData.make(), which does the child ID allocation. Child IDs are now window-local, getting rid of that restriction. 2014-02-12 21:08:10 -05:00
stack.go Fixed Mac OS X control placement flipping. This is done by passing the height of the window around setRect() calls to avoid polling the content view frame each time. 2014-03-03 17:44:03 -05:00
stdfont_windows.go Re-added Windows font grabbing code. I won't use it just yet, since I only now realize I don't actually need it for preferred sizes, but eh 2014-02-24 11:55:38 -05:00
stdwndclass_windows.go Fixed Mac OS X control placement flipping. This is done by passing the height of the window around setRect() calls to avoid polling the content view frame each time. 2014-03-03 17:44:03 -05:00
sysdata.go Fixed Mac OS X control placement flipping. This is done by passing the height of the window around setRect() calls to avoid polling the content view frame each time. 2014-03-03 17:44:03 -05:00
sysdata_darwin.go Fixed Mac OS X control placement flipping. This is done by passing the height of the window around setRect() calls to avoid polling the content view frame each time. 2014-03-03 17:44:03 -05:00
sysdata_unix.go Fixed Mac OS X control placement flipping. This is done by passing the height of the window around setRect() calls to avoid polling the content view frame each time. 2014-03-03 17:44:03 -05:00
sysdata_windows.go Fixed Mac OS X control placement flipping. This is done by passing the height of the window around setRect() calls to avoid polling the content view frame each time. 2014-03-03 17:44:03 -05:00
test.sh Major code restructure to allow Cocoa to work correctly. Cocoa requires that the application loop run on the very first OS thread created, not just an any ordinary thread. To support this, your code must now be run by the UI init code. Windows and Unix builds still work fine; Mac OS X fails for reasons I now have to debug. 2014-03-01 15:18:29 -05:00
todo.md Fixed Mac OS X control placement flipping. This is done by passing the height of the window around setRect() calls to avoid polling the content view frame each time. 2014-03-03 17:44:03 -05:00
uitask_darwin.go Added the Mac OS X implementation of messageboxes. 2014-03-02 18:37:25 -05:00
uitask_unix.go Major code restructure to allow Cocoa to work correctly. Cocoa requires that the application loop run on the very first OS thread created, not just an any ordinary thread. To support this, your code must now be run by the UI init code. Windows and Unix builds still work fine; Mac OS X fails for reasons I now have to debug. 2014-03-01 15:18:29 -05:00
uitask_windows.go Major code restructure to allow Cocoa to work correctly. Cocoa requires that the application loop run on the very first OS thread created, not just an any ordinary thread. To support this, your code must now be run by the UI init code. Windows and Unix builds still work fine; Mac OS X fails for reasons I now have to debug. 2014-03-01 15:18:29 -05:00
window.go And the uitask message fixed was the issue all along. Now it works. 2014-02-24 14:16:05 -05:00
windows_windows.go Moved to a proper package; main() is now a test and go test -c is used to build. Once I iron out a bug with Windows event handling, I'll add a README. 2014-02-19 11:41:10 -05:00
winerrors.md More TODO reduction. 2014-02-15 15:41:50 -05:00

README.md

Native UI library for Go

THIS PACKAGE IS UNSTABLE. Feel free to start using it, but mind: it's far from feature-complete, it's still in need of testing and crash-fixing, and the API can (and will) change. If you can help, please do! Run go test -c to build a test binary which runs a (mostly) feature-complete UI test.

This is a simple library for building cross-platform GUI programs in Go. It targets Windows and all Unix variants (except Mac OS X until further notice) and provides a thread-safe, channel-based API.

The API is no longer frozen; instead I will have to continue without the OS X port and do more work later. Oh well :/

Until then, check todo.md for more.

Future Readme Contents

This is a simple library for building cross-platform GUI programs in Go. It targets Windows, Mac OS X, Linux, and other Unixes, and provides a thread-safe, channel-based API. The API itself is minimal; it aims to provide only what is necessary for GUI program design. That being said, suggestions are welcome. Layout is done using various layout managers, and some effort is taken to conform to the target platform's UI guidelines. Otherwise, the library uses native toolkits.

ui aims to run on all supported versions of supported platforms. To be more precise, the system requirements are:

  • Windows: Windows 2000 or newer. The Windows backend uses package syscall and calls Windows DLLs directly, so does not rely on cgo.
  • Mac OS X: Mac OS X 10.6 (Snow Leopard) or newer. Objective-C dispatch is done by interfacing with libobjc directly, and thus this uses cgo.
  • Other Unixes: The Unix backend uses GTK+, and thus cgo. It requires GTK+ 3.4 or newer; for Ubuntu this means 12.04 LTS (Precise Pangolin) at minimum. Check your distribution.

ui itself has no outside Go package dependencies; it is entirely self-contained.

To install, simply go get this package. On Mac OS X, make sure you have the Apple development headers. On other Unixes, make sure you have the GTK+ development files (for Ubuntu, libgtk-3-dev is sufficient).

Package documentation is available at http://godoc.org/github.com/andlabs/ui.

The following is an example program to illustrate what programming with ui is like:

(see main_test.go)

Contributing

Contributions are welcome. File issues, pull requests, approach me on IRC (pietro10 in #go-nuts; andlabs elsewhere), etc. Even suggestions are welcome: while I'm mainly drawing from my own GUI programming experience, everyone is different.

If you want to dive in, read implementation.md: this is a description of how the library works. (Feel free to suggest improvements to this as well.) The other .md files in this repository contain various development notes.

Please suggest documentation improvements as well.