Graphic Calculator: FIDocalcus
Проект трёх первокурсников (по инженерному практикуму в первом семестре) по созданию графического калькулятора на FLTK C++
Loading...
Searching...
No Matches
Graph_lib::Color Struct Reference

Цвет, с учетом прозрачности More...

#include <Shapes.h>

Public Types

enum  Color_type {
  red = FL_RED , blue = FL_BLUE , green = FL_GREEN , yellow = FL_YELLOW ,
  white = FL_WHITE , black = FL_BLACK , magenta = FL_MAGENTA , cyan = FL_CYAN ,
  dark_red = FL_DARK_RED , dark_green = FL_DARK_GREEN , dark_yellow = FL_DARK_YELLOW , dark_blue = FL_DARK_BLUE ,
  dark_magenta = FL_DARK_MAGENTA , dark_cyan = FL_DARK_CYAN
}
 
enum  Transparency { invisible = 0 , visible = 255 }
 

Public Member Functions

 Color (Color_type _c)
 
 Color (Color_type _c, Transparency _v)
 
 Color (Transparency _v)
 
 Color (unsigned int _c)
 
 ~Color ()=default
 
unsigned int as_uint () const
 
void set_visibility (Transparency _v)
 
char visibility () const
 

Private Attributes

Fl_Color c
 
unsigned char v
 

Detailed Description

Цвет, с учетом прозрачности

Member Enumeration Documentation

◆ Color_type

Enumerator
red 
blue 
green 
yellow 
white 
black 
magenta 
cyan 
dark_red 
dark_green 
dark_yellow 
dark_blue 
dark_magenta 
dark_cyan 
24 {
25 red = FL_RED,
26 blue = FL_BLUE,
32 cyan = FL_CYAN,
38 dark_cyan = FL_DARK_CYAN
39 };
W & reference_to(void *ptr_wid)
Definition Widgets.h:16
@ magenta
Definition Shapes.h:31
@ dark_cyan
Definition Shapes.h:38
@ dark_magenta
Definition Shapes.h:37
@ dark_blue
Definition Shapes.h:36
@ dark_red
Definition Shapes.h:33
@ white
Definition Shapes.h:29
@ black
Definition Shapes.h:30
@ dark_green
Definition Shapes.h:34
@ yellow
Definition Shapes.h:28
@ cyan
Definition Shapes.h:32
@ green
Definition Shapes.h:27
@ blue
Definition Shapes.h:26
@ dark_yellow
Definition Shapes.h:35
@ red
Definition Shapes.h:25

◆ Transparency

Enumerator
invisible 
visible 
41{ invisible = 0, visible = 255 };
@ invisible
Definition Shapes.h:41
@ visible
Definition Shapes.h:41

Constructor & Destructor Documentation

◆ Color() [1/4]

Graph_lib::Color::Color ( Color_type _c)
inline
43: c{Fl_Color(_c)}, v{visible} {}
unsigned char v
Definition Shapes.h:69
Fl_Color c
Definition Shapes.h:68

◆ Color() [2/4]

Graph_lib::Color::Color ( Color_type _c,
Transparency _v )
inline
46 : c{Fl_Color(_c)}, v{static_cast<unsigned char>(_v)} {}

◆ Color() [3/4]

Graph_lib::Color::Color ( unsigned int _c)
inline
48: c{Fl_Color(_c)}, v{visible} {}

◆ Color() [4/4]

Graph_lib::Color::Color ( Transparency _v)
inline
51 : c{Fl_Color()}, v{static_cast<unsigned char>(_v)} {}

◆ ~Color()

Graph_lib::Color::~Color ( )
inlinedefault

Member Function Documentation

◆ as_uint()

unsigned int Graph_lib::Color::as_uint ( ) const
inline
57{ return c; }
Here is the caller graph for this function:

◆ set_visibility()

void Graph_lib::Color::set_visibility ( Transparency _v)
inline
61{ v = _v; }

◆ visibility()

char Graph_lib::Color::visibility ( ) const
inline
59{ return v; }

Member Data Documentation

◆ c

Fl_Color Graph_lib::Color::c
private

◆ v

unsigned char Graph_lib::Color::v
private

The documentation for this struct was generated from the following file: