_gtkButtonCBpressed

Set a pressed callback.

Définit la callback à appeler lorsque le bouton est pressé.

Type :

fun [ObjGtk fun [ObjGtk u0 I I I I] I u0] ObjGtk

_button_ : ObjGtk : any button already created.

_reflex_ : fun [ObjGtk u0 I I I I] I : the callback, can be nil

_user_param_ : u0 : any user parameter, at your convenience

Return : ObjGtk : the same button or nil if error.

Example :

	typeof button = ObjGtk;;
	
	fun cbButton (objbutton, userparam, mousebutton, keymask, xclick, yclick)=
		_fooS strcat "the user paramater is : " userparam;
		_fooS strcat "the mouse button is : " itoa mousebutton;
		_fooS strcat "the key mask is : " itoa keymask;
		_fooS strcatn "the click coordonate is : " :: (itoa xclick) :: " , " :: (itoa yclick) :: nil;
		0;;
	
	fun main()=
		_showconsole;
		set button = _gtkButtonNewLabel _channel "Bouton";
		_gtkButtonCBpressed button @cbButton "It's Bouton";
		...

Back