wx.Colour Class Reference

Inheritance diagram for wx.Colour:

wx.Object wx.ICanBeMadeReadonly

List of all members.

Public Types

enum  C2S

Public Member Functions

 Colour (Colour colour)
 Colour (byte red, byte green, byte blue, byte alpha)
 Colour (byte red, byte green, byte blue)
 Colour (wxString name)
 Colour (string name)
 Colour ()
 Colour (IntPtr wxObject)
override void Dispose ()
override bool Equals (object obj)
string GetAsString (C2S flags)
override int GetHashCode ()
object MakeReadOnly ()
bool Ok ()
void Set (string str)
void Set (wxString str)
void Set (Colour src)
void Set (byte red, byte green, byte blue, byte alpha)
void Set (byte red, byte green, byte blue)
override string ToString ()

Static Public Attributes

static readonly Colour wxBLACK = (Colour)((Colour)new Colour("Black")).MakeReadOnly()
static readonly Colour wxBLUE = (Colour)((Colour)new Colour("Blue")).MakeReadOnly()
static readonly Colour wxCYAN = (Colour)((Colour)new Colour("Cyan")).MakeReadOnly()
static readonly Colour wxGREEN = (Colour)((Colour)new Colour("Green")).MakeReadOnly()
static readonly Colour wxLIGHT_GREY = (Colour)((Colour)new Colour("Light Gray")).MakeReadOnly()
static readonly Colour wxRED = (Colour)((Colour)new Colour("Red")).MakeReadOnly()
static readonly Colour wxWHITE = (Colour)((Colour)new Colour("White")).MakeReadOnly()

Protected Member Functions

override void CallDTor ()

Properties

byte Alpha [get, set]
byte Blue [get, set]
byte Green [get, set]
bool IsReadonly [get]
byte Red [get, set]
static ColourDatabase TheColourDatabase [get]


Detailed Description

This class represents colours.

Member Enumeration Documentation

enum wx::Colour::C2S

Options for wx.Colour.GetAsString()

Enumerator:
NAME  return colour name, when possible
CSS_SYNTAX  return colour in rgb(r,g,b) syntax
HTML_SYNTAX  return colour in rrggbb syntax.


Constructor & Destructor Documentation

wx.Colour.Colour ( IntPtr  wxObject  ) 

wx.Colour.Colour (  ) 

wx.Colour.Colour ( string  name  ) 

wx.Colour.Colour ( wxString  name  ) 

wx.Colour.Colour ( byte  red,
byte  green,
byte  blue 
)

wx.Colour.Colour ( byte  red,
byte  green,
byte  blue,
byte  alpha 
)

wx.Colour.Colour ( Colour  colour  ) 


Member Function Documentation

override void wx.Colour.CallDTor (  )  [protected, virtual]

This will be called by Dispose() to delete the C++ object. Overload this if you have to use another DTor.

Reimplemented from wx.Object.

override void wx.Colour.Dispose (  )  [virtual]

Reimplemented from wx.Object.

override bool wx.Colour.Equals ( object  obj  ) 

string wx.Colour.GetAsString ( C2S  flags  ) 

Returns the colour in string form according to the provided flags.

override int wx.Colour.GetHashCode (  ) 

object wx.Colour.MakeReadOnly (  ) 

From this call, all calls to modifiers will cause exceptions. This shall return this.

Implements wx.ICanBeMadeReadonly.

bool wx.Colour.Ok (  ) 

void wx.Colour.Set ( string  str  ) 

Set RGB values from the provided string. Set() accepts: colour names (those listed in wxTheColourDatabase), the CSS-like "RGB(r,g,b)" syntax (case insensitive) and the HTML-like syntax (i.e. "#" followed by 6 hexadecimal digits for red, green, blue components).

Parameters:
str Colour name, RGB-syntax string or HTML-like colour notation

void wx.Colour.Set ( wxString  str  ) 

Set RGB values from the provided string. Set() accepts: colour names (those listed in wxTheColourDatabase), the CSS-like "RGB(r,g,b)" syntax (case insensitive) and the HTML-like syntax (i.e. "#" followed by 6 hexadecimal digits for red, green, blue components).

Parameters:
str Colour name, RGB-syntax string or HTML-like colour notation

void wx.Colour.Set ( Colour  src  ) 

void wx.Colour.Set ( byte  red,
byte  green,
byte  blue,
byte  alpha 
)

Assign RGB and Alpha values.

void wx.Colour.Set ( byte  red,
byte  green,
byte  blue 
)

Assign RGB values.

override string wx.Colour.ToString (  ) 

Returns a string form representing the colour. Implemented by GetAsString().


Member Data Documentation

readonly Colour wx.Colour.wxBLACK = (Colour)((Colour)new Colour("Black")).MakeReadOnly() [static]

readonly Colour wx.Colour.wxBLUE = (Colour)((Colour)new Colour("Blue")).MakeReadOnly() [static]

readonly Colour wx.Colour.wxCYAN = (Colour)((Colour)new Colour("Cyan")).MakeReadOnly() [static]

readonly Colour wx.Colour.wxGREEN = (Colour)((Colour)new Colour("Green")).MakeReadOnly() [static]

readonly Colour wx.Colour.wxLIGHT_GREY = (Colour)((Colour)new Colour("Light Gray")).MakeReadOnly() [static]

readonly Colour wx.Colour.wxRED = (Colour)((Colour)new Colour("Red")).MakeReadOnly() [static]

readonly Colour wx.Colour.wxWHITE = (Colour)((Colour)new Colour("White")).MakeReadOnly() [static]


Property Documentation

byte wx.Colour.Alpha [get, set]

byte wx.Colour.Blue [get, set]

byte wx.Colour.Green [get, set]

bool wx.Colour.IsReadonly [get]

If this is true, all modifiers will cause exceptions. If this is false, modfiers can be used.

Implements wx.ICanBeMadeReadonly.

byte wx.Colour.Red [get, set]

ColourDatabase wx.Colour.TheColourDatabase [static, get]

Returns ColourDatabase.TheColourDatabase.

The standard database contains at least the following colours: AQUAMARINE, BLACK, BLUE, BLUE VIOLET, BROWN, CADET BLUE, CORAL, CORNFLOWER BLUE, CYAN, DARK GREY, DARK GREEN, DARK OLIVE GREEN, DARK ORCHID, DARK SLATE BLUE, DARK SLATE GREY DARK TURQUOISE, DIM GREY, FIREBRICK, FOREST GREEN, GOLD, GOLDENROD, GREY, GREEN, GREEN YELLOW, INDIAN RED, KHAKI, LIGHT BLUE, LIGHT GREY, LIGHT STEEL BLUE, LIME GREEN, MAGENTA, MAROON, MEDIUM AQUAMARINE, MEDIUM BLUE, MEDIUM FOREST GREEN, MEDIUM GOLDENROD, MEDIUM ORCHID, MEDIUM SEA GREEN, MEDIUM SLATE BLUE, MEDIUM SPRING GREEN, MEDIUM TURQUOISE, MEDIUM VIOLET RED, MIDNIGHT BLUE, NAVY, ORANGE, ORANGE RED, ORCHID, PALE GREEN, PINK, PLUM, PURPLE, RED, SALMON, SEA GREEN, SIENNA, SKY BLUE, SLATE BLUE, SPRING GREEN, STEEL BLUE, TAN, THISTLE, TURQUOISE, VIOLET, VIOLET RED, WHEAT, WHITE, YELLOW, YELLOW GREEN.


Manual of the wx.NET   (c) 2003-2011 the wx.NET project at   Get wx.NET at SourceForge.net. Fast, secure and Free Open Source software downloads