Send the Stack to the Center of the screen.

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Send the Stack to the Center of the screen.

Post by stam » Thu Dec 14, 2023 1:16 pm

bn wrote:
Thu Dec 14, 2023 1:12 pm
From the current dictionary entry for screenrect
Adding the effective adjective to either form returns the area of the
screen the application has to itself. In particular, if the keyboard is
activated, it take into account if the keyboard is taking up space on
the screen. (Android and iOS only)

Kind regards
Bernd
Thanks Bernd (I had already seen this) - but how does that apply to screenRect - it's not an application :shock: :?
If it is mean to reduce the available space on the screen with for example keyboards showing up, how is this different from working screenRect?
Keyboards is really a mobile thing, so does the effective keyword specifically have value for mobile?

S.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Send the Stack to the Center of the screen.

Post by bn » Thu Dec 14, 2023 2:13 pm

Hi Stam,

as far as I understand this:

on mobile the keyboard pops up in certain situations and the deveoper might want to move things around in that situation. Hence it is for mobile since this does not happen on desktop
Working screenrect is the permanently available area of the screen.
Effective allows you to only move around those elements that interfere with the keyboard without changing the stack size etc on mobile.

Kind regards
Bernd

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9389
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Send the Stack to the Center of the screen.

Post by richmond62 » Thu Dec 14, 2023 3:31 pm

As far as I understand things (guided by such jolly things as what tends to happen on my Android phone when I pull up the on-screen keyboard), the app window needs to shrink in such a way that the keyboard does NOT overlap it.

I assume (possibly dangerous) that on both iOS and Android that the virtual keyboards are 'seen' by LiveCode as screen 'furniture' (so their dimensions do not have to be directly addressed) and effective will do the 'heavy lifting' in terms of calculating what uncluttered screen space is available for your app.
Last edited by richmond62 on Thu Dec 14, 2023 8:28 pm, edited 1 time in total.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9389
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Send the Stack to the Center of the screen.

Post by richmond62 » Thu Dec 14, 2023 5:22 pm

The ONLY thing that fusses me is how an LC stack or standalone is going to work out 'by itself' when someone summons another bit of screen furniture.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7238
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Send the Stack to the Center of the screen.

Post by jacque » Fri Dec 15, 2023 6:53 pm

richmond62 wrote:
Thu Dec 14, 2023 5:22 pm
The ONLY thing that fusses me is how an LC stack or standalone is going to work out 'by itself' when someone summons another bit of screen furniture.
LC sends a keyboardActivated message so you can adjust the stack.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9389
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Send the Stack to the Center of the screen.

Post by richmond62 » Sat Dec 16, 2023 10:48 am

Presumably keyBoardActivated is mobile-platform-only.

It could be very useful on desktops as they all sport virtual keyboards.

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Send the Stack to the Center of the screen.

Post by stam » Sat Dec 16, 2023 3:55 pm

richmond62 wrote:
Sat Dec 16, 2023 10:48 am
Presumably keyBoardActivated is mobile-platform-only.
keyBoardActivated.jpg
richmond62 wrote:
Sat Dec 16, 2023 10:48 am
It could be very useful on desktops as they all sport virtual keyboards.
But do they fill an entire portion of the screen like on mobile?

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9389
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Send the Stack to the Center of the screen.

Post by richmond62 » Sat Dec 16, 2023 5:41 pm

But do they fill an entire portion of the screen like on mobile?
Top
Not 'an entire portion', but enough to block out a fair chunk of a standalone's window:
-
keyBoardScreen.jpg

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7238
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Send the Stack to the Center of the screen.

Post by jacque » Sat Dec 16, 2023 7:23 pm

richmond62 wrote:
Sat Dec 16, 2023 10:48 am
It could be very useful on desktops as they all sport virtual keyboards.
I didn't know that, how would I see that on my Mac?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9389
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Send the Stack to the Center of the screen.

Post by richmond62 » Sat Dec 16, 2023 8:25 pm

VKB.jpg
-
MacOS 12

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Send the Stack to the Center of the screen.

Post by stam » Sun Dec 17, 2023 1:18 am

jacque wrote:
Sat Dec 16, 2023 7:23 pm
richmond62 wrote:
Sat Dec 16, 2023 10:48 am
It could be very useful on desktops as they all sport virtual keyboards.
I didn't know that, how would I see that on my Mac?
Font/Language menu -> show keyboard viewer

But my point was that since none of the desktop systems have massive keyboards that occlude part of the screen, the kayBoardActivated message and the effective working screenRect aren't of any value on desktop...

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7238
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Send the Stack to the Center of the screen.

Post by jacque » Sun Dec 17, 2023 3:03 am

I forgot about that, it hasn't been in my menu for years. The last time I looked at it, it was only for character info, I wasn't aware you can actually type with it. Or maybe I'm thinking of something else. I wonder if it's for adaptive hardware, since otherwise the usual keyboard should be more convenient.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9389
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Send the Stack to the Center of the screen.

Post by richmond62 » Sun Dec 17, 2023 10:53 am

I wonder if it's for adaptive hardware, since otherwise the usual keyboard should be more convenient.
It can prove extremely useful.

Here's a use-instance as an example.

I want to type a letter to my friend in Bulgarian, but my physical keyboard is a 'standard' English-language QWERTY keyboard, so I don't have a clue where I might find the letter 'Я'.

By having the virtual keyboard up in front of me, on my monitor, I can either click on the 'Я' on the virtual keyboard, or I know which key to press on my physical keyboard to get a 'Я'.

The ONLY snag is that when one has the virtual keyboard open with a non-Latin keyboard layout it is well-nigh impossible to take screenshots. :?
-
Screenshot 2023-12-17 at 11.58.35.png
Last edited by richmond62 on Sun Dec 17, 2023 11:02 am, edited 2 times in total.

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Send the Stack to the Center of the screen.

Post by stam » Sun Dec 17, 2023 10:58 am

richmond62 wrote:
Sun Dec 17, 2023 10:53 am
The ONLY snag is that when one has the virtual keyboard open with a non-Latin keyboard layout it is well-nigh impossible to take screenshots. :?
Easy workaround: use Preview.app -> File menu -> take screenshot (with usual options to capture screen, rect or window)

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9389
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Send the Stack to the Center of the screen.

Post by richmond62 » Sun Dec 17, 2023 11:01 am

Easy workaround:
Thank you very much for such a useful tip. 8)

I actually did the thing with CMD + SHIFT + 5 and the 10 second timer.

Post Reply

Return to “Talking LiveCode”