How to snapshot an app icon?

4 posts / 0 new
Last post
jap
jap's picture
Offline
Last seen: 1 month 3 weeks ago
Joined: 2011-06-04 05:53
How to snapshot an app icon?

Hello,
I've made a ReAction GUI for my application. When the application has been shrunk to an app icon, I'd like to allow the user to take a Workbench snapshot to save the icon's location on the Workbench screen. Is it possible?

jabirulo
jabirulo's picture
Offline
Last seen: 2 months 1 week ago
Joined: 2013-05-30 00:53
Re: How to snapshot an app icon?

Iuse this piece of code to "force" the iconification to the 1st empty place, so maybe just knowing X/Y coords where you want to show icon and changing NO_ICON_POSITION with such positions will do it:

  1. // reset icon X/Y positions so it iconifies properly on Workbench
  2. iconify = IIcon->GetIconTags(icon_path_name, ICONGETA_FailIfUnavailable,FALSE, TAG_END);
  3. iconify->do_CurrentX = NO_ICON_POSITION;
  4. iconify->do_CurrentY = NO_ICON_POSITION;
AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonHD6570/SSD120GB/DVDRW :-P
thomas
thomas's picture
Offline
Last seen: 15 hours 18 min ago
Joined: 2011-05-16 14:23
Re: How to snapshot an app icon?

I'd like to allow the user to take a Workbench snapshot to save the icon's location on the Workbench screen

You can enable the Snapshot menu item with the WBAPPICONA_SupportsSnapshot tag on AddAppIcon. Then you will receive an AppMessage when the user selected that menu item. But then you have to implement the snapshotting yourself, i.e. you have to save the current icon position somewhere and before the next call to AddAppIcon you have to retrieve the saved icon position and poke it into the do_CurrentX/Y fields.

jap
jap's picture
Offline
Last seen: 1 month 3 weeks ago
Joined: 2011-06-04 05:53
Re: How to snapshot an app icon?

Thanks! Got it working with the AddAppIcon method.

Log in or register to post comments