HP Forums
which grob? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: which grob? (/thread-5146.html)



which grob? - ji3m - 11-16-2015 10:46 PM

In the following program

export spin ()
begin
Rect_P (); <--- who does this clear.?
CHOOSE (...); <--- where does this draw
TEXTOUT_P("hello",0,0); <-- where does this draw
while 1 do end;
end;

What grob am i writing to.?

if i break out i return to the starting screen.
The choose box opens on top of the starting screen which is untouched.

What exactly is the graphics paradigm here?


RE: which grob? - alexgt - 11-17-2015 12:29 AM

Rect_P() clears G0
Choose() does not store anything to a GROB it only displays a menu
TextOut_P("hello",0,0) outputs hello at 0,0 on G0

Experiment! if you don't know test it out Smile


RE: which grob? - Han - 11-17-2015 12:36 AM

(11-16-2015 10:46 PM)ji3m Wrote:  In the following program

export spin ()
begin
Rect_P (); <--- who does this clear.?
CHOOSE (...); <--- where does this draw
TEXTOUT_P("hello",0,0); <-- where does this draw
while 1 do end;
end;

What grob am i writing to.?

if i break out i return to the starting screen.
The choose box opens on top of the starting screen which is untouched.

What exactly is the graphics paradigm here?

Type: RECT_P and with the cursor somewhere in that command name, press the help key for all the information on that command. But to answer your question, when no graphics object is specified, the default G0 (current display) is always used.


RE: which grob? - ji3m - 11-17-2015 12:57 AM

Are the home screen and the cas screen grobs?
if so what number?

I certaintly have looked at the help screens but ...


RE: which grob? - eried - 11-17-2015 03:52 AM

(11-17-2015 12:57 AM)ji3m Wrote:  Are the home screen and the cas screen grobs?
if so what number?

I certaintly have looked at the help screens but ...

G0 is the "current" display, so it could be the home or cas, depending where you are.


RE: which grob? - cyrille de brébisson - 11-17-2015 06:25 AM

Hello,

G0 is the 'desktop', it is the current display framebuffer...
G0 is the default graphic for all graphical operations (if none is specified)...

Choose will of course display on the desktop, BUT since Choose is a 'window' control, executing it will cause a display of the whole desktop (not only the Choose), so any drawing that you might have done BEFORE doing the choose on G0 will be erased at this point...

Please note the Freeze command, which can freeze the display after the end of the execution of a program until a key is pressed.

Cyrille