API  0.9.6
 All Classes Files Functions Variables Macros Modules Pages
CPTheme Class Reference

#import <CPTheme.h>

+ Inheritance diagram for CPTheme:

Instance Methods

(CPDictionary- attributeNamesForClass:
 
(CPDictionary- attributesForClass:
 
(_CPThemeAttribute) - attributeWithName:forClass:
 
(CPArray- classNames
 
(void) - encodeWithCoder:
 
(id) - initWithCoder:
 
(id) - initWithName:
 
(CPString- name
 
(void) - takeThemeFromObject:
 
(id) - valueForAttributeWithName:forClass:
 
(id) - valueForAttributeWithName:inState:forClass:
 
- Instance Methods inherited from CPObject
(void) - addObserver:forKeyPath:options:context:
 
(void) - applyChange:toKeyPath:
 
(id) - autorelease
 
(id) - awakeAfterUsingCoder:
 
(void) - awakeFromCib
 
(void) - bind:toObject:withKeyPath:options:
 
(Class) - classForCoder
 
(Class) - classForKeyedArchiver
 
(CPString- className
 
(id) - copy
 
(void) - dealloc
 
(CPString- description
 
(CPDictionary- dictionaryWithValuesForKeys:
 
(void) - didChange:valuesAtIndexes:forKey:
 
(void) - didChangeValueForKey:
 
(void) - didChangeValueForKey:withSetMutation:usingObjects:
 
(void) - doesNotRecognizeSelector:
 
(CPArray- exposedBindings
 
(id) - forwardingTargetForSelector:
 
(void) - forwardInvocation:
 
(unsigned) - hash
 
(BOOL) - implementsSelector:
 
(CPDictionary- infoForBinding:
 
(id) - init
 
(BOOL) - isEqual:
 
(BOOL) - isKindOfClass:
 
(BOOL) - isMemberOfClass:
 
(BOOL) - isProxy
 
(IMP) - methodForSelector:
 
(CPMethodSignature) - methodSignatureForSelector:
 
(id) - mutableArrayValueForKey:
 
(id) - mutableArrayValueForKeyPath:
 
(id) - mutableCopy
 
(id) - mutableSetValueForKey:
 
(id) - mutableSetValueForKeyPath:
 
(id) - performSelector:
 
(id) - performSelector:withObject:
 
(id) - performSelector:withObject:withObject:
 
(id) - performSelector:withObjects:
 
(void) - release
 
(void) - removeObserver:forKeyPath:
 
(id) - replacementObjectForArchiver:
 
(id) - replacementObjectForCoder:
 
(id) - replacementObjectForKeyedArchiver:
 
(BOOL) - respondsToSelector:
 
(id) - retain
 
(id) - self
 
(void) - setValue:forKey:
 
(void) - setValue:forKeyPath:
 
(void) - setValue:forUndefinedKey:
 
(void) - setValuesForKeysWithDictionary:
 
(CPString- UID
 
(void) - unbind:
 
(Class) - valueClassForBinding:
 
(id) - valueForKey:
 
(id) - valueForKeyPath:
 
(id) - valueForUndefinedKey:
 
(void) - willChange:valuesAtIndexes:forKey:
 
(void) - willChangeValueForKey:
 
(void) - willChangeValueForKey:withSetMutation:usingObjects:
 

Class Methods

(CPTheme+ defaultHudTheme
 
(CPTheme+ defaultTheme
 
(void) + setDefaultHudTheme:
 
(void) + setDefaultTheme:
 
(CPTheme+ themeNamed:
 
- Class Methods inherited from CPObject
(BOOL) + accessInstanceVariablesDirectly
 
(id) + alloc
 
(id) + allocWithCoder:
 
(BOOL) + automaticallyNotifiesObserversForKey:
 
(Class) + class
 
(void) + exposeBinding:
 
(void) + initialize
 
(IMP) + instanceMethodForSelector:
 
(BOOL) + instancesRespondToSelector:
 
(BOOL) + isSubclassOfClass:
 
(CPSet+ keyPathsForValuesAffectingValueForKey:
 
(void) + load
 
(id) + new
 
(void) + setVersion:
 
(Class) + superclass
 
(int) + version
 

Additional Inherited Members

- Instance Variables inherited from CPObject
Class isa
 

Detailed Description

Definition at line 2 of file CPTheme.h.

Method Documentation

- (CPDictionary) attributeNamesForClass: (id)  aClass
implementation

Returns an array of names of all theme attributes defined for the given class, as found in the theme's ThemeDescriptors.j file.

The aClass parameter can be one of the following:

  • A class instance, for example the result of [CPCheckBox class]. The class must be a subclass of CPView.
  • A class name, for example "CPCheckBox".
  • A themed class name, for example "check-box".

If aClass does not refer to a themed class in this theme, nil is returned.

Parameters
aClassThe themed class whose attributes you want to retrieve
Returns
An array of attribute names or nil

Definition at line 174 of file CPTheme.j.

- (CPDictionary) attributesForClass: (id)  aClass
implementation

Returns a dictionary of all theme attributes defined for the given class, as found in the theme's ThemeDescriptors.j file. The keys of the dictionary are attribute names, and the values are instances of _CPThemeAttribute.

For a description of valid values for aClass, see attributeNamesForClass:.

Parameters
aClassThe themed class whose attributes you want to retrieve
Returns
A dictionary of attributes or nil

Definition at line 119 of file CPTheme.j.

- (_CPThemeAttribute) attributeWithName: (CPString aName
forClass: (id)  aClass 
implementation

Returns a theme attribute defined for the given class, as found in the theme's ThemeDescriptors.j file.

aName should be the attribute name as you would pass to the method valueForThemeAttribute: (CPView(Theming)).

For a description of valid values for aClass, see attributeNamesForClass:.

Parameters
aNameThe name of the attribute you want to retrieve
aClassThe themed class in which to look for the attribute
Returns
An instance of _CPThemeAttribute or nil

Definition at line 197 of file CPTheme.j.

- (CPArray) classNames
implementation

Returns an array of names of themed classes defined in this theme, as found in its ThemeDescriptors.j file.

NOTE: The names are not class names (such as "CPButton"), but the names returned by the class' +defaultThemeClass method. For example, the name for CPCheckBox is "check-box", as defined in themeClass (CPView(Theming)).

Definition at line 104 of file CPTheme.j.

+ (CPTheme) defaultHudTheme
implementation

The default HUD theme is (sometimes) used for windows with the CPHUDBackgroundWindowMask style mask. The default is theme with the name of the default theme with -HUD appended at the end.

Definition at line 64 of file CPTheme.j.

+ (CPTheme) defaultTheme
implementation

Definition at line 45 of file CPTheme.j.

- (void) encodeWithCoder: (CPCoder aCoder
implementation

Provided by category CPTheme(CPCoding).

Definition at line 304 of file CPTheme.j.

- (id) initWithCoder: (CPCoder aCoder
implementation

Provided by category CPTheme(CPCoding).

Definition at line 289 of file CPTheme.j.

- (id) initWithName: (CPString aName
implementation

Definition at line 76 of file CPTheme.j.

- (CPString) name
implementation

Definition at line 91 of file CPTheme.j.

+ (void) setDefaultHudTheme: (CPTheme aTheme
implementation

Set the default HUD theme. If set to nil, the default described in defaultHudTheme will be used.

Definition at line 54 of file CPTheme.j.

+ (void) setDefaultTheme: (CPTheme aTheme
implementation

Definition at line 40 of file CPTheme.j.

- (void) takeThemeFromObject: (id)  anObject
implementation

Definition at line 248 of file CPTheme.j.

+ (CPTheme) themeNamed: (CPString aName
implementation

Definition at line 71 of file CPTheme.j.

- (id) valueForAttributeWithName: (CPString aName
forClass: (id)  aClass 
implementation

Returns the value for a theme attribute in its normal state, as defined for the given class in the theme's ThemeDescriptors.j file.

aName should be the attribute name as you would pass to the method valueForThemeAttribute: (CPView(Theming)).

For a description of valid values for aClass, see attributeNamesForClass:.

Parameters
aNameThe name of the attribute whose value you want to retrieve
aClassThe themed class in which to look for the attribute
Returns
A value or nil

Definition at line 220 of file CPTheme.j.

- (id) valueForAttributeWithName: (CPString aName
inState: (CPThemeState aState
forClass: (id)  aClass 
implementation

Returns the value for a theme attribute in a given state, as defined for the given class in the theme's ThemeDescriptors.j file. This is the equivalent of the method valueForThemeAttribute:inState: (CPView(Theming)), but retrieves the value from the theme definition as opposed to a single view's current theme state.

For a description of valid values for aClass, see attributeNamesForClass:.

Parameters
aNameThe name of the attribute whose value you want to retrieve
aStateThe state qualifier for the attribute
aClassThe themed class in which to look for the attribute
Returns
A value or nil

Definition at line 238 of file CPTheme.j.


The documentation for this class was generated from the following files: