Commit Graph

361 Commits

Author SHA1 Message Date
Sasha Koshka faf5ebb283 List can now add multiple entries at once, and clear all of them 2023-03-20 01:57:06 -04:00
Sasha Koshka f37101eb9e Ctrl+a selects all in TextBox 2023-03-20 01:56:12 -04:00
Sasha Koshka d475e5e2ec TextBox now has an OnEnter method. 2023-03-20 01:13:23 -04:00
Sasha Koshka 221647a265 Made icons a bit better
There is a new IconNone and an IconUpward, and buttons don't
expand awkwardly when they have an icon.
2023-03-20 01:12:19 -04:00
Sasha Koshka 0f272f4835 DocumentContainer does as well 2023-03-17 02:00:19 -04:00
Sasha Koshka d651570746 The list element calls the scroll bounds change callback 2023-03-17 01:58:42 -04:00
Sasha Koshka 493c5210a7 DocumentContainer sets minimum size properly 2023-03-17 01:52:26 -04:00
Sasha Koshka 4c6e01203c Label.EmCollapse actually works now 2023-03-17 01:00:11 -04:00
Sasha Koshka 6258c77f86 Added an align method to label 2023-03-16 15:58:26 -04:00
Sasha Koshka a4ef28cdd0 Moved containers into a separate package 2023-03-16 14:22:56 -04:00
Sasha Koshka 40aa1a788b Renamed some oddly named files 2023-03-16 00:26:54 -04:00
Sasha Koshka bffdb000ed Piano element handles motion events 2023-03-16 00:25:36 -04:00
Sasha Koshka 5ca9206f65 DocumentContainer properly adopts children now 2023-03-16 00:24:40 -04:00
Sasha Koshka 1239f4e03d Made DocumentContainer satisfy FlexibleParent 2023-03-15 23:57:22 -04:00
Sasha Koshka 8aaa017902 Re-added OnScrollBoundsChange methods because they are useful 2023-03-15 23:56:00 -04:00
Sasha Koshka 639baecee5 Propagator unfocuses children before focusing a new one 2023-03-15 23:49:57 -04:00
Sasha Koshka c1b3562d10 It compiles 2023-03-15 23:47:13 -04:00
Sasha Koshka ef325d5161 Found a flaw in the focusing model, rectifying.
Still need to fix on X backend window, that will be in the next
commit.
2023-03-15 17:08:43 -04:00
Sasha Koshka 2f60abdfa3 Core properly sets nil parent 2023-03-15 01:46:58 -04:00
Sasha Koshka 275e113e3b Fun elements now conform to new API 2023-03-15 01:42:07 -04:00
Sasha Koshka 0015820fac Basic elements now conform to new API 2023-03-15 01:41:23 -04:00
Sasha Koshka f4799ba03d Testing elements now conform to new API 2023-03-14 19:41:36 -04:00
Sasha Koshka a34e8768ab Redid cores to conform to the new API changes 2023-03-14 18:30:32 -04:00
Sasha Koshka b08cbea320 Overhauled the element interfaces
Instead of the previous parenting model where parents would set
child callbacks during adoption by probing for callback setters,
child elements will instead probe their parents for notify methods
listed in the standard parent interfaces. This means that an
element cannot be half-parented to something, nor can it be
parented to two things at once. Parent elements may themselves
fulfill these interfaces, or they can pass a hook that fulfills
them to the child.
2023-03-14 17:08:39 -04:00
Sasha Koshka 99e029ae09 TextBox no longer aggressively requests focus 2023-03-13 22:25:57 -04:00
Sasha Koshka 5149c27cf3 Added untested label collapse 2023-03-13 17:10:27 -04:00
Sasha Koshka 7ef95cc751 Removed unneeded Container.reflectChildProperties() 2023-03-12 01:57:56 -05:00
Sasha Koshka b09994973c List and Piano do shattering properly 2023-03-12 01:47:58 -05:00
Sasha Koshka 37048c6759 Raycaster runs? 2023-03-12 01:33:05 -05:00
Sasha Koshka c45268d8c1 Testing elements now conform to the new API 2023-03-12 01:19:40 -05:00
Sasha Koshka 92e5822185 Basic and fun elements conform to new API change 2023-03-12 01:15:36 -05:00
Sasha Koshka 3d28ebe4cf Made interfacial changes that will allow for elements to be clipped 2023-03-12 00:17:35 -05:00
Sasha Koshka 5afbc0e713 DocumentContainer constrains its scroll position on resize 2023-03-11 20:04:08 -05:00
Sasha Koshka b7a7800370 DocumentContainer has a proper minimum width 2023-03-11 19:25:35 -05:00
Sasha Koshka 15fa3b2497 Quelled some of the strangeness 2023-03-11 18:27:16 -05:00
Sasha Koshka 081b005679 Added a somewhat buggy DocumentContainer 2023-03-11 18:00:29 -05:00
Sasha Koshka 1be769526d Removed references to flexible from containers 2023-03-11 00:48:15 -05:00
Sasha Koshka 51084a6cfe Removed references to flexible from layouts, x backend, core 2023-03-11 00:43:26 -05:00
Sasha Koshka 677dca1dbf ScrollContainer uses ScrollBar for scrolling 2023-03-11 00:21:54 -05:00
Sasha Koshka 5d4a26a877 AnalogClock is no longer flexible. 2023-03-10 13:45:53 -05:00
Sasha Koshka aaa794ac04 ScrollBar handles scroll wheel events 2023-03-10 13:42:51 -05:00
Sasha Koshka 8658ecd879 Sort of fixed a flexible height bug 2023-03-10 00:10:26 -05:00
Sasha Koshka 1c28613981 The scroll bar is better 2023-03-09 23:27:08 -05:00
Sasha Koshka 8e1638e054 I may have fixed the wierd scrollbar rendering
And something else I didn't realize was there
2023-03-09 22:23:09 -05:00
Sasha Koshka aff9aca835 We now have an untested lone scrollbar element 2023-03-09 18:15:52 -05:00
Sasha Koshka 305acea285 Use ezprof to profile 2023-03-08 20:24:43 -05:00
Sasha Koshka f3c1c95a57 Keyboard control for sliders 2023-03-07 19:13:08 -05:00
Sasha Koshka 11402cfc25 Button applies the sink offset correctly to icons 2023-03-05 11:20:33 -05:00
Sasha Koshka 7e0d64e8bd TextBox text is now vertically centered 2023-03-05 10:58:27 -05:00
Sasha Koshka d38bd1cbf5 Hiding button text actually works now 2023-03-05 00:31:41 -05:00
Sasha Koshka 865dd20724 Buttons can now hide their text 2023-03-05 00:23:45 -05:00
Sasha Koshka 0071994ba6 Buttons can now have icons 2023-03-05 00:05:56 -05:00
Sasha Koshka 61bbe0e346 Added an Icon element 2023-03-04 22:56:44 -05:00
Sasha Koshka 912a3f9f66 oops lmao 2023-03-04 16:18:43 -05:00
Sasha Koshka 531b0ffce9 Fixed Container not clearing child event handlers in DisownAll 2023-03-04 10:44:45 -05:00
Sasha Koshka 9c12cd7e18 Fixed cringe bug with focus requests being improperly handled 2023-03-04 02:20:48 -05:00
Sasha Koshka 4f6f4e1f1a Me when I make the exact mistake twice 2023-03-04 02:04:47 -05:00
Sasha Koshka dc5ddfc0bd Propagator no longer segfaults when handling keynav 2023-03-04 01:48:16 -05:00
Sasha Koshka 5fc5af92df Layouts now take in proper margin and padding values 2023-03-04 01:42:14 -05:00
Sasha Koshka 90ce0d7281 Fixed Propagator.forChildren 2023-03-04 01:29:45 -05:00
Sasha Koshka be286fa86c The container actually creates a propagator now lmao 2023-03-04 01:27:16 -05:00
Sasha Koshka 252433f13d Cleaned up Container somewhat 2023-03-04 01:26:23 -05:00
Sasha Koshka 165d0835bf Worked Propagator into basic.Container 2023-03-04 01:20:23 -05:00
Sasha Koshka 56e11ae1de Cleaned up the (ChildIterator -> Parent) interface 2023-03-04 01:05:37 -05:00
Sasha Koshka 1d9fb6024d Fully implemented Propagator 2023-03-04 00:57:17 -05:00
Sasha Koshka c13cdd570d Implemented all focus methods except for HandleFocus
I am dreading this
2023-03-04 00:38:37 -05:00
Sasha Koshka 5af8d7fd97 Implemented keyboard, mouse, theme, and config event propagation 2023-03-04 00:18:27 -05:00
Sasha Koshka b6eb158964 Tidied up documentation on Propagator 2023-03-03 23:48:10 -05:00
Sasha Koshka 6bb5b2d79c Created the stub for Propagator
Unlike the previous poorly-defined ContainerCore idea, this struct
has one sole responsibility and that is propagating events to
children. There may be another struct called like ChildManager or
something in the future that also abstracts away logic for
adoption, canvas cutting, disowning, layout, etc.
2023-03-03 20:31:30 -05:00
Sasha Koshka 538123dcd5 No that was a bad idea time to do something else 2023-03-03 20:16:36 -05:00
Sasha Koshka 38baa97e76 ContainerCore and ContainerCoreControl WIP 2023-03-02 18:59:08 -05:00
Sasha Koshka ef59f46559 Made the progress bar look nicer 2023-02-28 19:00:34 -05:00
Sasha Koshka b1d15fb4ec this piano is DOPE and PHAT and WAY COOL 2023-02-28 00:17:05 -05:00
Sasha Koshka ee45b2fa60 Theming tweaks and rendering fixes 2023-02-27 17:00:28 -05:00
Sasha Koshka 8dd506a007 Textures now render properly 2023-02-27 16:38:33 -05:00
Sasha Koshka de10cde630 Add image textures to theme 2023-02-27 12:48:44 -05:00
Sasha Koshka 449922851f Fix list not drawing background 2023-02-26 22:56:20 -05:00
Sasha Koshka 26787d8670 Fixed TextBox 2023-02-26 22:48:14 -05:00
Sasha Koshka cda2d1f0ae Default elements compile 2023-02-26 22:20:17 -05:00
Sasha Koshka 241c297626 whee back in busineess 2023-02-26 14:27:38 -05:00
Sasha Koshka 0c39c2dd57 Button takes advantage of the rendering hints 2023-02-16 22:41:07 -05:00
Sasha Koshka f8240fb518 Created FillRectangleShatter for convenience 2023-02-16 18:19:36 -05:00
Sasha Koshka b9cbf83a18 Added the collapse behavior as an interface 2023-02-16 17:35:53 -05:00
Sasha Koshka e3369ab3d4 AAAAART! 2023-02-16 14:57:46 -05:00
Sasha Koshka 56dc9ba54c this just j 2023-02-16 12:35:31 -05:00
Sasha Koshka a0e7bf1373 Integrated the new text drawer 2023-02-15 18:45:58 -05:00
Sasha Koshka 0c22977693 TextDrawer does not separate whitespace from printables 2023-02-14 18:11:11 -05:00
Sasha Koshka 4d87972235 Hot themeing tweaks 2023-02-14 17:21:05 -05:00
Sasha Koshka d59b7d812d Stop some redundant rendering in the piano 2023-02-14 17:05:13 -05:00
Sasha Koshka 09f782953e Use FillRectangleClip in List and Container 2023-02-14 16:53:28 -05:00
Sasha Koshka dcaf9919e4 Fix thos issue 2023-02-14 02:14:52 -05:00
Sasha Koshka d18da8b07a Rudimentary text selection with the mouse 2023-02-13 18:29:49 -05:00
Sasha Koshka 21abd147bf Rudimentary text selection with keybaord keys 2023-02-13 12:55:51 -05:00
Sasha Koshka 4bc8566820 Textmanip now operates on a dot instead of a cursor 2023-02-13 01:52:31 -05:00
Sasha Koshka 8ac5108211 Elements are no longer images 2023-02-13 01:49:33 -05:00
Sasha Koshka 7f0462d588 Changed the order of the Theme.Pattern method 2023-02-12 10:58:23 -05:00
Sasha Koshka 9e8e986977 Changes to how scroll bars respond to the mouse
- Left clicking on the gutter jumps to that position
- Right clicking on the gutter scrolls incrementally towards that
  position
- Middle clicking on the gutter pages up or down to that position
2023-02-11 22:17:03 -05:00
Sasha Koshka 2d9a941da8 Lists no longer have stale scroll values when enlarged 2023-02-11 21:45:04 -05:00
Sasha Koshka c64ce8da67 Container shatters its background before drawing 2023-02-11 21:17:43 -05:00
Sasha Koshka a893831a21 Added a shatter function to subtract rectangles from a rectangle 2023-02-11 21:07:35 -05:00
Sasha Koshka 7f1c3ae870 Added documentation for the sliders 2023-02-11 17:04:50 -05:00
Sasha Koshka d7a6193c04 Added gain slider 2023-02-11 01:46:12 -05:00
Sasha Koshka a74f9809af Awesome labels 2023-02-11 01:27:28 -05:00
Sasha Koshka 0e3de11203 Fixed a focus issue with ScrollContainer 2023-02-11 00:58:54 -05:00
Sasha Koshka 981c11bd44 Fixed the list widget 2023-02-11 00:18:21 -05:00
Sasha Koshka dce0321e9b Added a Select() method to List 2023-02-10 22:26:34 -05:00
Sasha Koshka 5e448edb21 Added sliders and made the ADSR controllabe with them 2023-02-10 21:55:59 -05:00
Sasha Koshka cfc2b5e130 Image element for showing images 2023-02-09 18:34:53 -05:00
Sasha Koshka 6e7cf285cc Fixed issue with X backend not recognizing key repeats 2023-02-09 17:26:36 -05:00
Sasha Koshka e3aea7fc9e Better piano keybinds 2023-02-09 16:36:38 -05:00
Sasha Koshka 5446ffe40b h a r m o n y 2023-02-09 16:15:02 -05:00
Sasha Koshka 06e97461fa Note.Octave returns an Octave 2023-02-09 15:06:41 -05:00
Sasha Koshka b38232ee24 More documentation! 2023-02-09 15:05:13 -05:00
Sasha Koshka 2cd670f4cd Improved element documentation 2023-02-09 14:50:24 -05:00
Sasha Koshka c7bebabed5 Fixed issue where containers would not select themselves prperly 2023-02-09 14:25:55 -05:00
Sasha Koshka b15c260dfc Improved piano styling 2023-02-09 11:38:01 -05:00
Sasha Koshka 16ce15621e Moar waveforms!!!! 2023-02-09 02:04:58 -05:00
Sasha Koshka 16a0e76145 Removed a bunch of redundant draw calls
Most were related to a but with the keynav api
2023-02-09 01:30:14 -05:00
Sasha Koshka c5ee7c8cdb The piano plays sound 2023-02-08 23:41:31 -05:00
Sasha Koshka bec8b817c8 Added a piano widget because why not really 2023-02-08 21:05:36 -05:00
Sasha Koshka 6cc0f36000 Migrated the clock 2023-02-08 15:12:18 -05:00
Sasha Koshka a0e57921a4 Oh my jod 2023-02-08 14:36:14 -05:00
Sasha Koshka 6936353516 asuhfdjkshlk 2023-02-08 00:22:40 -05:00
Sasha Koshka 3998d842b1 Half-done migration of basic elements 2023-02-07 11:27:59 -05:00
Sasha Koshka 0bdbaa39ca Artist and test examples work 2023-02-03 18:32:22 -05:00
Sasha Koshka f8ebe5b1e4 Core provides convenience methods for easy theme access 2023-02-03 18:28:01 -05:00
Sasha Koshka 8d90dbdc92 Element core now deals with Config and Theme objects 2023-02-03 18:07:10 -05:00
Sasha Koshka d79701d01b X backend conforms to new API 2023-02-03 01:35:59 -05:00
Sasha Koshka bdf599f93c Backends must now accept Config and Theme 2023-02-03 01:25:45 -05:00
Sasha Koshka 8ccaa0faba Added Themeable and Configurable element interfaces 2023-02-03 01:14:03 -05:00
Sasha Koshka 892c74a9da Updated everything else to match 2023-02-02 01:48:38 -05:00
Sasha Koshka 04d2ea4767 Atomized the functionality of the base tomo package 2023-02-02 01:47:01 -05:00
Sasha Koshka 9b22e80f05 Got scroll container working 2023-01-31 18:39:17 -05:00
Sasha Koshka b0ff1ca0af Vertical stack example works 2023-01-31 18:04:12 -05:00
Sasha Koshka 2f9504b1e4 Fixed wierd inconsistency with element core 2023-01-31 16:18:10 -05:00
Sasha Koshka d5028317ef Fun and testing elements conform to new API 2023-01-31 14:57:02 -05:00
Sasha Koshka ee424b9125 Basic elements conform to new API 2023-01-31 14:54:43 -05:00
Sasha Koshka 537d69b491 Removed Resize, added DrawTo 2023-01-31 14:29:35 -05:00
Sasha Koshka 801c3ef6f5 Hocus focus 2023-01-30 17:01:47 -05:00
Sasha Koshka 35870951a2 The theming around List makes slightly more sense 2023-01-30 02:22:16 -05:00
Sasha Koshka 174beba79f Added a case specifier to the theme API
This will allow themes to pull off some cool dirty tricks without
screwing anything up
2023-01-30 01:30:13 -05:00
Sasha Koshka 44b9a1e717 List relies more on the bounds insetting from theme 2023-01-29 12:51:43 -05:00
Sasha Koshka 92aeb48a1f Overhauled the theme system
Also added a toggle switch :)
2023-01-29 01:49:01 -05:00
Sasha Koshka 9422ff6198 Added a selectability core to reduce complexity of selectables 2023-01-27 17:55:49 -05:00
Sasha Koshka b2b2a80a06 Made the stripey sunken background optional 2023-01-26 18:37:44 -05:00
Sasha Koshka 93019b1b38 Fixed Container.HandleSelection
It now handles nested containers properly.
2023-01-26 14:00:54 -05:00
Sasha Koshka 9aea6d8c0f List element's events make more sense
Removed redundant selected entry change event, and added an event
that fires when the user deselects the current element.
2023-01-26 12:05:28 -05:00
Sasha Koshka 48679c8ad2 Added keynav input for lists 2023-01-26 11:53:49 -05:00
Sasha Koshka 912f939f2e The noise pattern can now be harsh 2023-01-24 18:27:36 -05:00
Sasha Koshka c9c5f1d251 Added a pseudorandom noise pattern 2023-01-24 18:15:46 -05:00