neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
widget.hpp
Go to the documentation of this file.
1// widget.cpp
2/*
3neoGFX Design Studio
4Copyright(C) 2020 Leigh Johnston
5
6This program is free software: you can redistribute it and / or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation, either version 3 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#pragma once
21
23
25{
27 {
28 public:
29 };
30
32 {
33 public:
38 public:
39 ng::optional_color cell_color(const ng::item_presentation_model_index& aIndex, ng::color_role aColorRole) const override
40 {
41 if (aColorRole == ng::color_role::Background)
42 return ng::service<ng::i_app>().current_style().palette().color(aIndex.row() % 2 == 0 ? ng::color_role::Base : ng::color_role::AlternateBase);
43 return {};
44 }
45 public:
46 };
47}
48
ng::optional_color cell_color(const ng::item_presentation_model_index &aIndex, ng::color_role aColorRole) const override
Definition widget.hpp:39