This component handles commands from the File menu, except for Exit. It also handles the DocumentTitleChanged event.
| 13 | // This component handles commands from the File menu, except for Exit. |
| 14 | // It also handles the DocumentTitleChanged event. |
| 15 | class FileComponent : public ComponentBase |
| 16 | { |
| 17 | public: |
| 18 | FileComponent(AppWindow* appWindow); |
| 19 | |
| 20 | bool HandleWindowMessage( |
| 21 | HWND hWnd, |
| 22 | UINT message, |
| 23 | WPARAM wParam, |
| 24 | LPARAM lParam, |
| 25 | LRESULT* result) override; |
| 26 | |
| 27 | void SaveScreenshot(); |
| 28 | void PrintToPdf(bool enableLandscape); |
| 29 | bool IsPrintToPdfInProgress(); |
| 30 | |
| 31 | ~FileComponent() override; |
| 32 | |
| 33 | private: |
| 34 | OPENFILENAME CreateOpenFileName(LPWSTR defaultName, LPCWSTR filter); |
| 35 | |
| 36 | AppWindow* m_appWindow = nullptr; |
| 37 | wil::com_ptr<ICoreWebView2> m_webView; |
| 38 | bool m_printToPdfInProgress = false; |
| 39 | bool m_enableLandscape = false; |
| 40 | |
| 41 | EventRegistrationToken m_documentTitleChangedToken = {}; |
| 42 | }; |
| 43 |
nothing calls this directly
no outgoing calls
no test coverage detected