Aurore
A Switch-like interface for your app, on every screen
Loading...
Searching...
No Matches
ime.hpp
Go to the documentation of this file.
1/*
2 Copyright 2019 WerWolv
3 Copyright 2019 p-sam
4 Copyright 2023 xfangfang
5
6Licensed under the Apache License, Version 2.0 (the "License");
7you may not use this file except in compliance with the License.
8You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12Unless required by applicable law or agreed to in writing, software
13distributed under the License is distributed on an "AS IS" BASIS,
14WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15See the License for the specific language governing permissions and
16limitations under the License.
17*/
18
19#pragma once
20
21#include <functional>
22#include <string>
23
24namespace aurore
25{
26
39
41{
42 public:
43 virtual ~ImeManager() { }
44
45 virtual bool openForText(std::function<void(std::string)> f, std::string headerText = "",
46 std::string subText = "", int maxStringLength = 32, std::string initialText = "",
48 = 0;
49
55 virtual bool openForPassword(std::function<void(std::string)> f, std::string headerText = "",
56 std::string subText = "", int maxStringLength = 32, std::string initialText = "",
58 {
59 return openForText(f, headerText, subText, maxStringLength, initialText, kbdDisableBitmask);
60 }
61
62 virtual bool openForNumber(std::function<void(long)> f, std::string headerText = "",
63 std::string subText = "", int maxStringLength = 18, std::string initialText = "",
64 std::string leftButton = "", std::string rightButton = "",
66 = 0;
67};
68
69};
Definition ime.hpp:41
virtual ~ImeManager()
Definition ime.hpp:43
virtual bool openForText(std::function< void(std::string)> f, std::string headerText="", std::string subText="", int maxStringLength=32, std::string initialText="", int kbdDisableBitmask=KeyboardKeyDisableBitmask::KEYBOARD_DISABLE_NONE)=0
virtual bool openForNumber(std::function< void(long)> f, std::string headerText="", std::string subText="", int maxStringLength=18, std::string initialText="", std::string leftButton="", std::string rightButton="", int kbdDisableBitmask=KeyboardKeyDisableBitmask::KEYBOARD_DISABLE_NONE)=0
virtual bool openForPassword(std::function< void(std::string)> f, std::string headerText="", std::string subText="", int maxStringLength=32, std::string initialText="", int kbdDisableBitmask=KeyboardKeyDisableBitmask::KEYBOARD_DISABLE_NONE)
Definition ime.hpp:55
Definition actions.hpp:25
KeyboardKeyDisableBitmask
Definition ime.hpp:28
@ KEYBOARD_DISABLE_BACKSLASH
Definition ime.hpp:34
@ KEYBOARD_DISABLE_FORWSLASH
Definition ime.hpp:33
@ KEYBOARD_DISABLE_USERNAME
Definition ime.hpp:37
@ KEYBOARD_DISABLE_SPACE
Definition ime.hpp:30
@ KEYBOARD_DISABLE_PERCENT
Definition ime.hpp:32
@ KEYBOARD_DISABLE_AT
Definition ime.hpp:31
@ KEYBOARD_DISABLE_NUMBERS
Definition ime.hpp:35
@ KEYBOARD_DISABLE_DOWNLOADCODE
Definition ime.hpp:36
@ KEYBOARD_DISABLE_NONE
Definition ime.hpp:29