KMCustomButtonPopMenuViewController.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. //
  2. // KMPopMenuViewController.h
  3. // SignFlow
  4. //
  5. // Created by Kdan on 2020/10/23.
  6. //
  7. #import <Cocoa/Cocoa.h>
  8. @protocol KMCustomButtonPopMenuViewControllerDataSources <NSObject>
  9. //pop框有多少行
  10. - (NSInteger)numberOfLine;
  11. //pop框某行显示的文字
  12. - (nullable NSString *)stringForLineAtIndex:(NSInteger)index;
  13. //某行是否需要下划线
  14. - (BOOL)needInsertSeperateLineAtIndex:(NSInteger)index;
  15. //某行是否需要选取
  16. - (BOOL)needHightLightLineAtIndex:(NSInteger)index;
  17. - (nullable NSImage *)imageForLineAtIndex:(NSInteger)index;
  18. - (BOOL)itemEnableAtIndex:(NSInteger)index;
  19. @end
  20. @protocol KMCustomButtonPopMenuViewControllerDelegate <NSObject>
  21. - (void)customViewButtonPopDidSelectIndex:(NSInteger)index;
  22. @end
  23. NS_ASSUME_NONNULL_BEGIN
  24. @interface KMCustomButtonPopMenuViewController : NSViewController
  25. @property (nonatomic, assign)id<KMCustomButtonPopMenuViewControllerDataSources>dataSources;
  26. @property (nonatomic, assign)id<KMCustomButtonPopMenuViewControllerDelegate>delegate;
  27. @end
  28. NS_ASSUME_NONNULL_END