AuboCaps  0.4.1
keyboard_input_factory.h
Go to the documentation of this file.
1 #ifndef AUBO_SCOPE_KEYBOARD_INPUT_FACTORY_H
2 #define AUBO_SCOPE_KEYBOARD_INPUT_FACTORY_H
3 
4 #include <memory>
5 #include <string>
10 
11 namespace arcs {
12 namespace aubo_scope {
13 ARCS_CLASS_FORWARD(KeyboardInputFactory);
14 
15 /**
16  * <p>
17  * Factory for creating keyboard inputs which are used to configure the virtual
18  * keyboard/keypad and to request it to be displayed for a Swing GUI component.
19  * The typical Swing component most commonly used is a {@link
20  * javax.swing.JTextField}.
21  * </p>
22  *
23  * NOTE: This functionality is only relevant for AuboCap nodes with a
24  * Swing-based user interface (see {@link ProgramNodeService}, {@link
25  * InstallationNodeService} and ToolbarService}).
26  */
28 {
29 public:
32  virtual ~KeyboardInputFactory();
33 
34  /**
35  * <p>
36  * Creates a standard virtual keyboard input.
37  * </p>
38  *
39  * If no input validator is specified, all strings are accepted.
40  *
41  * @return new instance of KeyboardTextInput.
42  */
43  KeyboardTextInputPtr createStandardKeyboardInput();
44 
45  /**
46  * <p>
47  * Creates a standard virtual keyboard input for naming.
48  * </p>
49  *
50  * If no input validator is specified, all strings are accepted.
51  *
52  * @return new instance of KeyboardTextInput.
53  */
54  KeyboardTextInputPtr createStringKeyboardInput();
55 
56  /**
57  * <p>
58  * Creates a expression virtual keyboard input for expression.
59  * </p>
60  *
61  * If no input validator is specified, all strings are accepted.
62  *
63  * @return new instance of KeyboardTextInput.
64  */
65  KeyboardExpressionInputPtr createExpressionKeyboardInput();
66 
67  /**
68  * <p>
69  * Creates a standard virtual keyboard input accepting password string/text
70  * input. When the end user types, asterisks are shown instead of the
71  * original characters.
72  * </p>
73  *
74  * If no input validator is specified, all strings are accepted.
75  *
76  * @return new instance of KeyboardTextInput.
77  */
78  KeyboardTextInputPtr createPasswordKeyboardInput();
79 
80  /**
81  * Creates a virtual keyboard input accepting IPv4 addresses. The keyboards
82  * accepts any IPv4 address (ensuring the correct format) and returns it as
83  * a string.
84  *
85  * @return new instance of <code>KeyboardTextInput</code>.
86  */
87  std::shared_ptr<KeyboardIntInput> createIPAddressKeyboardInput();
88 
89  /**
90  * <p>
91  * Creates a virtual numeric keypad input accepting doubles
92  * </p>
93  *
94  * If no input validator is specified, all double values are accepted.
95  *
96  * @return new instance of <code>KeyboardNumberInput<Double></code>.
97  */
98  std::shared_ptr<KeyboardDoubleInput> createDoubleKeypadInput();
99 
100  /**
101  * <p>
102  * Creates a virtual numeric keypad input accepting positive doubles. The
103  * minus ('-') button on the keypad will be disabled.
104  * </p>
105  *
106  * If no input validator is specified, all positive double values are
107  * accepted.
108  *
109  * @return new instance of <code>KeyboardNumberInput<Double></code>.
110  */
111  std::shared_ptr<KeyboardDoubleInput> createPositiveDoubleKeypadInput();
112 
113  /**
114  * <p>
115  * Creates a virtual numeric keypad input accepting integers. The dot ('.')
116  * button on the keypad will be disabled.
117  * </p>
118  *
119  * If no input validator is specified, all integer values are accepted.
120  *
121  * @return new instance of <code>KeyboardNumberInput<Integer>}.
122  */
123  std::shared_ptr<KeyboardIntInput> createIntegerKeypadInput();
124 
125  /**
126  * <p>
127  * Creates a virtual numeric keypad input accepting positive integers. The
128  * minus ('-') and the dot ('.') buttons on the keypad will be disabled.
129  * </p>
130  *
131  * If no input validator is specified, all positive integer values are
132  * accepted.
133  *
134  * @return new instance of <code>KeyboardNumberInput<Integer></code>.
135  */
136  std::shared_ptr<KeyboardUIntInput> createPositiveIntegerKeypadInput();
137 
138 private:
139  friend class DataSwitch;
141  void *d_{ nullptr };
142 };
143 } // namespace aubo_scope
144 } // namespace arcs
145 
146 #endif
ARCS_CLASS_FORWARD(GripForceCapability)
#define ARCS_ABI_EXPORT
Definition: class_forward.h:16