_gtkTextTagCBclick

Set the callback when the user press a mouse button on a part of text which has a particular tag. This is a "light" callback.

Définit un réflexe de click (bouton appuyé) sur une partion du texte sur lequel un tag a été apposé.

Type :

fun [ObjGtk fun [ObjGtk u0 S S I] u1 u0 S] ObjGtk

_textview_ : ObjGtk : any textview object already created.

_reflex_ : fun [ObjGtk u0 S S I] u1 : callback

_userparam_ : u0 : a parameter at your convenience.

_tagname_ : S : the name of the tag. The tag must be already created. If _tagname_ is equal at nil, then a click will call the callback from anywhere on the _textview_.

Return : ObjGtk : the same textview or nil if error (tag not created, object unknown, ...).


See also : _gtkTextTagCBclickEx.

Example :

	fun cbTagForeground (obj, userparam, tagname, text, numbutton)=
		_fooS strcat "tag name = " tagname;
		_fooS strcat "user parameter = " userparam;
		_fooS strcat "text = " text;
		_fooS strcat "button number = " itoa numbutton;
		0;;
	
	fun main ()=
		_showconsole;
		...
		_gtkTextTableTagAddS table "tag_foreground" ["foreground" "brown"] :: nil; /* create a tag */
		_gtkTextTagCBclick object @cbTagForeground "test reflex !" "tag_foreground"; /* set the callback */
		...
	

Back