//
//  KBKeyboardView.h
//  CustomKeyboard
//
//  键盘主容器，内部管理按键行布局。
//

#import <UIKit/UIKit.h>

@class KBKeyboardView, KBKey;

typedef NS_ENUM(NSInteger, KBKeyboardLayoutStyle) {
    KBKeyboardLayoutStyleLetters = 0,
    KBKeyboardLayoutStyleNumbers
};

@protocol KBKeyboardViewDelegate <NSObject>
@optional
/// 键被点击的回调
- (void)keyboardView:(KBKeyboardView *)keyboard didTapKey:(KBKey *)key;
@end

@interface KBKeyboardView : UIView

@property (nonatomic, weak) id<KBKeyboardViewDelegate> delegate;
@property (nonatomic, assign) KBKeyboardLayoutStyle layoutStyle; // 布局样式（字母/数字）
@property (nonatomic, assign, getter=isShiftOn) BOOL shiftOn;    // 大小写状态
// 在数字布局中，是否显示“更多符号”(#+=)页
@property (nonatomic, assign) BOOL symbolsMoreOn;

- (void)reloadKeys; // 当布局样式/大小写变化时调用

@end
