Ewl_Text_Trigger: References portions of the
Detailed Description
Defines a class for triggering actions within the text.text that respond to actions.
- Remarks:
- Inherits from Ewl_Widget.
Data Structures | |
struct | Ewl_Text_Trigger |
Inherits from Ewl_Widget and extends to provide a trigger for the text widget. More... | |
Defines | |
#define | EWL_TEXT_TRIGGER(trigger) ((Ewl_Text_Trigger *) trigger) |
#define | EWL_TEXT_TRIGGER_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_TEXT_TRIGGER_TYPE)) |
#define | EWL_TEXT_TRIGGER_TYPE "trigger" |
Typedefs | |
typedef Ewl_Text_Trigger | Ewl_Text_Trigger |
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_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_hide (Ewl_Widget *w, void *ev, void *data) |
Hides the trigger. | |
void | ewl_text_trigger_cb_show (Ewl_Widget *w, void *ev, void *data) |
Shows the trigger. | |
void | ewl_text_trigger_cb_unrealize (Ewl_Widget *w, void *ev, void *data) |
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 | ( | trigger | ) | ((Ewl_Text_Trigger *) trigger) |
Typecasts a pointer to an Ewl_Text_Trigger pointer
#define EWL_TEXT_TRIGGER_IS | ( | w | ) | (ewl_widget_type_is(EWL_WIDGET(w), EWL_TEXT_TRIGGER_TYPE)) |
Returns TRUE if the widget is an Ewl_Text_Trigger, FALSE otherwise
#define EWL_TEXT_TRIGGER_TYPE "trigger" |
The type name for the Ewl_Text_Trigger widget
Typedef Documentation
typedef struct Ewl_Text_Trigger Ewl_Text_Trigger |
A trigger in the text, used for selections and clickable text
Function Documentation
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.
- Parameters:
-
t,: The Ewl_Text parent cur,: The trigger to work with x,: The x position y,: The y position w,: The width h,: The height
- Returns:
- Returns no value
void ewl_text_trigger_areas_cleanup | ( | Ewl_Text_Trigger * | trig | ) |
Cleans up the trigger areas for trig.
- Parameters:
-
trig,: The trigger to work with
- Returns:
- Returns no value
unsigned int ewl_text_trigger_base_get | ( | Ewl_Text_Trigger * | t | ) |
Retrieves the current base position of the cursor.
- Parameters:
-
t,: The trigger to work with
- Returns:
- Returns 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.
- Parameters:
-
t,: The trigger to work with char_pos,: The position to set as the base for the cursor
- Returns:
- Returns no value
void ewl_text_trigger_cb_hide | ( | Ewl_Widget * | w, | |
void * | ev, | |||
void * | data | |||
) |
Hides the trigger.
- Parameters:
-
w,: The trigger to work with ev,: UNUSED data,: UNUSED
- Returns:
- Returns no value
void ewl_text_trigger_cb_show | ( | Ewl_Widget * | w, | |
void * | ev, | |||
void * | data | |||
) |
Shows the trigger.
- Parameters:
-
w,: The trigger to work with ev,: UNUSED data,: UNUSED
- Returns:
- Returns no value
void ewl_text_trigger_cb_unrealize | ( | Ewl_Widget * | w, | |
void * | ev, | |||
void * | data | |||
) |
Unrealizes the trigger.
- Parameters:
-
w,: The trigger to work with ev,: UNUSED data,: UNUSED
- Returns:
- Returns no value
int ewl_text_trigger_init | ( | Ewl_Text_Trigger * | trigger, | |
Ewl_Text_Trigger_Type | type | |||
) |
Initializes a trigger to default values.
- Parameters:
-
trigger,: The trigger to initialize type,: The type of the triger
- Returns:
- Returns TRUE if successful of FALSE otherwise
unsigned int ewl_text_trigger_length_get | ( | Ewl_Text_Trigger * | t | ) |
Retrieves the length from the cursor t.
- Parameters:
-
t,: The trigger to work with
- Returns:
- Returns the length of the trigger
void ewl_text_trigger_length_set | ( | Ewl_Text_Trigger * | t, | |
unsigned int | char_len | |||
) |
Sets the length len on the trigger t.
- Parameters:
-
t,: The trigger to work with char_len,: The length to set on the cursor
- Returns:
- Returns no value
Ewl_Widget* ewl_text_trigger_new | ( | Ewl_Text_Trigger_Type | type | ) |
Creates a new trigger for the text object.
- Parameters:
-
type,: The type of trigger to create
- Returns:
- Returns a new ewl_text_trigger widget
unsigned int ewl_text_trigger_start_pos_get | ( | Ewl_Text_Trigger * | t | ) |
Retrieves the start position of the trigger.
- Parameters:
-
t,: The trigger to work with
- Returns:
- Returns the current 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.
- Parameters:
-
t,: The trigger to work with char_pos,: The position to set
- Returns:
- Returns no value
Ewl_Text_Trigger_Type ewl_text_trigger_type_get | ( | Ewl_Text_Trigger * | t | ) |
Retrieves the type of the trigger.
- Parameters:
-
t,: The trigger to work with
- Returns:
- Returns the type of the trigger