OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ASH_IME_INPUT_METHOD_MENU_ITEM_H_ | 5 #ifndef UI_CHROMEOS_IME_INPUT_METHOD_MENU_ITEM_H_ |
6 #define ASH_IME_INPUT_METHOD_MENU_ITEM_H_ | 6 #define UI_CHROMEOS_IME_INPUT_METHOD_MENU_ITEM_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 #include "ash/ash_export.h" | 10 #include "ui/chromeos/ui_chromeos_export.h" |
11 | 11 |
12 namespace ash { | 12 namespace ui { |
13 namespace ime { | 13 namespace ime { |
14 | 14 |
15 // A structure which represents a property for an input method engine. | 15 // A structure which represents a property for an input method engine. |
16 struct ASH_EXPORT InputMethodMenuItem { | 16 struct UI_CHROMEOS_EXPORT InputMethodMenuItem { |
17 InputMethodMenuItem(const std::string& in_key, | 17 InputMethodMenuItem(const std::string& in_key, |
18 const std::string& in_label, | 18 const std::string& in_label, |
19 bool in_is_selection_item, | 19 bool in_is_selection_item, |
20 bool in_is_selection_item_checked); | 20 bool in_is_selection_item_checked); |
21 | 21 |
22 InputMethodMenuItem(); | 22 InputMethodMenuItem(); |
23 ~InputMethodMenuItem(); | 23 ~InputMethodMenuItem(); |
24 | 24 |
25 bool operator==(const InputMethodMenuItem& other) const; | 25 bool operator==(const InputMethodMenuItem& other) const; |
26 bool operator!=(const InputMethodMenuItem& other) const; | 26 bool operator!=(const InputMethodMenuItem& other) const; |
27 | 27 |
28 // Debug print function. | 28 // Debug print function. |
29 std::string ToString() const; | 29 std::string ToString() const; |
30 | 30 |
31 std::string key; // A key which identifies the property. Non-empty string. | 31 std::string key; // A key which identifies the property. Non-empty string. |
32 // (e.g. "InputMode.HalfWidthKatakana") | 32 // (e.g. "InputMode.HalfWidthKatakana") |
33 std::string label; // A description of the property. Non-empty string. | 33 std::string label; // A description of the property. Non-empty string. |
34 // (e.g. "Switch to full punctuation mode", "Hiragana") | 34 // (e.g. "Switch to full punctuation mode", "Hiragana") |
35 bool is_selection_item; // true if the property is a selection item. | 35 bool is_selection_item; // true if the property is a selection item. |
36 bool is_selection_item_checked; // true if |is_selection_item| is true and | 36 bool is_selection_item_checked; // true if |is_selection_item| is true and |
37 // the selection_item is selected. | 37 // the selection_item is selected. |
38 }; | 38 }; |
39 typedef std::vector<InputMethodMenuItem> InputMethodMenuItemList; | 39 typedef std::vector<InputMethodMenuItem> InputMethodMenuItemList; |
40 | 40 |
41 } // namespace ime | 41 } // namespace ime |
42 } // namespace ash | 42 } // namespace ui |
43 | 43 |
44 #endif // ASH_IME_INPUT_METHOD_MENU_ITEM_H_ | 44 #endif // UI_CHROMEOS_IME_INPUT_METHOD_MENU_ITEM_H_ |
OLD | NEW |