//
//  YCKWhiteboardElementPopMenusProtocol.h
//  YCKit
//
//  Created by 任佳杰 on 2022/3/15.
//  Copyright © 2022 徐家骏. All rights reserved.
//

#import <Foundation/Foundation.h>

@class YCKWhiteboard;
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(int, YCKWhiteboardPopMenus)
{
    YCKWhiteboardPopMenusNone         = 0, //隐藏
    YCKWhiteboardPopMenusLock         = 1, //因为有多选，所以这几个有可能混杂
    YCKWhiteboardPopMenusUnlock       = 2,
    YCKWhiteboardPopMenusBringToFront = 4,
    YCKWhiteboardPopMenusSendToBack   = 8,
    YCKWhiteboardPopMenusCombinate    = 16, //组合元素
    YCKWhiteboardPopMenusDecombinate  = 32, //解组合
    YCKWhiteboardPopMenusCopy         = 64,
    YCKWhiteboardPopMenusPaste        = 128,
    YCKWhiteboardPopMenusDelete       = 256,
    YCKWhiteboardPopMenusRotateLeft   = 512,
    YCKWhiteboardPopMenusRotateRight  = 1024,
};

@protocol YCKWhiteboardElementPopMenusProtocol <NSObject>

//@optional
/// 自定义的可以不实现以下
@property (nonatomic, weak) YCKWhiteboard *whiteboard; //持有一个弱引用
@property (nonatomic) YCKWhiteboardPopMenus allowPopMenus;

- (void)configurePopMenusItem:(YCKWhiteboardPopMenus)item callback:(void (^)(UIButton *item))block;

@required
/**
 设置选中元素要显示的对应menu
 @param elementPopMenus 选中元素支持的menu，与YCKWhiteboardPopMenus & 运算得知要显示的类型
 @return 返回0，则不显示，非0显示
 */
- (int)setElementPopMenus:(int)elementPopMenus;

@end

NS_ASSUME_NONNULL_END
