digitalmars.D.learn - gtkDcoding Blog Post # 26 - Menu Basics
- Ron Tarrant (4/4) Apr 12 2019 Today starts a series on GtkD menus. Over the next four weeks,
- number (4/8) Apr 12 2019 Thanks, I'm still a reader!
- Ron Tarrant (7/10) Apr 12 2019 Yes. Right after this series on menus, I start on Dialogs. The
- number (13/21) Apr 13 2019 I'm asking because there was discussion elsewhere on the net
- Ron Tarrant (14/25) Apr 13 2019 Because the Dialog class inherits from Window, you can size it
- number (11/36) Apr 14 2019 Sorry, I was unclear. By rolling my own I meant to not use a
- Ron Tarrant (4/4) Apr 16 2019 It being Tuesday, it's time for another gtkDcoding Blog Post.
Today starts a series on GtkD menus. Over the next four weeks, we'll cover enough ground to get you up-n-running with most menu-related topics. And it all starts right here: http://gtkdcoding.com/2019/04/12/0026-menu-basics.html
Apr 12 2019
On Friday, 12 April 2019 at 09:05:11 UTC, Ron Tarrant wrote:Today starts a series on GtkD menus. Over the next four weeks, we'll cover enough ground to get you up-n-running with most menu-related topics. And it all starts right here: http://gtkdcoding.com/2019/04/12/0026-menu-basics.htmlThanks, I'm still a reader! Are you planning to cover messagebox-like stuff (i.e. gtkdialog.. i guess?)
Apr 12 2019
On Friday, 12 April 2019 at 13:56:51 UTC, number wrote:Thanks, I'm still a reader!Excellent. Thanks for letting me know.Are you planning to cover messagebox-like stuff (i.e. gtkdialog.. i guess?)Yes. Right after this series on menus, I start on Dialogs. The first couple of those are already in the grist mill (HelpDialog, FileChooserDialog) giving that series five articles so far. But I'll put MessageDialog next on the list which means it'll be posted on May 31st.
Apr 12 2019
On Saturday, 13 April 2019 at 00:25:21 UTC, Ron Tarrant wrote:On Friday, 12 April 2019 at 13:56:51 UTC, number wrote:I'm asking because there was discussion elsewhere on the net about another programming language where a [gtk] messagebox title was too long so the text could not be read completely because the messagebox sized itself to the shorter text in the content area. They said it's an OS limitation (meaning gtk standard dialogs). It also seems dialogs are not user-resizable by default, which seems strange to me. So I thought to roll my own dialog, but didn't get to it yet. I also wonder why I often encounter gtk apps/windows that are unresizable, but still have the resize-icon cursor when hovering the bottom-right window edge, which when used moves the window instead.Are you planning to cover messagebox-like stuff (i.e. gtkdialog.. i guess?)Yes. Right after this series on menus, I start on Dialogs. The first couple of those are already in the grist mill (HelpDialog, FileChooserDialog) giving that series five articles so far. But I'll put MessageDialog next on the list which means it'll be posted on May 31st.
Apr 13 2019
On Saturday, 13 April 2019 at 09:49:47 UTC, number wrote:On Saturday, 13 April 2019 at 00:25:21 UTC, Ron Tarrant wrote: I'm asking because ... the messagebox sized itself to the shorter text in the content area. They said it's an OS limitation (meaning gtk standard dialogs).Because the Dialog class inherits from Window, you can size it with setSizeRequest(). On Windows, at least. I'm not sure about Linux. I'm about to go out for a few hours, so perhaps you could test this.It also seems dialogs are not user-resizable by default, which seems strange to me. So I thought to roll my own dialog, but didn't get to it yet.That's another topic I have on my list for the dialog series.I also wonder why I often encounter gtk apps/windows that are unresizable, but still have the resize-icon cursor when hovering the bottom-right window edge, which when used moves the window instead.It's because there are two flags controlling resize-ability, both found in generated\gtkd\gdk\c\types.d: - a window decorations flag (GdkWMDecoration), and - another that controls whether or not the window is allowed to resize (GdkWMFunction). If the programmer turns off the resize flag, but not the decorator flag, well... there's your answer. Hope that helps, number.
Apr 13 2019
On Saturday, 13 April 2019 at 12:42:36 UTC, Ron Tarrant wrote:On Saturday, 13 April 2019 at 09:49:47 UTC, number wrote:Yes, this work on Linux, too.On Saturday, 13 April 2019 at 00:25:21 UTC, Ron Tarrant wrote: I'm asking because ... the messagebox sized itself to the shorter text in the content area. They said it's an OS limitation (meaning gtk standard dialogs).Because the Dialog class inherits from Window, you can size it with setSizeRequest(). On Windows, at least. I'm not sure about Linux. I'm about to go out for a few hours, so perhaps you could test this.Sorry, I was unclear. By rolling my own I meant to not use a predefined library function MessageRequester() that exists in that language, but instead using gtk dialog directly which would be more customizable. Anyway that would only be for learning purposes, nothing I desperately need.It also seems dialogs are not user-resizable by default, which seems strange to me. So I thought to roll my own dialog, but didn't get to it yet.That's another topic I have on my list for the dialog series.Ok, I understand. But then it seems still strange that the window can be moved by dragging the edge if it's only a decoration that is active. Thanks for your explanations.I also wonder why I often encounter gtk apps/windows that are unresizable, but still have the resize-icon cursor when hovering the bottom-right window edge, which when used moves the window instead.It's because there are two flags controlling resize-ability, both found in generated\gtkd\gdk\c\types.d: - a window decorations flag (GdkWMDecoration), and - another that controls whether or not the window is allowed to resize (GdkWMFunction). If the programmer turns off the resize flag, but not the decorator flag, well... there's your answer. Hope that helps, number.
Apr 14 2019
It being Tuesday, it's time for another gtkDcoding Blog Post. Today, we continue our exploration of menu topics by looking at mnemonics and separators. You can find it here: http://gtkdcoding.com/2019/04/16/0027-mnemonic-shortcut-key.html
Apr 16 2019