// http://www.apache.org/licenses/LICENSE-2.0/
//
// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an ”AS IS” BASIS,
+// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
__pEditTimePresenter->Draw();
- if(unlikely((_AccessibilityManager::IsActivated())))
+ if (unlikely((_AccessibilityManager::IsActivated())))
{
UpdateAccessibilityElement();
}
bool
_EditTime::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
{
- SetFocused(true);
-
FloatRectangle absoluteBounds = GetAbsoluteBoundsF();
if (absoluteBounds.y != __absoluteBounds.y || absoluteBounds.height != __absoluteBounds.height)
{
return;
}
+void
+_EditTime::OnDrawFocus(void)
+{
+ __pEditTimePresenter->SetFocusState(true);
+ __pEditTimePresenter->SetFocusedElement();
+ __pEditTimePresenter->DrawFocus();
+ return;
+}
+
+bool
+_EditTime::OnKeyPressed(const _Control &source, const _KeyInfo &keyInfo)
+{
+ _KeyCode keyCode = keyInfo.GetKeyCode();
+
+ switch (keyCode)
+ {
+ case _KEY_ENTER:
+ {
+ FloatRectangle absoluteBounds = GetAbsoluteBoundsF();
+
+ if (absoluteBounds.y != __absoluteBounds.y || absoluteBounds.height != __absoluteBounds.height)
+ {
+ CalculateDateTimeBarPosition();
+ }
+ break;
+ }
+ default:
+ break;
+
+ }
+
+ return __pEditTimePresenter->OnKeyPressed(source, keyInfo);
+}
+
+bool
+_EditTime::OnFocusGained(const _Control &source)
+{
+ __pEditTimePresenter->SetFocusedElement();
+ return true;
+}
+
+bool
+_EditTime::OnFocusLost(const _Control &source)
+{
+ return __pEditTimePresenter->OnFocusLost(source);
+}
+
+void
+_EditTime::OnFocusModeStateChanged(void)
+{
+ __pEditTimePresenter->OnFocusModeStateChanged();
+ return;
+}
+
FloatRectangle
_EditTime::GetParentWindowBounds(void) const
{
__pAccessibilityAmPmElement->Activate(true);
}
- String hintAmPmText(L"Double tap to change to ");
+ String hintAmPmText(L"Double tap to edit");
String amString;
String pmString;
if (__pEditTimePresenter->GetAmEnabled() == true)
{
__pAccessibilityAmPmElement->SetLabel(amString);
- hintAmPmText.Append(pmString.GetPointer());
string.Append(amString.GetPointer());
}
else
{
__pAccessibilityAmPmElement->SetLabel(pmString);
- hintAmPmText.Append(amString.GetPointer());
string.Append(pmString.GetPointer());
}
}
bool
-_EditTime::OnAccessibilityReadedElement(const _AccessibilityContainer& control, const _AccessibilityElement& element)
+_EditTime::OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element)
{
return false;
}