mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-23 06:55:52 +00:00
New: added protocol CPTheme
This commit is contained in:
1 parent
464040895c
commit
c8d768c59a
1 file changed
+27
-1
@@ -28,7 +28,33 @@ var CachedThemeAttributes = nil;
|
||||
var CPViewThemeClassKey = @"CPViewThemeClassKey",
|
||||
CPViewThemeStateKey = @"CPViewThemeStateKey";
|
||||
|
||||
@implementation CPObject (ObjectTheming)
|
||||
@protocol CPTheme
|
||||
|
||||
- (CPString)themeClass;
|
||||
- (void)setThemeClass:(CPString)theClass;
|
||||
|
||||
- (CPTheme)theme;
|
||||
- (void)setTheme:(CPTheme)aTheme;
|
||||
|
||||
- (unsigned)themeState;
|
||||
- (BOOL)hasThemeState:(ThemeState)aState;
|
||||
- (BOOL)setThemeState:(ThemeState)aState;
|
||||
- (BOOL)unsetThemeState:(ThemeState)aState;
|
||||
- (BOOL)hasThemeAttribute:(CPString)aName;
|
||||
|
||||
- (void)objectDidChangeTheme;
|
||||
|
||||
- (void)setValue:(id)aValue forThemeAttribute:(CPString)aName inState:(ThemeState)aState;
|
||||
- (void)setValue:(id)aValue forThemeAttribute:(CPString)aName;
|
||||
- (id)valueForThemeAttribute:(CPString)aName inState:(ThemeState)aState;
|
||||
- (id)valueForThemeAttribute:(CPString)aName;
|
||||
- (id)currentValueForThemeAttribute:(CPString)aName;
|
||||
- (void)registerThemeValues:(CPArray)themeValues;
|
||||
- (void)registerThemeValues:(CPArray)themeValues inherit:(CPArray)inheritedValues;
|
||||
|
||||
@end
|
||||
|
||||
@implementation CPObject (ObjectTheming) <CPTheme>
|
||||
{
|
||||
// Theming Support
|
||||
CPTheme _theme;
|
||||
|
||||
Reference in new issue
Block a user