Commit Graph

54 Commits

Author SHA1 Message Date
Pietro Gagliardi 15c10b63de Removed leftover TODO about left-justifying labels in GTK+. 2014-06-02 15:24:01 -04:00
Pietro Gagliardi 9903fd624c Properly left-aligned Labels in GTK+. Also added a note to decide on/document/verify vertical alignment of Labels. 2014-06-02 15:22:31 -04:00
Pietro Gagliardi 812d547a5a Moved the GtkLayout transparency style to the new init-time style code in gtkcalls_unix.go. 2014-06-02 13:39:27 -04:00
Pietro Gagliardi 986bb201d9 Moved the GTK+ ProgressBar style stuff to the Go side and to gtk_init(). 2014-06-02 13:32:43 -04:00
Pietro Gagliardi 726f047655 Null-terminated the GtkLayout stylesheet string. This will be handy for consolidating all the GTK+ stylesheet stuff into a single Go-side init function. (Thanks to mischief, nsf, and dsal in irc.badnik.net/#go-nuts for confirming that this is valid.) 2014-06-02 13:13:16 -04:00
Pietro Gagliardi e28dff429d Made the GTK+ ProgressBar arbitrary resize a program-global style. 2014-06-02 13:01:36 -04:00
Pietro Gagliardi 2c2d2dc0c8 More TODOs. 2014-05-24 21:30:21 -04:00
Pietro Gagliardi 32480a65c2 Resolved GtkEntry and GtkProgressBar resizing issues; decided from observing how they do padding that worrying about padding is counterproductive for now. 2014-05-24 21:28:28 -04:00
Pietro Gagliardi a48dd80add Removed the extra #cgo directives from the Unix files. cgo collects directives from ALL files, rather than using each file's directive individually, so having them combined like this is pointless. Instead, the #cgo directives are (or is, since there's only one) in uitask_unix.go. Will do the same for Mac next; this will help since we're going to add a CFLAGS value afterward. 2014-05-19 22:32:38 -04:00
Pietro Gagliardi 4e820e86fc Moved gtk_main() such that uitask_unix.go calls it directly via cgo. This is in preparation for the next two commits, which will remove the #cgo directives from all files except the uitask_*.go files, since they're being concatenated across files. 2014-05-19 22:18:53 -04:00
Pietro Gagliardi f058bf8284 Cleaned up and got rid of some TODOs in gtkcalls_unix.go. 2014-04-27 20:47:37 -04:00
Pietro Gagliardi ba2ff53729 Removed TODO from gtkcalls_unix.go about gtk_widget_show_all() working on all widgets, not just containers; the documentation explicitly says this. 2014-04-27 19:15:32 -04:00
Pietro Gagliardi 6a2fb35d60 ui.Go() on GTK+ now reports the reason gtk_init() failed in its error return. 2014-04-27 12:43:15 -04:00
Pietro Gagliardi 6978961661 Changed fromgchar()/togchar() to fromgstr()/togstr() in the GTK+ code; the new names are more precise (though they don't operate on GStrings; that's not an issue here though). 2014-04-26 22:55:43 -04:00
Pietro Gagliardi 77297672dd Made the C.GoString() part of fromgchar() in gtkcasts_unix.go to reduce the number of calls to that function elsewhere (makes things simpler). 2014-04-26 22:51:12 -04:00
Pietro Gagliardi fb50badf00 Fixed Area test time label weirdness by making Labels truncate their text instead of word-wrapping on all platforms. This doesn't explain GTK+/Wayland, alas. 2014-04-13 18:05:07 -04:00
Pietro Gagliardi e395adb214 Fixed GTK+ windows having the wrong background. 2014-04-09 12:04:04 -04:00
Pietro Gagliardi 81153617dc Got rid of gtkWidget and changed to using *C.GtkWidget everywhere. This gets rid of some of the casting functions and invocations of said functions, and only adds sysdata_unix.go to the cgo list. 2014-04-01 16:30:38 -04:00
Pietro Gagliardi 14770e890a Moved <stdlib.h> includes in the GTK+ backend to gtk_unix.h; organized that file a bit. 2014-04-01 16:01:49 -04:00
Pietro Gagliardi bbccf96981 Fixed the shrinking not working: the Cairo clip rect apparently can fall outside the actual size of the widget. (I did notice this before.) 2014-03-23 21:31:29 -04:00
Pietro Gagliardi a41f582866 Added Area resizing. Everything mostly works, but not making things smaller... 2014-03-23 20:54:11 -04:00
Pietro Gagliardi 63f8033f49 Split out includes of <gtk/gtk.h> into a new header file so the GTK+ versioning macros can be included in all Go files, not just area_unix.go. 2014-03-16 10:34:12 -04:00
Pietro Gagliardi e429b8d6b8 Allowed GTK+ windows to be resized smaller than the size request of the controls within. 2014-03-15 14:27:18 -04:00
Pietro Gagliardi a7f7ea1b8d Major overhaul of the way GTK+ events are handled. Closures that perform events are no longer generated; instead all events are given to fixed, compile-time, cgo-exported callback functions that take the sysData as user data. This saves memory (we no longer need to generate closures and we no longer have to save them elsewhere to keep them from being garbage collected) and makes the top of sysdata_unix.go slightly cleaner, but it moves the code for handling UI events into callbacks_unix.go. This is needed for Area, in which we need to feed the sysData to an event connected to a subwidget instead of the main widget returned. 2014-03-14 20:03:02 -04:00
Pietro Gagliardi 34ce16d586 Separated file creation dates from the package comment. 2014-03-12 21:55:45 -04:00
Pietro Gagliardi 55f7a9638e Changed the way uitask is dispatched on GTK+ to make event handling not a CPU hog. 2014-03-12 20:00:29 -04:00
Pietro Gagliardi 6ee8d96a6e Added GTK+ indeterminate ProgressBars. 2014-03-12 17:31:13 -04:00
Pietro Gagliardi 3aa59d4ab9 Added Combobox/Listbox.Len() and its GTK+ implementation. 2014-03-08 16:42:57 -05:00
Pietro Gagliardi 61726d5cdd Oops, the garbage collector is collecting our GTK+ idle callback too (much later than it did the other callbacks). Fixed. 2014-03-07 09:10:14 -05:00
Pietro Gagliardi 011836e94d Have ui.Go() return on main() return on Unix. 2014-03-05 13:25:19 -05:00
Pietro Gagliardi 06fa3a5174 Added password entry fields; they are the alternate mode of LineEdit. 2014-02-25 15:06:51 -05:00
Pietro Gagliardi d8c0df7993 Added GTK+ implementation of ProgressBar and added a ProgressBar to the test program. 2014-02-25 00:49:08 -05:00
Pietro Gagliardi d5ce49c8b0 Added the preferred widget size basework and its GTK+ implementation. 2014-02-23 20:04:33 -05:00
Pietro Gagliardi fb82e651a4 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
Pietro Gagliardi 647b69a3bb Fixed the faults: upon further examination, the garbage collector was eating the callback closures! 2014-02-18 14:22:31 -05:00
Pietro Gagliardi e7d280e5e1 Split the GTK+ ListBox implementation into its own file. 2014-02-17 15:49:02 -05:00
Pietro Gagliardi c92a370f08 Isolated all the non-listbox-related GTK+ type conversions into their own file with functions to reduce the amount of code noise in gtkcalls_unix.go. 2014-02-17 15:45:26 -05:00
Pietro Gagliardi e395ea105b Whoops, the GList returned by gtk_tree_selection_get_selected_rows contains GtkTreePaths, not GtkTreeRowReferences. Fixed the index getting. 2014-02-17 07:32:04 -05:00
Pietro Gagliardi 24049d8324 Separated GTK+ listbox index retreival and dereferencing, just to be safe/to allow easier debugging. 2014-02-17 03:10:07 -05:00
Pietro Gagliardi 56923d0bda Added scrollbars to the Listbox GtkTreeViews. 2014-02-17 02:29:49 -05:00
Pietro Gagliardi 7617fe6d42 Okay, fixed item showing; the GtkTableView column just needed the text attribute. Now I need scrollbars... 2014-02-17 02:18:42 -05:00
Pietro Gagliardi a018dabde9 Fixed GTK+ listboxes to create item cells and not show headers; still not displaying item text... 2014-02-17 02:16:33 -05:00
Pietro Gagliardi 0856e953be Added GTK+ listboxes... sort of. This whole thing is so broken it's funny. 2014-02-16 23:50:54 -05:00
Pietro Gagliardi 919e89ca7e Added GTK+ Labels. 2014-02-16 22:03:14 -05:00
Pietro Gagliardi 6bf0b00aa3 Added GTK+ LineEdit. It appears there's something weird happening now... 2014-02-16 21:40:59 -05:00
Pietro Gagliardi ee23690f79 Added GTK+ comboboxes. ...and THESE aren't being positioned properly, sigh... 2014-02-16 19:50:52 -05:00
Pietro Gagliardi 13d4e1d258 Added the GTK+ equivalent of Window.Title() and Button.Text() in preparation for adding the GTK+ implementation of Combobox. 2014-02-16 18:57:50 -05:00
Pietro Gagliardi 4fc3cb1d00 Added Checkbox to GTK+. Also added a TODO about crashes. 2014-02-16 18:41:29 -05:00
Pietro Gagliardi 622d7b1569 Added window (and thus control) resizing. Other bugs have been fixed along the way. 2014-02-16 18:04:57 -05:00
Pietro Gagliardi 7c365b3920 [GTK+] Added buttons. Things aren't quite being positioned properly yet though... 2014-02-16 17:30:58 -05:00