Changeset View
Changeset View
Standalone View
Standalone View
source/gui/ObjectTypes/COList.h
/* Copyright (C) 2021 Wildfire Games. | /* Copyright (C) 2022 Wildfire Games. | ||||
Silier: the another files the same | |||||
* This file is part of 0 A.D. | * This file is part of 0 A.D. | ||||
* | * | ||||
* 0 A.D. is free software: you can redistribute it and/or modify | * 0 A.D. is free software: you can redistribute it and/or modify | ||||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0 A.D. is distributed in the hope that it will be useful, | * 0 A.D. is distributed in the hope that it will be useful, | ||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
* GNU General Public License for more details. | * GNU General Public License for more details. | ||||
* | * | ||||
* You should have received a copy of the GNU General Public License | * You should have received a copy of the GNU General Public License | ||||
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | ||||
*/ | */ | ||||
#ifndef INCLUDED_COLIST | #ifndef INCLUDED_COLIST | ||||
#define INCLUDED_COLIST | #define INCLUDED_COLIST | ||||
#include "gui/ObjectTypes/CList.h" | #include "gui/ObjectTypes/CList.h" | ||||
#include "gui/SettingTypes/CGUIColor.h" | #include "gui/SettingTypes/CGUIColor.h" | ||||
#include <vector> | #include <vector> | ||||
/** | /** | ||||
* Represents a column. | * Represents a column. | ||||
*/ | */ | ||||
class COListColumn | class COListColumn | ||||
{ | { | ||||
public: | public: | ||||
COListColumn(IGUIObject* owner, const CStr& cid) | COListColumn(IGUIObject* owner, const CStr& cid) | ||||
: m_Width(0), m_Id(cid), m_List(owner, "list_" + cid), m_Hidden(owner, "hidden_" + cid, false) | : m_Width(0), m_Id(cid), m_List(owner, "list_" + cid), m_Heading(owner, "heading_" + cid), m_Hidden(owner, "hidden_" + cid, false) | ||||
Done Inline ActionsSpace after :. vladislavbelov: Space after `:`. | |||||
{} | {} | ||||
// Avoid copying the strings. | // Avoid copying the strings. | ||||
NONCOPYABLE(COListColumn); | NONCOPYABLE(COListColumn); | ||||
MOVABLE(COListColumn); | MOVABLE(COListColumn); | ||||
CGUIColor m_TextColor; | CGUIColor m_TextColor; | ||||
CStr m_Id; | CStr m_Id; | ||||
float m_Width; | float m_Width; | ||||
CStrW m_Heading; // CGUIString?? | CGUISimpleSetting<CStrW> m_Heading; // CGUIString?? | ||||
Done Inline ActionsThe COList should watch heading_* changes to call SetupText. vladislavbelov: The COList should watch `heading_*` changes to call SetupText. | |||||
CGUISimpleSetting<CGUIList> m_List; | CGUISimpleSetting<CGUIList> m_List; | ||||
CGUISimpleSetting<bool> m_Hidden; | CGUISimpleSetting<bool> m_Hidden; | ||||
}; | }; | ||||
/** | /** | ||||
* Multi-column list. One row can be selected by the user. | * Multi-column list. One row can be selected by the user. | ||||
* Individual cells are clipped if the contained text is too long. | * Individual cells are clipped if the contained text is too long. | ||||
* | * | ||||
Show All 40 Lines | |||||
private: | private: | ||||
static const CStr EventNameSelectionColumnChange; | static const CStr EventNameSelectionColumnChange; | ||||
// Width of space available for columns | // Width of space available for columns | ||||
float m_TotalAvailableColumnWidth; | float m_TotalAvailableColumnWidth; | ||||
float m_HeadingHeight; | float m_HeadingHeight; | ||||
}; | }; | ||||
#endif // INCLUDED_COLIST | #endif // INCLUDED_COLIST | ||||
No newline at end of file |
Wildfire Games · Phabricator
the another files the same