Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
50 user(s) are online (44 user(s) are browsing Forums)

Members: 0
Guests: 50

more...
Support us!
Recent OS4 Files
OS4Depot.net





I have a question how do I add Iconify Icon in top border of a window?
Home away from home
Joined:
2006/11/20 16:26
From Norway
Posts: 2703
I have a question how do I add Iconify Icon in top border of a window? I know it has be a Reaction image button, to get align flags to work.

_________________
(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
   Report Go to top

Re: I have a question how do I add Iconify Icon in top border of a window?
Quite a regular
Joined:
2009/5/1 17:57
From Czech Republic
Posts: 970
@LiveForIt

In a ReAction window you simply pass WINDOW_IconifyGadget, TRUE in the object definition.

_________________
Smoke me a kipper, I'll be back for breakfast!

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon R5 230 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
   Report Go to top

Re: I have a question how do I add Iconify Icon in top border of a window?
Home away from home
Joined:
2006/11/20 16:26
From Norway
Posts: 2703
@trixie

it's a normal window.

_________________
(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
   Report Go to top

Re: I have a question how do I add Iconify Icon in top border of a window?
Home away from home
Joined:
2006/11/20 16:26
From Norway
Posts: 2703
@LiveForIt


fixed this is solved.

_________________
(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
   Report Go to top

Re: I have a question how do I add Iconify Icon in top border of a window?
Just can't stay away
Joined:
2006/12/4 23:15
Posts: 1992
Solved for you but what about the next person that needs to know?

Some excerpts from the AWeb code showing how to get the right image and create a title bar gadget from the buttongclass.

'win' is just a AWeb struct holding various window related data.

if(!(win->iconify_img=(struct Image *)NewObject(NULL,"sysiclass",
      
SYSIA_DrawInfo,drinfo,
      
SYSIA_Which,ICONIFYIMAGE,
      
TAG_END))) return FALSE;      

....
....
....
  if ( 
NULL != win->iconify_img )
  {
       
win->iconify_gad NewObject(NULL,"buttongclass",
         
GA_RelRight,TRUE,
         
GA_TitlebarTRUE,                               
         
GA_Imagewin->iconify_img,
         
GA_RelVerifyTRUE,
         
GA_IDGID_ICONIFY,
         
ICA_TARGETICTARGET_IDCMP,
       
TAG_END );
       if ( 
NULL != win->iconify_gad )
         
AddGadget (win->windowwin->iconify_gad0);
 }


In you window event loop do like so...

case IDCMP_GADGETUP:
               if ( 
GID_ICONIFY == ((struct Gadget *)msg->IAddress)->GadgetID )
               
Iconify (TRUE);
               break;


_________________
Blender For OS4.x : Blues : Walker Broad
   Report Go to top

Re: I have a question how do I add Iconify Icon in top border of a window?
Home away from home
Joined:
2006/11/30 18:43
From Norway
Posts: 2462
@LiveForIt

What do you need this for?
Quote:

I have a question how do I add Iconify Icon in top border of a window? I know it has be a Reaction image button, to get align flags to work.

_________________
Sam460 Lite
   Report Go to top

Re: I have a question how do I add Iconify Icon in top border of a window?
Home away from home
Joined:
2006/11/20 16:26
From Norway
Posts: 2703
@Antique

Well spying on me again are we? Ok I always wonted to know how to put icons in border like that, I have not really needed it before now.

_________________
(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
   Report Go to top

Re: I have a question how do I add Iconify Icon in top border of a window?
Quite a regular
Joined:
2009/5/1 17:57
From Czech Republic
Posts: 970
@LiveForIt

On a side note: don't be afraid to ask programming-related questions at OS4coding.net. Only then can we build a useful resource & learning centre like the dead good UtilityBase (which I still miss very much!). Of course you'll get your answer in a forum like this one, but for other people who may later be struggling with a similar problem, things will be easier to find in a dedicated place.

_________________
Smoke me a kipper, I'll be back for breakfast!

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon R5 230 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
   Report Go to top

Re: I have a question how do I add Iconify Icon in top border of a window?
Home away from home
Joined:
2006/11/20 16:26
From Norway
Posts: 2703
@trixie

I found the how to on OS4coding.net, I already have too many user accounts. It be nice if some on added some pages to Amiga wiki pages about this, I think.


_________________
(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
   Report Go to top

Re: I have a question how do I add Iconify Icon in top border of a window?
Home away from home
Joined:
2006/11/20 16:26
From Norway
Posts: 2703
@broadblues

The code I found was a bit RAW, that's way I did not post anything, about it here.

_________________
(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
   Report Go to top

Re: I have a question how do I add Iconify Icon in top border of a window?
Not too shy to talk
Joined:
2007/2/6 13:57
From Donostia (SPAIN)
Posts: 376
@broadblues

Yep, using same code in MIXER

...
#define GID_ICONIFY 401
#include <intuition/sysiclass.h>
// iconify gadget
struct DrawInfo *DRI;
struct Image *IcoImg;
struct Gadget *IcoGad;
...
 
DRI IIntuition->GetScreenDrawInfo(MainScreen);
 
IcoImg = (struct Image *)IIntuition->NewObject(NULL"sysiclass"
                                       
SYSIA_DrawInfo,DRISYSIA_Which,ICONIFYIMAGE
                                      
TAG_END);
 
IcoGad = (struct Gadget *)IIntuition->NewObject(NULL"buttongclass"
                                        
GA_ID,GID_ICONIFYGA_RelVerify,TRUEGA_Image,IcoImg
                                        
GA_TopBorder,TRUEGA_RelRight,0GA_Titlebar,TRUE
                                       
TAG_END);
 
IIntuition->AddGadget(MixWindowIcoGad, -1);
...

   Report Go to top

Re: I have a question how do I add Iconify Icon in top border of a window?
Not too shy to talk
Joined:
2007/7/14 20:30
From Lothric
Posts: 438
Thanks, this thread was useful. Is Aweb / Mixer code available in some public version control? It would be nice to see also gadget disposal examples.

   Report Go to top

Re: I have a question how do I add Iconify Icon in top border of a window?
Home away from home
Joined:
2007/9/11 11:31
From Russia
Posts: 4517
@Capehil
Quote:

Thanks, this thread was useful. Is Aweb / Mixer code available in some public version control? It would be nice to see also gadget disposal examples.


Mixer source included in archive itself: http://os4depot.net/share/audio/misc/mixer.lha

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: I have a question how do I add Iconify Icon in top border of a window?
Just can't stay away
Joined:
2006/12/4 23:15
Posts: 1992

_________________
Blender For OS4.x : Blues : Walker Broad
   Report Go to top





[Advanced Search]


Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project