Commit Graph

616 Commits

Author SHA1 Message Date
Pietro Gagliardi b9b8ab7552 Removed some debugging stuff. I'm going to need to introduce a uiControlRelayoutParent(). 2015-08-17 18:53:46 -04:00
Pietro Gagliardi df832fbff8 More uiGroup work. 2015-08-17 18:30:04 -04:00
Pietro Gagliardi f2e30548fc Attempted to fill in uiGroup; also fixed uiUninit() bugs. 2015-08-17 17:27:27 -04:00
Pietro Gagliardi ab9432cc7e Stray TODO resolution removal. 2015-08-17 15:20:46 -04:00
Pietro Gagliardi 6544e76d5f Implemented the uiSlider and uiProgressBar functions and events. More TODOs. Some build warnings fixed. 2015-08-17 15:16:54 -04:00
Pietro Gagliardi 478f5d2504 More TODO resolution. 2015-08-17 12:57:45 -04:00
Pietro Gagliardi b15554cbd1 Some TODO resolution. 2015-08-17 12:42:10 -04:00
Pietro Gagliardi d8bba34caf More TODOs. 2015-08-17 12:15:32 -04:00
Pietro Gagliardi 46da8c5fc7 More TODOs. 2015-08-17 01:58:23 -04:00
Pietro Gagliardi edd2bf81e1 Fixed other build errors. IT WORKS! but isn't quite clean now... 2015-08-17 01:52:06 -04:00
Pietro Gagliardi a5a9c464bf Fixed some build and runtime errors. 2015-08-17 01:41:04 -04:00
Pietro Gagliardi eb0b1d1ab7 Changed all the things that used NSMutableDictionary to store views as keys to not do so. Will test next. 2015-08-17 01:29:34 -04:00
Pietro Gagliardi 22551413aa Set up the infrastructure for replacing NSMutableDictionary with a proper non-copying map. 2015-08-17 01:03:53 -04:00
Pietro Gagliardi 9d3ba0cfd7 More TODOs. 2015-08-16 23:45:15 -04:00
Pietro Gagliardi 4a9d0081a3 Other build issues fixed. Now for other issues. 2015-08-16 23:44:23 -04:00
Pietro Gagliardi 13e90c4263 More fixes. 2015-08-16 23:20:53 -04:00
Pietro Gagliardi 4b0d81c144 More compile fixes. 2015-08-16 23:16:42 -04:00
Pietro Gagliardi fa659395c8 Fixed some build issues and added the OS X uiControl code. 2015-08-16 23:08:00 -04:00
Pietro Gagliardi d5f2cae243 Whoops, forgot to migrate the tests. 2015-08-16 22:49:50 -04:00
Pietro Gagliardi a048f0bcc0 Migrated everything else. Now we can rebuild! 2015-08-16 22:48:27 -04:00
Pietro Gagliardi 51f714e0e4 More migration. I think that's all the code; all that's left is the makefiles... 2015-08-16 22:46:18 -04:00
Pietro Gagliardi f95b9c1204 More migration. 2015-08-16 22:30:44 -04:00
Pietro Gagliardi 705f81d7e4 Started merging back the uiControl base code. 2015-08-16 22:19:15 -04:00
Pietro Gagliardi 2cd336903d Rewrote the public-facing OS X control macro. 2015-08-16 20:56:39 -04:00
Pietro Gagliardi 7613d32bc1 Converted ui.idl to a non-IDL ui.h. 2015-08-16 17:14:46 -04:00
Pietro Gagliardi 8fec1b41d2 Some more Auto Layout utility functions. 2015-08-16 11:43:51 -04:00
Pietro Gagliardi d0ceac86c2 Wrote up the Auto Layout-based uiBox implementation. 2015-08-15 23:32:34 -04:00
Pietro Gagliardi a0bf2107d3 Migrated the uiWindow code, also reimplementing it to use the new Auto Layout system. 2015-08-15 20:37:02 -04:00
Pietro Gagliardi 459900ffd5 Fixed up tab.m. 2015-08-15 19:35:36 -04:00
Pietro Gagliardi f8fbcb3dfb Started some Auto Layout utility functions. 2015-08-15 17:05:48 -04:00
Pietro Gagliardi cfd50c16d9 More control migration. I'm going to rewrite this before continuing, but first, Auto Layout stuff. 2015-08-15 17:05:11 -04:00
Pietro Gagliardi a931957f4e More new Darwin controls. 2015-08-14 23:50:38 -04:00
Pietro Gagliardi 60856a59b7 Even more Darwin control work. 2015-08-14 22:50:20 -04:00
Pietro Gagliardi 521da6c598 More Darwin control migration. 2015-08-14 21:46:35 -04:00
Pietro Gagliardi e0963f8030 More TODOs. 2015-08-13 23:38:58 -04:00
Pietro Gagliardi 216f480d31 Started rewriting the OS X backend. This time I start by writing the controls how I'd ideally write the boilerplate. 2015-08-13 23:38:17 -04:00
Pietro Gagliardi a44498e4c3 More TODOs and comments. 2015-08-11 20:23:12 -04:00
Pietro Gagliardi 372cfd048d Experimented with manually specifying control sizes for nonstretchy controls in Box. This resolves ambiguities! 2015-08-11 20:21:30 -04:00
Pietro Gagliardi 819d778b46 Some layout.swift changes. Added support for the metrics parameter and a fitting size calculation function; this will be needed for the next experiment with boxes. 2015-08-11 20:10:12 -04:00
Pietro Gagliardi 22599c3428 Removed the OS version stuff in the previous commit. Not sure what the difference between OS Version and Subsystem Version is. 2015-08-09 16:01:55 -04:00
Pietro Gagliardi bf2bacd32c Set the major OS subsystem version for Windows targets. Thanks to nbjoerg in irc.oftc.net/#mingw-w64 and Hans Passant on Stack Overflow. 2015-08-09 15:55:37 -04:00
Pietro Gagliardi 0268028ccb Added nested Box stress tests. 2015-08-09 01:59:06 -04:00
Pietro Gagliardi 4de4fdafdf More TODOs. 2015-08-09 01:51:13 -04:00
Pietro Gagliardi ba2651ce03 Fixed other Spinbox issues. Rule for our Box is that both intrinsic dimensions MUST be provided. 2015-08-09 00:20:28 -04:00
Pietro Gagliardi 3cba5b018c Reimplemented the old main.swift_. Spinbox still has issues, it seems. 2015-08-08 23:46:56 -04:00
Pietro Gagliardi 5964af433a Fixed up Spinbox. 2015-08-08 23:33:56 -04:00
Pietro Gagliardi f570acef6f Started migrating the original main test back. We need to rework Spinbox now. 2015-08-08 23:03:05 -04:00
Pietro Gagliardi 2af8289753 More TODOs. 2015-08-08 22:06:57 -04:00
Pietro Gagliardi 9431ed5851 Added a more comprehensive test of the basics. Woo! Now to convert the test that's in main.swift_... 2015-08-08 22:04:03 -04:00
Pietro Gagliardi 02991879bc Implemented lack of stretchiness. I believe this is a complete Box implementation. A lot simpler than the other one! :) But will it hold up to the stress test... 2015-08-08 21:54:58 -04:00
Pietro Gagliardi 64dedfe540 Implemented multiple stretchy controls. 2015-08-08 21:38:21 -04:00
Pietro Gagliardi 48e1ccdb10 Implemented stretchiness. 2015-08-08 21:31:15 -04:00
Pietro Gagliardi 15eadff66b Made the button stretchy. This will be important for testing, as by default Auto Layout will want to make the text field stretchy instead. 2015-08-08 20:21:07 -04:00
Pietro Gagliardi 8ae6c9d02a Switched to processing command-line arguments for setting the variables in main.swift. 2015-08-08 19:47:53 -04:00
Pietro Gagliardi c76584c3d2 More Box work. Secondary dimension stretchiness works fine. 2015-08-08 19:32:24 -04:00
Pietro Gagliardi b2f5254fe2 Wrote some preparation for stretchiness. 2015-08-08 11:48:35 -04:00
Pietro Gagliardi 240dc25d74 More Box work. 2015-08-08 11:12:55 -04:00
Pietro Gagliardi cacc4f1ed6 More Box work. 2015-08-07 22:40:09 -04:00
Pietro Gagliardi 39d36f30b5 Removed Control.Relayout(). It's not going to be needed, as only a change in control-specific state would trigger a relayout, and we don't need to lay /the entire window/ out recursively due to an internal change. 2015-08-07 22:10:11 -04:00
Pietro Gagliardi 34684cf2aa Started reimplementing Box. 2015-08-07 22:01:19 -04:00
Pietro Gagliardi 43e3d538e0 Migrated Spinbox back. 2015-08-07 20:25:18 -04:00
Pietro Gagliardi a6b16d6473 Started migrating controls back. 2015-08-07 19:44:08 -04:00
Pietro Gagliardi 96e857dbee Fixed compiler issues. Starting to get very annoyed about optionals. 2015-08-07 19:29:01 -04:00
Pietro Gagliardi 4857ddc018 Started restructuring this whole thing, Swift-izing it in the process. I'm going to just abandon the current tBox implementation; I have no idea how it worked at all. 2015-08-07 18:17:29 -04:00
Pietro Gagliardi 10914816ff Got rid of UIntMax. 2015-08-07 16:27:03 -04:00
Pietro Gagliardi ad895a7f7e Fixed some more runtime errors. I have no idea how this code even worked anymore. 2015-08-07 16:24:15 -04:00
Pietro Gagliardi 9aeeeab812 Fixed runtime errors. Now to fix bugs! 2015-08-07 15:07:53 -04:00
Pietro Gagliardi dbde124471 Fixed build errors. Now to fix runtime errors. 2015-08-07 14:45:01 -04:00
Pietro Gagliardi 06f32ca759 Fixed many compiler errors. 2015-08-07 10:46:34 -04:00
Pietro Gagliardi de4156122f Converted box.m to Swift. Now to test the build! 2015-08-07 10:17:44 -04:00
Pietro Gagliardi 3709e3fb0a Converted spinbox.m to Swift. 2015-08-07 02:15:40 -04:00
Pietro Gagliardi b3f7559bef Minor fixups. 2015-08-07 02:06:18 -04:00
Pietro Gagliardi e2605f5db9 More code conversion to Swift. 2015-08-07 02:04:05 -04:00
Pietro Gagliardi 63df1b8e16 More work. 2015-08-07 01:28:26 -04:00
Pietro Gagliardi 06c88c9d9f More work. 2015-08-07 01:11:55 -04:00
Pietro Gagliardi 260f619b20 Removed now-converted files. 2015-08-06 23:15:10 -04:00
Pietro Gagliardi 2b1134625d Converted window.m. 2015-08-06 23:10:50 -04:00
Pietro Gagliardi 170426a9df Decided to rewrite this test program in Swift. Started with main.m, osxaltest.h, and util.m. 2015-08-06 22:38:39 -04:00
Pietro Gagliardi 4c4737c661 More TODOs. 2015-08-03 14:34:14 -04:00
Pietro Gagliardi 0e851d6c0e More TODOs. 2015-08-03 13:57:01 -04:00
Pietro Gagliardi fcf562d264 Rotated the boxes. Let's fix the new problems! 2015-08-03 13:37:48 -04:00
Pietro Gagliardi f185ca71c6 Added labels to make sure those don't need minimum width constraints. They don't. 2015-08-03 13:35:36 -04:00
Pietro Gagliardi 1cdc7d3eb3 Removed all the debugging hooks, re-enabled (and fixed) everything else. 2015-08-03 12:47:41 -04:00
Pietro Gagliardi 70adbf6496 Added a non-stretchy predicate for non-stretchy controls. This fixes our spinboxes. 2015-08-03 12:43:51 -04:00
Pietro Gagliardi 1e66408881 More debugging. It looks like I'll need to add that minimum width field after all. 2015-08-03 12:34:49 -04:00
Pietro Gagliardi f66e2e569e Fixed empty boxes. 2015-08-03 12:17:56 -04:00
Pietro Gagliardi f7c5c6e60e More ambiguity debugging hooks. 2015-08-03 12:16:08 -04:00
Pietro Gagliardi c5a013aea1 ACTUALLY switched to tBoxContainer in box.m this time. 2015-08-03 12:10:47 -04:00
Pietro Gagliardi 64f36f8e74 Added a debug hook for constraints. 2015-08-03 12:09:31 -04:00
Pietro Gagliardi 69cb4694dd Added padding. 2015-08-03 11:22:14 -04:00
Pietro Gagliardi 06257b19a5 Added tEntry as a test of the tSpinbox bug. THAT works fine. 2015-08-03 11:14:05 -04:00
Pietro Gagliardi 38c10ed990 More test stuff. More TODOs. 2015-08-03 01:19:32 -04:00
Pietro Gagliardi 167ea85f6e Implemented the proper hugging constraints for stretchy controls in tBox. 2015-08-03 01:10:27 -04:00
Pietro Gagliardi 1d2880895d Started saving the hugging priorities. 2015-08-03 00:56:14 -04:00
Pietro Gagliardi 410478e1c8 Added an orientation variable to the tBox code for when we start dealing with hugging. This is the proper way to prevent controls from stretching. 2015-08-02 23:42:14 -04:00
Pietro Gagliardi e7570c9490 Added another row of buttons to main.m. Non-stretchiness doesn't quite work correctly... 2015-08-02 23:21:27 -04:00
Pietro Gagliardi 0adf51118e Readded stretchiness. 2015-08-02 23:17:20 -04:00
Pietro Gagliardi 17a17b0d27 Fixed build and runtime errors. 2015-08-02 23:05:16 -04:00
Pietro Gagliardi 2eb48aa129 Changed button.m and spinbox.m to use the new model. Let's test this one... 2015-08-02 22:41:07 -04:00
Pietro Gagliardi bd166e601f Modified box.m to use a single NSView. 2015-08-02 22:38:24 -04:00
Pietro Gagliardi f275a9a043 Converted box.m's auto layout code to the new format. Stretchiness isn't handled yet. Next up is box.m's actual view itself. 2015-08-02 22:29:35 -04:00
Pietro Gagliardi bdf3bed5f4 Changed tWindow to use the single-view-per-control model. 2015-08-02 21:34:54 -04:00
Pietro Gagliardi 90cd19fca6 Removed the separate spinbox. It's not going to happen; every component has to be its own NSView for tBox to work. 2015-08-02 21:03:06 -04:00
Pietro Gagliardi f1b372569a Tried to do lateral dimension tuning. Didn't work -_- Recursive tBoxes might have to be individual NSViews as well :|
Psy in #macdev said things which confirm that Auto Layout does NOT give me Interface Builder metrics for free. This destroys the whole point...
2015-08-02 19:27:55 -04:00
Pietro Gagliardi 2fe193563e Resolved that TODO. 2015-08-02 18:54:33 -04:00
Pietro Gagliardi 03212b6b02 More TODOs. 2015-08-02 18:43:50 -04:00
Pietro Gagliardi f434b8e1b9 Started constructing the final test tBox. 2015-08-02 18:40:45 -04:00
Pietro Gagliardi 10efe52513 "Fixed" another crash. 2015-08-02 18:34:47 -04:00
Pietro Gagliardi b3ad1768b0 Fixed Auto Layout prefix issues. 2015-08-02 18:19:11 -04:00
Pietro Gagliardi ebae310ff1 Fixed crashing. Made relayouts optional in tSetParent. Rewrote the tBox auto layout code a fair bit, thinking crashing was caused by stack overflow (it was not). 2015-08-02 18:16:44 -04:00
Pietro Gagliardi 4a97a3cdb9 Wrote the tBox code to deal with starts and ends and attachments. It doesn't quite work yet... 2015-08-02 16:55:21 -04:00
Pietro Gagliardi f72b47c4dc Added horizontal/vertical first/last flags. These flags are used by single controls for attachments. tBox will set them conditionally, so it can use the attachment values directly. 2015-08-02 15:03:30 -04:00
Pietro Gagliardi 3e8aad0068 Started converting tBox to the attachcment-based system. I think I'll need to introduce a few more parameters (first/last horz/vert). 2015-08-02 14:49:10 -04:00
Pietro Gagliardi 15ecebbccc Adjusted tWindow to use the new attachment system. 2015-08-02 14:06:49 -04:00
Pietro Gagliardi b508161d1e Added a framework for handling attachments to the frame. These are only handled by the shallowest control level (the immediate child of a tWindow). 2015-08-02 13:57:59 -04:00
Pietro Gagliardi 5bc53f937d More stretchiness work. 2015-08-02 12:52:24 -04:00
Pietro Gagliardi 88f137aa80 Laid the foundation for handling stretchiness. 2015-08-02 12:35:48 -04:00
Pietro Gagliardi fbbe1fdd3b Added vertical boxes. 2015-08-02 12:22:24 -04:00
Pietro Gagliardi 64ed23e933 Changed the Auto Layout generation function to use a structure of parameters. This will make adding parameters easier. 2015-08-02 11:26:03 -04:00
Pietro Gagliardi 96dfd95fd3 Fixed spinbox single-view issues. 2015-08-02 09:31:49 -04:00
Pietro Gagliardi 2daf46b711 Moved the combined spinbox back. Forgot to auto layout its contents :D 2015-08-02 09:10:17 -04:00
Pietro Gagliardi f0d1c5d171 Added a copy of the spinbox code with just one view containing the two controls. This is going to hurt is it... 2015-08-02 00:39:16 -04:00
Pietro Gagliardi aca81945e8 Added some support code for our changes to tSpinbox to make it have only one view. Unfortunately, this is how we're going to need to do stretchiness with tSpinbox. 2015-08-02 00:10:30 -04:00
Pietro Gagliardi 08c3602130 Saved stretchy values in box.m. We'll need to figure out how to incorporate these into the generated files... 2015-08-01 22:38:01 -04:00
Pietro Gagliardi 30a30cb5be Added tRelayout to all controls. Also changed the order of stretchy controls in main.m because Auto Layout's defaults aren't optimal. 2015-08-01 22:13:41 -04:00
Pietro Gagliardi 8868ad3b53 Stored parents in the various tControls. This is neccessary for making tRelayout on all controls. 2015-08-01 21:41:36 -04:00
Pietro Gagliardi 399f18f3ad Removed the old Auto Layout routines from the other classes. 2015-08-01 18:35:24 -04:00
Pietro Gagliardi a2925e3b0b Implemented more of the tBox auto layout logic. Now we need to get rid of the methods I had before and implement tRelayout on all classes. 2015-08-01 18:33:17 -04:00
Pietro Gagliardi a06216eb34 Fixed some build errors. 2015-08-01 18:13:43 -04:00
Pietro Gagliardi a7b0df8198 Updated the main program to use tBox. If we test it, nothing should show up... 2015-08-01 18:08:45 -04:00
Pietro Gagliardi 7bd98bafc9 Started reimplementing uiBox. Added a first argument to the main Auto Layout function so uiBox can have subviews. 2015-08-01 18:05:50 -04:00
Pietro Gagliardi b528d1ff0c Added multiple primary horizontal and vertical Auto Layout views. This will accomodate tSpinbox. Now we can go back to tBox. 2015-08-01 17:26:56 -04:00
Pietro Gagliardi 4dc63828e4 Added spinboxes to the test. We're going to need multiple horizontals and verticals. 2015-08-01 17:19:45 -04:00
Pietro Gagliardi 554454f036 Added margined to tWindow. 2015-08-01 15:44:06 -04:00
Pietro Gagliardi 391f6dd265 Implemented the basic Auto Layout manager for tWindow and tButton. Added tWindow this time too >_> 2015-08-01 15:38:59 -04:00
Pietro Gagliardi 9ecf15f4e0 Changed things around a bit; going to build things from tWindow's perspective first. 2015-08-01 15:21:03 -04:00
Pietro Gagliardi cdbf2d5b5c Moved tBox out of the way. We'll start with just a tButton for now. 2015-08-01 15:08:33 -04:00
Pietro Gagliardi 63439daffc Some cleanup in the Auto Layout test. 2015-08-01 14:22:45 -04:00
Pietro Gagliardi c9da21e350 More Auto Layout test work. It compiles1 2015-08-01 12:43:54 -04:00
Pietro Gagliardi 8bcaeb5d85 More TODOs. 2015-08-01 02:28:10 -04:00
Pietro Gagliardi 52152f0f9d More uiBox mock work. 2015-08-01 02:16:35 -04:00
Pietro Gagliardi 0d27b4e30f Started mocking the implementation of uiBox. 2015-07-31 23:25:59 -04:00
Pietro Gagliardi 32905f5989 More Auto Layout test work. 2015-07-31 23:06:29 -04:00
Pietro Gagliardi 046a7303c4 Started mocking out how uiBox will work in Auto Layout. This will be a separate program for now; hopefully I can salvage its code for the actual implementation. 2015-07-31 22:33:49 -04:00
Pietro Gagliardi c8ac7ffaf5 Added planning for new auto layout-based uiBoxes for OS X. 2015-07-31 14:06:48 -04:00
Pietro Gagliardi 43341f51e9 Switched the GTK+ implementation to use this new uiBox, completed the implementation a bit more, and fixed some other build errors. 2015-07-30 12:43:40 -04:00
Pietro Gagliardi d4d30285ff Wrote up an untested implementation of a GtkBox-based uiBox, redux. This system of having one uiControl vtable to rule them all isn't going to work; each backend will need a wildly different implementation; oh well :/ 2015-07-30 12:31:39 -04:00
Pietro Gagliardi 29220bde2d Implemented autoresize of bin controls. It won't work now because uiBox tries to do its own size management. This is going to be a mess... :) 2015-07-29 19:57:23 -04:00
Pietro Gagliardi bddbe16ea9 Fixed some more runtime errors. 2015-07-29 13:43:54 -04:00
Pietro Gagliardi 10eefc7a61 Verified some stuff. 2015-07-29 13:35:49 -04:00