www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Blog Post #77: Notebook, Part I

reply Ron Tarrant <rontarrant gmail.com> writes:
Today starts a new series on the Notebook widget. Over the next 
few weeks, we'll dig in deep, looking at single-tab and 
multiple-tab demos, customizing the look of the actual tabs, 
adding and removing tabs... a whole ton of stuff. Sounds like 
fun, right?

Come on over and check it out: 
https://gtkdcoding.com/2019/10/08/0077-notebook-i-basics.html
Oct 08 2019
next sibling parent reply GreatSam4sure <greatsam4sure gmail.com> writes:
On Tuesday, 8 October 2019 at 10:00:00 UTC, Ron Tarrant wrote:
 Today starts a new series on the Notebook widget. Over the next 
 few weeks, we'll dig in deep, looking at single-tab and 
 multiple-tab demos, customizing the look of the actual tabs, 
 adding and removing tabs... a whole ton of stuff. Sounds like 
 fun, right?

 Come on over and check it out: 
 https://gtkdcoding.com/2019/10/08/0077-notebook-i-basics.html
Good works Is there any way to detect the size of my screen using gtkd? So that incan calculate the size of my screen and center my window on the screen using move(x, y). Besides can you convert all your posts to a pdf that is easily downloadable for those with little internet access?
Oct 08 2019
next sibling parent reply Ron Tarrant <rontarrant gmail.com> writes:
On Wednesday, 9 October 2019 at 03:13:48 UTC, GreatSam4sure wrote:

 Good works
Thanks, GreatSam4sure.
 Is there any way to detect the size of my screen using gtkd? So 
 that incan calculate the size of my screen and center my window 
 on the screen using move(x, y).
I had a quick look into this and there is no straightforward solution, so I can't give you an immediate answer. It would be easier to explain with a demo, so I'll need some time to work one up. I've put it on my to-do list.
 Besides can you convert all your posts to a pdf that is easily 
 downloadable for those with little internet access?
I've been thinking about an ebook based on the blog, something that would start with installing a development environment, go into how to organize and write each part of an application, and end with how to distribute the finished product. It's in very early stages ATM, but I'm open to any suggestions you (or anyone else) may have for how to make it as useful as possible.
Oct 09 2019
parent GreatSam4sure <greatsam4sure gmail.com> writes:
On Wednesday, 9 October 2019 at 09:44:39 UTC, Ron Tarrant wrote:
 On Wednesday, 9 October 2019 at 03:13:48 UTC, GreatSam4sure 
 wrote:

 Good works
Thanks, GreatSam4sure.
 Is there any way to detect the size of my screen using gtkd? 
 So that incan calculate the size of my screen and center my 
 window on the screen using move(x, y).
I had a quick look into this and there is no straightforward solution, so I can't give you an immediate answer. It would be easier to explain with a demo, so I'll need some time to work one up. I've put it on my to-do list.
 Besides can you convert all your posts to a pdf that is easily 
 downloadable for those with little internet access?
I've been thinking about an ebook based on the blog, something that would start with installing a development environment, go into how to organize and write each part of an application, and end with how to distribute the finished product. It's in very early stages ATM, but I'm open to any suggestions you (or anyone else) may have for how to make it as useful as possible.
Thanks, it will be better to use coded. It is very easy to stand a gtkd project in coded and vs code. All dependency taking care of. Dub will download the dependency for if you are connected to the internet
Oct 09 2019
prev sibling parent Ron Tarrant <rontarrant gmail.com> writes:
On Wednesday, 9 October 2019 at 03:13:48 UTC, GreatSam4sure wrote:

 Is there any way to detect the size of my screen using gtkd? So 
 that incan calculate the size of my screen and center my window 
 on the screen using move(x, y).
I was distracted last time I replied to this thread and so overlooked the obvious. This is actually very simple to do. Add this to your Window or MainWindow constructor: Window.setPosition(WindowPosition.CENTER); That's it. Here's a full example, so you can see it in its natural habitat: https://github.com/rontarrant/gtkDcoding/blob/master/001_window/window_001_11_centered.d
Oct 15 2019
prev sibling parent reply Carsten Schlote <carsten.schlote gmx.net> writes:
On Tuesday, 8 October 2019 at 10:00:00 UTC, Ron Tarrant wrote:
 Today starts a new series on the Notebook widget. Over the next 
 few weeks, we'll dig in deep, looking at single-tab and 
 multiple-tab demos, customizing the look of the actual tabs, 
 adding and removing tabs... a whole ton of stuff. Sounds like 
 fun, right?

 Come on over and check it out: 
 https://gtkdcoding.com/2019/10/08/0077-notebook-i-basics.html
Nice work, Ron! I'm just converted some of you examples into dub based projects, and compiled and run them a normal intel PC and a Raspberry. As a prerequisite I had to install the following on a Raspian Lite installation (from a NOOP sdcard, no GUI) $ sudo apt install libgstreamer-plugins-base1.0-0 libgstreamer-plugins-bad1.0-0 I also installed dub and ldc2 on it: $ sudo apt install dub ldc2 I prepared a new project $ dub init gtk_test_0 gtk-d and replaced the contents of source/app.d with your very first example 'Hello GtkD Imperative'. Assuming you logged in with 'ssh -YXC pi <yourbox>', you can compile and start it with $ dub run A nice empty GTK window should appear now. Of course a normal Raspbian installation with GUI should work as well. Ever considered to provide such dub based examples on GitHub/GitLab/... for easy access? Such source examples could be very helpful for GTK newbies. And dub projects should work on Windows as well. Carsten
Oct 12 2019
parent Ron Tarrant <rontarrant gmail.com> writes:
On Saturday, 12 October 2019 at 16:34:01 UTC, Carsten Schlote 
wrote:

 Nice work, Ron!
Thanks, Carsten.
 I'm just converted some of you examples into dub based 
 projects, and compiled and run them a normal intel PC and a 
 Raspberry. As a prerequisite I had to install the following on 
 a Raspian Lite installation (from a NOOP sdcard, no GUI)
Well, that's pretty cool.
 Ever considered to provide such dub based examples on 
 GitHub/GitLab/... for easy access?
Yup! It's coming. Also, module-based stuff.
 Such source examples could be very helpful for GTK newbies. And 
 dub projects should work on Windows as well.
Yup, absolutely.
Oct 12 2019