Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
189 user(s) are online (179 user(s) are browsing Forums)

Members: 0
Guests: 189

more...

Support us!

Headlines

 
  Register To Post  

Reaction : How to specify position of a window with precision
Just can't stay away
Just can't stay away


See User information
Hi,
I'm converting the info window of my Docky NetDock from MUI to Reaction.

Because I don't succeed to have 2 dockies with 2 MUI info windows at the same time without freeze.

http://zzd10h.amiga-ng.org/NetDock/NetDock_MiniInfo2.jpg

I would like to be able to specify to position my window just below the docky.

With MUI, I made

MUIA_Window_TopEdge,MUIV_Window_TopEdge_Delta + XXX pixels
MUIA_Window_LeftEdge,MUIV_Window_LeftEdge_Moused

But with Reaction, I just find these positions for WINDOW_Position

WPOS_CENTERSCREEN
WPOS_CENTERMOUSE
WPOS_TOPLEFT
WPOS_CENTERWINDOW
WPOS_FULLSCREEN

There is a way to fine position a Reaction window ?

Thank you by advance
Guillaume

Go to top
Re: Reaction : How to specify position of a window with precision
Just can't stay away
Just can't stay away


See User information
@zzd10h

Did you try if WOS_CENTERMOUSE suits your needs?

If not, try:
if( (screen = IIntuition->LockPubScreen(NULL)) )
{
top_border = screen->WBorTop + screen->Font->ta_YSize + 1;

IIntuition->UnlockPubScreen(NULL,screen);
}

copy&paste from here: http://wiki.amigaos.net/index.php/Intuition_Windows

and the use 'WA_Top, top_border'


Edited by jabirulo on 2013/11/26 20:23:55
Edited by jabirulo on 2013/11/26 20:24:59
Go to top
Re: Reaction : How to specify position of a window with precision
Just can't stay away
Just can't stay away


See User information
@jabirulo
Thank you Jabirulo,
I tested CenterMouse but it overlap my docky, therfore it's not good.

I will try Wa_left, right...by retrieving mouse coordinates and screen dimensions.

I hoped a simple way like with MUI...

Thanks


Go to top
Re: Reaction : How to specify position of a window with precision
Just can't stay away
Just can't stay away


See User information

Go to top
Re: Reaction : How to specify position of a window with precision
Just can't stay away
Just can't stay away


See User information
Hé, not so much difficult !

It works with

top_border = scr->WBorTop + scr->Font->ta_YSize + 1;

and
WA_Top, top_border,
WINDOW_Position, WPOS_CENTERMOUSE,

Thank you javier

Go to top
Re: Reaction : How to specify position of a window with precision
Home away from home
Home away from home


See User information
@zzd10h

Quote:

I would like to be able to specify to position my window just below the docky.


Why? My doc is at the bottom of the screen, therefore it's impossible to place a window below it. You shouldn't try to second guess things like this as every bodies screen layout is different.

For what reason must your window be precisely positioned below the docky? If there isn't a very good reason then you should allow it open in the default position on screen or perhaps in the position snapshotted by the user.


Go to top
Re: Reaction : How to specify position of a window with precision
Supreme Council
Supreme Council


See User information
Check the intuition/intuition.h file. In there you will find lots of window tags, the ones supported by window.class are listed in the window_cl.doc autodoc.

The ones primarily of interest to you are WA_Top and WA_Left.

Due to the dynamic nature of layout.gadget, specifying WA_Width and WA_Height is ignored, but you can use WA_InnerWidth and WA_InnerHeight to specify the window size. This is probably better off left to the user preferences (and later the snapshot position) though.

Simon

Comments made in any post are personal opinion, and are in no-way representative of any commercial entity unless specifically stated as such.
----
http://codebench.co.uk
Go to top
Re: Reaction : How to specify position of a window with precision
Just can't stay away
Just can't stay away


See User information
broadblues:
"You shouldn't try to second guess things like this as every bodies screen layout is different. "

Sure, in my NetDock MUI info window, I specify position of this info window by tooltype.
Below the dock, Above the dock or screen centered or in one of the 4 corners.
The ask for "below" was for information. I will have to specify all the combination that I used with MUI based NetDock.

@Rigo :
Thanks, I will check it.



Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project