after learning the basic of windowing, i would like to learn how to attach text to those windows @ any pos (x,y). Yes, there are examples here and there, but these exemples are, as usual, done for the old programming methods.
You cannot use specific coordinates in a ReAction GUI. The GUI is built completely dynamically. It is organised in horizontal and vertical groups and the size of each group is derived from the objects it contains and from the window size. The size of each object is dynamically calculated from its kind and the size of its neighbours and its parents.
If you print your text at fixed coordinates, it is very likely that you print over an existing object.
That said, if you look at the toolbar example, you will find an empty horizontal group between the toolbar and group containing the ok/cancel buttons.
If you put this between StartHGroup and EndHGroup, it will print some text into the empty space:
I saw somewhere some example where you simply wirte:
rp = win->RPort;
Move (rp,20,40);
Text (rp,"Beep !",6);/* you won't see DisplayBeep on a RTG screen */
Again, there are different way to do things on AOS, but it's a lot confusing.
Assuming i want to show a moving text using reaction and (let me use this term) using the "last shout" on AOS programming.... the code above would not be portable to reaction?
My fault, sorry.
I promise i will study.
I've managed to add the second window. Now i have to add menus and events for the second window :P
What's next?
after learning the basic of windowing, i would like to learn how to attach text to those windows @ any pos (x,y). Yes, there are examples here and there, but these exemples are, as usual, done for the old programming methods.
You cannot use specific coordinates in a ReAction GUI. The GUI is built completely dynamically. It is organised in horizontal and vertical groups and the size of each group is derived from the objects it contains and from the window size. The size of each object is dynamically calculated from its kind and the size of its neighbours and its parents.
If you print your text at fixed coordinates, it is very likely that you print over an existing object.
That said, if you look at the toolbar example, you will find an empty horizontal group between the toolbar and group containing the ok/cancel buttons.
If you put this between StartHGroup and EndHGroup, it will print some text into the empty space:
Is this a limit or a good functionality?
I saw somewhere some example where you simply wirte:
Again, there are different way to do things on AOS, but it's a lot confusing.
Assuming i want to show a moving text using reaction and (let me use this term) using the "last shout" on AOS programming.... the code above would not be portable to reaction?
In the scrwin.c you provide this nice function;
I assume that the function should return an object instead of a window structure. How would this function looks like in the reaction version?
Pages