Skip to content
Snippets Groups Projects
Select Git revision
  • 4e438da8f264d516517f3ac9d8283318a38284c0
  • master default protected
  • release/201811
  • release/201812
  • release/201901
  • release/201902
  • release/201903
  • release/201904
  • release/201905
  • release/201906
  • release/201908
  • release/201912
  • release/202001
  • release/202005
  • release/windows-test/201910
  • release/201808
  • wip/smartlist_refacto
  • wip/patches_poly_2017/JimmyHamel/MathieuGirouxHuppe
18 results

MainPage.xaml.h

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    MainPage.xaml.h 4.32 KiB
    /**************************************************************************
    * Copyright (C) 2016 by Savoir-faire Linux                                *
    * Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com>              *
    * Author: Traczyk Andreas <andreas.traczyk@savoirfairelinux.com>          *
    *                                                                         *
    * This program is free software; you can redistribute it and/or modify    *
    * it under the terms of the GNU General Public License as published by    *
    * the Free Software Foundation; either version 3 of the License, or       *
    * (at your option) any later version.                                     *
    *                                                                         *
    * This program is distributed in the hope that it will be useful,         *
    * but WITHOUT ANY WARRANTY; without even the implied warranty of          *
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           *
    * GNU General Public License for more details.                            *
    *                                                                         *
    * You should have received a copy of the GNU General Public License       *
    * along with this program.  If not, see <http://www.gnu.org/licenses/>.   *
    **************************************************************************/
    #pragma once
    
    #include "MainPage.g.h"
    #include "SmartPanelItem.h"
    
    using namespace Windows::UI::Xaml::Input;
    using namespace Windows::Foundation;
    using namespace Windows::ApplicationModel::ExtendedExecution;
    using namespace Windows::UI::Xaml::Controls;
    using namespace Windows::Networking::Connectivity;
    
    namespace RingClientUWP
    {
    
    enum class FrameOpen {
        WELCOME,
        MESSAGE,
        VIDEO
    };
    
    public ref class MainPage sealed
    {
    public:
        MainPage();
    
        void showLoadingOverlay(bool load, bool modal);
        void hideLoadingOverlay();
        void OnsetOverlayStatusText(String^ statusText, String^ color);
        void focusOnMessagingTextbox();
        void updateMessageTextPage(SmartPanelItem^ item);
    
        property bool isLoading;
        property bool isModal;
        property bool isSmartPanelOpen;
    
    internal:
        property FrameOpen currentFrame {
            FrameOpen get() {
                return _currentFrame;
            }
        };
    
    protected:
        virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override;
        virtual void OnKeyDown(KeyRoutedEventArgs^ e) override;
    
        void OnResize(Platform::Object^ sender, Windows::UI::Core::WindowSizeChangedEventArgs^ e);
    
    private:
        // Visibility and suspension
        void Application_Suspending(Object^, Windows::ApplicationModel::SuspendingEventArgs^ e);
        EventRegistrationToken applicationSuspendingEventToken;
        void Application_VisibilityChanged(Object^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ e);
        EventRegistrationToken visibilityChangedEventToken;
        void Application_Resuming(Object^ sender, Object^ args);
        EventRegistrationToken applicationResumingEventToken;
    
        // Multi-monitor, DPI, scale factor change, and window resize detection
        void DisplayProperties_DpiChanged(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args);
        EventRegistrationToken dpiChangedtoken;
        Rect bounds;
        FrameOpen _currentFrame;
        bool editionMode = false;
    
        void _toggleSmartBoxButton__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
        void setSmartPanelState(bool open);
        void showFrame(Windows::UI::Xaml::Controls::Frame^ frame);
        void OnsummonMessageTextPage();
        void OnFullScreenToggled(bool state);
        void OnsummonWelcomePage();
        void OnsummonPreviewPage();
        void OnhidePreviewPage();
        void OnsummonVideoPage();
        void OnpressHangUpCall();
        void OnstateChange(Platform::String ^callId, CallStatus state, int code);
        void OncloseMessageTextPage();
        void OnregistrationStateErrorGeneric(const std::string& accountId);
        void OnregistrationStateUnregistered(const std::string& accountId);
        void OnregistrationStateRegistered(const std::string& accountId);
        void OncallPlaced(Platform::String ^callId);
        void OnnameRegistred(bool status);
        void OnvolatileDetailsChanged(const std::string &accountId, const std::map<std::string, std::string>& details);
    };
    }