CPDFChoiceWidgetAnnotation.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //
  2. // CPDFChoiceWidgetAnnotation.h
  3. // ComPDFKit
  4. //
  5. // Copyright © 2014-2023 PDF Technologies, Inc. All Rights Reserved.
  6. //
  7. // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
  8. // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
  9. // UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
  10. // This notice may not be removed from this file.
  11. //
  12. #import <ComPDFKit/CPDFWidgetAnnotation.h>
  13. @interface CPDFChoiceWidgetItem : NSObject
  14. @property (nonatomic,retain) NSString *value;
  15. @property (nonatomic,retain) NSString *string;
  16. @end
  17. /**
  18. * A CPDFChoiceWidgetAnnotation object provides user interactivity on a page of a PDF document, in the form of pop-up menus and lists.
  19. *
  20. * @discussion CPDFButtonWidgetAnnotation inherits general annotation behavior from the CPDFWidgetAnnotation class.
  21. */
  22. @interface CPDFChoiceWidgetAnnotation : CPDFWidgetAnnotation
  23. /**
  24. * Initializes CPDFChoiceWidgetAnnotation object.
  25. */
  26. - (instancetype)initWithDocument:(CPDFDocument *)document listChoice:(BOOL)isListChoice;
  27. /**
  28. * Returns a Boolean value indicating whether the widget annotation is a list.
  29. *
  30. * @discussion There are two flavors of Choice widget annotations, lists and pop-up menus. These methods allow you to differentiate.
  31. */
  32. @property (nonatomic,readonly) BOOL isListChoice;
  33. /**
  34. * Returns an array of CPDFChoiceWidgetItem that represent the items available in the list or pop-up menu of the choice widget annotation.
  35. */
  36. @property (nonatomic,retain) NSArray<CPDFChoiceWidgetItem *> *items;
  37. @property (nonatomic,assign) NSInteger selectItemAtIndex;
  38. @end