Exit callback
-
Is there a way to know when the user closes the app? My use case is for my downloader, I would like to prompt the user if they have active downloads running when they go to close the app.
-
@d-healey might be doable for a standalone app but a plugin does not have the power to resist a shutdown command from the host.
-
@Christoph-Hart Yeah I was thinking just for standalone too
-
@d-healey Good point
-
@Christoph-Hart might also be nice if HISE itself had this to prompt us to save unfinished work before closing.
-
I take the opportunity for something half related:
While working on the main window behaviour, would it be possible to remove the full screen button, or make the zoom level to follow the size of the window? -
@ustk said in Exit callback:
would it be possible to remove the full screen button
Already possible - can't remember how I did it but it's in my HISE fork I think. I posted about it on the forum so a search might reveal it.
@ustk said in Exit callback:
make the zoom level to follow the size of the window?
If Christoph does add a callback for the close button, I think he could also add one for the maximize button too, then you could resize your UI as needed in that callback. We'd also need a function to give us the UI size. I vote for
Content.getInterfaceSize()
-
@d-healey Yeah I remember we talked about this long ago, but the solution was to tinker in the source anyway.
Juce already contains everything about desktop size and the buttons so it should be trivial to make this accessible somehow.
-
@ustk Looks like Christoph intended to add it anyway - https://forum.hise.audio/topic/1138/disable-the-maximize-button-on-a-standalone/5?_=1727789005386
And looks like you added it too - https://forum.hise.audio/topic/8471/disable-full-screen-mode/6?_=1727789061795
-
@d-healey said in Exit callback:
We'd also need a function to give us the UI size. I vote for Content.getInterfaceSize()
I just had another thought about this. If we can get the UI size then all component dimensions could be set relative to the UI using % instead of hardcoded pixel values. Much like with html + css. What would be even nicer is if this was a built in option... I might have to poke around in the source code when I have time because this would be really good.
-
@d-healey Do you mean you want to resize the components themselves? But a zoom factor would be more straight forward right? Or I don't get it...
-
@ustk said in Exit callback:
Do you mean you want to resize the components themselves
Maybe, but I think it will be mostly panels (which are like html divs) and then the components inside them will be repositioned. Just like when you expand/contract a website you'll see the contents shift around to fit within the page boundaries.
-
@d-healey Oh ok so you're talking about UI morphing stuff...
-
@ustk said in Exit callback:
UI morphing stuff
I've not heard it referred to as such, but maybe that's what I'm talking about :p I'm basically a glorified web developer so I'm just thinking of how html and css play together, and now we have css in HISE I'm dreaming of making the layout part work like html.
-
@d-healey This is at least how I'd call it, dunno what other say
Well, I'm dreaming how to make my html work like in Hise...
-
Lol how that thread derailed from a request to remove a button to „yeah let‘s reinvent responsive design“.
Everything related to CSS positioning is the worst (it almost made me discard the entire CSS stuff because it sucks so much) and for plugins you don‘t need that. Rescale your UI or extend it to show an additional element but the rest should stay where it belongs (web design).
Also I would really like to emphasize how much I hate CSS positioning if that wasn‘t made clear enough.
-
@Christoph-Hart What is your position about css positioning?
Yeah though dynamic replacement looks nice I can't really find a real world example for which my product could play its life on it...So just to re-center the topic I stole from @d-healey:
- An exit CB to perform anything you want in the world
- Remove the full window button or rescale (zoom) the interface properly
-
What is your position about css positioning?
Actually I don't have a strong opinion on CSS positioning, I thi2nk it'asflks a gosfjo 2 AAARGH!!!!