GtkD: New widget

Johnson via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Aug 21 16:38:34 PDT 2017


On Monday, 21 August 2017 at 20:54:04 UTC, Mike Wey wrote:
> On 21-08-17 03:45, Johnson Jones wrote:
>> [...]
>
> If you want gtk to know about the functions you override you 
> could use gtkd.Implement.ImplementCLass.
>
> [...]

Thanks, I'll test it out when I get a chance. I was able to work 
around the issue for now but I imagine I'll need the ability to 
implement my own container in the future.

BTW, when I try to create a value I get an error about opCall

Value handleSize = new Value(0);

vs

Value handleSize = Value(0);

I'd rather not create a value on the heap when I only need it 
locally.

Could you add a way to create the value with the right type to 
Value?

Even static constructors would work(probably could templatize it).

Although, I'm not sure how much it matters since value itself 
seems to allocate on the heap ;/

	public this()
	{
	    this(new GValue);
	}

But it might help reduce some memory waste.



More information about the Digitalmars-d-learn mailing list