php-gtk3 icon indicating copy to clipboard operation
php-gtk3 copied to clipboard

GtkRadioButton_::set_group implementation

Open d47081 opened this issue 1 year ago • 3 comments

GTK documentation https://docs.gtk.org/gtk3/method.RadioButton.set_group.html

I see that is not implemented, and there is no exceptions.

Tried to play around, but seems no simple way to init GSList by PHP objects there? Hm, or maybe re-init every the method by array values..

void GtkRadioButton_::set_group(Php::Parameters &parameters)
{
	GSList* group;

	Php::Value arr = parameters[0];

	for(int index=0; index < (int)arr.size(); index++) {

		g_slist_append(

                // ...

Same for constructor..

I'm using RadioButton::join_group() as the solution

d47081 avatar Aug 03 '24 04:08 d47081

You cannot loop array and create gslist?

https://github.com/scorninpc/php-gtk3/blob/013b2919ca5c5c53ee175afe578aff772ae251c4/src/Gtk/GtkListStore.cpp#L229

scorninpc avatar Aug 03 '24 12:08 scorninpc

I don't know how to init entire PHP object, seems every setter should be called?

or some common helper exists to convert php objects to their cpp implementation (not re-init every the node manually)

d47081 avatar Aug 03 '24 16:08 d47081

maybe this can help

https://github.com/scorninpc/php-gtk3/blob/master/main.cpp#L4409

this will convert any php var to gvalue, including G_TYPE_OBJECT

scorninpc avatar Aug 03 '24 16:08 scorninpc