gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Button Cell Images


From: Christopher Armstrong
Subject: Button Cell Images
Date: Sun, 24 Jun 2007 17:34:44 +1000
User-agent: Thunderbird 1.5.0.12 (Windows/20070509)

Hi

I think I've written on this before, but I don't remember getting a reply so I'll try again. I want to put some images into a theme bundle that are to be used as button images for radio buttons and switch buttons. It appears the API for this is incomplete. Someone has been working on it but I am trying to understand what they were doing.

From what I can see, button images are currently loaded from the Appkit bundle by using the +[NSImage imageNamed:] API when -[NSButtonCell setButtonType:] is called. I believe the intention is to replace the encoding and decoding of system button images with instances of NSButtonImageSource; there appears to be some code to do this in NSButtonCell.m but it doesn't make any sense. NSButtonImageSource also seems incomplete and it isn't clear what role GSTheme plays in this.

My guess is that NSButtonImageSource instances are to be created for each type of button (NSRadioButton and NSSwitch), and they are to be put where -[NSButtonCell setImage:] is. NSButtonImageSource appears to be a hidden class in Cocoa as both QuantumStep and Cocotron have versions of it. I don't understand the part where it only gets stored for the alternate image (not the main one as well).

Would someone kindly explain what the intention of this is and how it should work? I have the time to work on it at the moment but I have no idea what should happen.

Cheers
Chris




reply via email to

[Prev in Thread] Current Thread [Next in Thread]