[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Button Cell Images
From: |
Gregory John Casamento |
Subject: |
Re: Button Cell Images |
Date: |
Sun, 24 Jun 2007 13:01:11 -0700 (PDT) |
GNUstep has this class as well... it's in GSNibCompatibility.m. I wrote it
originally as part of the keyed-nib decoding mechanism in GNUstep.
I wrote it to model the behavior I was seeing on Mac OS X. WHY Apple chose to
do it this way I'm not quite certain, but it is one of the classes which is
read and unarchived during nib processing and, thus, needed to be present.
GJC.
--
Gregory Casamento
----- Original Message ----
From: Christopher Armstrong <address@hidden>
To: address@hidden
Sent: Sunday, June 24, 2007 3:34:44 AM
Subject: Button Cell Images
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
_______________________________________________
Gnustep-dev mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/gnustep-dev