I have been away for awhile
because I wanted to learn how to become a better programmer
and since gtk is the linux power tool default
starting there is the way to go or is it ?
but all the C code is just ugly
this is where you can combine gtk functions to build the GUI
and then do away with all the ugly pointers and use basic
using the PROTO command allows you to import gtk functions
http://basic-converter.proboards.com/in ... &post=3770
I never liked gtk but it something I wanted to learn and use
it is a needed step for the linux toolbox
Joe
how to embed gtk in BaCon
- Ahau
- King of Docs
- Posts: 1331
- Joined: 28 Dec 2010, 15:18
- Distribution: LXDE & Xfce 32/64-bit
- Location: USA
Re: how to embed gtk in BaCon
Welcome Joe, glad to have you back!
A few months ago, I was toying with the idea of learning C. I wanted to try creating a simple gui sound mixer for alsa that didn't rely on gnome, fltk, pulseaudio, or anything outside of the default Porteus iso. So I read some tutorials and made some CLI "hello world" programs, etc, and started to feel like I was getting the hang of it. Then, I opened the first gtk "hello world" tutorial and got so confused (and a bit intimidated), that I gave up and went on to something else. I'm glad to hear that BaCon is making it more accessible! Good luck, and I'm looking forward to seeing what you're able to put together with this!
A few months ago, I was toying with the idea of learning C. I wanted to try creating a simple gui sound mixer for alsa that didn't rely on gnome, fltk, pulseaudio, or anything outside of the default Porteus iso. So I read some tutorials and made some CLI "hello world" programs, etc, and started to feel like I was getting the hang of it. Then, I opened the first gtk "hello world" tutorial and got so confused (and a bit intimidated), that I gave up and went on to something else. I'm glad to hear that BaCon is making it more accessible! Good luck, and I'm looking forward to seeing what you're able to put together with this!
Please take a look at our online documentation, here. Suggestions are welcome!
Re: how to embed gtk in BaCon
Hey Ahau!
There are several ways to solve a problem
the one that works for you at the time is the best
having different options allows us to get around big dependencies
and complex code
a simple hello world in pure BaCon is pretty easy there is a tutorial
Bacon has many simplified widgets already built in
but for larger projects were you want to use the full power of gtk
we have to embed some things (this is considered an advanced approach
after the basic widgets don't do everything you want)
but an embedded gtk hello world has to be converted to Bacon syntax
which takes a little bit of time but in the end what you are doing is IMPORTING
gtk functions so that they are available to be used inside Bacon
then instead of all the confusing memory address pointing that C code uses
we just use normal variables that don't need to be defined so strictly as C obligates you to do
I am converting all the official gtk examples to BaCon
so that getting started will be easier
updated to have a wiki page
you inspired me to start a mini how to http://code.google.com/p/bigbass-porteu ... 3BaCon#TOP
Joe
There are several ways to solve a problem
the one that works for you at the time is the best
having different options allows us to get around big dependencies
and complex code
a simple hello world in pure BaCon is pretty easy there is a tutorial
Bacon has many simplified widgets already built in
but for larger projects were you want to use the full power of gtk
we have to embed some things (this is considered an advanced approach
after the basic widgets don't do everything you want)
but an embedded gtk hello world has to be converted to Bacon syntax
which takes a little bit of time but in the end what you are doing is IMPORTING
gtk functions so that they are available to be used inside Bacon
then instead of all the confusing memory address pointing that C code uses
we just use normal variables that don't need to be defined so strictly as C obligates you to do
I am converting all the official gtk examples to BaCon
so that getting started will be easier
updated to have a wiki page
you inspired me to start a mini how to http://code.google.com/p/bigbass-porteu ... 3BaCon#TOP
Joe
Re: how to embed gtk in BaCon
bigbass-porteus
is officially dead due to googlecode not allowing updates after January
I will not be maintaining bigbass-porteus with any new updates
all my work will be moved and maintained at sourceforge
https://sourceforge.net/p/baconproto/wiki/Home/
all source code here for the examples
https://sourceforge.net/projects/baconproto/
I am working on embedding GTK/GDK and C code
making it easy to get some nice widgets in GTK3 and GTK2
and of course having fun in the process
P.S the new forum page looks great!
Joe
is officially dead due to googlecode not allowing updates after January
I will not be maintaining bigbass-porteus with any new updates
all my work will be moved and maintained at sourceforge
https://sourceforge.net/p/baconproto/wiki/Home/
all source code here for the examples
https://sourceforge.net/projects/baconproto/
I am working on embedding GTK/GDK and C code
making it easy to get some nice widgets in GTK3 and GTK2
and of course having fun in the process
P.S the new forum page looks great!
Joe
-
- Samurai
- Posts: 137
- Joined: 18 Feb 2016, 09:25
- Distribution: Linux porteus 3.2.2 KDE
- Location: Spain
Re: how to embed gtk in BaCon
if your only purpose is to use GTK from basic and BaCon maybe you would be interested in Gtk-Server which is a server listening to several channels for gtk commands, here you get an example written in Basic using gtk-server listening to FIFO channel.bigbass wrote: but for larger projects were you want to use the full power of gtk
we have to embed some things (this is considered an advanced approach
after the basic widgets don't do everything you want)
but an embedded gtk hello world has to be converted to Bacon syntax
which takes a little bit of time but in the end what you are doing is IMPORTING
gtk functions so that they are available to be used inside Bacon
then instead of all the confusing memory address pointing that C code uses
we just use normal variables that don't need to be defined so strictly as C obligates you to do
I am converting all the official gtk examples to BaCon
so that getting started will be easier
In fact I've seen in BaCon web page an example to use gtk-server so you probably are aware of it and my whole message is useless ;-)