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

#import <Foundation/Foundation.h>

@class NXWhiteboard;
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(int, NXWhiteboardPopMenus)
{
    NXWhiteboardPopMenusNone         = 0, //隐藏
    NXWhiteboardPopMenusLock         = 1, //因为有多选，所以这几个有可能混杂
    NXWhiteboardPopMenusUnlock       = 2,
    NXWhiteboardPopMenusBringToFront = 4,
    NXWhiteboardPopMenusSendToBack   = 8,
    NXWhiteboardPopMenusCombinate    = 16, //组合元素
    NXWhiteboardPopMenusDecombinate  = 32, //解组合
    NXWhiteboardPopMenusCopy         = 64,
    NXWhiteboardPopMenusPaste        = 128,
    NXWhiteboardPopMenusDelete       = 256,
    NXWhiteboardPopMenusRotateLeft   = 512,
    NXWhiteboardPopMenusRotateRight  = 1024,
};

@protocol NXWhiteboardElementPopMenusProtocol <NSObject>

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

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

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

@end

NS_ASSUME_NONNULL_END
