Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
84 user(s) are online (46 user(s) are browsing Forums)

Members: 0
Guests: 84

more...

Headlines

 
  Register To Post  

is there way to change dynamically screen pointer of window which was hiden ?
Home away from home
Home away from home


See User information
Situation is: I open some window on some screen. Then , i hide the window and i want it to be opened on new screen. I.e. the same window which was hide (i can't close/open window on new screen from scratch because of few moments). What i need its some way like:

HideWindow(window); // hide window on some screen
..there some code which make new screen..
scrn = LockPubScreen (newscreen);
..something there which will mean that window will be shown on new screen..
ShowWindow(window,WINDOW_FRONTMOST);
UnlockPubScreen(NULL, scrn);

Maybe intuition or whatever already have something which can change in real-time pointer to screen of given window ? Or probably there can be another ways to hide window, and then open it on new screen BUT (and that important) without closing/opening of window. Maybe some idcmp flags can be set to window when it opens first time which will help somehow ?


Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: is there way to change dynamically screen pointer of window which was hiden ?
Just can't stay away
Just can't stay away


See User information
@kas1e

window.class autodoc:
WMHI_JUMPSCREEN The User wants the window on another screen
..
WMHI_JUMPSCREEN is returned when the "Jump to screen" option
is selected from the popup menu and a valid screen was chosen.
The application should query the WA_PubScreen attribute after
the event is received to get the screen pointer the user wants
this window moved to. This window object should then be closed,
the public screen pointer updated with SetAttrs() and then
reopened. Because there may be other objects disposed when this
window object is closed, it is not currently possible to
automate this process.
..
WINDOW_JumpScreensMenu

This attribute switches the "Jump to screen" menu on and off.
Applications that can support this functionality should enable
this option, although it is only applicable when the
WINDOW_PopupGadget attribute is set.

Defaults to FALSE.

Applicability is (OM_NEW, OM_SET ).
..

Go to top
Re: is there way to change dynamically screen pointer of window which was hiden ?
Home away from home
Home away from home


See User information
@Javier
Thanks for input, through to add its all about pure intuition window: no menus, no gadgets, just plain window which need to hide without closing, and show on another screen to which i have pointer.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: is there way to change dynamically screen pointer of window which was hiden ?
Just can't stay away
Just can't stay away


See User information
Maybe it's a bit no_friendly_way, but what about:

oldscrn = scrn; // just in case...
ICONIFY_WINDOW
scrn = LookPubScreen...
window.Screen = scrn; // or something alike, maybe you need to "re-assign" other structs too (rastport?...)
REOPEN WINDOW


Go to top
Re: is there way to change dynamically screen pointer of window which was hiden ?
Amigans Defender
Amigans Defender


See User information
@jabirulo

I'd be a bit worried about that. Most gadgets have a DrawInfo(?) structure linked to them which relates to the screen, and others have the Screen pointer set directly.

Go to top
Re: is there way to change dynamically screen pointer of window which was hiden ?
Home away from home
Home away from home


See User information
@kas1e
If I understand you right, then I think what you ask is not possible with a plain Intuition window. Windows are physically tied to a particular screen. So if you want to 'move' an Intuition window to another screen, then you must destroy old window, create new one, and then redraw the contents.

Some GUI toolkits (like MUI) abstract windows, so that they are not tied to screens... but then you are not dealing with Intuition windows anymore (not directly anyway).

If you are not using a GUI toolkit, then usually you can just change the window pointer in your program... why can't you?

Author of the PortablE programming language.
Go to top
Re: is there way to change dynamically screen pointer of window which was hiden ?
Just can't stay away
Just can't stay away


See User information
@kas1e

What I would do:

- create a window object (based on window.class)
- invoke WM_OPEN to open the window on its original screen
- invoke WM_CLOSE to hide the window
- LockPubScreen() the screen you want to reopen on
- SetAttrs() WA_PubScreen to point to the locked new screen
- invoke WM_OPEN
- UnlockPubScreen()

The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
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-2023 The XOOPS Project