Commit Graph

193 Commits

Author SHA1 Message Date
Pietro Gagliardi 58f6bed7e4 Set the default control font on Windows to the expected standard font instead of to the default System font. 2014-02-24 14:49:46 -05:00
Pietro Gagliardi a9325fbfbc Some notes on the last few changes. 2014-02-24 14:17:37 -05:00
Pietro Gagliardi b166c0f114 And the uitask message fixed was the issue all along. Now it works. 2014-02-24 14:16:05 -05:00
Pietro Gagliardi 4c6ce9639f Oh right derp, preferredSize() is running on uitask already; don't use the dispatch channel. Almost working... 2014-02-24 14:12:02 -05:00
Pietro Gagliardi d08ad65c4c Potential fix: show the window before getting control preferred sizes; need to make setRect() locking first. 2014-02-24 14:05:38 -05:00
Pietro Gagliardi 62d4886253 More TODOs (unrelated to previous commit). 2014-02-24 13:26:04 -05:00
Pietro Gagliardi 165308b819 Added Windows preferred size code. It doesn't work right now; both GetDC() and GetWindowDC() are not returning at all on both wine and Windows XP; need to debug (print guards are included). 2014-02-24 13:22:59 -05:00
Pietro Gagliardi 1d9a883431 Re-added Windows font grabbing code. I won't use it just yet, since I only now realize I don't actually need it for preferred sizes, but eh 2014-02-24 11:55:38 -05:00
Pietro Gagliardi 3014a5edf1 More TODOs. 2014-02-24 11:35:06 -05:00
Pietro Gagliardi f839192c8f Made sure Stack.SetStretchy() (like all other layout-changing functions) cannot be called once the parent Window has been opened. 2014-02-24 11:19:57 -05:00
Pietro Gagliardi 8bf2b5cc76 Adjusted main_test.go to make use of SetStretchy(). IT WORKS! :D 2014-02-24 11:18:47 -05:00
Pietro Gagliardi b716530863 Added Stack.preferredSize() and fixed errors in stack.go. 2014-02-24 11:14:26 -05:00
Pietro Gagliardi 53db57745f Added Control.preferredSize() and preferredSize() for all the standard Controls. 2014-02-24 10:56:35 -05:00
Pietro Gagliardi 1510af0005 Fixed some compiler errors in the last few commits. 2014-02-24 10:44:20 -05:00
Pietro Gagliardi 1c540117d3 Wrote the new Stack.setRect(). 2014-02-24 10:42:58 -05:00
Pietro Gagliardi a174fbebbd Changed Orientation to a bool to prevent invalid values outright. 2014-02-24 10:30:14 -05:00
Pietro Gagliardi 19f9761a81 Started rewriting Stack to conform to the new layout plan. 2014-02-24 10:29:15 -05:00
Pietro Gagliardi f7ed9deda1 Added a new layout plan for Stack. 2014-02-24 10:22:23 -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 a0c951cca9 sigh 2014-02-23 17:16:58 -05:00
Pietro Gagliardi ab0b13a3ab Fixed up todo.md to remove things that are done and add more notes. 2014-02-21 11:35:50 -05:00
Pietro Gagliardi e39a5d928c Fixed the unregistered window class error on 64-bit Windows: turns out it was a difference in Go's int vs. what Windows expected (thanks Microsoft for not using your special types here). Fixed all instances of this, even in unmigrated/. Still does not work in wine... 2014-02-21 02:27:59 -05:00
Pietro Gagliardi bd51e3e9a7 Got rid of my Windows input lag problems on Windows (triggered by the switch to the concurrent garbage collector sweep routine in the Go runtime) by treating <-uitask as a Windows message itself posted to the message loop thread and not making the message loop a CPU waster. 2014-02-19 22:59:48 -05:00
Pietro Gagliardi 43dd5121b2 More README updates. 2014-02-19 12:47:44 -05:00
Pietro Gagliardi 3284f6c4f4 Updated README to package-ize. 2014-02-19 11:58:52 -05:00
Pietro Gagliardi 4fe6ccce97 Super ultra important TODO related to previous two commits. 2014-02-19 11:57:18 -05:00
Pietro Gagliardi fb5c789fc4 ...and now it magically works again?! after too long, anyway... 2014-02-19 11:56:46 -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 c02948847e Missed a ui. in the README example code. 2014-02-18 16:12:38 -05:00
Pietro Gagliardi 24f73c666b More README adjustments. 2014-02-18 16:05:06 -05:00
Pietro Gagliardi 8d7cd85111 Expanded the README. 2014-02-18 16:02:43 -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 23f6a07c7f Buffered the event channels, as per skelterjohn's suggestion; I thought this would fix the faults I now get, but it doesn't... 2014-02-18 10:53:15 -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 16ab1763ba Added license and README. 2014-02-17 18:38:50 -05:00
Pietro Gagliardi b1b05c2b1f Removed all //package ui comments. 2014-02-17 18:01:32 -05:00
Pietro Gagliardi 96de0c712e Moved the old Windows main() to unmigrated/; may wind up deleting it instead. 2014-02-17 17:39:51 -05:00
Pietro Gagliardi 4363d74c96 Wrote an implementation guide. 2014-02-17 17:38:52 -05:00
Pietro Gagliardi 66045ee876 Simplified the GTK+ Listbox code and added a documentation blob to it. 2014-02-17 16:19:00 -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 00abb00e8b More TODOs. 2014-02-17 02:55:59 -05:00
Pietro Gagliardi fd86aa55c8 Added GTK+ message boxes. 2014-02-17 02:54:58 -05:00
Pietro Gagliardi 316e5e9db4 Split out the dialog functions into portable and non-portable code to keep the package documentation in the portable code only. 2014-02-17 02:34:58 -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 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