MyScript Interactive Ink SDK  4.0.0
PlaceholderController.h
1 // Copyright @ MyScript. All rights reserved.
2 
3 #pragma once
4 
5 #include <iink/ContentBlock.h>
6 #include <iink/MimeType.h>
7 #include <iink/String.h>
8 
9 #include <iink/graphics/Rectangle.h>
10 
11 
12 namespace myscript {
13 namespace iink {
14 
21 {
22  bool selectOnTapAllowed = true;
23  bool selectOnLassoAllowed = true;
24  bool resizeAllowed = true;
25  bool rotationAllowed = true;
26  bool keepAspectRatio = true;
30 };
31 
38 {
39 public:
40 
41  virtual ~PlaceholderController() = default;
42 
61  virtual std::shared_ptr<ContentBlock> add(const graphics::Rectangle& box, const String& inputFile, MimeType mimeType, const String& userData,
62  bool selectOnAdd, const PlaceholderInteractivityOptions& interactivityOptions) = 0;
63 
79  virtual void update(std::shared_ptr<ContentSelection> placeholder, const graphics::Rectangle& box, const String& inputFile, MimeType mimeType, const String& userData) = 0;
80 
90  virtual void setUserData(std::shared_ptr<ContentSelection> placeholder, const String& userData) = 0;
91 
102  virtual String getUserData(std::shared_ptr<ContentSelection> placeholder) = 0;
103 
113  virtual void setVisible(std::shared_ptr<ContentSelection> placeholder, bool visible) = 0;
114 
125  virtual bool isVisible(std::shared_ptr<ContentSelection> placeholder) = 0;
126 
136  virtual bool isPlaceholder(std::shared_ptr<ContentSelection> selection) = 0;
137 };
138 
139 }
140 }
Definition: PlaceholderController.h:38
virtual bool isVisible(std::shared_ptr< ContentSelection > placeholder)=0
virtual void setVisible(std::shared_ptr< ContentSelection > placeholder, bool visible)=0
virtual bool isPlaceholder(std::shared_ptr< ContentSelection > selection)=0
virtual std::shared_ptr< ContentBlock > add(const graphics::Rectangle &box, const String &inputFile, MimeType mimeType, const String &userData, bool selectOnAdd, const PlaceholderInteractivityOptions &interactivityOptions)=0
virtual void setUserData(std::shared_ptr< ContentSelection > placeholder, const String &userData)=0
virtual String getUserData(std::shared_ptr< ContentSelection > placeholder)=0
virtual void update(std::shared_ptr< ContentSelection > placeholder, const graphics::Rectangle &box, const String &inputFile, MimeType mimeType, const String &userData)=0
Definition: String.h:27
MimeType
Definition: MimeType.h:15
Definition: Configuration.h:11
Definition: PlaceholderController.h:21
bool resizeAllowed
Definition: PlaceholderController.h:24
bool selectOnLassoAllowed
Definition: PlaceholderController.h:23
PlaceholderInteractivityOptions(const PlaceholderInteractivityOptions &other)=default
bool selectOnTapAllowed
Definition: PlaceholderController.h:22
bool rotationAllowed
Definition: PlaceholderController.h:25
bool keepAspectRatio
Definition: PlaceholderController.h:26
Definition: Rectangle.h:17