Commit Graph

70 Commits

Author SHA1 Message Date
Pietro Gagliardi 8a81650b3d Moved it all back; the preemptive multitaksing during an event handler kills us on all platforms. Going to have to restrict ALL GUI accss to happening from one t hread, so going to need to drop uitask entirely and have just a start() callback for startup code and a post() function for posting requests to windows (like channel sends but into a perpetual buffer). 2014-07-02 22:53:03 -04:00
Pietro Gagliardi 5d339e656b Moved everything out of the way pending rewrite. 2014-07-02 17:13:40 -04:00
Pietro Gagliardi 2a7152339f Fixed indeterminate progress bars on GTK+. This specific fix also avoids any future panics caused by Go and GTK+ racing by doing the pulsing all on GTK+. 2014-07-01 13:47:23 -04:00
Pietro Gagliardi e04e5f5cad Converted the GTK+ backend to use the new uitask. Indeterminate progressbars no longer work; this will be fixed soon. 2014-07-01 12:09:31 -04:00
Pietro Gagliardi ffa1bbe0b9 Restored the previous new API. I'm going to change it so that events are callbacks rather than using a window handler, but other than that... yeah. 2014-06-30 22:48:12 -04:00
Pietro Gagliardi 33155f7496 Reverted everything back to the old API. 2014-06-30 09:57:44 -04:00
Pietro Gagliardi 385993792f Migrated the GTK+ backend to the new API. 2014-06-28 21:40:44 -04:00
Pietro Gagliardi 098beef996 Added Checkbox.SetChecked() and implemented it on GTK+. 2014-06-26 21:36:46 -04:00
Pietro Gagliardi e00eebf580 Split Label into a non-aligned standalone label and an aligned regular label. Implemented on GTK+. Now to write the test. 2014-06-25 11:39:06 -04:00
Pietro Gagliardi 1414950538 Implemented Window.Center() on GTK+. 2014-06-11 14:38:16 -04:00
Pietro Gagliardi 3c1a61049b More go fmt. 2014-06-10 10:22:30 -04:00
Pietro Gagliardi a0e8048b06 Had Area.SetSize() explicitly labelled as repainting the whole Area; made sure it does that on GTK+ (it already did on Windows and Mac). I think we're ready to declare the API as it stands now stable! 2014-06-09 22:47:45 -04:00
Pietro Gagliardi f8d46b6bdb Implemented Area.RepaintAll() on GTK+. 2014-06-09 22:22:02 -04:00
Pietro Gagliardi 14c7267b10 Made the preferred size of an Area its size on GTK+ as well. 2014-06-06 23:31:50 -04:00
Pietro Gagliardi e1f322dce0 Changed Unix Area WM_ACTIVATE equivalent handling to use enter-notify-event and leave-notify-event instead of focus-in-event and focus-out-event as suggested by tristan in irc.gimp.net/#gtk+. 2014-06-01 00:16:57 -04:00
Pietro Gagliardi 4045d50f94 Checked to see if the previous commit worked after removing the leftover Combobox selectIndex() code; it does. Removed the dummy code from the Windows and GTK+ backends as well. 2014-05-29 04:41:07 -04:00
Pietro Gagliardi f4afa2a951 Attempted to add focus change support to the new GTK+ high-order click code like we do on Windows; it isn't working quite yet but I'll mark it as a TODO for now. 2014-05-23 23:38:14 -04:00
Pietro Gagliardi dbeccfa922 Added custom double-click/triple-click/higher-order click handling to GTK+ Areas. 2014-05-23 18:30:08 -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 be56293e9c Found a method in NSArrayController via Stack Overflow which lets me suppress selection-changing behavior on NSTableView inserts; use that on Listbox in Mac OS X. This means sysData.selectIndices() and its Mac OS X implementation can (and has) gone away, clearing TODOs on Windows and Unix by extension. 2014-05-17 12:42:00 -04:00
Pietro Gagliardi e30646ed59 Removed TODO about returning container before connecting signals in sysdata_unix.go; nothing will actually be sent until we show the widgets anyway. 2014-04-27 13:48:47 -04:00
Pietro Gagliardi 6c3058a32d Settled window sizing for GTK+; moved the respective TODO to future plans. 2014-04-15 12:58:17 -04:00
Pietro Gagliardi d4c79539af Fixed Listboxes on Mac OS X having an initial selection. 2014-04-12 22:05:34 -04:00
Pietro Gagliardi 274fa0c292 Fixed Comboboxes on Mac OS X having an initial selection. This also lays the groundwork for adding Combobox/Listbox.Select() as a public function... 2014-04-12 21:49:41 -04:00
Pietro Gagliardi 69b63dbbb8 Slowed GTK+ indeterminate Progressbars down. 2014-04-08 00:21:12 -04:00
Pietro Gagliardi 2647d28f2b Removed the initText parameter from sysData.make() and changed all invocations to call sysData.setText() separately; this avoids the need to check if sysData.setText() is valid. Also implemented that on GTK+. 2014-04-01 16:43:56 -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 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