Commit Graph

524 Commits

Author SHA1 Message Date
Pepe Rivera
76fa670f92
Support mouse gestures when active tracing is enabled (#1064)
* Make the pointer follow the mouse

* Only render when necessary

* Move trace rendering to background thread
2020-03-16 11:54:19 -07:00
pi1024e
f527dce88d
Use static_cast instead of C-style cast in UnitConverter.cpp (#1089) 2020-03-16 09:29:58 -07:00
Matt Cooley
41dcbf53ec
Remove CMakeLists for now (#1086) 2020-03-13 12:40:57 -07:00
Scott Freeman
0490d8cd20
Reducing the number of wstring copies when constructing Unit and Category (#936) 2020-03-13 11:06:20 -07:00
Stephanie Anderl
18a1f82035
Graphing Calculator Diagnostics Instrumentation (#1041)
* Add telemetry for keyboard button usage in graphing mode

* Added the diagnostics for EquationAdded and FunctionAnalysis

* Added remaining diagnostics events for graphing calculator

* Fix proj files to include the IsStoreBuild condition. Move the Delayer class to the Calculator/Utils folder

* Ensure the variable textbox has focus before logging diagnostics

* Move maxVariableCount check into the tracelogger class

* Created enums and updated the slider value changed method to remove the variable from the map after the log method is called

* Re-enable hidden lines when the expression is updated

* Fixed extra line in grapher.h and removed the conditional logging for variable count

* Updated logging per PR feedback

* Updated variable logging and fixed issues in the IsEquationLineDisabled binding the EditTextBox control.

* Update per PR feedback

* Added TraceLogging project to contain shared logging logic.

* Updated TraceLogging project and updated tracelogger classes to use the TraceLogging project methods

* Updated VariableLogging to log variable name. And updated per PR comments

* Updated Variables logging to log count changed instead of variable added and fixed issue with variableSliders not being initialized

* Remove outdated tracelogging call caused by rebase

* Updated Delayer class to DispatcherTimerDelayer and fixed some small formatting issues

* Fixed missing Dalyer class name updates

* Removed extra line in traceloger.h
2020-03-12 14:05:47 -07:00
Pepe Rivera
102782df47
Select the equation when the EquationTextBox has focus and during analysis (#1067)
* Select equation on focus

* PR comment
2020-03-12 10:12:01 -07:00
Pepe Rivera
a2794b3705
Support regular textbox context menu functions in the EquationTextBox (#1065)
* Add context menu items back

* Disable if no selection
2020-03-11 18:38:12 -07:00
Stephanie Anderl
59c55a9333
Update the EquationInputArea divider line to update with the app theme (#1084) 2020-03-11 12:19:14 -07:00
Pepe Rivera
ebc57af203
Work around crash by replacing ItemRepeater with ListView (#1058)
* Replace ItemRepeater with ListView

* Allow animations

* undo temp key change

* Remove animation
2020-03-11 09:41:52 -07:00
Pepe Rivera
2caea01c6f
Fix analyze button being enabled with error (#1061) 2020-03-11 09:41:37 -07:00
Eric Wong
d11873caf6
Check for ctrl when navigating to handle AltGr (#1054) 2020-03-10 12:45:36 -07:00
Pepe Rivera
4f8db42855
Add reset button to settings flyout (#1073) 2020-03-09 16:51:39 -07:00
Pepe Rivera
1b1eb4c7e7
Add automation name to graph control (#1032)
* fix bugs

* Update src/Calculator/Resources/en-US/Resources.resw

Co-Authored-By: Rudy Huyn <rudyhuyn@gmail.com>

Co-authored-by: Rudy Huyn <rudyhuyn@gmail.com>
2020-03-06 16:25:50 -08:00
Pepe Rivera
de3a1cdff7
Allow copying graph as image (#1051) 2020-03-04 16:25:50 -08:00
Pepe Rivera
f1d53fba61
Support other locales for decimal and list separators (#1060)
* Support other locales for decimal and list seperators

* PR fixes
2020-03-04 15:15:18 -08:00
pi1024e
880072016f
Push back if the vector is a whimsical (#1062) 2020-03-03 13:47:26 -08:00
Pepe Rivera
814473f4d6
Parse each individual equation (#1059) 2020-03-03 10:53:03 -08:00
Pepe Rivera
dbc3dc5abb
Handle focus for clear and clearentry buttons (#896) 2020-03-03 10:52:48 -08:00
Stephanie Anderl
d7e7f46c99
Update Analysis after variables change (#1056)
* Updated Analyze Equation to set the current value of the variables before analysis

* Updated SetGraphArgs to take in a graph parameter and use it in AnalyzeEquation()
2020-02-28 09:34:16 -08:00
Pepe Rivera
915e0a8220
Pass EquationButtonContentIndex for show equation tooltip (#1057) 2020-02-27 14:28:18 -08:00
Pepe Rivera
f97c084a67
Fix some accessibility bugs (#1047)
* Fix accessibility bugs

* style fix
2020-02-27 11:54:29 -08:00
Pepe Rivera
0c8d6dd83c
Fix usability issues with settings flyout (#1049)
* various settings fixes

* PR fixes
2020-02-26 16:21:38 -08:00
Pepe Rivera
1f56b4946d
Delay loading some unused UI elements (#1042)
* unload

* pr fixes
2020-02-26 13:28:29 -08:00
Rudy Huyn
c0cb14a8e8
Make unit converters stil working when users opened 'Currency' in offline mode (#1022) 2020-02-25 16:34:18 -08:00
Pepe Rivera
dab258f3f0
share image (#1039) 2020-02-24 10:27:22 -08:00
Pepe Rivera
8483b68f12
Fix crash when tabbing through KGF (#1037)
* Check readonly

* Update src/Calculator/Controls/MathRichEditBox.cpp

Co-Authored-By: Rudy Huyn <rudyhuyn@gmail.com>

Co-authored-by: Rudy Huyn <rudyhuyn@gmail.com>
2020-02-14 15:01:43 -08:00
Pepe Rivera
11ab829b1b
Remove unneeded assets (#1038)
* remove fun assets

* PR comments
2020-02-14 14:56:54 -08:00
pi1024e
1ecf431ea3
No need to make an enum variable if it is either one of two possibilities. (#1036)
Visibility variable holding collapsed but then turning into visible is unnecessary when one can return Visibility::Collapsed or Visibility::Visible.
2020-02-14 12:52:58 -08:00
Crystal Edwards
d8fedaffde
Update Standard Mode Calculator UI Tests (#788)
Additional Standard mode UI Tests added.
2020-02-13 14:42:43 -08:00
Pepe Rivera
d196909246
Rename icons to new format and update internals package (#1028)
* Rename asset files

* Add missing files

* Exclude references to assets that don't exist

* Update internals version
2020-02-12 14:35:28 -08:00
Matt Cooley
7da1ab6874
Fix ARM64 build (#1026) 2020-02-11 14:03:43 -08:00
Stephanie Anderl
66e47627c0
Update the CI build to only run p0 UI tests for PRs and all UI tests for rolling CI builds (#1012)
* Added testcasefilter to the UI tests yaml

* Set priorities on UI tests

* Add UI tests for PRs yaml file, conditionally add it to the CI build yaml

* Update priority on functional tests

* Use a conditional task input instead of an additional yaml file to determine if UI tests should be filtered to P0 only

* Add condition:succeeded() back into the run-ui-tests.yaml

* Add back line

Co-authored-by: Matt Cooley <matt@mattcooley.net>
2020-02-07 15:12:31 -08:00
Pepe Rivera
724d12b762
Update mocks (#967) 2020-02-06 15:15:28 -08:00
Scott Freeman
4b9d6e9799
Making Graphing::Color fully constexpr (#1010) 2020-02-06 15:13:38 -08:00
Pepe Rivera
f1482252ef
Allow rendering the graph on a background thread (#1014)
* Render on background thread

* More work

* variable fix

* Add comments
2020-02-04 15:02:42 -08:00
Stephanie Anderl
f4ab94ce1c
Enables analysis on functions with variables (#1021)
* Add Graph Options to enable analysis with variables

* Remove debugging call to GetAllowKeyGraphFeaturesForFunctionsWithParameters()

* Updated the variable analysis logic to use the UpdateGraphOptions method
2020-02-04 13:43:00 -08:00
Pepe Rivera
6ca8f90021
Fix focus bug in graphing mode and other small changes (#938)
* Fix some bugs

* Style fixes from prev PR
2020-01-31 13:45:16 -08:00
Yair Aichenbaum
f2dbaad9b9
Always on top tool tip (#968)
* First implementation of KeyboardAccelerators for OnTop

* Changed shortcut keys to match the specs

* Adjusted ToolTips for compact overlay buttons to show the KeyboardAccelerator
2020-01-28 19:21:19 -08:00
Rudy Huyn
cdaf97e3d7
Update Calculator MDL2 Font(#972) 2020-01-28 10:05:38 -08:00
Stephanie Anderl
c55797c933 Updated unit tests certificate (#971)
* Updated unit tests certificate

* Remove the user macros section since the certificate is already in the global section of the vcxproj
2020-01-27 11:25:33 -08:00
Pepe Rivera
350b8a9024
Fix graphing crash when plotting equations with errors (#958)
* fix crash

* Fix follow up crash

* real fix
2020-01-22 13:39:51 -08:00
Scott Freeman
e77823b97c Fixing CalculatorManagerTests by setting calculator mode so CCalcEngine is set. (#940) 2020-01-17 20:19:17 -08:00
Scott Freeman
1947a25ff8 Making a few improvements in Grapher (#922)
- Removed unused variable
- Using ArrayReference in GetGraphBitmapStream so bytes aren't copied an extra time
2020-01-15 09:36:31 -08:00
Scott Freeman
52de42e7fb Removing Utils::Swap and using std::swap instead (#932) 2020-01-14 15:22:50 -08:00
Pepe Rivera
ca0b3d83e8
fix bugs (#934) 2020-01-14 13:52:57 -08:00
Stephanie Anderl
9fc9c97ee7
Update KGF Back Button Styling (#927)
* Remove rounded corners on the back button

* Updated back button style to align with Equation button.

* Fixed issue where the forground color was white in high contrast and fixed the crash in high contrast
2020-01-13 15:09:45 -08:00
Pepe Rivera
3d1f0e9440
Make variable boxes collapsible on click (#916)
* fix

* PR comments

* fix bug

Co-authored-by: Eric Wong <eriwong@microsoft.com>
2020-01-13 10:08:23 -08:00
Scott Freeman
80e9b82bdc Removing useless code from VisualTree::FindDescendantByName (#925) 2020-01-10 18:06:21 -08:00
Eric Wong
c7c9bf0513
Use path instead of glyph for active tracing (#910)
* Use path instead of glyph
2020-01-10 16:42:55 -08:00
Pepe Rivera
240792a775 Adjustments to ghost textbox (#924)
* adjustments

* delete extra visual states

* Fix hover bug

* Fix a few more bugs

* Fix high contrast crash
2020-01-10 16:41:23 -08:00
Stephanie Anderl
ab2ad8cdee Update Font Sizes for Graph Settings and Key Graph Features to be aligned (#923)
* Updated fonts for Graph Settings to match KGF

* Update graph settings font sizes to be a bigger

* Update KGF fonts to match Graph Settings
2020-01-10 15:56:12 -08:00
Stephanie Anderl
42dcfdc598 Update group policy check to look in HKCU instead of HKLM for allowing graphing mode (#918)
* Update group policy check to look in HKCU instead of HKLM

* Update the dwFlags to use RRF_RT_DWORD.
2020-01-10 15:48:07 -08:00
Matt Cooley
6c524e68e2 Remove LimitedAccessFeatures check for old package name (#921) 2020-01-10 15:46:55 -08:00
Pepe Rivera
397c180d52 Format MathML equations before submission to the GraphControl (#926)
* Format richedit input

* fix spelling error
2020-01-10 15:17:36 -08:00
Pepe Rivera
c8a67eb574 ui changes (#920) 2020-01-09 14:10:48 -08:00
Rudy Huyn
9b9c9fb7ee
Fix function symbols in RtoL (#914) 2020-01-09 13:33:09 -08:00
Scott Freeman
bea4c2429f Inferring std::array template params for featureLevels. (#917) 2020-01-09 12:05:49 -08:00
Scott Freeman
4f05b63ba6 Removing unnecessary string copies when iterating vectors and maps in KeyGraphFeaturesInfo (#915) 2020-01-09 12:05:16 -08:00
Rudy Huyn
6fe229fc15 Update toggle to switch from graph to equations (#912)
* Modify toggle to switch from graph to equations

* support RtoL languages

* fix margin
2020-01-09 09:44:46 -08:00
Pepe Rivera
9329af37f1 Fix crash when setting graph options to very large numbers (#904)
* fix crash

* Fixes

* Update build/pipelines/templates/build-app-internal.yaml

Co-Authored-By: Stephanie Anderl <46726333+sanderl@users.noreply.github.com>

Co-authored-by: Stephanie Anderl <46726333+sanderl@users.noreply.github.com>
2020-01-08 15:06:26 -08:00
Stephanie Anderl
c3414ea9c9
Change Calculator app name back to Calculator and add more margin to the preview tag for graphing mode (#909) 2020-01-08 14:56:44 -08:00
Scott Freeman
8141941208 Removing wstringstream usage since it adds unnecessary overhead (#908) 2020-01-08 14:35:05 -08:00
Rudy Huyn
f9c049a84b Add preview tag to Graphing feature (#907)
* Add preview tag to Graphing

* Fix Graph Settings button in dark mode
2020-01-08 10:34:05 -08:00
Eric Wong (PAX)
09926e4f84 Fix build as a result of merge conflict 2020-01-07 14:26:40 -08:00
Eric Wong (PAX)
aad968ff37 Merge remote-tracking branch 'upstream/master' into mergeFeature 2020-01-07 14:08:18 -08:00
Rudy Huyn
2d177e5160 CalcViewModel code cleaning (#754)
* move KeyboardShortcutManager, ValidationConverter and ViewState to Calculator
* remove dead code listed in #753
* remove Microsoft.UI.Xaml nuget package from CalcViewModel
2020-01-07 13:59:51 -08:00
Eric Wong (PAX)
d087404256 One more unit test fix 2020-01-07 11:46:52 -08:00
Eric Wong (PAX)
967b2a1e86 More Unit tests fixes for when graphing calc is not enabled 2020-01-07 11:27:26 -08:00
Rudy Huyn
712bdb1b7c Code cleaning: Remove all properties/functions not used in CalculationResult (#649) 2020-01-07 11:03:47 -08:00
Eric Wong (PAX)
40cadcda13 Add condition to unit tests to handle cases where graphing calculator is hidden 2020-01-06 16:04:27 -08:00
Rudy Huyn
7f2c300e37 remove the useless code related to the management of the focus in CalculationResult (#700) 2020-01-06 15:21:29 -08:00
Eric Wong (PAX)
78c6c2faff Fix filters from bad merge 2020-01-06 14:43:07 -08:00
Eric Wong (PAX)
d2b2853114 Merge remote-tracking branch 'upstream/feature/GraphingCalculator' into mergeFeature 2020-01-06 14:42:40 -08:00
Rudy Huyn
22f57aab3f Take windows setting into account to Disable/Enable animations (#748) 2020-01-06 14:36:45 -08:00
Scott Freeman
563404fd99 Wstring view overrun (#884) 2020-01-06 13:44:40 -08:00
Scott Freeman
fb18b639e3 Using wstring::find_last_not_of in CalcManager::NumberFormattingUtils::TrimTrailingZeroes (#898) 2020-01-06 13:36:58 -08:00
Pepe Rivera
3592b3d5a2 Update equation colors (#885) 2020-01-06 13:19:04 -08:00
Rudy Huyn
7aaeee934c Prevent the graph to pan/zoom in some cases (#897)
* prevent the graph to change ranges when hide/show an equation or change the trig unit

* make sure to not zoom/pan when we hide the last visible equation
2020-01-06 13:10:53 -08:00
Rudy Huyn
8357f5d5c5
Add Graph Settings (#879) 2020-01-03 15:06:14 -08:00
Eric Wong
234ac8deb3
Change active tracing to use correct glyph instead of dot (#890)
* Change active tracing to use correct glyph instead of dot

* make the pointer on the glyph line up correctly
2020-01-03 12:08:02 -08:00
Pepe Rivera
3b916dcec3 Minor changes to share output (#886)
* Make some tweaks to share output

* adjust strings

* one more tweak

* Remove unneeded span
2020-01-03 10:45:51 -08:00
dovisutu
4846190008 Update build year in Aboutflyout (#895) 2020-01-03 02:21:31 -08:00
dovisutu
9e52256196 Fix prefix 0s after deleting decimal point (#825) 2020-01-03 02:21:12 -08:00
Rudy Huyn
3942662c9d High Contrast support for Graphing Calculator (#878)
* Equation Control - High contrast

* tweak

* Update graph colors when users switch from one high contrast mode to another

* decrease opacity of reveal borders
2019-12-20 10:56:01 -08:00
Eric Wong
13e31799c9 Wire up keyboard in graphing calculator (#863)
* Wire up graphing calculator keyboard with math rich edit control

* CR feedback

* Handle focus bug in flyout
2019-12-19 09:56:03 -08:00
Scott Freeman
a21b4a2d1a Using wstring instead of wstringstream where appropriate (#881) 2019-12-19 01:50:31 -08:00
Rudy Huyn
38da8d7b38 support ctrl+- and + (#882) 2019-12-18 16:06:13 -08:00
Scott Freeman
be4e437f4d Removing call to stripzeroesnum if no number exists. (#877) 2019-12-18 02:02:04 -08:00
Scott Freeman
3c6b5a808e Cleaning up some UnitConverter code and making some of it more efficient. (#875) 2019-12-18 01:19:28 -08:00
Rudy Huyn
dc79ec65f6 Remove EquationTextBox from KeyGraphFeaturesPanel (#833)
* remove EquationBox from KFG

* polish

* improve templates

* fix issue with dark theme and MathRichEditBox
2019-12-16 23:00:06 -08:00
Rudy Huyn
fe599e31f8 Update graph tooltip design and content (#867)
* update graph tooltip

* modify font size
2019-12-16 10:41:35 -08:00
Rudy Huyn
eb2fa6db9b Fix focus issues (#868) 2019-12-16 10:13:34 -08:00
Rudy Huyn
dbddc7bc86 Save and restore the value of EquationInputArea when users scroll (#866)
* Save and restore the value of EquationInputArea when users scroll

* clean up

* replace ->Focus(..) by FocusManager::TryFocus(...)
2019-12-13 16:42:12 -08:00
Rudy Huyn
534139d67d GraphControl: refactoring and optimizations (#831)
* GraphControl cleaning

* replace textbox value after submission

* rebase

* rebase

* rebase

* Add filters

* rebase!

* rebase
2019-12-13 16:33:08 -08:00
Rudy Huyn
da38b5a015 Move variables to the right column (#859)
* move variable editor

* support high contrast and tab navigation

* Remove obsolete resources

* take feedback into account

* Fix focus when virtualization recycle a EquationTextBox

* formatting
2019-12-12 14:52:36 -08:00
Pepe Rivera
2a0637e51c
Fix some UI bugs in graph mode (#862)
* Address issues with error states

* Add various fixes

* Add back initial tooltip

* PR comments
2019-12-12 12:58:28 -08:00
Rudy Huyn
f282605bc6 Redesign graph buttons + replace ActiveTracing button by a ToggleButton (#864)
* redesign graph buttons

* fix high-contrast and focus
2019-12-12 09:38:10 -08:00
Stephanie Anderl
f593c621aa
Update GraphingCalculator Projects to allow official builds (#852)
* renamed MockGraphingImpl to GraphingImpl, updated the nuget.config to include the WindowsApps feed

* Revert nuget.config change

* Updated vcxproj files to output to the same directory regardless of configuration

* Removed outder used GenerateProjectSpecificOutputfolder instead

* revert commenting out the temporary.pfx cert in the calculator.vcxproj file
2019-12-10 16:15:49 -08:00
Scott Freeman
b6f9634e34 Removing unused serialization code in CalculatorManager (#858) 2019-12-10 14:32:00 -08:00
Rudy Huyn
07d012cf6b [Graph] Replace the Add button by a EquationTextBlock (#826)
* init

* Replace the Add equation button by an EquationTextBox

* Move automatically the focus to the next textbox when users press Enter

* nit

* localize the placeholder

* rebase

* rebased and disable remove context menu when the equation is the last one

* replace storyboards by setters in visual states
2019-12-10 11:06:37 -08:00
Scott Freeman
06f43ad373 Refactoring LocalizationSettings (#850) 2019-12-09 19:28:43 -08:00
Pepe Rivera
f1bf3354c4
Fix graph rendering of inequalities (#856)
* fix inequality rendering

* Add comment
2019-12-09 13:30:39 -08:00
Eric Wong
4bb5c39e34
Add context menu to rich edit to allow for keyboard support (#854)
* Add context menu to rich edit to allow for keyboard support

* Update src/Calculator/Controls/EquationTextBox.cpp

Co-Authored-By: Pepe Rivera <joseartrivera@gmail.com>

* Check for focus before triggering submit
2019-12-09 13:18:06 -08:00
Pepe Rivera
c6d3132ad4 Add keyboard UI (#855) 2019-12-09 12:52:10 -08:00
Rudy Huyn
5209084bb0 Fix crash with x86 (#853) 2019-12-06 17:02:46 -08:00
Rudy Huyn
503831895d
Hide or Disable graphing calculator menu item when necessary (#848) 2019-12-06 15:03:07 -08:00
Eric Wong
36327b73de
Adding automation names to buttons (#842)
* Add missing automation names for buttons in graphing calculator

* Add narrator support for tracing features
2019-12-04 11:00:07 -08:00
Eric Wong
133df73d6a Add icons for show, hide and switch to equation mode (#845)
* Add icons for show, hide and switch to equation mode

* use correct icon for small mode

* cleanup of fonts
2019-12-03 16:02:46 -08:00
Matt Cooley
bed51511bb
Update navigation unit tests to account for new graphing calc entry point position (#844) 2019-12-03 14:53:17 -08:00
Pepe Rivera
89c3fc3e4d Add error handling to graph and equations (#827)
* add error handling

* Handle regraphing on certain errors

* Fix high contrast

* Hide KGF button in error state
2019-12-03 14:41:39 -08:00
Matt Cooley
3ca4f4ffa7
Change GraphingCalculator package identity back to WindowsCalculator.Dev (#843) 2019-12-03 13:59:10 -08:00
Matt Cooley
03c2d6514f
Build GraphingCalculator against SDK 18362 (#841) 2019-12-03 13:28:49 -08:00
Rudy Huyn
6911f2b268 Add missing brush 2019-12-02 20:22:21 -08:00
Rudy Huyn
73d6a32add merge with master 2019-12-02 19:36:54 -08:00
Scott Freeman
d0785b2fad Updating HistoryViewModel::SaveHistory so it (#819)
Taking a const ref of history items vector in HistoryViewModel::SaveHistory and iterating over those items using a range for loop.
2019-12-01 09:02:34 -08:00
Scott Freeman
369843dd37 Changing CCalcEngine::s_engineStrings to use string_view for keys (#829) 2019-12-01 08:59:50 -08:00
Rudy Huyn
f395d14764 Hide the Edit Variables button when no variables are available (#823) 2019-11-22 17:49:57 -08:00
Rudy Huyn
25d7a46ac1 Modify how we manage the visibility of the history button (#821)
* Modify how we manage the visibility of the history button

* rename function
2019-11-22 16:22:53 -08:00
Eric Wong
603d672015 Add tooltips to buttons in graphing calculator (#822)
* Add tooltips to buttons in graphing calculator

* Fix break due to bad merge

* CR Feedback
2019-11-22 15:08:23 -08:00
Rudy Huyn
7ef6eaf1b6 Added support for small windows in the graphing calculator (#803)
* Add support of small windows

* remove extra space

* Modify how we manage the tooltip

* Fix merge issues
2019-11-22 10:36:36 -08:00
Scott Freeman
6e2b82c8bf Changing CalculatorManager::GetSavedCommands to return a const ref (#812) 2019-11-21 21:50:26 -08:00
Stephanie Anderl
a33c1a4494
Equation button updates: Enable/Disable on click, button content f1, f2, f3..., visibility icon on hover (#804)
* Added enable/disable line functionality

* Update EquationTextBox to change the opacity of functions have are not visible. Update the function label for the EquationTextBox to increment the label to show f1, f2, f3, etc

* rebase key-graph-features and fix issue where removing an equation box and adding a new one repopulates the previous equation

* Added visibility icon for the equation button hover

* updated EquationButton to be a toggle button to better handle the LineHidden state and other PR comment fixes.

* Updated EquationButton style to use a toggle button and to have placeholder icons for the show/hide states

* Updated equation button after pulling the refactor work into the branch. Fixed the Equation Button in KGF UI

* Fixed Pepe's bugs

* Uncomment temporary.pfx in calculator.vcxproj
2019-11-21 15:07:45 -08:00
Pepe Rivera
288a90e0fe
Refactor Equation to be treated as a model and update Key Graph Features (#791)
* refactor code

* update KGF

* Rename some functions

* Undo comment out of proj file

* Pr feedback
2019-11-20 14:28:32 -08:00
Pepe Rivera
9ee2f8a293
Update styles for buttons on Graph and ListView (#793)
* Fix listview

* extra merge with KGF

* Few tweaks

* Fix scrolling

* PR feedback and other tweaks

* Update src/Calculator/Views/GraphingCalculator/EquationInputArea.xaml

Co-Authored-By: Stephanie Anderl <46726333+sanderl@users.noreply.github.com>
2019-11-20 11:41:21 -08:00
Pepe Rivera
b55659f236 Update share output (#782)
* fix share bugs

* PR feedback

* PR feedback and merge fix

* Fix spacing and use explicit break

* Fix extra space
2019-11-19 15:54:24 -08:00
Scott Freeman
00346cc5a3 Fixing typo in StandardCalculatorViewModel::UpdatecommandsInRecording… (#810)
* Fixing typo in StandardCalculatorViewModel::UpdatecommandsInRecordingMode
Removing unnecessary copy of vector in StandardCalculatorViewModel::UpdateCommandsInRecordingMode
Using range-for in StandardCalculatorViewModel::UpdateCommandsInRecordingMode

* Using static_cast instead of safe_cast for unsigned char to Command
2019-11-19 07:08:05 -08:00
Scott Freeman
582e10faed Updating RemoveUnwantedCharsFromString to be a template (#808) 2019-11-18 19:02:45 -08:00
Rudy Huyn
86307f206f Modify the declaration of some properties of StandardCalculatorViewModel to make them read-only and use macros (#799) 2019-11-14 08:08:03 -08:00
Rudy Huyn
1380c7ed83 Use only NumberBase to represent radix in CalcViewModel (#797) 2019-11-14 07:09:17 -08:00
Rudy Huyn
b9b0e068cd
Convert CopyPasteManager to runtime class (#766)
* Convert CopyPasteManager to runtime class
* merge AssertUtils and Helpers.h
* update onpastemanager
2019-11-13 15:15:13 -08:00
Pepe Rivera
afc1b2146c
Fix focus for EquationTextBox (#787) 2019-11-13 13:10:05 -08:00
Stephanie Anderl
442ed6a861
Key graph features (#704)
* Added IGraphAnalyzer

* Key Graph Features called and getting returned to the client. To do put all strings into the Equation object

* Updated UpdateKeyGraphFeatures to add function analysis data to all properties in Equation object

* Update KGF when variables are updated

* Key graph features ui started

* Added MathRichEditBox and started hooking up key graph features to the UI

* Updated EquationViewModel to include parity and periodicity

* Updated key graph features to update the EquationViewModel

* updated key graph features to display more values

* Key graph features populating uing MathRichEdit mode

* moved KeyGraphFeatures control to GraphingCalculator.xaml

* Use MathML formatting instead of MathRichEdit for strings passed back from the engine

* cleaned up project targeting and equation.h comments

* Updated equation edit box to populate for KeyGraphFeatures

* Fixed vcxproj files to have the correct targeting and certificates. KGF Title strings moved to x:Uid instead of the code behind

* Updated per PR feedback

* Update MathRichEditBox to detect if the string is a mathml string and use the appropriate set method to set the text

* fixed the issue where parity, periodicity and monotonicity could be set with an old value if the next one is empty

* KGF control UI adjustments and error handling

* Error control updates

* Error handling added when analysis fails

* fixed alignment on rich edit boxes

* Add monotonicity direction into the mathml string and only have 1 richeditbox

* Set hover state on KGF EquationEditBox to change button opacity and fixed spacing in Monotonicity RichEditBox

* remove sideload package certificate info VS added

* updated logic for setting error strings to be in the viewmodel

* Updated KeyGraphFeatures to populate dynamically using a ListView and TemplateSelector

* Update periodicity to not show if it isn't supported

* Fixed issue where y-intercept was using the x-intercept value

* Remove ItemsControl ItemsContainerStyle

* Updated per pr feedback. Fixed bug where analysis error would not reset

* Update MathRichEdit box to remove selection when focus is lost

* Updated mathrichedit to get LAF access for Dev, Release and Graphing projects

* Remove OnLostFocus in MathRichEdit, Change KGF ItemsControl back to ListView

* Clean up styles for KGF and ensure the match the comps

* Moved formatoptions logic to the Grapher constructor and reverted LineColor.Text resource that was mistakenly taken out

* Add copyright header to KGF Files

* fixed issue where asymptote values were not populating

* Disable KGF button when there is no equation. Fixed issue where equation populated in a new equationtextbox after the previous one was deleted

* Removed formatoptions testing lines used for debugging
2019-11-12 13:46:11 -08:00
Rudy Huyn
61c2d07a89 force a call to m_expressionContainer->Measure in UpdateScrollButtons (#750) 2019-11-11 16:23:30 -08:00
marcomontoya
626bdf0de5 Added Copyright headers to .cpp and .h files (#790) 2019-11-11 16:18:13 -08:00
Scott Freeman
01299a92cd Updating code to append a wchar_t instead of const wchar_t (#778) 2019-11-11 09:23:34 -08:00
Rudy Huyn
4c81ed83c7
use Command instead of int to represent a command id (#781) 2019-11-06 15:45:31 -08:00
Rudy Huyn
5df3016df6 Fully separate Calculator and CalcManager (#752) 2019-11-06 15:31:57 -08:00
Scott Freeman
be68e72a9a Updating StandardCalculatorViewModel to use algorithms (#776)
- Using default wstring constructor instead of taking empty string literal
- Updated to for range-for where appropriate
- Used std::find for IsOp* code that was doing it by hand
- Used std::count to calculate LengthWithoutPadding
- Used existing wstring constructor to pad a string
2019-11-06 12:07:23 -08:00
Rudy Huyn
caa1c6bb9d Convert DateCalculatorViewModel to runtime class (#769) 2019-11-06 06:58:34 -08:00
Rudy Huyn
577aafb3f4 Migrate TraceLogger to runtime class (#772) 2019-11-05 18:59:24 -08:00
Rudy Huyn
8ba7234550
Fix the right arrow button of CalculationResult not disappearing in some cases (#736) 2019-11-05 16:51:36 -08:00
Rudy Huyn
613aaebf6f
fix DateDifference::operator== (#762) 2019-11-05 16:51:03 -08:00
Pepe Rivera
433d54d571
Fix crash and high contrast (#773) 2019-11-05 15:26:46 -08:00
Rudy Huyn
e38e911bfa Modify how Calculator manages the visibility of the History button (#712)
* Modify how Calculator manages the History button + code cleaning

* remove extra include
2019-11-05 15:04:28 -08:00
Rudy Huyn
136ade6aa8
Replace wstring used in public methods by Platform::String in CalcViewModel (#768) 2019-11-05 13:57:48 -08:00
Rudy Huyn
049d3f4c6c Revert "Replace wstring used in public methods by Platform::String in CalcViewModel (#758)" (#767)
This reverts commit 93f1f784bb.
2019-11-04 17:54:12 -08:00
Rudy Huyn
93f1f784bb
Replace wstring used in public methods by Platform::String in CalcViewModel (#758) 2019-11-04 17:16:16 -08:00
Matt Cooley
44e1984f6b
Enable code analysis in the CalcManager project (#689) 2019-11-04 07:41:13 -08:00
Yair Aichenbaum
62c45d9d1e Add KeyboardAccelerators for AlwaysOnTop (#734) 2019-11-01 17:24:27 -07:00
Matt Cooley
b36441ba5f Remove AsyncHelper, Resource and Module.cpp from CalculatorUnitTests project. (#746) 2019-11-01 14:08:26 -07:00
Scott Freeman
5e46ceabc8 Making string concatenations more efficent (#760)
by appending wchar_ts instead of  wstrings
2019-10-31 11:44:25 -07:00
Scott Freeman
6366e0c535 Replacing CalculatorVector usage with std::vector (#756)
* Replacing CalculatorVector usage with std::vector

Assumptions made here are that memory allocations
are not recoverable.  If it can be proved that an index
will be in range, then the indexing operation is used.
If not (without manual checks) the std::vector::at function
is used to throw an exception in case of a programmer bug.

* Changes based on PR feedback

Using auto& in CalculatorCollector::UpdateHistoryExpression
so the token.first value is properly updated.

Using range for loop to GenerateExpressions.

Setting isEditable directly to the result of boolean expression.

Using token.second directly instead of creating a
separate tokenCommandIndex variable.

* Fixing issue with generating expressions strings.

A space should not be added before the first item.
2019-10-30 10:55:13 -07:00
Rudy Huyn
25cdca991c make ControlSizeTrigger works even if the control is already loaded (#738) 2019-10-29 15:21:32 -07:00
Rudy Huyn
bc2d2d4e9d use short date (#739) 2019-10-29 11:14:11 -07:00
Matt Cooley
afa144cd16
Remove unnecessary dependencies from UITestFramework project (#745)
The CalculatorUITestFramework project does not need Microsoft.NET.Test.Sdk or MSTest.TestAdapter. These dependencies are needed only in the project which produces the actual test assembly (in our case, the CalculatorUITests project).

Removing these resolves a build warning, since the test adapter package does not target .NET Standard.
2019-10-28 10:54:26 -07:00
Rudy Huyn
8db4c2b25a Allow negative numbers without digits before the decimal point (#743) 2019-10-28 10:17:02 -07:00
Matt Cooley
d5046e1ffc
Update localized strings 2019-10-21 (#724) 2019-10-21 14:47:32 -07:00
Scott Freeman
f6a061c486 Updating CalculatorHistory to use a default destructor. (#723)
Its memory will be cleaned up by std::vector's destructor.
2019-10-21 12:47:09 -07:00
Mateusz
bfa5f81ef6 Do not hide expression when user presses Enter or = (#695)
* #653 Do not hide expression on EQU operation

* #653 Clear expression, when user makes an action

* #653 Fixed UI tests

* #653 Review fixes
2019-10-18 13:40:13 -07:00
Rudy Huyn
b97046ad67 Allow users to paste expressions with ^or % (#682) 2019-10-18 11:07:51 -07:00
Rudy Huyn
00064fba11 Modify how the Calculator control manages the focus (#686) 2019-10-17 14:18:35 -07:00
Rudy Huyn
1a9edff26b add fallback colors to RevealBrush missing them (#685) 2019-10-17 14:10:26 -07:00
Rudy Huyn
05eda81ba2 Add E-notation support to CopyPasteManager for standard mode (#687)
* Add scientific notation support to CopyPasteManager for standard mode

* improve c_signedDecFloat to ignore '.'

* fix c_signedDecFloat
2019-10-14 10:16:31 -07:00
James Inkster
033f7757e2 fix 505 (#710)
* fix 505

* Update CalcErr.h

Updated to have line of code changed to be right below the comment referring to line of code. (Line 45-44)
2019-10-13 09:56:19 -07:00
David Shoemaker
65c304682d Active tracing (#702)
* Plumebd with data transfer

* Getting mainpage to talk to getbitmap.  moving share callbacks from mainpage to graphingcalculator

* Trying to get bitmap from renderer.

* work

* Share worked

* cleanups

* Cleanups progressing

* Share working, need loc for title string and user notification incase of a failure.  Then add the equations key.

* More cleanup, now using share icon image and resources for strings.  Still need to do the graph equation key.

* Change share to html based start.

* Key working, with UL but going to try changing to table.

* Fix a html formating error, generating a new UL for each equation.

* Switched over to a table for equation key and have color block formating

* Updates from PR feedback, using Graphing::IBitmap abstraction.

* Update src/Calculator/Views/GraphingCalculator/GraphingCalculator.xaml.h

Fixed

Co-Authored-By: Pepe Rivera <joseartrivera@gmail.com>

* PR Updates.

* Add variables to the graph key.

* eod

* Passive graph value tracing working.

* Basic active tracing cursor working.

* Move active tracing from graphingcalculator to grapher to save some hops.
Also block tracking of the active tracing key's when in the EquationTextBox.

* Active tracing working, need to put button on screen for activation.

* Added active tracing control button (placeholder image)

* Eod

* Popup trace value now tracks the highlighted point.

* Popup skined

* PR Updates.

* Update certificate thumbnail so VS2019 doesn't have a build error.

* PR comments in process.

* PR Updates

* PR Updates, change tracing value to use tooltip static resource so we automatically change depending on system values.  And changed text formatting of the value to be generic (x,y) value.

* PR updates, changed how we detect who has focus so we don't eat keys when not in active tracing.

* Additional filtering for the Key Up/Down in the grapher.

* Fix bug where active tracing would turn back on after clicking button to turn it off.
2019-10-10 13:28:34 -07:00
svsrk praveen
51c4845f88 Fix the focus when right-clicking CalculationResult's TextBlock (#698)
* Fixed issue with focus when right-clicking result

* Using dynamic_cast in place of safe_cast
2019-10-09 07:39:55 -07:00
Stephanie Anderl
16e8e2d89e
Added new dev app icons and update version to 1909 (#705)
* Added new dev app icons

* Removed VS added page include in calculator.vcsxproj.filters and increased the internal version number and the app version number
2019-10-08 10:44:13 -07:00
David Shoemaker
18f80a89db Passive & Active tracing (#638)
* Plumebd with data transfer

* Getting mainpage to talk to getbitmap.  moving share callbacks from mainpage to graphingcalculator

* Trying to get bitmap from renderer.

* work

* Share worked

* cleanups

* Cleanups progressing

* Share working, need loc for title string and user notification incase of a failure.  Then add the equations key.

* More cleanup, now using share icon image and resources for strings.  Still need to do the graph equation key.

* Change share to html based start.

* Key working, with UL but going to try changing to table.

* Fix a html formating error, generating a new UL for each equation.

* Switched over to a table for equation key and have color block formating

* Updates from PR feedback, using Graphing::IBitmap abstraction.

* Update src/Calculator/Views/GraphingCalculator/GraphingCalculator.xaml.h

Fixed

Co-Authored-By: Pepe Rivera <joseartrivera@gmail.com>

* PR Updates.

* Add variables to the graph key.

* eod

* Passive graph value tracing working.

* Basic active tracing cursor working.

* Move active tracing from graphingcalculator to grapher to save some hops.
Also block tracking of the active tracing key's when in the EquationTextBox.

* Active tracing working, need to put button on screen for activation.

* Added active tracing control button (placeholder image)

* Eod

* Popup trace value now tracks the highlighted point.

* Popup skined

* PR Updates.

* Update certificate thumbnail so VS2019 doesn't have a build error.

* PR comments in process.

* PR Updates

* PR Updates, change tracing value to use tooltip static resource so we automatically change depending on system values.  And changed text formatting of the value to be generic (x,y) value.

* PR updates, changed how we detect who has focus so we don't eat keys when not in active tracing.

* Additional filtering for the Key Up/Down in the grapher.
2019-10-04 12:24:43 -07:00
Pepe Rivera
55074c2312
Update Calculator keyboard for greater consistency and extensibility (#688) 2019-10-03 15:56:44 -07:00
Pepe Rivera
9cb0932eaa
Update Calc Engine for new functions needed for keyboard refresh (#662)
* Update Calc Engine to Support New Functionality

* Address PR comments

* Address PR comments
2019-09-30 14:04:20 -07:00
Matt Cooley
d9bf57ff99
Code cleanup: simplify NarratorNotifier (#646)
Now that the RaiseNotificationEvent API is available on all platforms where the Calculator app runs, we can remove the factory classes which switched between RaiseNotificationEvent and an alternative implementation based on live regions.
2019-09-29 16:42:37 -07:00
Rudy Huyn
5c0785743c Modify how narrator names the first and last bits of a number in Bit Flip (#675)
* Replace 0th by "least significant bit"

* Add support of Most Significant Bit

* Fix issue with narrator not updating text of some bits
2019-09-27 10:39:50 -07:00
David Shoemaker
9a099acb3a Updated signature which VS 2019 is actually enforcing (#681) 2019-09-26 16:28:05 -07:00
Zach Herman
f6f864c88c Do not collapse Update Rates button in a transient state (#619)
* Do not collapse Update Rates button in a transient state

* Address PR feedback and add animation to everything affected by IsCurrencyLoadingVisible
2019-09-26 11:38:40 -07:00
Pepe Rivera
7864fe6413
Update color picker (#668) 2019-09-25 10:48:56 -07:00
Pepe Rivera
b2dd55a64f Switch to RichEdit math mode in EquationTextBox (#672)
* Use RichEdit Math Mode

* Add comment

Co-Authored-By: Stephanie Anderl <46726333+sanderl@users.noreply.github.com>
2019-09-23 11:51:08 -07:00
Rudy Huyn
80912a33d0 Prevent the history panel to be displayed when using the Programmer mode (#676)
Be sure we don't display the panel when the current view is the Programmer mode.

Fixes #665
2019-09-20 16:29:45 -07:00
Pepe Rivera
c4fe87a118
Disable ProgrammerRadixOperators when not visible 2019-09-20 15:04:28 -07:00
Zach Herman
d68e505b04 Add copy button to history menu item context menu (#628)
Adds a Copy button to the context menu for history menu items located above the delete button in the menu. Copy only copies the result and not the entire content of the history item (equation and result).

Fixes #429
2019-09-19 16:41:50 -07:00
Rudy Huyn
f0b51ae1ee Fix scroll buttons in CalculationResult (#652)
* Fix scroll buttons of CalculationResult

* Unregister click events

* Add comment
2019-09-09 09:57:30 -07:00
Pepe Rivera
41fbcfe9c5
Merge master into feature/GraphingCalculator branch (#660) 2019-09-05 15:01:12 -07:00
Rudy Huyn
c877b0a2e9 Replace AppChromeAcrylicHostBackdropMediumLowBrush from OverflowTextBlock + improvements (#647)
* replace acrylic brush by margin/padding

* Modify how the control manages the focus

* remove comment

* Prevent deadlock
2019-09-05 11:01:58 -07:00
Stephanie Anderl
98908c627f
Updated Win UI to 2.2 for Calculator and CalcViewModel projects (#658) 2019-09-05 10:23:35 -07:00
Pepe Rivera
6b8a83a2f9
Remove ProgModeRadixChange unload (#641) 2019-09-04 14:20:58 -07:00
Rudy Huyn
41e2e97591 Optimize BitFlipPanel to suppress flicker when users switch between bit lengths (#640)
* Optimize BitFlipPanel

* remove namespace in cpp file

* improve localization + add tests

* add helper to compare ivector

* Modify how the control manages AutomationProperties::Name
2019-08-26 09:31:13 -07:00
Rudy Huyn
eb24c085bc General improvement of the title bar for Always-On-Top. (#634)
* Make sure TitleBar takes into account the AOT mode change

* remove namespaces in cpp files

* code linting

* use macro for IsAlwaysOnTop and make IsAlwaysOnTop/DisplayNormalAlwaysOnTopOption read-only

* Fix FontWeight
2019-08-23 13:42:00 -07:00
Matt Cooley
5b2d976e64 Remove colorize and fullcolor app list icons (#644) 2019-08-21 15:40:01 -07:00
Rudy Huyn
71b010483b Remove unused expression item template selector (#623)
* remove unused AlwaysOnTopExpressionItemTemplateSelector

* replace incorrect ThemeResource by StaticResource references
2019-08-20 12:55:49 -07:00
Rudy Huyn
5966503703 Fix regression bug with application title no longer grayed out. (#632)
Move back the VisualStateManager node to the root XAML element to fix visual states of the titlebar.

### How changes were validated:
- Manually

Fixes #631
2019-08-19 16:34:49 -07:00
Wei (Waley) Zhang
1c9755d38a Adds zoom buttons to graph controls (#637) 2019-08-16 16:11:43 -07:00
David Shoemaker
c1efa3d3e3 Adding share functionality to Graphing Calculator (#601)
* Plumebd with data transfer

* Getting mainpage to talk to getbitmap.  moving share callbacks from mainpage to graphingcalculator

* Trying to get bitmap from renderer.

* work

* Share worked

* cleanups

* Cleanups progressing

* Share working, need loc for title string and user notification incase of a failure.  Then add the equations key.

* More cleanup, now using share icon image and resources for strings.  Still need to do the graph equation key.

* Change share to html based start.

* Key working, with UL but going to try changing to table.

* Fix a html formating error, generating a new UL for each equation.

* Switched over to a table for equation key and have color block formating

* Updates from PR feedback, using Graphing::IBitmap abstraction.

* Update src/Calculator/Views/GraphingCalculator/GraphingCalculator.xaml.h

Fixed

Co-Authored-By: Pepe Rivera <joseartrivera@gmail.com>

* PR Updates.

* Add variables to the graph key.

* PR Updates.
2019-08-13 12:57:13 -07:00
Matt Cooley
24d997dd00
Update localized strings 2019-08-08 (#636) 2019-08-08 18:37:05 -07:00
Wei (Waley) Zhang
672e88187b Fixes Always-on-Top crashes (#626) 2019-08-06 19:52:19 -07:00
Howard Wolosky
c994e49279
Prevent Dev title from showing up on Store builds (#627)
Commit 0722781fc updated the app to use `DevAppName` for the
app's window title when it was a non-official build, based on
the state of `IsStoreBuild`.

Unfortunately, `IsStoreBuild` is a _project_ level variable defined in
[build-app-internal.yaml](0722781fc6/build/pipelines/templates/build-app-internal.yaml (L36)),
but not a _compile-time_ defined value.

To solve this, we are now defining `IS_STORE_BUILD` in
`Calculator.vcxproj` when `IsStoreBuild='True'`, the same way that
we set `SEND_DIAGNOSTICS` for official builds, and we'll change the
window title based on that new `#define`.

Using this new `#define` can lead us down a slippery slope.  We need to
limit the amount of divergent code that we have between dev/official
builds.  This should be hopefully one of very few instances where
this value is ever used.
2019-08-06 16:32:13 -07:00
Rudy Huyn
a7d668e568 Fix the thumbprint of the certificate in the vcxproj file (#617) 2019-08-03 14:22:11 -07:00
Rudy Huyn
cc8491a3d7 Currency rate: always display minimum 4 significant decimals or 2 trailing zeros if the number is integer (#256)
* Currency rate: Compute how many decimals we need to display two meaningful digits at minimum

* formatting

* nit

* Increase the number of meaningfull digits (2->4)

* Revert "Increase the number of meaningfull digits (2->4)"

This reverts commit 9ad93e0d591a386e3e229e09b39a58158d544069.

* Rename constants

* modify FORMATTER_RATE_* values

* format CurrencyConverterUnitTests.cpp
2019-08-01 15:07:27 -07:00
Wei (Waley) Zhang
796d171960 Always-on-Top mode implemented (#579) 2019-07-30 17:53:39 -07:00
Seulgi Kim
af8322617f Restore user preferences (#456)
### Description of the changes:
**1) Do not set units to default values if they already have valid values** 
This fixes the actual issue. `UnitConverter::InitializeSelectedUnits()` ( this function resets all units to their default units if available for the current category ) gets called after `UnitConverterViewModel::RestoreUserPreferences()` ( this function restores user preferences ).
So Calculator has been restoring saved values, and then overriding the restored values with default values.
I modified `InitializeSelectedUnits()` so that we only initialize units only when they are not already set to valid units for the current category.

**2) Removed `m_isFirstTime`** 
I noticed that we are calling `RestoreUserPreferences()`  twice when Calculator starts up, and the function is restoring the same value both times

The below happens when Calculator starts up
1) On startup, in `UnitConverterViewModel::InitializeView()`, `RestoreUserPreferences()` is called.
2) `RestoreUserPreferences()` in turn triggers `OnUnitChanged()`
3) During the first call to `OnUnitChanged()`, m_IsFirstTime is `True`, so we call `RestoreUserPreferences()` again while also setting `m_IsFirstTime` to `False`. 
4) `RestoreUserPreference()` again triggers `OnUnitChanged()`
5) During the second call to `OnUnitChanged()`,  m_IsFirstTime is `False`, so we call `SaveUserPreferences()`

I think we should only call `SaveUserPreferences()` inside `OnUnitChanged()` since we already restored user preferences during view initialization. I can't really think of a reason to restore units after view has been initialized. This led me to just delete `m_isFirstTime`.


### How changes were validated:
Manually tested that units and the current category are properly selected when you quit and start Calculator.

![GifMaker_20190414182150911](https://user-images.githubusercontent.com/3166423/56102706-88f73400-5ee3-11e9-8bbf-7a0c8e051a5c.gif)

![GifMaker_20190414183403644](https://user-images.githubusercontent.com/3166423/56102763-f0ad7f00-5ee3-11e9-99ef-3b932f587393.gif)

## Fixes #445.
2019-07-29 09:39:19 -07:00
Stephanie Anderl
8106691d7c
Fixed issue where UI Responsive events were not fired (#603)
* Fixed the WindowIdLog so that it is updated when a new WindowCreated event is fired

* Updated the windowidlog check in LogWindowCreated to use IsWindowIdInLog
2019-07-26 11:51:01 -07:00
Michał Janiszewski
60c5c39ee5 Fix #563: Odd dependency cycle (#570)
There is an odd dependency in CalcEngine.

`CalculatorManager` inherits `ICalcDisplay` and implements a set of virtual calls it exposes, in particular `SetPrimaryDisplay`.
2517854836/src/CalcManager/Header%20Files/ICalcDisplay.h (L13)

When setting a mode in `CalculatorManager`, e.g. 2517854836/src/CalcManager/CalculatorManager.cpp (L208)
`this` (here: an instance of `CalculatorManager`) gets passed as an argument to the newly created `CCalcEngine` as `ICalcDisplay` pointer and the engine is stored as `unique_ptr` member field of `CalculatorManager`.

In the destructor of `CalculatorManager`, a single function is called, `MemorizedNumberClearAll` which then invokes `ProcessCommand(IDC_MCLEAR)` on current engine, gets passed on to `CCalcEngine::ProcessCommandWorker`, to `DisplayNum`, to `CCalcEngine::SetPrimaryDisplay` and finally to `m_pCalcDisplay->SetPrimaryDisplay`, but here `m_pCalcDisplay` _was_ the instance of `CalculatorManager` that just got its destructor called.

2517854836/src/CalcManager/CalculatorManager.cpp (L46)
2517854836/src/CalcManager/CalculatorManager.cpp (L475)
2517854836/src/CalcManager/CEngine/scicomm.cpp (L87)
2517854836/src/CalcManager/CEngine/scicomm.cpp (L133)
2517854836/src/CalcManager/CEngine/scidisp.cpp (L124)
2517854836/src/CalcManager/CEngine/scicomm.cpp (L837)

It will likely differ by implementation on how exactly, but the [standard suggests](http://eel.is/c++draft/class.cdtor#4) that will invoke the pure virtual `ICalcDisplay::SetPrimaryDisplay`. In case of GCC I believe the vtable is already destroyed by the time you enter dtor's body.

There appears to be no reason to call `MemorizedNumberClearAll` in `CalculatorManager::~CalculatorManager()` because the calc manager and all its engines are going down anyway.  Therefore, removing the call (and thus, the destructor which would then be empty).


Fixes #563: Odd dependency cycle
2019-07-25 23:24:12 -07:00