neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
widget.hpp
Go to the documentation of this file.
1
// widget.cpp
2
/*
3
neoGFX Design Studio
4
Copyright(C) 2020 Leigh Johnston
5
6
This program is free software: you can redistribute it and / or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation, either version 3 of the License, or
9
(at your option) any later version.
10
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with this program. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#pragma once
21
22
#include <
DesignStudio/DesignStudio.hpp
>
23
24
namespace
neogfx::DesignStudio
25
{
26
class
widget_property_model
:
public
ng::item_tree_model
27
{
28
public
:
29
};
30
31
class
widget_property_presentation_model
:
public
ng::item_tree_presentation_model
32
{
33
public
:
34
widget_property_presentation_model
() :
35
ng
::
item_tree_presentation_model
{}
36
{
37
}
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
DesignStudio.hpp
neogfx::DesignStudio::widget_property_model
Definition
widget.hpp:27
neogfx::DesignStudio::widget_property_presentation_model
Definition
widget.hpp:32
neogfx::DesignStudio::widget_property_presentation_model::cell_color
ng::optional_color cell_color(const ng::item_presentation_model_index &aIndex, ng::color_role aColorRole) const override
Definition
widget.hpp:39
neogfx::DesignStudio::widget_property_presentation_model::widget_property_presentation_model
widget_property_presentation_model()
Definition
widget.hpp:34
neogfx::basic_item_model
Definition
item_model.hpp:209
neogfx::basic_item_presentation_model
Definition
item_presentation_model.hpp:43
neolib::optional
Definition
optional.hpp:55
neogfx::DesignStudio
Definition
console_client.hpp:26
neogfx
Definition
action.hpp:28
neogfx::color_role
color_role
Definition
i_palette.hpp:31
include
neogfx
tools
DesignStudio
widget.hpp
Generated by
1.9.8