English Amiga Board

Go Back   English Amiga Board > Coders > Coders. System

Thread Tools
Old 14 January 2014, 22:19   #1
XoXo/Tasko Developer
AGS's Avatar
Join Date: Dec 2013
Location: Munich
Age: 45
Posts: 450
Question How to add an Iconify-Gadget to a Window?

Well, easy little question. Some Windows have an Iconify-Gadget. As far I know these are custom. So, how to add one?
AGS is offline  
Old 14 January 2014, 22:45   #2
Paranoid Amigoid

mfilos's Avatar
Join Date: Mar 2008
Location: Athens/Greece
Age: 42
Posts: 1,577
I'm not sure 100% but AFAIK the iconify gadget is a feature of MUI programs where you can either enable it globaly on MUI prefs, or per program using it's own MUI prefs.
mfilos is offline  
Old 14 January 2014, 22:49   #3
Global Moderator

prowler's Avatar
Join Date: Aug 2008
Location: Sidcup, England
Posts: 10,300
A windows iconify gadget is also a feature of ScalOS, IIRC.
prowler is offline  
Old 14 January 2014, 22:51   #4
XoXo/Tasko Developer
AGS's Avatar
Join Date: Dec 2013
Location: Munich
Age: 45
Posts: 450
That's good. So it somehow works. Question is: How can I code such?
AGS is offline  
Old 14 January 2014, 23:33   #5
Registered User
thomas's Avatar
Join Date: Jan 2002
Location: Germany
Posts: 6,192
Create a gadget and put it into the top border. It's the same procedure as you did with the scroll bars.

Positioning is a bit tricky. As is sizing. You better supply a BOOPSI image to the gadget rather than a static struct Image because BOOPSI images can automatically adjust their size. For correct positioning you have to consider the gadgets which already are in the top right border.

There is a multi-purpose BOOPSI image in Aminet: http://aminet.net/package/dev/gui/titlebar_ic
The TBITest.c example also shows how to create an iconify gadget.

Here is another example with a self-written BOOPSI image class: http://thomas-rapp.homepage.t-online...s/iconifygad.c
thomas is online now  
Old 15 January 2014, 16:41   #6
Minuous's Avatar
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,210
You give the WINDOW_IconifyGadget tag to window.class when opening the window. See the OS3.9 NDK for the autodocs. No MUI-crap required.
Minuous is offline  

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Where can I get the Progress.gadget from? Tony Landais request.Apps 6 16 December 2015 20:16
Can't find Close gadget in full-screen mode garyg support.WinUAE 1 11 August 2010 21:19
Gadget/Layout.gadget V44 ruliovega support.Apps 6 02 January 2006 12:50
My amiga freezes because of select.gadget prefs??? keropi support.Apps 5 15 December 2005 12:27

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 14:40.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Page generated in 0.06675 seconds with 13 queries