- Your Widget Set For OpenGL
Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | Related Pages

ufo::UPalette Class Reference

#include <upalette.hpp>

Inheritance diagram for ufo::UPalette:

ufo::UObject ufo::UCollectable List of all members.

Public Types

enum  ColorGroup { Active, Inactive, Disabled, NColorGroupType }
enum  ColorRole {
  Background, Foreground, Base, Text,
  Button, ButtonText, Light, MidLight,
  Dark, Mid, Highlight, HighlightedText,
  Link, LinkVisited, MaxColorRoles
}

Public Member Functions

 UPalette (const UColor &background, const UColor &foreground, const UColor &base, const UColor &text, const UColor &light, const UColor &midLight, const UColor &dark, const UColor &mid, const UColor &highlight, const UColor &highlightedText, const UColor &button, const UColor &buttonText, const UColor &link, const UColor &linkVisited)
 UPalette (const UColor &background, const UColor &foreground, const UColor &base, const UColor &text, const UColor &highlight, const UColor &highlightedText)
void setColor (ColorRole role, const UColor &color)
const UColorgetColor (ColorRole role) const
void transcribe (const UPalette &pal)
void update (const UPalette &pal)
const UColorbackground () const
const UColorforeground () const
const UColorbase () const
const UColortext () const
const UColorbutton () const
const UColorbuttonText () const
const UColorlight () const
const UColormidLight () const
const UColordark () const
const UColormid () const
const UColorhighlight () const
const UColorhighlightedText () const
const UColorlink () const
const UColorlinkVisited () const
const UColorgetColor (ColorGroup group, ColorRole role) const
void setColor (ColorGroup group, ColorRole role, const UColor &color)
bool operator== (const UPalette &pal) const
bool operator!= (const UPalette &pal) const

Protected Member Functions

virtual std::ostream & paramString (std::ostream &os) const

Detailed Description

A palettes represents the color set used to paint a widget.
Author:
Johannes Schmidt


Member Enumeration Documentation

enum ufo::UPalette::ColorGroup
 

Currently not used.

enum ufo::UPalette::ColorRole
 

Identifiers for different colors used in a GUI.

Enumeration values:
Background  The background color for normal widgets.
Foreground  suitable foreground color for drawing over the widget.
Base  Background color of text entries.
Text  suitable foreground color for text, usually the same as foreground.
Button  Some GUIs need different background colors for buttons, but usually the same as background.
ButtonText  Foreground color for Button.
Light  A lighter color than Button.
MidLight  Between Light and Button.
Dark  A darker color than Button.
Mid  Between Dark and Button.
Highlight  Used for selected or current item and text background.
HighlightedText  Text color used for Highlight.
Link  Used for unvisited hyper links.
LinkVisited  Used for visited hyper links.


Member Function Documentation

const UColor& ufo::UPalette::getColor ColorGroup  group,
ColorRole  role
const
 

used.

virtual std::ostream& ufo::UPalette::paramString std::ostream &  os  )  const [protected, virtual]
 

Prints some useful internal data to the ostream os. This method is meant only for debugging purposes.

Reimplemented from ufo::UObject.

void ufo::UPalette::setColor ColorGroup  group,
ColorRole  role,
const UColor color
 

used.

void ufo::UPalette::transcribe const UPalette pal  ) 
 

Every color of pal which is no default color of the default constructor overwrites the appropriate value of this palette. Example: If pal->foreground != UPalette().foreground then this->foreground becomes pal->foreground.

void ufo::UPalette::update const UPalette pal  ) 
 

Updates every default value of this palette with the given values of pal. Example: If this->foreground == UPalette().foreground then this->foreground becomes pal->foreground.


The documentation for this class was generated from the following file:
The libUFO Project - written by Johannes Schmidt