Re: NSImageView + Text
Re: NSImageView + Text
- Subject: Re: NSImageView + Text
- From: Mijobee <email@hidden>
- Date: Wed, 30 Nov 2005 15:48:45 -0500
My question is about the best design to get the specific look I want,
the look of the UI is important I definitely don't want to sacrifice
anything. I'm interested in how people would design that component
somehow abstracting it into a single cell class that can be used in
an NSMatrix. So far I'm thinking the cleanest way would be to create
an NSImageCell subclass and an NSComponent subclass. Before I go
through that though I'm looking for a sanity check because I'm not an
experienced Cocoa developer and I've seen interesting ways things
have been made very simple. Thanks.
On Nov 30, 2005, at 6:57 AM, Uli Kusterer wrote:
Am 30.11.2005 um 00:20 schrieb Mijobee:
I'm writing a hot key view that allows users to click on the cell
and then press a key combination which is then displayed in the
view. I've considered a few different design approaches but am
not sure the best way to implement it. Do I just need to subclass
NSImageCell, implement my keyDown and text drawing logic and write
a simple NSControl subclass or do I also need to subclass
NSImageView for my control? I'm trying to avoid piling controls
on top of each other but if that's really the best way then I'm
open to it.
Do whatever works best for you. If you don't need a cell at all
(e.g. you don't plan on having a table view where one column uses
your keyboard shortcut cells, or an NSMatrix of such cells) it may
even be easier and more efficient to just write an NSView subclass
that has all that behaviour.
> I know how to do the key translation, glyph lookup, etc. Thanks
in advance.
I'd be interested in that code. Currently I'm using CocoaHotkeys3
from Rogue Amoeba, IIRC, but it requires a look-up-table in your
application's resources for each language to translate the virtual
key codes back to the actual key names. How are you doing that?
The software is still under active development but we will most
likely be releasing portions under an open source license or some
sort of developers toolkit. I'll let you know when that's done and
you can have a look at how it works. The interface is just like the
NSNotificationCenter except which a key code and modifier flags.
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden