| @@ -38,6 +38,10 @@ | ||
| 38 | 38 | <integer>1</integer> |
| 39 | 39 | <key>tsInputModeMenuIconFileKey</key> |
| 40 | 40 | <string>AquaSKK-InputMethod.tif</string> |
| 41 | + <key>tsInputModeAlternateMenuIconFileKey</key> | |
| 42 | + <string>AquaSKK-InputMethod.tif</string> | |
| 43 | + <key>tsInputModePaletteIconFileKey</key> | |
| 44 | + <string>AquaSKK-InputMethod.tif</string> | |
| 41 | 45 | <key>tsInputModePrimaryInScriptKey</key> |
| 42 | 46 | <true/> |
| 43 | 47 | <key>tsInputModeScriptKey</key> |
| @@ -57,6 +61,10 @@ | ||
| 57 | 61 | <integer>0</integer> |
| 58 | 62 | <key>tsInputModeMenuIconFileKey</key> |
| 59 | 63 | <string>Mini-Jisx0208Latin.tiff</string> |
| 64 | + <key>tsInputModeAlternateMenuIconFileKey</key> | |
| 65 | + <string>Mini-Jisx0208Latin.tiff</string> | |
| 66 | + <key>tsInputModePaletteIconFileKey</key> | |
| 67 | + <string>Mini-Jisx0208Latin.tiff</string> | |
| 60 | 68 | <key>tsInputModePrimaryInScriptKey</key> |
| 61 | 69 | <false/> |
| 62 | 70 | <key>tsInputModeScriptKey</key> |
| @@ -76,6 +84,10 @@ | ||
| 76 | 84 | <integer>0</integer> |
| 77 | 85 | <key>tsInputModeMenuIconFileKey</key> |
| 78 | 86 | <string>Mini-Jisx0201Kana.tiff</string> |
| 87 | + <key>tsInputModeAlternateMenuIconFileKey</key> | |
| 88 | + <string>Mini-Jisx0201Kana.tiff</string> | |
| 89 | + <key>tsInputModePaletteIconFileKey</key> | |
| 90 | + <string>Mini-Jisx0201Kana.tiff</string> | |
| 79 | 91 | <key>tsInputModePrimaryInScriptKey</key> |
| 80 | 92 | <false/> |
| 81 | 93 | <key>tsInputModeScriptKey</key> |
| @@ -95,6 +107,10 @@ | ||
| 95 | 107 | <integer>1</integer> |
| 96 | 108 | <key>tsInputModeMenuIconFileKey</key> |
| 97 | 109 | <string>Mini-Hirakana.tiff</string> |
| 110 | + <key>tsInputModeAlternateMenuIconFileKey</key> | |
| 111 | + <string>Mini-Hirakana.tiff</string> | |
| 112 | + <key>tsInputModePaletteIconFileKey</key> | |
| 113 | + <string>Mini-Hirakana.tiff</string> | |
| 98 | 114 | <key>tsInputModePrimaryInScriptKey</key> |
| 99 | 115 | <true/> |
| 100 | 116 | <key>tsInputModeScriptKey</key> |
| @@ -114,6 +130,10 @@ | ||
| 114 | 130 | <integer>2</integer> |
| 115 | 131 | <key>tsInputModeMenuIconFileKey</key> |
| 116 | 132 | <string>Mini-Katakana.tiff</string> |
| 133 | + <key>tsInputModeAlternateMenuIconFileKey</key> | |
| 134 | + <string>Mini-Katakana.tiff</string> | |
| 135 | + <key>tsInputModePaletteIconFileKey</key> | |
| 136 | + <string>Mini-Katakana.tiff</string> | |
| 117 | 137 | <key>tsInputModePrimaryInScriptKey</key> |
| 118 | 138 | <false/> |
| 119 | 139 | <key>tsInputModeScriptKey</key> |
| @@ -133,6 +153,10 @@ | ||
| 133 | 153 | <integer>3</integer> |
| 134 | 154 | <key>tsInputModeMenuIconFileKey</key> |
| 135 | 155 | <string>Mini-Ascii.tiff</string> |
| 156 | + <key>tsInputModeAlternateMenuIconFileKey</key> | |
| 157 | + <string>Mini-Ascii.tiff</string> | |
| 158 | + <key>tsInputModePaletteIconFileKey</key> | |
| 159 | + <string>Mini-Ascii.tiff</string> | |
| 136 | 160 | <key>tsInputModePrimaryInScriptKey</key> |
| 137 | 161 | <true/> |
| 138 | 162 | <key>tsInputModeScriptKey</key> |
| @@ -536,6 +536,16 @@ | ||
| 536 | 536 | const StateContainer& Container() const { |
| 537 | 537 | return container_; |
| 538 | 538 | } |
| 539 | + | |
| 540 | + bool IsChildOf(const Handler state) { | |
| 541 | + for(Handler current = active_; current != top_; current = getSuperState(current)) { | |
| 542 | + if(current == state) { | |
| 543 | + return true; | |
| 544 | + } | |
| 545 | + } | |
| 546 | + | |
| 547 | + return false; | |
| 548 | + } | |
| 539 | 549 | }; |
| 540 | 550 | |
| 541 | 551 | // ====================================================================== |
| @@ -25,6 +25,7 @@ | ||
| 25 | 25 | |
| 26 | 26 | #include "SKKInputModeListener.h" |
| 27 | 27 | #include "SKKInputContext.h" |
| 28 | +#include "SKKStateMachine.h" | |
| 28 | 29 | #include <vector> |
| 29 | 30 | |
| 30 | 31 | class SKKInputSessionParameter; |
| @@ -65,6 +66,8 @@ | ||
| 65 | 66 | |
| 66 | 67 | void Activate(); |
| 67 | 68 | void Deactivate(); |
| 69 | + | |
| 70 | + bool IsChildOf(SKKStateMachine::Handler handler); | |
| 68 | 71 | }; |
| 69 | 72 | |
| 70 | 73 | #endif |
| @@ -70,6 +70,10 @@ | ||
| 70 | 70 | forEachWidget(&SKKWidget::Deactivate); |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | +bool SKKRecursiveEditor::IsChildOf(SKKStateMachine::Handler handler) { | |
| 74 | + return state_.IsChildOf(handler); | |
| 75 | +} | |
| 76 | + | |
| 73 | 77 | // ---------------------------------------------------------------------- |
| 74 | 78 | |
| 75 | 79 | void SKKRecursiveEditor::forEachWidget(WidgetMethod method) { |
| @@ -110,6 +110,10 @@ | ||
| 110 | 110 | top()->Deactivate(); |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | +bool SKKInputSession::IsChildOf(SKKStateMachine::Handler handler) { | |
| 114 | + return top()->IsChildOf(handler); | |
| 115 | +} | |
| 116 | + | |
| 113 | 117 | // ---------------------------------------------------------------------- |
| 114 | 118 | |
| 115 | 119 | void SKKInputSession::beginEvent() { |
| @@ -62,6 +62,8 @@ | ||
| 62 | 62 | |
| 63 | 63 | void Activate(); |
| 64 | 64 | void Deactivate(); |
| 65 | + | |
| 66 | + bool IsChildOf(SKKStateMachine::Handler handler); | |
| 65 | 67 | }; |
| 66 | 68 | |
| 67 | 69 | #endif |