libyui
Loading...
Searching...
No Matches
YColor.h
1
/*
2
Copyright (C) 2000-2012 Novell, Inc
3
This library is free software; you can redistribute it and/or modify
4
it under the terms of the GNU Lesser General Public License as
5
published by the Free Software Foundation; either version 2.1 of the
6
License, or (at your option) version 3.0 of the License. This library
7
is distributed in the hope that it will be useful, but WITHOUT ANY
8
WARRANTY; without even the implied warranty of MERCHANTABILITY or
9
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10
License for more details. You should have received a copy of the GNU
11
Lesser General Public License along with this library; if not, write
12
to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13
Floor, Boston, MA 02110-1301 USA
14
*/
15
16
17
/*-/
18
19
File: YColor.h
20
21
Author: Stefan Hundhammer <shundhammer@suse.de>
22
23
/-*/
24
25
#ifndef YColor_h
26
#define YColor_h
27
28
typedef
unsigned
char
uchar;
29
30
34
class
YColor
35
{
36
public
:
40
YColor
( uchar
red
, uchar
green
, uchar
blue
)
41
: _red (
red
)
42
, _green(
green
)
43
, _blue (
blue
)
44
, _undef( false )
45
{}
46
50
YColor
()
51
: _red( 0 ), _green( 0 ), _blue( 0 )
52
, _undef( true )
53
{}
54
58
uchar
red
()
const
{
return
_red; }
59
63
uchar
green
()
const
{
return
_green; }
64
68
uchar
blue
()
const
{
return
_blue; }
69
73
bool
isUndefined
()
const
{
return
_undef; }
74
78
bool
isDefined
()
const
{
return
! _undef; }
79
80
private
:
81
82
uchar _red;
83
uchar _green;
84
uchar _blue;
85
86
bool
_undef;
87
};
88
89
90
#endif
// YColor_h
YColor::blue
uchar blue() const
Definition
YColor.h:68
YColor::isUndefined
bool isUndefined() const
Definition
YColor.h:73
YColor::red
uchar red() const
Definition
YColor.h:58
YColor::YColor
YColor(uchar red, uchar green, uchar blue)
Definition
YColor.h:40
YColor::green
uchar green() const
Definition
YColor.h:63
YColor::YColor
YColor()
Definition
YColor.h:50
YColor::isDefined
bool isDefined() const
Definition
YColor.h:78
src
YColor.h
Generated by
1.13.2