Class: Wx::ColourData

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/colour_dialog.rb

Overview

Note:

This class is untracked and should not be derived from nor instances extended!

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

Category: Common Dialogs, Data Structures

See Also:

Requires:

  • USE_COLOURDLG

Constant Summary collapse

NUM_CUSTOM =
16

Instance Method Summary collapse

Methods inherited from Object

#clone, #dup, #is_same_as, #un_share

Constructor Details

#initializeWx::ColourData

Constructor.

Initializes the custom colours to NULL_COLOUR, the data colour setting to black, and the choose full setting to true.



104
# File 'lib/wx/doc/gen/colour_dialog.rb', line 104

def initialize; end

Instance Method Details

#from_string(str) ⇒ Boolean

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

Parameters:

  • str (String)

Returns:

  • (Boolean)


174
# File 'lib/wx/doc/gen/colour_dialog.rb', line 174

def from_string(str) end

#get_choose_alphaBoolean Also known as: choose_alpha

Indicates whether the colour dialog will display alpha values and an opacity selector.

It is meaningful under WXGTK, WXOSX and with regards to generic colour dialog. The default value is false, except WXOSX where it is true (for the sake of backward compatibility).

Returns:

  • (Boolean)


119
# File 'lib/wx/doc/gen/colour_dialog.rb', line 119

def get_choose_alpha; end

#get_choose_fullBoolean Also known as: choose_full

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.

Returns:

  • (Boolean)


111
# File 'lib/wx/doc/gen/colour_dialog.rb', line 111

def get_choose_full; end

#get_colourWx::Colour Also known as: colour

Gets the current colour associated with the colour dialog.

The default colour is black.

Returns:



126
# File 'lib/wx/doc/gen/colour_dialog.rb', line 126

def get_colour; end

#get_custom_colour(i) ⇒ Wx::Colour Also known as: custom_colour

Returns custom colours associated with the colour dialog.

Parameters:

  • i (Integer)

    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.

Returns:



132
# File 'lib/wx/doc/gen/colour_dialog.rb', line 132

def get_custom_colour(i) end

#set_choose_alpha(flag) ⇒ void Also known as: choose_alpha=

This method returns an undefined value.

Tells the colour dialog to show alpha values and an opacity selector (slider).

Currently it has effect under WXGTK, WXOSX and for generic colour dialog. The default value is false, except WXOSX where it is true for backward compatibility.

Parameters:

  • flag (Boolean)


150
# File 'lib/wx/doc/gen/colour_dialog.rb', line 150

def set_choose_alpha(flag) end

#set_choose_full(flag) ⇒ void Also known as: choose_full=

This method returns an undefined value.

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 (Boolean)


141
# File 'lib/wx/doc/gen/colour_dialog.rb', line 141

def set_choose_full(flag) end

#set_colour(colour) ⇒ void Also known as: colour=

This method returns an undefined value.

Sets the default colour for the colour dialog.

The default colour is black.

Parameters:



158
# File 'lib/wx/doc/gen/colour_dialog.rb', line 158

def set_colour(colour) end

#set_custom_colour(i, colour) ⇒ void

This method returns an undefined value.

Sets custom colours for the colour dialog.

Parameters:

  • i (Integer)

    An integer between 0 and 15 for whatever custom colour you want to set. The default custom colours are invalid colours.

  • colour (Wx::Colour, String, Symbol)

    The colour to set



165
# File 'lib/wx/doc/gen/colour_dialog.rb', line 165

def set_custom_colour(i, colour) end

#to_stringString

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

Returns:

  • (String)


169
# File 'lib/wx/doc/gen/colour_dialog.rb', line 169

def to_string; end