| [ Return to Bugs & Features | Roadmap 2.0 | Post Text | Post File ]
STR #732
Application: | FLTK Library |
Status: | 5 - New |
Priority: | 1 - Request for Enhancement, e.g. asking for a feature |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Core Library |
Summary: | Improved Icon support for Win32 and X11 (but no Mac yet...) |
Version: | 2.0-feature |
Created By: | joekrahn |
Assigned To: | Unassigned |
Fix Version: | Unassigned |
Update Notification: | |
Trouble Report Files:
[ Post File ]
Trouble Report Comments:
[ Post Text ]
|
#1 | joekrahn 11:22 Feb 26, 2005 |
| Here is some source code for improved icon support under Win32 and X11. It is currently written as a Window subclass, and works well (for me) under FTK 1.1.6.
I've included the header at the top of the attached source file.
Features: Creates plain X11 Color+Mask Pixmaps, or ARGB NET_WM_ICONs when supported. Creates WinXP DIB icons with alpha, or standard DDB bitmask icons. In both cases, the icons are updated for active windows.
Win32 note: Documentation states that CreateIcon requires DDBs. I am assuming that pre-WinXP GDI will return unsuccessfully if given a DIB, in which case the DIB is reduced to a DDB. But, this has not been tested.
TODO: Some rules for supporting Large and Small icons, and possibly additional sizes.
Move some init code, like checking for WM_NET_ICON support, into FLTK's init routines.
Mac OSX support; a bit more involved due to icon resource organization. I couldn't find any example code for direct run-time icon building. Look here for documentation: http://developer.apple.com/documentation/Carbon/Reference/IconServices/icon_services/function_group_19.html
Have fun, Joe Krahn | |
|
#2 | spitzak 14:33 Mar 05, 2005 |
| The file seems to be missing.
Certainly this is an often-requested feature. I would like 2.0 to be able to set the icon directly from any Symbol object. Of course I would also like the Cursor to be set this way too. In both cases the OS interface is painful.
| |
|
#3 | mike 05:10 Oct 06, 2005 |
| Updated this STR to be a priority 2 against 1.1.x, in case we decide to include this in 1.1.7... | |
|
#4 | matt 06:50 Oct 10, 2005 |
| Hmm, this is about changing the application icon in the dock bar at run-time, right? This should be really easy on the Mac, since OS X provides two wonderful functions for this:
SetApplicationDockTileImage sets the image that is displayed in the Dock, and CreateCGImageFromPixMaps creates the required images from a 128x128 rgb and alpha map.
The OS X link you provided works the other way around. It provides image information if we feel the desire to render the default application icons in the FLTK file chooser... . | |
|
#5 | mike 04:49 Nov 02, 2005 |
| OK, I'm reassigning this to 2.0; after playing a bit to do the code to support all image types in 1.1.x and to support OSX, it is pretty clear that this will be a major undertaking. | |
|
#6 | Natevw 18:28 Dec 01, 2005 |
| Here's the link to matt's functions: http://developer.apple.com/documentation/Carbon/Reference/Dock_Manager/index.html | |
[ Return to Bugs & Features | Post Text | Post File ]
|
| |