Ewl_Colordialog: A Simple Colour Dialog widget
Detailed Description
- Remarks:
- Inherits from Ewl_Dialog.
Tutorial
Data Structures | |
struct | Ewl_Colordialog |
Inherit from the Ewl_Dialog to create a color dialog widget. More... | |
Defines | |
#define | EWL_COLORDIALOG(cd) ((Ewl_Colordialog *) cd) |
#define | EWL_COLORDIALOG_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_COLORDIALOG_TYPE)) |
#define | EWL_COLORDIALOG_TYPE "colordialog" |
Typedefs | |
typedef struct Ewl_Colordialog | Ewl_Colordialog |
Functions | |
unsigned int | ewl_colordialog_alpha_get (Ewl_Colordialog *cp) |
This retrieves the current alpha value selected in the dialog. | |
void | ewl_colordialog_alpha_set (Ewl_Colordialog *cp, unsigned int alpha) |
Sets the alpha value of the cd dialog to alpha . | |
void | ewl_colordialog_cb_button_click (Ewl_Widget *w, void *ev, void *data) |
void | ewl_colordialog_cb_delete_window (Ewl_Widget *w, void *ev, void *data) |
Ewl_Color_Mode | ewl_colordialog_color_mode_get (Ewl_Colordialog *cp) |
This will retrive the current Ewl_Color_Mode set on the color dialog. | |
void | ewl_colordialog_color_mode_set (Ewl_Colordialog *cp, Ewl_Color_Mode type) |
Sets the color dialog mode to type . | |
void | ewl_colordialog_current_rgb_get (Ewl_Colordialog *cp, unsigned int *r, unsigned int *g, unsigned int *b) |
This will retrieve the rgb values from the color dialog. | |
void | ewl_colordialog_current_rgb_set (Ewl_Colordialog *cp, unsigned int r, unsigned int g, unsigned int b) |
This sets the given rbg information into the color dialog. | |
unsigned int | ewl_colordialog_has_alpha_get (Ewl_Colordialog *cp) |
This retrieves weither or not the color dialog is showing alpha information. | |
void | ewl_colordialog_has_alpha_set (Ewl_Colordialog *cp, unsigned int alpha) |
This will set if the color dialog will show the alpha information. | |
int | ewl_colordialog_init (Ewl_Colordialog *cd) |
Initialize a color dialog to starting values. | |
Ewl_Widget * | ewl_colordialog_new (void) |
Create a new Ewl_Colordialog widget. | |
void | ewl_colordialog_previous_rgba_get (Ewl_Colordialog *cp, unsigned int *r, unsigned int *g, unsigned int *b, unsigned int *a) |
This will retrieve the value current set into the previous color box of the color dialog rgba values from the color dialog. | |
void | ewl_colordialog_previous_rgba_set (Ewl_Colordialog *cp, unsigned int r, unsigned int g, unsigned int b, unsigned int a) |
This sets the given rgba values as the color to display in the previous color box of the color dialog. |
Define Documentation
#define EWL_COLORDIALOG | ( | cd | ) | ((Ewl_Colordialog *) cd) |
Typecast a pointer to an Ewl_Colordialog pointer.
Referenced by ewl_colordialog_cb_button_click(), ewl_colordialog_cb_delete_window(), and ewl_colordialog_new().
#define EWL_COLORDIALOG_IS | ( | w | ) | (ewl_widget_type_is(EWL_WIDGET(w), EWL_COLORDIALOG_TYPE)) |
Returns TRUE if the widget is an Ewl_Colordialog, FALSE otherwise
#define EWL_COLORDIALOG_TYPE "colordialog" |
The type name for the Ewl_Colordialog widget
Referenced by ewl_colordialog_alpha_get(), ewl_colordialog_alpha_set(), ewl_colordialog_cb_button_click(), ewl_colordialog_cb_delete_window(), ewl_colordialog_color_mode_get(), ewl_colordialog_color_mode_set(), ewl_colordialog_current_rgb_get(), ewl_colordialog_current_rgb_set(), ewl_colordialog_has_alpha_get(), ewl_colordialog_has_alpha_set(), ewl_colordialog_init(), ewl_colordialog_previous_rgba_get(), and ewl_colordialog_previous_rgba_set().
Typedef Documentation
typedef struct Ewl_Colordialog Ewl_Colordialog |
The Ewl_Colordialog
Function Documentation
unsigned int ewl_colordialog_alpha_get | ( | Ewl_Colordialog * | cd | ) |
This retrieves the current alpha value selected in the dialog.
- Parameters:
-
cd,: The color dialog to get the alpha value from
- Returns:
- Returns the current alpha value selected in the dialog
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_COLORDIALOG_TYPE, EWL_COLORPICKER, ewl_colorpicker_alpha_get(), and picker.
void ewl_colordialog_alpha_set | ( | Ewl_Colordialog * | cd, | |
unsigned int | alpha | |||
) |
Sets the alpha value of the cd
dialog to alpha
.
- Parameters:
-
cd,: The color dialog to set the alpha into alpha,: The alpha value to set into the color dialog
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_COLORDIALOG_TYPE, EWL_COLORPICKER, ewl_colorpicker_alpha_set(), and picker.
void ewl_colordialog_cb_button_click | ( | Ewl_Widget * | w, | |
void * | ev, | |||
void * | data | |||
) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_COLORDIALOG, EWL_COLORDIALOG_TYPE, EWL_STOCK, EWL_STOCK_TYPE, and ewl_stock_type_get().
Referenced by ewl_colordialog_init().
void ewl_colordialog_cb_delete_window | ( | Ewl_Widget * | w, | |
void * | ev, | |||
void * | data | |||
) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_COLORDIALOG, EWL_COLORDIALOG_TYPE, and EWL_STOCK_CANCEL.
Referenced by ewl_colordialog_init().
Ewl_Color_Mode ewl_colordialog_color_mode_get | ( | Ewl_Colordialog * | cd | ) |
This will retrive the current Ewl_Color_Mode set on the color dialog.
- Parameters:
-
cd,: The color dialog to get the mode from
- Returns:
- Returns the current mode of the color dialog
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_COLOR_MODE_HSV_HUE, EWL_COLORDIALOG_TYPE, EWL_COLORPICKER, ewl_colorpicker_color_mode_get(), and picker.
void ewl_colordialog_color_mode_set | ( | Ewl_Colordialog * | cd, | |
Ewl_Color_Mode | type | |||
) |
Sets the color dialog mode to type
.
- Parameters:
-
cd,: The color dialog to set the mode of type,: The mode to set on the color dialog
- Returns:
- Returns no value.
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_COLORDIALOG_TYPE, EWL_COLORPICKER, ewl_colorpicker_color_mode_set(), and picker.
void ewl_colordialog_current_rgb_get | ( | Ewl_Colordialog * | cd, | |
unsigned int * | r, | |||
unsigned int * | g, | |||
unsigned int * | b | |||
) |
This will retrieve the rgb values from the color dialog.
- Parameters:
-
cd,: The color dialog to get the rgb information from r,: Where to store the red value g,: Where to store the green value b,: Where to store the blue value
- Returns:
- Returns no value.
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_COLORDIALOG_TYPE, EWL_COLORPICKER, ewl_colorpicker_current_rgb_get(), and picker.
void ewl_colordialog_current_rgb_set | ( | Ewl_Colordialog * | cd, | |
unsigned int | r, | |||
unsigned int | g, | |||
unsigned int | b | |||
) |
This sets the given rbg information into the color dialog.
- Parameters:
-
cd,: The color dialog to set the rgb values into r,: The red value to set g,: The green value to set b,: The blue value to set
- Returns:
- Returns no value.
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_COLORDIALOG_TYPE, EWL_COLORPICKER, ewl_colorpicker_current_rgb_set(), and picker.
unsigned int ewl_colordialog_has_alpha_get | ( | Ewl_Colordialog * | cd | ) |
This retrieves weither or not the color dialog is showing alpha information.
- Parameters:
-
cd,: The color dialog to get the alpha information from
- Returns:
- Returns TRUE if the color dialog is showing alpha information
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_COLORDIALOG_TYPE, EWL_COLORPICKER, ewl_colorpicker_has_alpha_get(), and picker.
void ewl_colordialog_has_alpha_set | ( | Ewl_Colordialog * | cd, | |
unsigned int | alpha | |||
) |
This will set if the color dialog will show the alpha information.
- Parameters:
-
cd,: The color dialog to set the alpha value on alpha,: If the color dialog should show the alpha option
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_COLORDIALOG_TYPE, EWL_COLORPICKER, ewl_colorpicker_has_alpha_set(), and picker.
Referenced by ewl_colordialog_init().
int ewl_colordialog_init | ( | Ewl_Colordialog * | cd | ) |
Initialize a color dialog to starting values.
- Parameters:
-
cd,: the color dialog to initialize
- Returns:
- Returns TRUE on success, FALSE on failure.
References DCHECK_PARAM_PTR_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, ewl_button_new(), ewl_callback_append(), EWL_CALLBACK_CLICKED, EWL_CALLBACK_DELETE_WINDOW, ewl_colordialog_cb_button_click(), ewl_colordialog_cb_delete_window(), ewl_colordialog_has_alpha_set(), EWL_COLORDIALOG_TYPE, ewl_colorpicker_new(), EWL_CONTAINER, ewl_container_child_append(), EWL_DIALOG, ewl_dialog_action_position_set(), ewl_dialog_active_area_set(), ewl_dialog_init(), EWL_FLAG_FILL_FILL, EWL_OBJECT, ewl_object_fill_policy_set(), EWL_POSITION_BOTTOM, EWL_POSITION_TOP, EWL_STOCK, EWL_STOCK_CANCEL, EWL_STOCK_OK, ewl_stock_type_set(), EWL_WIDGET, ewl_widget_inherit(), ewl_widget_internal_set(), ewl_widget_show(), EWL_WINDOW, ewl_window_class_set(), ewl_window_name_set(), ewl_window_title_set(), and picker.
Referenced by ewl_colordialog_new().
Ewl_Widget* ewl_colordialog_new | ( | void | ) |
Create a new Ewl_Colordialog widget.
- Returns:
- Returns a new Ewl_Colordialog widget
References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_COLORDIALOG, ewl_colordialog_init(), ewl_widget_destroy(), and NEW.
void ewl_colordialog_previous_rgba_get | ( | Ewl_Colordialog * | cd, | |
unsigned int * | r, | |||
unsigned int * | g, | |||
unsigned int * | b, | |||
unsigned int * | a | |||
) |
This will retrieve the value current set into the previous color box of the color dialog rgba values from the color dialog.
- Parameters:
-
cd,: The color dialog to get the rgb information from r,: Where to store the red value g,: Where to store the green value b,: Where to store the blue value a,: Where to store the alpha value
- Returns:
- Returns no value.
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_COLORDIALOG_TYPE, EWL_COLORPICKER, ewl_colorpicker_previous_rgba_get(), and picker.
void ewl_colordialog_previous_rgba_set | ( | Ewl_Colordialog * | cd, | |
unsigned int | r, | |||
unsigned int | g, | |||
unsigned int | b, | |||
unsigned int | a | |||
) |
This sets the given rgba values as the color to display in the previous color box of the color dialog.
- Parameters:
-
cd,: The color dialog to set the previous rgb values into r,: The red value to set g,: The green value to set b,: The blue value to set a,: The alpha value to set
- Returns:
- Returns no value.
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_COLORDIALOG_TYPE, EWL_COLORPICKER, ewl_colorpicker_previous_rgba_set(), and picker.