Dillo v3.1.1-46-g8a360e32
Loading...
Searching...
No Matches
dw::core::style::Color Class Reference

#include <style.hh>

Public Types

enum  Shading {
  SHADING_NORMAL , SHADING_INVERSE , SHADING_DARK , SHADING_LIGHT ,
  SHADING_NUM
}
 

Public Member Functions

void ref ()
 
void unref ()
 
- Public Member Functions inherited from dw::core::style::ColorAttrs
 ColorAttrs (int color)
 
int getColor ()
 
bool equals (lout::object::Object *other)
 Returns, whether two objects are equal.
 
int hashValue ()
 Return a hash value for the object.
 
- Public Member Functions inherited from lout::object::Object
virtual ~Object ()
 The destructor is defined as virtual (but not abstract), so that destruction of Object's works properly.
 
virtual Objectclone ()
 Return an exact copy of the object.
 
virtual void intoStringBuffer (misc::StringBuffer *sb)
 Store a textual representation of the object in a misc::StringBuffer.
 
const char * toString ()
 Use object::Object::intoStringBuffer to return a textual representation of the object.
 
virtual size_t sizeOf ()
 Return the number of bytes, this object totally uses.
 

Static Public Member Functions

static Colorcreate (Layout *layout, int color)
 

Protected Member Functions

 Color (int color)
 
virtual ~Color ()
 
int shadeColor (int color, Shading shading)
 

Private Member Functions

void remove (dw::core::Layout *layout)
 
int shadeColor (int color, int d)
 

Private Attributes

int refCount
 

Additional Inherited Members

- Protected Attributes inherited from dw::core::style::ColorAttrs
int color
 

Detailed Description

See also
dw::core::style

Definition at line 751 of file style.hh.

Member Enumeration Documentation

◆ Shading

Enumerator
SHADING_NORMAL 
SHADING_INVERSE 
SHADING_DARK 
SHADING_LIGHT 
SHADING_NUM 

Definition at line 767 of file style.hh.

Constructor & Destructor Documentation

◆ Color()

dw::core::style::Color::Color ( int  color)
inlineprotected

Definition at line 760 of file style.hh.

References DBG_OBJ_CREATE, and refCount.

◆ ~Color()

dw::core::style::Color::~Color ( )
protectedvirtual

Definition at line 467 of file style.cc.

References DBG_OBJ_DELETE.

Member Function Documentation

◆ create()

Color * dw::core::style::Color::create ( Layout layout,
int  color 
)
static

◆ ref()

void dw::core::style::Color::ref ( )
inline

Definition at line 776 of file style.hh.

References refCount.

Referenced by dw::core::Layout::setBgColor(), and dw::core::style::Style::Style().

◆ remove()

void dw::core::style::Color::remove ( dw::core::Layout layout)
private

◆ shadeColor() [1/2]

int dw::core::style::Color::shadeColor ( int  color,
int  d 
)
private

Definition at line 472 of file style.cc.

References dw::core::style::ColorAttrs::color, and lout::misc::max().

Referenced by dw::fltk::FltkColor::FltkColor(), and shadeColor().

◆ shadeColor() [2/2]

int dw::core::style::Color::shadeColor ( int  color,
Shading  shading 
)
protected

◆ unref()

void dw::core::style::Color::unref ( )
inline

Member Data Documentation

◆ refCount

int dw::core::style::Color::refCount
private

Definition at line 754 of file style.hh.

Referenced by Color(), ref(), and unref().


The documentation for this class was generated from the following files: