Commit Graph

26 Commits

Author SHA1 Message Date
Pietro Gagliardi 6f0d114a8b Changed from using image.NRGBA to image.RGBA (premultiplied alpha) in Area.Paint() since it'll be easier to work with on Windows after applying what Treeki/Ninjifox suggested I do instead of what I am doing now. 2014-04-11 16:13:18 -04:00
Pietro Gagliardi d6abf79932 Added bounds checking to NewArea() and Area.SetSize() such that an Area must have a valid size. 2014-04-10 20:42:01 -04:00
Pietro Gagliardi 09e92b0eb3 Documented scrollbars on Listbox and Area to the best of my ability, shuffling the appropriate TODOs around. 2014-04-10 16:18:53 -04:00
Pietro Gagliardi 78bb4cdace Fixed Area drawing assuming the first pixel of the *image.NRGBA is at i.Pix[0]. 2014-04-09 18:26:20 -04:00
Pietro Gagliardi 00acf74177 Updated Area's KeyEvent documentation to talk about some window managers on Unix intercepting some events; also updated the keyboard test program to make a note of behaviors related to that. 2014-04-07 12:56:10 -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 ce5cd80dba Updated the documentation: Area now works on all platforms, Modifiers behavior on both left and right keys simultaneously is undefined for now, and the way to create custom Controls no longer involves embedding Area. 2014-03-30 19:57:24 -04:00
Pietro Gagliardi 41a7e3dab8 Implemented Area mouse events on Mac OS X. Also fixed a few other things left behind in the previous commits. Also more TODOs. 2014-03-30 17:52:27 -04:00
Pietro Gagliardi efdd60375a Documented that the clip area in AreaHandler.Paint() more properly and indicate that it is cleared on each AreaHandler.Paint() call; (try to) implement that on Windows (GTK+ does it for us; noted that as well). 2014-03-29 19:02:09 -04:00
Pietro Gagliardi 75acdfd9ad Re-added the numeric keypad keys to ExtKey and removed predefkeys in area_unix.go since all are now being handled. 2014-03-29 13:01:42 -04:00
Pietro Gagliardi 76d24be6b0 Removed the numpad constants pending re-evaluation of how to handle those. 2014-03-29 12:33:00 -04:00
Pietro Gagliardi 0d75303dc3 Changed the definition of KeyEvent to be positional. The implementation has not been written, and thus the package will not build yet. 2014-03-28 21:10:42 -04:00
Pietro Gagliardi ab6e7121e4 Added a flag to AreaHandler.Key()/Mouse() to indicate that a repaint is needed after that event has been handled. (Having Repaint() as a method deadlocked for the same reason resizing deadlocked before.) 2014-03-27 20:31:23 -04:00
Pietro Gagliardi cd49e05da8 Fixed a slight documentation error in area.go. 2014-03-23 21:04:47 -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 646e91b25a Had ExtKey start at 1 so KeyEvent.ExtKey can be 0. 2014-03-23 17:08:46 -04:00
Pietro Gagliardi 64d5eb541e Changed the new resizing code so that it uses the same allocated slice per window instead of making a new one to store all the resize requests each time. 2014-03-17 21:09:03 -04:00
Pietro Gagliardi 19227080da Changed window resizes so that the actual Control.setRect() functions appended to an array of requests that the resize() function set all at once instead of having each done individually. This will be necessary for what I think will be a solution to the deadlocks. It doesn't work right now; I'm assuming it's allocating too much memory. I know how to fix this, but I'm committing what I have so far to be safe. 2014-03-17 20:42:36 -04:00
Pietro Gagliardi 4adf1ae5cd Removed the mutexes from Labels and Areas because I'm at my wits end about settling the deadlock between window resizing and setting a Label's text. 2014-03-17 13:37:51 -04:00
Pietro Gagliardi ae554f10c3 Changed Area to use a delegate handler object that implements the new AreaHandler interface for handling events. Also updated the GTK+ backend with this change, and made a few more tweaks to the documentation in area.go. 2014-03-16 21:40:33 -04:00
Pietro Gagliardi 961d8484bc Clarified that MouseEvent.Held will not include Down/Up. 2014-03-15 22:39:16 -04:00
Pietro Gagliardi 2c547cb5ec Added note in MouseEvent documentation about both Down and Up being 0 representing mouse movement. 2014-03-15 22:30:49 -04:00
Pietro Gagliardi 829cf7b1c6 Added (untested) GTK+ implementation of Area's mouse events. 2014-03-15 22:29:47 -04:00
Pietro Gagliardi a5a3287696 Added portable code for Area's MouseEvent. 2014-03-15 21:36:10 -04:00
Pietro Gagliardi a82a50c440 Documented the details of Area's coordinate system. 2014-03-15 17:27:42 -04:00
Pietro Gagliardi c3c0edda3d Added the portable code for Area. 2014-03-14 16:43:46 -04:00