GTKD - get CSS class for button

TheDGuy via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jun 22 08:16:59 PDT 2016


On Wednesday, 22 June 2016 at 13:47:01 UTC, Gerald wrote:
> On Wednesday, 22 June 2016 at 12:57:51 UTC, TheDGuy wrote:
>>> widget.getStyleContext().listClasses() to get a list of all 
>>> classes assigned to the widget. If you just want to see if a 
>>> specific class is assigned to the widget you can use 
>>> widget.getStyleContext().hasClass()
>>
>> Thanks a lot for your answer. Do you know how i can get the 
>> first classname as string from the widget? I don't understand 
>> how the return type 'GList' is organized.
>
> ListG has a D specific method called toArray that allows you to 
> convert it to a typed array, so you could use it in this case 
> to get a string[] out of it.
>
> http://api.gtkd.org/src/glib/ListG.html

"Type T wraps should match the type of the data"

Does string match the type of the data? What is the type of the 
data? How do i tell the function that i want the Array as a 
string array? I am not familiar with Types and what 'TC' or 'T' 
is, i am afraid.


More information about the Digitalmars-d-learn mailing list