@@ -25,6 +25,7 @@ typedef void (*component_tick_cb)(component *c);
2525typedef void (* component_free_cb )(component * c );
2626typedef void (* component_init_cb )(component * c , const gui_theme * theme );
2727typedef component * (* component_find_cb )(component * c , int id );
28+ typedef component * (* component_find_text_cb )(component * c , const char * text );
2829
2930/*! \brief Basic GUI object
3031 *
@@ -70,8 +71,9 @@ struct component {
7071 component_tick_cb tick ; ///< Tick function callback. This is called periodically.
7172 component_free_cb free ; ///< Free function callback. Any component callbacks should be done here.
7273 component_find_cb find ; ///< Should only be set by widget and sizer. Used to look up widgets by ID.
73- component_init_cb init ; ///< Initialization function callback. This is called right before layout function. This
74- ///< should be used to prerender elements, decide size hints, etc.
74+ component_find_text_cb find_text ; ///< ...
75+ component_init_cb init ; ///< Initialization function callback. This is called right before layout function. This
76+ ///< should be used to prerender elements, decide size hints, etc.
7577
7678 component * parent ; ///< Parent component. For widgets, usually a sizer. NULL for root component.
7779};
@@ -121,5 +123,6 @@ void component_set_init_cb(component *c, component_init_cb cb);
121123void component_set_tick_cb (component * c , component_tick_cb cb );
122124void component_set_free_cb (component * c , component_free_cb cb );
123125void component_set_find_cb (component * c , component_find_cb cb );
126+ void component_set_find_text_cb (component * c , component_find_cb cb );
124127
125128#endif // COMPONENT_H
0 commit comments