![]() |
mgsLib
1.3
Mermaja's Graphic Screen. A simple C library to build Windows graphic applications from console programs.
|
ColorPicker for the MrMWidgets. More...
Functions | |
Color Picker management functions | |
| int | mrmCPInit (int bgCol, int txtCol) |
| Creates the Color Picker with the given colors. More... | |
| void | mrmCPDelete () |
| Delete the Color Picker if exists. More... | |
| int | mrmCPExists (void) |
| Check the existence of the Color Picker. More... | |
| void | mrmCPMove (int x, int y) |
| Moves the Color Picker to a new position. More... | |
| void | mrmCPSetSelection (int crgb) |
| Sets the color selected on the Color Picker. More... | |
| int | mrmCPRGB () |
| Gets the color selected on the Color Picker. More... | |
| int mrmCPInit | ( | int | bgCol, |
| int | txtCol | ||
| ) |
This function is used to create the Color Picker. Only one can be present in the system, so the call will fail if one already exists.
| [in] | bgCol | Color for the background of the Color Picker window. Use MWG_CPBCKCOL for the default color. |
| [in] | txtCol | Color for the texts on the Color Picker. Use MWG_CPTXTCOL for the default color. |
| void mrmCPDelete | ( | void | ) |
This functions deletes the Color Picker from the system. A new one can then be created if desired.
| int mrmCPExists | ( | void | ) |
Only one Color Picker can be present in the system. This function returns true if the Color Picker exists, false if not.
| void mrmCPMove | ( | int | x, |
| int | y | ||
| ) |
This functions places the Color Picker -top left corner- to the indicated position, without altering proportion nor contents. No bounding checks are performed.
| [in] | x | Coordinate of the leftmost position. |
| [in] | y | Coordinate of the top position. |
| void mrmCPSetSelection | ( | int | crgb | ) |
The color selected on the Color Picker is set to the RGB value given if the Color Picker exists.
| [in] | crgb | RGB value of the color. |
| int mrmCPRGB | ( | void | ) |
Returns the RGB value selected on the Color Picker, or 0 if it does not exist.
1.8.13