InteractiveInterfaces Interface CATIIniSearchColorCriterion

Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.


interface CATIIniSearchColorCriterion

Interface to define a color-based search criterion.
Role: This interface enables the complete definition of a search criterion based on the color graphic attribute.
The objects found will match the color and operating sign, as specified in the method.
Only objects that have the color graphic property attribute implemented by the CATIVisProperties interface are taken into account in the search results. Their assumed color is the one displayed in the graphic property toolbar.


Method Index


o FindColorNameFromRGBColorCode(unsigned int const*,CATUnicodeString&)
Retrieves a color's name from the RGB code.
o FindRGBColorCodeFromObject(CATBaseUnknown_var&,unsigned int*&)
Retrieves the object's RGB color code.
o GetParameters(unsigned int&,unsigned int&,unsigned int&,CATIniSearchEnumeration::Comparison&,CATUnicodeString&)
Retrives the color parameters using the RGB code.
o SetParameters(unsigned int,unsigned int,unsigned int,CATIniSearchEnumeration::Comparison,CATUnicodeString)
Sets the color parameters using the RGB code.

Methods


o FindColorNameFromRGBColorCode
public virtual FindColorNameFromRGBColorCode( iColors,
oName)
Retrieves a color's name from the RGB code.
Role: This method retrieves the color's name from its RGB code.
Parameters:
iColors
A size-3 integer array representing the RGB code.
oName
The name of the color corresponding to the RGB code.
Returns:
  • S_OK if the RGB code corresponds to a basic or a customized color.
  • E_FAIL otherwise.
o FindRGBColorCodeFromObject
public virtual FindRGBColorCodeFromObject( const iObject,
oColors)
Retrieves the object's RGB color code.
Role: This method retrieves the RGB color code of an object.
Parameters:
iObject
The object implementing CATIVisProperties from which the color code will be retrieved.
oColors
The RGB color code, as a size-3 integer array.
The caller has to delete the returned pointer.
If the return code is a failure, this pointer is NULL.
Returns:
  • S_OK if the color has been found.
  • E_FAIL otherwise.
o GetParameters
public virtual GetParameters( oRed,
oGreen,
oBlue,
oOperatingSign,
oColorString)
Retrives the color parameters using the RGB code.
Role: This method Retrives the color parameters thanks to its RGB code.
Parameters:
oRed
The red component of the color's RGB code.
It must be located between 0 and 255.
oGreen
The green component of the color's RGB code.
It must be located between 0 and 255.
oBlue
The blue component of the color's RGB code.
It must be located between 0 and 255.
oOperatingSign
The value corresponding to the desired operating sign.
The only authorized values are Equal and Different.
oColorString
This parameter is to be used only for the NLS print out of the query.
If it is not provided, the RGB code will be used for the print out. Refer to
.
Returns:
  • E_FAIL if the criterion is not correctly set up.
  • S_OK otherwise.
o SetParameters
public virtual SetParameters( iRed,
iGreen,
iBlue,
iOperatingSign,
iColorString="")
Sets the color parameters using the RGB code.
Role: This method sets the color parameters thanks to its RGB code.
Parameters:
iRed
The red component of the color's RGB code.
It must be located between 0 and 255.
iGreen
The green component of the color's RGB code.
It must be located between 0 and 255.
iBlue
The blue component of the color's RGB code.
It must be located between 0 and 255.
iOperatingSign
The value corresponding to the desired operating sign.
The only authorized values are Equal and Different.
iColorString
This parameter is to be used only for the NLS print out of the query.
If it is not provided, the RGB code will be used for the print out. Refer to
.
This information can be retrieved from the method.
Returns:
  • E_FAIL if the criterion is not correctly set up.
  • S_OK otherwise.

This object is included in the file: CATIIniSearchColorCriterion.h
If needed, your Imakefile.mk should include the module: CATInteractiveInterfaces

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.