Add Automation Names to the GraphNumPad (#1145)
* Turn off keyboard shortcuts when in graphing mode * Added automation names to the graphnumpad, added any missing ones to the resources.resw file * Remove HonorShortcuts call in the EquationInputArea, update Equal button automation name to use the existing one * conditionally set the HonorShortcuts when the nav menu is closed * added disable shortcuts to override HonorShortcuts when it is set
This commit is contained in:
@@ -56,6 +56,8 @@ static map<int, Flyout ^> s_AboutFlyout;
|
||||
|
||||
static reader_writer_lock s_keyboardShortcutMapLock;
|
||||
|
||||
static bool s_shortcutsDisabled = false;
|
||||
|
||||
namespace CalculatorApp
|
||||
{
|
||||
namespace Common
|
||||
@@ -735,6 +737,11 @@ void KeyboardShortcutManager::UpdateDropDownState(Flyout ^ aboutPageFlyout)
|
||||
|
||||
void KeyboardShortcutManager::HonorShortcuts(bool allow)
|
||||
{
|
||||
if (s_shortcutsDisabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Writer lock for the static maps
|
||||
reader_writer_lock::scoped_lock lock(s_keyboardShortcutMapLock);
|
||||
|
||||
@@ -828,3 +835,9 @@ void KeyboardShortcutManager::OnWindowClosed(int viewId)
|
||||
s_fHonorShortcuts.erase(viewId);
|
||||
s_AboutFlyout.erase(viewId);
|
||||
}
|
||||
|
||||
void KeyboardShortcutManager::DisableShortcuts(bool disable)
|
||||
{
|
||||
s_shortcutsDisabled = disable;
|
||||
HonorShortcuts(!disable);
|
||||
}
|
||||
|
@@ -43,6 +43,7 @@ namespace CalculatorApp
|
||||
static void IgnoreEscape(bool onlyOnce);
|
||||
static void HonorEscape();
|
||||
static void HonorShortcuts(bool allow);
|
||||
static void DisableShortcuts(bool disable);
|
||||
static void UpdateDropDownState(bool);
|
||||
static void ShiftButtonChecked(bool checked);
|
||||
static void UpdateDropDownState(Windows::UI::Xaml::Controls::Flyout ^ aboutPageFlyout);
|
||||
|
Reference in New Issue
Block a user