Table Of Contents

Previous topic

Colour

Next topic

ColourDatabase

This Page

phoenix_title ColourData

This class holds a variety of information related to colour dialogs.


class_hierarchy Inheritance Diagram

Inheritance diagram for class ColourData

Inheritance diagram of ColourData


method_summary Methods Summary

__init__ Constructor.
FromString Decodes the given string, which should be in the same format returned by ToString , and sets the internal colours.
GetChooseFull Under Windows, determines whether the Windows colour dialog will display the full dialog with custom colour selection controls.
GetColour Gets the current colour associated with the colour dialog.
GetCustomColour Returns custom colours associated with the colour dialog.
SetChooseFull Under Windows, tells the Windows colour dialog to display the full dialog with custom colour selection controls.
SetColour Sets the default colour for the colour dialog.
SetCustomColour Sets custom colours for the colour dialog.
ToString Converts the colours saved in this class in a string form, separating the various colours with a comma.

property_summary Properties Summary

ChooseFull See GetChooseFull and SetChooseFull
Colour See GetColour and SetColour

api Class API



class ColourData(Object)

This class holds a variety of information related to colour dialogs.

Possible constructors:

ColourData()

Methods



__init__(self)

Constructor.

Initializes the custom colours to NullColour , the data colour setting to black, and the choose full setting to True.



FromString(self, str)

Decodes the given string, which should be in the same format returned by ToString , and sets the internal colours.

Parameters:str (string) –
Return type:bool


GetChooseFull(self)

Under Windows, determines whether the Windows colour dialog will display the full dialog with custom colour selection controls.

Has no meaning under other platforms.

The default value is True.

Return type:bool


GetColour(self)

Gets the current colour associated with the colour dialog.

The default colour is black.

Return type: Colour


GetCustomColour(self, i)

Returns custom colours associated with the colour dialog.

Parameters:i (int) – An integer between 0 and 15, being any of the 15 custom colours that the user has saved. The default custom colours are invalid colours.
Return type: Colour


SetChooseFull(self, flag)

Under Windows, tells the Windows colour dialog to display the full dialog with custom colour selection controls.

Under other platforms, has no effect.

The default value is True.

Parameters:flag (bool) –


SetColour(self, colour)

Sets the default colour for the colour dialog.

The default colour is black.

Parameters:colour (Colour) –


SetCustomColour(self, i, colour)

Sets custom colours for the colour dialog.

Parameters:
  • i (int) – An integer between 0 and 15 for whatever custom colour you want to set. The default custom colours are invalid colours.
  • colour (Colour) – The colour to set


ToString(self)

Converts the colours saved in this class in a string form, separating the various colours with a comma.

Return type:string

Properties



ChooseFull

See GetChooseFull and SetChooseFull



Colour

See GetColour and SetColour