2025-10-28 14:30:03 +08:00
|
|
|
|
//
|
|
|
|
|
|
// KBFunctionView.h
|
|
|
|
|
|
// CustomKeyboard
|
|
|
|
|
|
//
|
|
|
|
|
|
// Created by Mac on 2025/10/28.
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
#import <UIKit/UIKit.h>
|
2026-01-09 19:35:36 +08:00
|
|
|
|
@class KBFunctionBarView, KBFunctionPasteView, KBFunctionView;
|
2025-10-28 15:10:38 +08:00
|
|
|
|
|
|
|
|
|
|
@protocol KBFunctionViewDelegate <NSObject>
|
|
|
|
|
|
@optional
|
2026-01-09 19:35:36 +08:00
|
|
|
|
- (void)functionView:(KBFunctionView *_Nullable)functionView
|
|
|
|
|
|
didTapToolActionAtIndex:(NSInteger)index;
|
|
|
|
|
|
- (void)functionView:(KBFunctionView *_Nullable)functionView
|
|
|
|
|
|
didRightTapToolActionAtIndex:(NSInteger)index;
|
|
|
|
|
|
- (void)functionViewDidRequestSubscription:
|
|
|
|
|
|
(KBFunctionView *_Nullable)functionView;
|
2025-11-26 21:16:56 +08:00
|
|
|
|
|
2025-10-28 15:10:38 +08:00
|
|
|
|
@end
|
2025-10-28 14:30:03 +08:00
|
|
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
|
|
|
|
/// 整个功能面板视图:顶部Bar + 粘贴区 + 标签列表 + 右侧操作按钮
|
|
|
|
|
|
@interface KBFunctionView : UIView
|
|
|
|
|
|
|
2026-01-09 19:35:36 +08:00
|
|
|
|
@property(nonatomic, weak) id<KBFunctionViewDelegate> delegate;
|
2025-10-28 15:10:38 +08:00
|
|
|
|
|
2026-01-09 19:35:36 +08:00
|
|
|
|
@property(nonatomic, strong, readonly)
|
|
|
|
|
|
UICollectionView *collectionView; // 话术分类/标签列表
|
|
|
|
|
|
@property(nonatomic, strong, readonly)
|
|
|
|
|
|
NSArray<NSString *> *items; // 简单数据源(演示用)
|
2025-10-28 14:30:03 +08:00
|
|
|
|
|
|
|
|
|
|
// 子视图暴露,便于外部接入事件
|
2026-01-09 19:35:36 +08:00
|
|
|
|
@property(nonatomic, strong, readonly) KBFunctionBarView *barView;
|
|
|
|
|
|
@property(nonatomic, strong, readonly) KBFunctionPasteView *pasteView;
|
2025-10-28 14:30:03 +08:00
|
|
|
|
|
2026-01-09 19:35:36 +08:00
|
|
|
|
@property(nonatomic, strong, readonly) UIButton *pasteButton; // 右侧-粘贴
|
|
|
|
|
|
@property(nonatomic, strong, readonly) UIButton *deleteButton; // 右侧-删除
|
|
|
|
|
|
@property(nonatomic, strong, readonly) UIButton *clearButton; // 右侧-清空
|
|
|
|
|
|
@property(nonatomic, strong, readonly) UIButton *sendButton; // 右侧-发送
|
2025-10-28 14:30:03 +08:00
|
|
|
|
|
2025-11-04 21:01:46 +08:00
|
|
|
|
/// 应用当前皮肤(更新背景/强调色)
|
|
|
|
|
|
- (void)kb_applyTheme;
|
|
|
|
|
|
|
2026-01-09 19:35:36 +08:00
|
|
|
|
#pragma mark - Theme Colors (用于 Cell 获取暗黑模式颜色)
|
|
|
|
|
|
|
|
|
|
|
|
/// Cell 背景色:暗黑 #707070,浅色 白色90%透明度
|
|
|
|
|
|
+ (UIColor *)kb_cellBackgroundColor;
|
|
|
|
|
|
|
|
|
|
|
|
/// Cell 文字颜色:暗黑 #FFFFFF,浅色 #1B1F1A
|
|
|
|
|
|
+ (UIColor *)kb_cellTextColor;
|
|
|
|
|
|
|
2025-10-28 14:30:03 +08:00
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|