Commit Graph

43 Commits

Author SHA1 Message Date
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 92dc282ffd Added the framework code for handling keyboard events in GTK+ Areas. Oh boy... this is gonna hurt (as I will describe shortly). 2014-03-18 12:44:21 -04:00
Pietro Gagliardi 829cf7b1c6 Added (untested) GTK+ implementation of Area's mouse events. 2014-03-15 22:29:47 -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 6cdda6ebec Provided a way to connect child widget signals in the GTK+ sysData and connected Area to draw. I think I'm getting the wrong child widget, though... 2014-03-14 23:15:24 -04:00
Pietro Gagliardi a61b43f50c Hacked around the cairo issue for now; hooked everything together and fixed a few things. Added the Area test to the test program. Now to just hook up the draw event. 2014-03-14 23:06:51 -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 6ee8d96a6e Added GTK+ indeterminate ProgressBars. 2014-03-12 17:31:13 -04:00
Pietro Gagliardi 92fb9efce9 Removed error returns from Combobox.Delete(), Listbox.Delete(), and sysData.delete(), since they are no longer used. Updated the TODO file to mark this issue closed. 2014-03-11 13:50:02 -04:00
Pietro Gagliardi 699f786cd5 Fixed compiler errors in the previous few commits. 2014-03-10 11:06:07 -04:00
Pietro Gagliardi 353c949f64 Removed error returns from sysData.setText() now that we no longer care. 2014-03-10 10:39:08 -04:00
Pietro Gagliardi 51fea6be87 Whoops, forgot Checkbox.Text() on GTK+. Fixed. 2014-03-10 01:19:01 -04:00
Pietro Gagliardi f72d6c9900 Removed now-unused error returns from sysData.show() and sysData.hide(). 2014-03-09 21:56:17 -04:00
Pietro Gagliardi 45e0779790 Split sysData.show() into separate show() and firstShow() to accomodate Windows's differing rules for first-time window show; this will also allow me to remove the error returns from sysData.show() and sysData.hide() (later). 2014-03-09 21:40:14 -04:00
Pietro Gagliardi b9f0ad90ec Steamrolled errors under panic() in Combobox/Listbox.Append()/InsertBefore() because screw Windows being different. 2014-03-09 16:02:17 -04:00
Pietro Gagliardi a7ec908ebd Removed gListboxSelected; it was never being called anyway (only gListboxSelectedMulti is; Windows still uses selectedIndex() for Listbox because of differences in how multi-selection listboxes are handled there and Mac OS X never had this function written to begin with). 2014-03-09 11:36:44 -04:00
Pietro Gagliardi 3aa59d4ab9 Added Combobox/Listbox.Len() and its GTK+ implementation. 2014-03-08 16:42:57 -05:00
Pietro Gagliardi 962a84e056 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
Pietro Gagliardi 4923f3944c Removed crash guards from the Mac OS X sysData code. Also removed some leftover ones from the GTK+ code. 2014-03-03 15:44:46 -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 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 1f08c874e0 Made event dispatch asynchronous to avoid deadlocks; right now events that cannot be dispatched get dropped. 2014-02-18 09:57:19 -05:00
Pietro Gagliardi b1b05c2b1f Removed all //package ui comments. 2014-02-17 18:01:32 -05:00
Pietro Gagliardi 0595135d9a Fixed the GTK+ crashes (I think) by making resizes synchronous. Since all control resizes happen on the UI thread anyway, we don't need to dispatch back; just call the resizing functions directly. Windows gets this fix too for consistency (and also because it gets rid of the only asynchronous oddity in the system). 2014-02-17 01:40:53 -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 d7f9d3807d Fixed layout failure... for now. 2014-02-16 21:50:55 -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 bce4c19fdd Added alternate control style building... mostly... 2014-02-16 20:27:16 -05:00
Pietro Gagliardi a302590ee0 Added crash guard for making alternates (to get editable comboboxes). 2014-02-16 20:09:51 -05:00
Pietro Gagliardi 5ac0af8d79 ...derp, it was my crash guard failing. 2014-02-16 20:07:10 -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 b8f7f4aa6e Removed some debugging prints. 2014-02-16 18:06:45 -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
Pietro Gagliardi 7a99d42d65 Added cgo-safe callback code for GTK+ signals. GTK+ signals work! 2014-02-16 16:43:48 -05:00
Pietro Gagliardi c40b7b5599 Added basic signal connection. I'm going to need to build a different callback system, though... 2014-02-16 16:23:49 -05:00
Pietro Gagliardi 21c1ec6f83 Added the beginning of the Unix (GTK+) implementation. 2014-02-16 15:55:51 -05:00