lib/ewl_text_trigger.c File Reference
#include "ewl_base.h"
#include "ewl_text.h"
#include "ewl_text_trigger.h"
#include "ewl_private.h"
#include "ewl_macros.h"
#include "ewl_debug.h"

Data Structures | |
| struct | Ewl_Text_Trigger_Area |
| Inherits from Ewl_Widget and extends to provide a trigger area. More... | |
Defines | |
| #define | EWL_TEXT_TRIGGER_AREA(area) ((Ewl_Text_Trigger_Area *) area) |
| #define | EWL_TEXT_TRIGGER_AREA_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_TEXT_TRIGGER_AREA_TYPE)) |
| #define | EWL_TEXT_TRIGGER_AREA_TYPE "trigger_area" |
Typedefs | |
| typedef struct Ewl_Text_Trigger_Area | Ewl_Text_Trigger_Area |
Functions | |
| void | ewl_text_trigger_area_add (Ewl_Text *t, Ewl_Text_Trigger *cur, int x, int y, int w, int h) |
| Creates a trigger area at the given co-ordinates. | |
| void | ewl_text_trigger_area_cb_clicked (Ewl_Widget *w, void *ev, void *data __UNUSED__) |
| void | ewl_text_trigger_area_cb_mouse_down (Ewl_Widget *w, void *ev, void *data __UNUSED__) |
| void | ewl_text_trigger_area_cb_mouse_in (Ewl_Widget *w, void *ev, void *data __UNUSED__) |
| void | ewl_text_trigger_area_cb_mouse_out (Ewl_Widget *w, void *ev, void *data __UNUSED__) |
| void | ewl_text_trigger_area_cb_mouse_up (Ewl_Widget *w, void *ev, void *data __UNUSED__) |
| void | ewl_text_trigger_areas_cleanup (Ewl_Text_Trigger *trig) |
| Cleans up the trigger areas for trig. | |
| unsigned int | ewl_text_trigger_base_get (Ewl_Text_Trigger *t) |
| Retrieves the current base position of the cursor. | |
| void | ewl_text_trigger_base_set (Ewl_Text_Trigger *t, unsigned int char_pos) |
| Sets the given position pos as the base for the trigger t. | |
| void | ewl_text_trigger_cb_destroy (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_text_trigger_cb_hide (Ewl_Widget *w, void *ev __UNUSED__, void *data __UNUSED__) |
| Hides the trigger. | |
| void | ewl_text_trigger_cb_show (Ewl_Widget *w, void *ev __UNUSED__, void *data __UNUSED__) |
| Shows the trigger. | |
| void | ewl_text_trigger_cb_unrealize (Ewl_Widget *w, void *ev __UNUSED__, void *data __UNUSED__) |
| Unrealizes the trigger. | |
| int | ewl_text_trigger_init (Ewl_Text_Trigger *trigger, Ewl_Text_Trigger_Type type) |
| Initializes a trigger to default values. | |
| unsigned int | ewl_text_trigger_length_get (Ewl_Text_Trigger *t) |
| Retrieves the length from the cursor t. | |
| void | ewl_text_trigger_length_set (Ewl_Text_Trigger *t, unsigned int char_len) |
| Sets the length len on the trigger t. | |
| Ewl_Widget * | ewl_text_trigger_new (Ewl_Text_Trigger_Type type) |
| Creates a new trigger for the text object. | |
| unsigned int | ewl_text_trigger_start_pos_get (Ewl_Text_Trigger *t) |
| Retrieves the start position of the trigger. | |
| void | ewl_text_trigger_start_pos_set (Ewl_Text_Trigger *t, unsigned int char_pos) |
| Sets the start position of the trigger t to position pos. | |
| Ewl_Text_Trigger_Type | ewl_text_trigger_type_get (Ewl_Text_Trigger *t) |
| Retrieves the type of the trigger. | |
Define Documentation
| #define EWL_TEXT_TRIGGER_AREA | ( | area | ) | ((Ewl_Text_Trigger_Area *) area) |
Typecasts a pointer to an Ewl_Text_Trigger_Area pointer
Referenced by ewl_text_trigger_area_add(), ewl_text_trigger_area_cb_clicked(), ewl_text_trigger_area_cb_mouse_down(), ewl_text_trigger_area_cb_mouse_in(), ewl_text_trigger_area_cb_mouse_out(), and ewl_text_trigger_area_cb_mouse_up().
| #define EWL_TEXT_TRIGGER_AREA_IS | ( | w | ) | (ewl_widget_type_is(EWL_WIDGET(w), EWL_TEXT_TRIGGER_AREA_TYPE)) |
Returns TRUE if the widget is an Ewl_Text_Area_Trigger, FALSE otherwise
| #define EWL_TEXT_TRIGGER_AREA_TYPE "trigger_area" |
The type name for the Ewl_Text_Area_Trigger widget
Referenced by ewl_text_trigger_area_cb_clicked(), ewl_text_trigger_area_cb_mouse_down(), ewl_text_trigger_area_cb_mouse_in(), ewl_text_trigger_area_cb_mouse_out(), and ewl_text_trigger_area_cb_mouse_up().
Typedef Documentation
| typedef struct Ewl_Text_Trigger_Area Ewl_Text_Trigger_Area |
Typdef for the Ewl_Text_Trigger_Area struct
Function Documentation
| void ewl_text_trigger_area_cb_clicked | ( | Ewl_Widget * | w, | |
| void * | ev, | |||
| void *data | __UNUSED__ | |||
| ) |
| void ewl_text_trigger_area_cb_mouse_down | ( | Ewl_Widget * | w, | |
| void * | ev, | |||
| void *data | __UNUSED__ | |||
| ) |
| void ewl_text_trigger_area_cb_mouse_in | ( | Ewl_Widget * | w, | |
| void * | ev, | |||
| void *data | __UNUSED__ | |||
| ) |
| void ewl_text_trigger_area_cb_mouse_out | ( | Ewl_Widget * | w, | |
| void * | ev, | |||
| void *data | __UNUSED__ | |||
| ) |
| void ewl_text_trigger_area_cb_mouse_up | ( | Ewl_Widget * | w, | |
| void * | ev, | |||
| void *data | __UNUSED__ | |||
| ) |
| void ewl_text_trigger_cb_destroy | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
| void ewl_text_trigger_cb_hide | ( | Ewl_Widget * | w, | |
| void *ev | __UNUSED__, | |||
| void *data | __UNUSED__ | |||
| ) |
Hides the trigger.
- Parameters:
-
w,: The trigger to work with ev,: UNUSED data,: UNUSED
- Returns:
- Returns no value
References Ewl_Text_Trigger::areas, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_TEXT_TRIGGER, EWL_TEXT_TRIGGER_TYPE, and ewl_widget_hide().
Referenced by ewl_text_trigger_init().
| void ewl_text_trigger_cb_show | ( | Ewl_Widget * | w, | |
| void *ev | __UNUSED__, | |||
| void *data | __UNUSED__ | |||
| ) |
Shows the trigger.
- Parameters:
-
w,: The trigger to work with ev,: UNUSED data,: UNUSED
- Returns:
- Returns no value
References Ewl_Text_Trigger::areas, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_TEXT_TRIGGER, EWL_TEXT_TRIGGER_TYPE, and ewl_widget_show().
Referenced by ewl_text_trigger_init().
| void ewl_text_trigger_cb_unrealize | ( | Ewl_Widget * | w, | |
| void *ev | __UNUSED__, | |||
| void *data | __UNUSED__ | |||
| ) |
Unrealizes the trigger.
- Parameters:
-
w,: The trigger to work with ev,: UNUSED data,: UNUSED
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_TEXT_TRIGGER, ewl_text_trigger_areas_cleanup(), and EWL_TEXT_TRIGGER_TYPE.
Referenced by ewl_text_trigger_init().