Commit Graph

2026 Commits

Author SHA1 Message Date
Pietro Gagliardi 9a4e7bf5eb Changed Stack so that controls are added only at creation time. 2014-02-14 10:58:16 -05:00
Pietro Gagliardi 5436f8f5fa Added Stacks of controls. 2014-02-13 17:04:57 -05:00
Pietro Gagliardi 44842fea4b Added Checkbox.Checked(). 2014-02-13 15:14:10 -05:00
Pietro Gagliardi f3c77bda6e Added checkboxes. You can't really do anything with them yet, though... 2014-02-13 12:26:43 -05:00
Pietro Gagliardi c36c863fe1 Adjusted bookkeeping notes for the now-implemented sizing code. 2014-02-13 11:46:41 -05:00
Pietro Gagliardi 91113a32bf Removed Control.setParent() as the parent/child hierarchy is now unidirectional. 2014-02-13 11:45:10 -05:00
Pietro Gagliardi a400ec6666 Fixed the resizing deadlock. 2014-02-13 11:42:21 -05:00
Pietro Gagliardi 5626b9e35c Added sizing of windows and the main window control. It presently deadlocks; I'll need to redo my mutexes... 2014-02-13 05:28:26 -05:00
Pietro Gagliardi ae9afced2a Added a reminder/TODO related to why I needed to do all that (add resizing). 2014-02-12 21:37:24 -05:00
Pietro Gagliardi 3d2df2334e Fixed compiler errors. New code structure success! 2014-02-12 21:33:24 -05:00
Pietro Gagliardi 8e2f3b136e Adjusted sysData.make() to make the new window class and fixed main(). Now to fix compiler errors... 2014-02-12 21:28:58 -05:00
Pietro Gagliardi 40dc20be0d Whoops, forgot to turn Button.sysData.clicked into Button.sysData.event. 2014-02-12 21:26:18 -05:00
Pietro Gagliardi 5bc4c49afa Modified Button for the new changes. Now I just need to actually create the window class and edit main()... 2014-02-12 21:25:25 -05:00
Pietro Gagliardi 942490e1aa Adjusted Control and Window for the new system. 2014-02-12 21:23:53 -05:00
Pietro Gagliardi 403ca88316 Whoops, class registration now has to go through the UI task. 2014-02-12 21:11:21 -05:00
Pietro Gagliardi bccbc45bcf The past few commits mean we no longer need to do reverse sysData lookup, so get rid of that. 2014-02-12 21:09:28 -05:00
Pietro Gagliardi 3dcbb3920d Windows sysData has been adjusted to deal with child controls. Rather than storing the parent window, it is passed as an argument to sysData.make(), which does the child ID allocation. Child IDs are now window-local, getting rid of that restriction. 2014-02-12 21:08:10 -05:00
Pietro Gagliardi e296398eff Formatting change for cSysData itself. 2014-02-12 20:57:30 -05:00
Pietro Gagliardi 98d56767a3 Each control may only need one event, so combine them all into a single channel whose use depends on the sysData itself. Also we won't need to save the parentWindow anymore, as the change to the make() function will take care of that for us. 2014-02-12 20:55:05 -05:00
Pietro Gagliardi 4b16716e61 Restructuring the codebase to make things neater. First off: each window now has its own class; the sysData knows about children. This updates the window class to become a generator and rewrites the WndProc as well. 2014-02-12 20:51:07 -05:00
Pietro Gagliardi a9ff388944 Added Window.SetTitle(). Also oops, forgot to mark the window as created. 2014-02-12 18:14:37 -05:00
Pietro Gagliardi 0a9f408129 More TODOs... this time about crashes... oh boy... 2014-02-12 14:15:09 -05:00
Pietro Gagliardi a272436ee6 Whoops, forgot to add button.go itself :| 2014-02-12 13:52:34 -05:00
Pietro Gagliardi da92dd55bd Even more TODOs. 2014-02-12 11:34:36 -05:00
Pietro Gagliardi d3dace0c06 More TODOs. 2014-02-12 11:34:10 -05:00
Pietro Gagliardi 5f587fbf47 Added button events. 2014-02-12 11:32:17 -05:00
Pietro Gagliardi ddfb5c7603 Added buttons. 2014-02-12 11:29:20 -05:00
Pietro Gagliardi 87a99bd675 More TODOs. 2014-02-12 10:58:05 -05:00
Pietro Gagliardi 33a32c4cda Added a TODO list. 2014-02-12 10:54:58 -05:00
Pietro Gagliardi 49d0375975 Added initial window size and the Window.SetTitle() function. 2014-02-12 10:51:27 -05:00
Pietro Gagliardi 3f8fe0e710 Separated initial text from sysData and fixed errors in the previous commits. 2014-02-12 10:43:57 -05:00
Pietro Gagliardi f93bebfeec Added control ID generation. 2014-02-12 10:35:15 -05:00
Pietro Gagliardi e9e2c0f269 Set up restrictions tracking. Added a restriction that a window and its controls are fixed to the window once it has been open. Started accounting for parent windows in controls. 2014-02-12 10:29:56 -05:00
Pietro Gagliardi 0f373195de Changed the sysData cache so that if we didn't fill it in yet, getSysData() returns nil instead of panicking, and the standard window procedure jumps directly to the default handler. Not what I originally wanted to do, but whatever, it finally works! 2014-02-11 22:41:55 -05:00
Pietro Gagliardi 6da43e8bb7 Fixed the PeekMessage() call as per http://blogs.msdn.com/b/oldnewthing/archive/2006/02/10/529525.aspx 2014-02-11 22:38:46 -05:00
Pietro Gagliardi 08ba4a1074 Fixed the wndproc not responding: turns out I have to have message dispatch in the UI thread... 2014-02-11 22:18:14 -05:00
Pietro Gagliardi ae14253c80 Derp me, more incorrect error checking! But now a window shows, and the process hangs, so progress! 2014-02-11 20:23:49 -05:00
Pietro Gagliardi 88363e131c Got rid of the reverse HWND->sysData lookup for now, to see if there's a mistake elsewhere. Now we're up to a panic... with Success... 2014-02-11 20:14:19 -05:00
Pietro Gagliardi cee78198e4 It appears the result of syscall.StringToUTF16Ptr() is only temporary, so removed all that. Now the program just hangs... 2014-02-11 19:52:39 -05:00
Pietro Gagliardi 9bfe67c49d Changed the caching such that the window procedure is held until we added the HWND to the cache. Now we have a mysterious class not regsitered issue... 2014-02-11 19:43:07 -05:00
Pietro Gagliardi bc531d60d7 More of the previous error and not printing panics... derp me. Still not fixed yet though... 2014-02-11 19:34:47 -05:00
Pietro Gagliardi a4182c606b Whoops, copy-paste fail somehow changed init error checks. Now it starts... and hangs before creating a window... 2014-02-11 19:27:58 -05:00
Pietro Gagliardi 73fa611b37 All build errors resolved. Now to test... 2014-02-11 19:18:03 -05:00
Pietro Gagliardi ecb2205e02 More error corrections; not done yet... 2014-02-11 19:09:10 -05:00
Pietro Gagliardi 09a42e0c34 Added the init and testing main functions and started fixing errors. Let's fix the rest and hope it works... 2014-02-11 18:57:03 -05:00
Pietro Gagliardi 7686c6e599 Added the window creation code. Now let's hope this works... 2014-02-11 18:50:33 -05:00
Pietro Gagliardi aa3e2788f3 Moved some more data structures to common_windows.go and made more things private. 2014-02-11 18:36:13 -05:00
Pietro Gagliardi bbff3d4f62 Locked the Windows message loop goroutine to the OS thread. 2014-02-11 18:32:07 -05:00
Pietro Gagliardi a1344512aa Added the Windows message loop. 2014-02-11 18:31:24 -05:00
Pietro Gagliardi b918496ae4 Filled in the standard window procedure. 2014-02-11 18:22:39 -05:00