xbmc
GUIWindowSettingsScreenCalibration.h
1 /*
2  * Copyright (C) 2005-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "guilib/GUIWindow.h"
12 
13 #include <map>
14 #include <utility>
15 #include <vector>
16 
18 {
19 public:
22  bool OnMessage(CGUIMessage& message) override;
23  bool OnAction(const CAction& action) override;
24  void DoProcess(unsigned int currentTime, CDirtyRegionList& dirtyregions) override;
25  void FrameMove() override;
26  void DoRender() override;
27  void AllocResources(bool forceLoad = false) override;
28  void FreeResources(bool forceUnLoad = false) override;
29 
30 protected:
31  unsigned int FindCurrentResolution();
32  void NextControl();
33  void ResetControls();
34  void EnableControl(int iControl);
35  bool UpdateFromControl(int iControl);
36  void ResetCalibration();
37  unsigned int m_iCurRes;
38  std::vector<RESOLUTION> m_Res;
39  int m_iControl;
40  float m_fPixelRatioBoxHeight;
41 
42 private:
43  std::map<int, std::pair<float, float>> m_controlsSize;
44  int m_subtitlesHalfSpace{0};
45  int m_subtitleVerticalMargin{0};
46  bool m_isSubtitleBarEnabled{false};
47 };
void FrameMove() override
Main update function, called every frame prior to rendering Any window that requires updating on a fr...
Definition: GUIWindowSettingsScreenCalibration.cpp:583
class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:22
Definition: GUIWindowSettingsScreenCalibration.h:17
Definition: GUIMessage.h:365
Definition: GUIWindow.h:58
void DoRender() override
Main render function, called every frame. Window classes should override this only if they need to al...
Definition: GUIWindowSettingsScreenCalibration.cpp:629