Wide Studio Object Reference

Wide Studio Home
Up to


Class Name

WSCcolorSet

Specification of methods



WSGIappColorSet Function Description

Form
WSCcolorSet* WSGIappColorSet()
Function
Obtain a global instance of color control class existing on an application
Description
Parameters
None.
Return value
A pointer to a color control class instance.
Notice
This function is a global function not a member function. Also the returned pointer should not be released.
Samples
   //Get the color number from the color name.
   short cno = WSGIappColorSet()->getColorNo("#ffffff");



getColor Function Description

Form
WSDcolor* getColor(short cno)
Function
Obtain a color instance from a color number
Description
Parameters
(in)short cno color number

Return value
Color instance
Notice
Do note release the returned color instance.
Samples
   //Obtain a color instance from a color number.
   WSDcolor* color = WSGIappColorSet()->getColor(cno);



getColor Function Description

Form
WSDcolor* getColor(char* cname)
Function
Obtain a color instance from a color name
Description
Parameters
(in)char* cname Color Name

Color name is specified by the following format.
#RRGGBB
RR: Specify the Red brightness with hexadecimal digit(00-ff)
GG: Specify the Green brightness with hexadecimal digit(00-ff)
BB: Specify the Blue brightness with hexadecimal digit(00-ff)

Color Color Name
White #ffffff
Black #000000
Red #ff0000
Green #00ff00
Blue #0000ff
Gray #888888
Dark Red #880000
Dark Green #008800
Dark Blue #000088

Return value
Color instance
Notice
Do not release the returned color instance
Samples
   //Obtain a color instance from a color name
   WSDcolor* color = WSGIappColorSet()->getColor("#ff0000");



getColorNo Function Description

Form
short getColorNo(char* cname)
Function
Obtain a color number from a color name
Description
Parameters
(in)char* Color Name

As for the color names, please refer to getColor(char*) function.
Return value
Color number
Notice
Samples
Please refer to WSGIappColorSet()



getDefaultColorNo Function Description

Form
short getDefaultColorNo(long kind)
Function
Obtain a color number which is specified as a default color
Description
Parameters
(in)long Default color identifier

The following default color identifiers are supported
Default Color Identifier Description
WS_DF_FORECOLOR Default disply color
WS_DF_BACKCOLOR Default background color
WS_DF_TOPSHADOWCOLOR Default upper brim color
WS_DF_BOTTOMSHADOWCOLOR Default lower brim color
WS_DF_MENUFORECOLOR Default menu foreground color
WS_DF_MENUBACKCOLOR Default menu background color
WS_DF_MENUSELECTFORECOLOR Default menu selected items foreground color
WS_DF_MENUSELECTCOLOR Default menu selected items background color
WS_DF_MENUTOPSHADOWCOLOR Default menu upper brim color
WS_DF_MENUBOTTOMSHADOWCOLOR Default menu lower brim color
WS_DF_DARKBACKCOLOR Default dark background color
WS_DF_WORKBACKCOLOR Default working area background color
WS_DF_BARSHADOWCOLOR Default scroll bar shadow color
WS_DF_NWFORECOLOR Default command foreground color
WS_DF_NWBACKCOLOR Default command background color
WS_DF_NWTOPSHADOWCOLOR Default command upper brim color
WS_DF_NWBOTTOMSHADOWCOLOR Default command lower brim color
WS_DF_DARKBOTTOMSHADOWCOLOR Default dark lower brim color

Return value
color number
Notice
Samples
   //Obtain a color number from a default color identifier
   short cno = WSGIappColorSet()->getDefaultColorNo(WS_DF_FORECOLOR);



getDefaultColor Function Description

Form
WSDcolor* getDefaultColor(long kind)
Function
Obtain a color instance of a specified default color
Description
Parameters
(in)long Default color variation

As for the default color variation, please refer to getDefaultColorNo(long) function
Return value
Color instance
Notice
Samples
   //Obtain a color instance specified by a default color identifier
   WSCcolor* color = WSGIappColorSet()->getDefaultColor(WS_DF_FORECOLOR);



getColorName Function Description

Form
char* getColorName(short cno)
Function
Obtain a color name from a specified color number
Description
Parameters
(in)short cno Color number

Return value
Color name
Notice
Samples
   //Obtain a color name specified by a color number
   char* cname = WSGIappColorSet()->getColorName(cno);



existColor Function Description

Form
WSCbool existColor(short cno)
Function
Checks whether a specified color number exists
Description
Parameters
(in)short cno Color number

Return value
True = exists, False = not exists
Notice
Samples
   //Checks whether a specified color number, cno, exists
   WSCbool exist = WSGIappColorSet()->existColor(cno);
   if (exist == False){
     //Does not exist
   }else{
     //Exists
   }


Document Release 3.20

For use with Wide Studio Release 3.20, Spring 2003


Wide Studio Home | Up to

Copyright(C) T. Hirabayashi, 1999-2003 Last modified: February 3, 2003