gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[open-cobol-list] Gtk binding, I gave up but just some thoughts


From: Patrick
Subject: [open-cobol-list] Gtk binding, I gave up but just some thoughts
Date: Sat, 25 Jan 2014 21:26:47 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10

I tried to put together a Cobol Gtk binding a few months ago but I ended up abandoning it. It's really a mess and not worth sharing but I wanted to mention a few things in case they were helpful for someone else.

I was going to make a very large shim layer of code that would allow new widgets to be created from the Cobol side as well.

This isn't a perfect example of it but the basic idea was to create an array of widgets in the C shim code and then to be able to index them from within C or Cobol, here is only C:


    GtkWidget  *box [1];
    int widget_index = 1 ;

    box [ widget_index ]   = gtk_hbox_new (homogeneous, spacing);

I also thought that I could hide C CALL statements in paragraphs and then not directly call them but rather use PERFORM statements. I had planned to put all the paragraphs in another copy file to keep things tidy.

Each paragraph was also going to have the ability to process a variety of similar widgets in a single PERFORM call.

So for instance I was thinking of having a button working storage with all the buttons and then a paragraph to instantiate all the buttons in a single PERFORM call in a sort of batch like way.

I guess I am a bit disillusioned with QT, WxWidgets and Gtk right now, I am hoping to run a light and simpler Linux set up, eventually and I think I have settled on Tk. It can be called from C, it's fairly light, it's mature and it's not going to die anytime soon due to it's use with Python Tinker, Ruby-Tk and Perl-Tk. I like FLTK and Fox seems cool but they don't have much momentum these days.

-Patrick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]