67 lines
1.3 KiB
Objective-C
67 lines
1.3 KiB
Objective-C
//
|
|
// XPRoomMoreMenuAction.h
|
|
// YuMi
|
|
//
|
|
// Created by Linus on 2025/1/13.
|
|
//
|
|
|
|
#import <Foundation/Foundation.h>
|
|
#import "XPRoomMoreItemModel.h"
|
|
#import "ThemeColor+Room.h"
|
|
#import "RoomHostDelegate.h"
|
|
#import "XPRoomMoreMenuActionContext.h"
|
|
|
|
@class XPRoomMoreMenuActionContext;
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
/**
|
|
* 房间更多菜单操作抽象基类
|
|
* 每个具体的菜单操作都应该继承此类
|
|
*/
|
|
@interface XPRoomMoreMenuAction : NSObject
|
|
|
|
/// 操作标题
|
|
@property (nonatomic, copy) NSString *title;
|
|
|
|
/// 图标名称
|
|
@property (nonatomic, copy) NSString *imageName;
|
|
|
|
/// 是否启用
|
|
@property (nonatomic, assign) BOOL isEnabled;
|
|
|
|
/// 是否选中
|
|
@property (nonatomic, assign) BOOL isSelected;
|
|
|
|
/// 操作类型
|
|
@property (nonatomic, assign) RoomMoreMenuType type;
|
|
|
|
/// 标题颜色
|
|
@property (nonatomic, strong) UIColor *titleColor;
|
|
|
|
/// 图标颜色
|
|
@property (nonatomic, strong) UIColor *imageTintColor;
|
|
|
|
/**
|
|
* 检查是否可以执行此操作
|
|
* @param context 操作上下文
|
|
* @return 是否可以执行
|
|
*/
|
|
- (BOOL)canExecuteWithContext:(XPRoomMoreMenuActionContext *)context;
|
|
|
|
/**
|
|
* 执行操作
|
|
* @param context 操作上下文
|
|
*/
|
|
- (void)executeWithContext:(XPRoomMoreMenuActionContext *)context;
|
|
|
|
/**
|
|
* 转换为数据模型
|
|
* @return XPRoomMoreItemModel 实例
|
|
*/
|
|
- (XPRoomMoreItemModel *)toItemModel;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|