Commit Graph

69 Commits

Author SHA1 Message Date
Pietro Gagliardi 3c1a61049b More go fmt. 2014-06-10 10:22:30 -04:00
Pietro Gagliardi fa4094adeb Added Area.RepaintAll() (requested by aybabtme on the Gopher Academy Slack) and implemented it on Mac OS X. 2014-06-09 22:11:08 -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 946e007e5d Same as previous commit, but for Mac OS X now. The #cgo directives are in uitask_darwin.go. 2014-05-19 22:52:59 -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 d8a7d9b53e Fixed up a bunch of Mac OS X function names, mostly Listbox-related, to be more clear and more consistent. 2014-05-16 20:44:19 -04:00
Pietro Gagliardi 6d67bce9b1 Moved toBOOL() from sysdata_darwin.go to objc_darwin.go since it's used by other Mac OS X files too. 2014-05-16 20:29:16 -04:00
Pietro Gagliardi ebcbaa129d Combined all the Objective-C headers into objc_darwin.h. 2014-05-16 06:49:29 -04:00
Pietro Gagliardi b7db0e15cd Removed all the objc_getClass() and sel_getUid() calls from the Go code on Mac OS X. Also got rid of a forgotten objc_msgSend(). Now comes the Objective-C half... 2014-05-15 20:14:44 -04:00
Pietro Gagliardi 9d8976abab Migrated everything else to Objective-C native; fixed a few things I missed along the way. 2014-05-15 19:55:16 -04:00
Pietro Gagliardi 791345fa97 Finished migrating sysdata_darwin.go away from calling objc_msgSend() directly. initWithDummyFrame() is still there as other files use it. 2014-05-13 07:09:22 -04:00
Pietro Gagliardi 3949fb94e9 Further refactoring and de-runtime-izing of sysdata_darwin.go. These changes currently untested. 2014-05-12 23:55:56 -04:00
Pietro Gagliardi 37f3d0fafc Converted most of sysdata_darwin.go to regular Objective-C. I'll also standardize the interface for transferring integer values between Objective-C and Go so that they use intptr_t and uintptr_t everywhere, rather than those two in some places and uint64_t/int64_t in others. 2014-05-12 19:34:13 -04:00
Pietro Gagliardi f14614c0c7 Began the migration to native Objective-C by moving the NSWindow functions and some of the shared helper routines. 2014-05-12 15:15:26 -04:00
Pietro Gagliardi e726ee16bd Replaced the hackish indeterminate progress bar animation on Mac OS X (which didn't work on 10.6) with calls to startAnimation: and stopAnimation:; I have no idea how I missed those the first time. Thanks to stal[DirectX] in irc.freenode.net/#macdev for pointing those out to me. 2014-05-11 21:31:20 -04:00
Pietro Gagliardi cc01981999 Added tracking areas to Area on Mac OS X so mouse move events can work; they work now. 2014-05-10 21:03:04 -04:00
Pietro Gagliardi 5819e52f8d Preparation for adding tracking areas to Mac OS X Areas: we need to now pass in the sysData to each control's make() function so Area can save the tracking area somewhere (this will also come in handy when I change alternate from a bool to an integer index). 2014-05-10 14:59:11 -04:00
Pietro Gagliardi 61b3b03418 Added comment explaining the use of -[NSWindow setContentSize:] in Mac OS X sysData.setWindowSize(). 2014-05-01 13:13:10 -04:00
Pietro Gagliardi 3bb9f41305 Fixed Mac OS X so that window sizes do not include the titlebar and frame. 2014-04-13 20:16:05 -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 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 dc96a73c2f Removed TODO from Mac OS X code about additional label styles; judging from Interface Builder I've got them covered. 2014-04-05 15:26:31 -04:00
Pietro Gagliardi da68adf420 Gave controls their proper fonts on Mac OS X. 2014-04-05 15:10:02 -04:00
Pietro Gagliardi 612eba9de3 Updated sysdata_darwin.go to remove some TODOs and change most, if not all, embedded magic numbers to named constants. 2014-04-05 13:59:11 -04:00
Pietro Gagliardi e35457b968 Removed objc_alloc(). This should be all of them. Now to redo how classes are handled... 2014-04-04 20:34:35 -04:00
Pietro Gagliardi 5a5b486b6a Removed objc_msgSend_rect(). This also consolidates all initWithFrame: calls into a simple initWithDummyFrame(). 2014-04-04 19:51:59 -04:00
Pietro Gagliardi dd4a7b9cbe Removed objc_msgSend_rect_uint_uint_bool(). 2014-04-04 19:14:03 -04:00
Pietro Gagliardi 461b0cc023 Removed objc_msgSend_rect_bool(). 2014-04-04 19:08:25 -04:00
Pietro Gagliardi ba2c1d6d20 Removed objc_msgSend_uint(). 2014-04-04 18:56:37 -04:00
Pietro Gagliardi fbde220ab1 Added a TODO related to the previous commit. 2014-04-04 18:00:22 -04:00
Pietro Gagliardi 1b05312da9 Mac OS X indeterminate progresbars were not animating under certain conditions; fix that. 2014-04-04 17:59:23 -04:00
Pietro Gagliardi 1a7bf4cd89 Got rid of objc_addDelegate(); it was only called in one place (Mac OS X Window creation). Also forgot to mention that the previous commit also disables mouse movements in Cocoa Areas for now; I need to replace the current code with one that uses tracking because mouse movements are system-global. 2014-04-04 15:51:40 -04:00
Pietro Gagliardi be668a965a Fixed Mac OS X Button appearance; turns out it was using the wrong font. Also updated the TODO file to mark this fix and remove other stale/already fixed details. 2014-04-04 14:52:38 -04:00
Pietro Gagliardi 01d9e1b02b Enabled mouse move events on Mac OS X. Mosue events now just got stranger and buggier there... 2014-04-03 18:33:37 -04:00
Pietro Gagliardi 2efda7bc39 Separated initial text from sysData.make() on the Mac OS X backend, completing that set of commits. 2014-04-01 17:05:16 -04:00
Pietro Gagliardi a1830c8883 Fixed Mac OS X Area setAreaSize() not working: I was using the NSWindow setFrame:display: selector instead of sending the two NSView setFrame: and display methods separately. 2014-03-30 13:25:41 -04:00
Pietro Gagliardi 08dfb5da20 Attempted to add the Area bare bones and resizing code to the Mac OS X backend. It complains that initWithFrame: is not implemented... 2014-03-30 11:19:13 -04:00
Pietro Gagliardi 34ce16d586 Separated file creation dates from the package comment. 2014-03-12 21:55:45 -04:00
Pietro Gagliardi 0e7dfc4c8a Added indeterminate ProgressBar code for Mac OS X. 2014-03-12 19:40:01 -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 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 47829df714 Added the Mac OS X implementation of Combobox/Listbox.Len(). 2014-03-08 17:25:19 -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 b2e49b3698 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
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