![]() |
API 0.9.5
|
#import <CPTheme.h>
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: |
Class Methods | |
(CPTheme) | + defaultHudTheme |
(CPTheme) | + defaultTheme |
(void) | + setDefaultHudTheme: |
(void) | + setDefaultTheme: |
(CPTheme) | + themeNamed: |
- (CPDictionary) attributeNamesForClass: | (id) | aClass |
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:
If aClass
does not refer to a themed class in this theme, nil is returned.
aClass | The themed class whose attributes you want to retrieve |
- (CPDictionary) attributesForClass: | (id) | aClass |
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:.
aClass | The themed class whose attributes you want to retrieve |
- (_CPThemeAttribute) attributeWithName: | (CPString) | aName | |
forClass: | (id) | aClass | |
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).
For a description of valid values for aClass
, see attributeNamesForClass:.
aName | The name of the attribute you want to retrieve |
aClass | The themed class in which to look for the attribute |
- (CPArray) classNames |
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).
+ (CPTheme) defaultHudTheme |
+ (void) setDefaultHudTheme: | (CPTheme) | aTheme |
- (id) valueForAttributeWithName: | (CPString) | aName | |
forClass: | (id) | aClass | |
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).
For a description of valid values for aClass
, see attributeNamesForClass:.
aName | The name of the attribute whose value you want to retrieve |
aClass | The themed class in which to look for the attribute |
- (id) valueForAttributeWithName: | (CPString) | aName | |
inState: | (CPThemeState) | aState | |
forClass: | (id) | aClass | |
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), 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:.
aName | The name of the attribute whose value you want to retrieve |
aState | The state qualifier for the attribute |
aClass | The themed class in which to look for the attribute |