blob: 79d8a299d4a78a4e24e6952e23e2631e85b63dcb [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#import "WXComponent.h"
@interface WXComponent (PseudoClassManagement)
/**
* @abstract filter common styles and pseudoClassStyles.
*
*/
-(NSMutableDictionary *)parseStyles:(NSDictionary *)styles;
/**
* @abstract reset pseudoClassStyles.
*
*/
- (void)resetPseudoClassStyles:(NSArray *)resetstyle;
/**
* @abstract filter common styles and pseudoClassStyles.
*
*/
-(NSString *)getPseudoKey:(NSString *)key;
/**
* @abstract get pseudo class styles through key.
*
* @param key the key to search pseudo class
*
* @return pseudo class.
*/
-(NSMutableDictionary *)getPseudoClassStyles:(NSString *)key;
/**
* @abstract get pseudo class styles through keys.
*
* @param keys the keys to search pseudo class
*
* @return pseudo class.
*/
-(NSMutableDictionary *)getPseudoClassStylesByKeys:(NSArray *)keys;
///--------------------------------------
/// @name Updating PseudoClass
///--------------------------------------
/**
* @abstract Called when component's style are updated
*
* @param pseudoClassStyles The updated style dictionary
* @discussion It can be overrided to handle specific style updating. The method is called on the main thread.
**/
- (void)updatePseudoClassStyles:(NSDictionary *)pseudoClassStyles;
///--------------------------------------
/// @name recovery styles
///--------------------------------------
/**
* @abstract Called when component recovery styles
*
* @discussion It can be overrided to handle specific style recovery. The method is called on the main thread.
**/
- (void)recoveryPseudoStyles:(NSDictionary *)styles;
@end