Free positioning of Reaction Gadgets ?

This forum is for general developer support questions.
Post Reply
User avatar
Thomas Frieden
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 147
Joined: Fri Dec 10, 2010 3:21 pm

Free positioning of Reaction Gadgets ?

Post by Thomas Frieden »

Hi,

I'm faced with a problem regarding Reaction: I want to use Reaction for a project of mine, but it requires free positioning of gadgets across the window. As far as I know, Reaction uses container gadgets that always layout the gadgets according to their fixed rules (horiziontal or vertical groups, etc).

Does anyone know if it is possible to simply have gadgets positioned manually ?

Thanks.
User avatar
gazelle
Posts: 102
Joined: Sun Mar 04, 2012 12:49 pm
Location: Frohnleiten, Austria

Re: Free positioning of Reaction Gadgets ?

Post by gazelle »

Use the gadtools.library functions instead of the reaction layout maybe?
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1479
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: Free positioning of Reaction Gadgets ?

Post by tonyw »

It's probably not enough for all purposes, but I have used specific spacing to position a gadget within a space. Try the LAYOUT_TopSpacing/LeftSpacing/etc. There are lots of tags to try.

If that is not good enough, you can always put a Space Gadget on each side and force them to a specific size.
cheers
tony
User avatar
tbreeden
Posts: 160
Joined: Sat Jun 18, 2011 12:57 am
Location: Charlottesville, VA, USA
Contact:

Re: Free positioning of Reaction Gadgets ?

Post by tbreeden »

tonyw wrote:It's probably not enough for all purposes, but I have used specific spacing to position a gadget within a space. Try the LAYOUT_TopSpacing/LeftSpacing/etc. There are lots of tags to try.

If that is not good enough, you can always put a Space Gadget on each side and force them to a specific size.
To further simply this approach, try using containers that you set to a fixed size. If you can fit the gadgets correctly within the container, then they will stay where they are w/r/t their neighboring gads in that container.

I go to containers within containers. If it is not too complex, that may not get too fuzzy.

Tom
Belxjander
Posts: 314
Joined: Mon May 14, 2012 10:26 pm
Location: 日本千葉県松戸市 / Matsudo City, Chiba, Japan
Contact:

Re: Free positioning of Reaction Gadgets ?

Post by Belxjander »

So you want a BOOPSI compliant ReAction UI but to include a "layout" which is assigned an area of "width:height" and within that area directly assign <X:Y> placed gadgets without the "smart layout" being used?

am I understanding the problem?

Is it possible to declare a "layout" of a fixed size without auto-sizing/placing it's children?
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 530
Joined: Sat Jun 18, 2011 3:12 pm
Location: Finland
Contact:

Re: Free positioning of Reaction Gadgets ?

Post by salass00 »

There's the LAYOUT_NoLayout tag which at least is supposed to allow doing just that.
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 12:06 am

Re: Free positioning of Reaction Gadgets ?

Post by xenic »

tbreeden wrote: To further simply this approach, try using containers that you set to a fixed size.
I haven't used Reaction that much and could not find the term "container" in any of my Reaction examples or docs. Could you be more explicit about Reaction "containers" and perhaps provide an example?
AmigaOne X1000 with 2GB memory - OS4.1 FE
User avatar
tbreeden
Posts: 160
Joined: Sat Jun 18, 2011 12:57 am
Location: Charlottesville, VA, USA
Contact:

Re: Free positioning of Reaction Gadgets ?

Post by tbreeden »

xenic wrote:
tbreeden wrote: To further simply this approach, try using containers that you set to a fixed size.
I haven't used Reaction that much and could not find the term "container" in any of my Reaction examples or docs. Could you be more explicit about Reaction "containers" and perhaps provide an example?
I mean to say "Layout Gadgets". I tend to think of them as containers.

I think it can sometimes be easier to achieve the desired overall design using one or more, maybe fixed size,
Layout gadgets into which you put the related interface gadgets. Then take these gadgets and put them into
another, higher level, Layout gadget.

You can then layout the layouts as desired. If you've fixed the size of the lower level layouts, what is
in them will not be affected by the higher level layout.

tom
User avatar
Thomas Frieden
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 147
Joined: Fri Dec 10, 2010 3:21 pm

Re: Free positioning of Reaction Gadgets ?

Post by Thomas Frieden »

The idea is that I can give a position and size for the gadget. I don't to work with weights or anything, that's going to be too complicated.
salass00 wrote:There's the LAYOUT_NoLayout tag which at least is supposed to allow doing just that.
Thanks, I'll look into that.
Post Reply