LCOV - code coverage report
Current view: top level - source/gui/ObjectBases - IGUIPanel.cpp (source / functions) Hit Total Coverage
Test: 0 A.D. test coverage report Lines: 0 16 0.0 %
Date: 2026-12-03 01:19:39 Functions: 0 6 0.0 %

          Line data    Source code
       1             : /* Copyright (C) 2026 Wildfire Games.
       2             :  * This file is part of 0 A.D.
       3             :  *
       4             :  * 0 A.D. is free software: you can redistribute it and/or modify
       5             :  * it under the terms of the GNU General Public License as published by
       6             :  * the Free Software Foundation, either version 2 of the License, or
       7             :  * (at your option) any later version.
       8             :  *
       9             :  * 0 A.D. is distributed in the hope that it will be useful,
      10             :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      11             :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      12             :  * GNU General Public License for more details.
      13             :  *
      14             :  * You should have received a copy of the GNU General Public License
      15             :  * along with 0 A.D.  If not, see <http://www.gnu.org/licenses/>.
      16             :  */
      17             : 
      18             : #include "precompiled.h"
      19             : 
      20             : #include "IGUIPanel.h"
      21             : 
      22             : #include "gui/CGUI.h"
      23             : #include "gui/CGUISetting.h"
      24             : #include "ps/CStr.h"
      25             : 
      26             : #include <map>
      27             : #include <string>
      28             : #include <vector>
      29             : 
      30           0 : IGUIPanel::IGUIPanel(CGUI& pGUI)
      31           0 :     : IGUIObject(pGUI)
      32             : {
      33           0 : }
      34             : 
      35           0 : IGUIPanel::~IGUIPanel()
      36             : {
      37           0 : }
      38             : 
      39           0 : bool IGUIPanel::IsMouseOver() const
      40             : {
      41           0 :     GetActualSize(); // Updates m_CachedLayoutActualSize if necessary.
      42           0 :     return m_CachedLayoutActualSize.PointInside(m_pGUI.GetMousePos());
      43             : }
      44             : 
      45           0 : void IGUIPanel::RecalculateActualSize() const
      46             : {
      47           0 :     IGUIObject::RecalculateActualSize();
      48           0 :     m_CachedLayoutActualSize = m_CachedActualSize;
      49           0 : }
      50             : 
      51           0 : const std::vector<IGUIObject*>& IGUIPanel::GetVisibleChildren() const
      52             : {
      53           0 :     if (m_Drawing)
      54           0 :         return m_Children;
      55             : 
      56           0 :     static std::vector<IGUIObject*> emptyVector;
      57             :     return emptyVector;
      58             : }

Generated by: LCOV version 1.16