digitalmars.D.learn - gtkDcoding Blog Post for 2019-03-29 - Grid
- Ron Tarrant (3/3) Mar 29 2019 I'm having trouble replying to the thread I usually use, so...
- aberba (3/6) Mar 29 2019 Have shared gtkdcoding.com with some folks and they like it, keep
- Ron Tarrant (2/4) Mar 29 2019 Cool. Thanks, aberba.
- Michelle Long (2/5) Mar 29 2019 I really wish you would start taking screenshots! It is not hard!
- Ron Tarrant (4/6) Mar 29 2019 You still think this is about me not knowing how to take a
- number (6/8) Mar 30 2019 Thanks!
- Ron Tarrant (7/12) Mar 30 2019 Thanks for catching that. I've made the following changes:
- Ron Tarrant (7/7) Apr 02 2019 Today's the day for (yet) another blog post over on
- number (9/21) Apr 02 2019 The function ignores its argument and always uses member variable
- Ron Tarrant (14/23) Apr 02 2019 Thanks for catching my typos. I gotta stop messing with the code
- Mike Wey (9/23) Apr 02 2019 While that would be true for things that live on the stack, this is not
- Ron Tarrant (3/9) Apr 03 2019 Glad you're around to step in when I don't really understand
I'm having trouble replying to the thread I usually use, so... There's a new tutorial for using a GTK Grid. You can find it here: http://gtkdcoding.com/2019/03/29/0022-grids.html
Mar 29 2019
On Friday, 29 March 2019 at 14:25:16 UTC, Ron Tarrant wrote:I'm having trouble replying to the thread I usually use, so... There's a new tutorial for using a GTK Grid. You can find it here: http://gtkdcoding.com/2019/03/29/0022-grids.htmlHave shared gtkdcoding.com with some folks and they like it, keep it coming!!
Mar 29 2019
On Friday, 29 March 2019 at 16:21:59 UTC, aberba wrote:Have shared gtkdcoding.com with some folks and they like it, keep it coming!!Cool. Thanks, aberba.
Mar 29 2019
On Friday, 29 March 2019 at 14:25:16 UTC, Ron Tarrant wrote:I'm having trouble replying to the thread I usually use, so... There's a new tutorial for using a GTK Grid. You can find it here: http://gtkdcoding.com/2019/03/29/0022-grids.htmlI really wish you would start taking screenshots! It is not hard!
Mar 29 2019
On Friday, 29 March 2019 at 20:34:32 UTC, Michelle Long wrote:I really wish you would start taking screenshots! It is not hard!You still think this is about me not knowing how to take a screenshot? :) I guess you didn't read my reply to your last request.
Mar 29 2019
On Friday, 29 March 2019 at 14:25:16 UTC, Ron Tarrant wrote:There's a new tutorial for using a GTK Grid. You can find it here: http://gtkdcoding.com/2019/03/29/0022-grids.htmlThanks! The first link in the blog post to '..the last blog post' links to the 0022 article itself, not to a previous one. BTW, it compiles fine without 'import gtk.c.types', too. Main.d (and maybe others) contains a 'public import gtk.c.types;'
Mar 30 2019
On Saturday, 30 March 2019 at 10:19:15 UTC, number wrote:The first link in the blog post to '..the last blog post' links to the 0022 article itself, not to a previous one.Corrected.BTW, it compiles fine without 'import gtk.c.types', too. Main.d (and maybe others) contains a 'public import gtk.c.types;'Thanks for catching that. I've made the following changes: - removed all import gtk.c.types statements, - added a comment below the import statement block stating which flags are brought in from c.types, - rewrote all coverage of examples to reflect the above points.
Mar 30 2019
Today's the day for (yet) another blog post over on gtkDcoding.com and the subjects are: - the RadioButton, and - the ColorButton. You can find it here: http://gtkdcoding.com/2019/04/02/0023-radio-and-color-buttons.html
Apr 02 2019
On Tuesday, 2 April 2019 at 11:31:39 UTC, Ron Tarrant wrote:Today's the day for (yet) another blog post over on gtkDcoding.com and the subjects are: - the RadioButton, and - the ColorButton. You can find it here: http://gtkdcoding.com/2019/04/02/0023-radio-and-color-buttons.htmlThank you!But if we want one of the others to be active on start-up, as well as syncing up the observed object, we have to call that button’s setActive(true) function. To simplify this two-step process, I broke it out into its own function, setActiveButton().The function ignores its argument and always uses member variable button2 instead. Changing the parameter type to MyRadioButton and using 'button' instead of 'button2' in the body works, so you could pass another default in RadioBox.this(). Can somebody explain why getRgba() (apparently inherited from ColorChooser) does take an out parameter instead of returning an Gdk.RGBA?
Apr 02 2019
On Tuesday, 2 April 2019 at 14:13:09 UTC, number wrote:Thank you!You're welcome. :)The function ignores its argument and always uses member variable button2 instead. Changing the parameter type to MyRadioButton and using 'button' instead of 'button2' in the body works, so you could pass another default in RadioBox.this().Thanks for catching my typos. I gotta stop messing with the code once it's working. :) Fixes are uploaded. Anyway, you can also declare it as a RadioButton and that works, too... as long as the variables inside the function are changed to 'button.'Can somebody explain why getRgba() (apparently inherited from ColorChooser) does take an out parameter instead of returning an Gdk.RGBA?My understanding is this: Returning an object (as opposed to a single value) means returning a pointer rather than the entire object. And the object will cease to exist once the function returns because the scope no longer exists. So, it follows that an out variable passed in will preserve the object itself once program control returns to the caller.
Apr 02 2019
On 02-04-2019 17:48, Ron Tarrant wrote:On Tuesday, 2 April 2019 at 14:13:09 UTC, number wrote:While that would be true for things that live on the stack, this is not the case for RGBA. The C version of getRgba uses the "out" parameter so you can pass in a existing GdkRgba, even tough that would make it more like ref. This doesn't make sense for the d binding since you will always get a new RGBA passed through the out parameter. -- Mike WeyCan somebody explain why getRgba() (apparently inherited from ColorChooser) does take an out parameter instead of returning an Gdk.RGBA?My understanding is this: Returning an object (as opposed to a single value) means returning a pointer rather than the entire object. And the object will cease to exist once the function returns because the scope no longer exists. So, it follows that an out variable passed in will preserve the object itself once program control returns to the caller.
Apr 02 2019
On Tuesday, 2 April 2019 at 18:27:10 UTC, Mike Wey wrote:While that would be true for things that live on the stack, this is not the case for RGBA. The C version of getRgba uses the "out" parameter so you can pass in a existing GdkRgba, even tough that would make it more like ref. This doesn't make sense for the d binding since you will always get a new RGBA passed through the out parameter.Glad you're around to step in when I don't really understand what's going on, Mike. Thanks for clearing this up. :)
Apr 03 2019