1. GUI libraries

Here are a few things I considered before I started "wrapping" GTK3:

  • Is the library being actively maintained?
  • Is it available for more than one platform?
  • Is it a "one-man" project, or well-supported?
  • Do lots of people use it? Popular apps written in it?
  • Is it well-documented with regular updates?
  • Is it likely to survive the changes in hardware and platforms?
  • Is it relatively easy to install (no compiling, etc)
  • Does it rely on some other programming language to do the work? (see note).

While there are dozens of GUI libraries out there, the vast majority do not fit more than 3 of those criteria.

Only QT and GTK3 qualify, and wrapping QT is difficult, and the apps written with it don't look as "polished" (to me).

Note: While this idea may work, it doesn't look good politically (demotes Euphoria to just another scripting language) and no doubt adds some overhead.

So, I'm not saying we should adopt EuGTK as the GUI to ship with Euphoria. I'm asking which of those criteria listed above are of no importance to making a decision? How many can safely be ignored?

new topic     » topic index » view message » categorize

2. Re: GUI libraries

euGTK works great.

euGTK makes sense.

euGTK should be shipped with the next release of Euphoria.


IUP

  • has dropped 32bit
  • the IUP .so files are a moving target, you have to match the IUP version, bits, os kernal to get things to work--much too painful for me
  • my netbook is 32bit and works just fine for my programming needs simply because it runs Euphoria (The Python way is to tell me go buy a faster computer.)
  • IUP has the value of working on Euphoria and Phix, not identically but close enough. But, since getting IUP to work is painful, this pseudo compatibility is meaningless.

tk/tcl

  • I can get a tk/tcl gui to work equally well on Euphoria and Phix
  • the appearance of the gui is now better than I originally remember it
  • very few people will put up with writing a tcl gui

libui

  • a work in progress
  • will never compete with euGTK
  • does offer Windows|Unix
    • with a minimal wrapper size, and one small .so|.dll file
    • looks like a very handy gui to ship with Euphoria

Big question, can libui be ported to Phix?


I see Euphoria has having two gui choices in the next release

  • euGTK
  • libui

_tom
Forked into: Considerations For A GUI Library for Euphoria

new topic     » goto parent     » topic index » view message » categorize

3. Re: GUI libraries

So, perhaps 3 more questions:

Can EuGTK be ported to phix - yes, no doubt, but lots of work.

Can libui be wrapped for phix? - seems probable, but needs volunteers.

Could tk/tcl be wrapped so it worked in a more Euphoric way?

new topic     » goto parent     » topic index » view message » categorize

4. Re: GUI libraries

irv said...

Could tk/tcl be wrapped so it worked in a more Euphoric way?

Anyone have an actual source on Tk binaries? Do I just install Tcl and pilfer them from there?

-Greg

new topic     » goto parent     » topic index » view message » categorize

5. Re: GUI libraries

If we can repackage the GTK binaries with Euphoria on Windows, then I'm okay with including that either along side, or in replacement of, libui.

On Linux and BSD, GTK is almost guaranteed to be installed in any desktop environment. If not it's a quick apt/rpm/pkg install away. Not sure about macOS, I'll have to play with that.

-Greg

new topic     » goto parent     » topic index » view message » categorize

6. Re: GUI libraries

irv said...

So, perhaps 3 more questions:

Can EuGTK be ported to phix - yes, no doubt, but lots of work.

A massive project that I could not wish on one person.

Possibly not needed since Phix has IUP for everyone except me and my 32bit computer.

irv said...

Can libui be wrapped for phix? - seems probable, but needs volunteers.

The big incompatibility is the Euphoria map library. Maybe Pete can take a quick look to see if his tree equivalent can be make to work.

I wrote a libui "hello world" with two windows. My first impression is that you have to remember to look after a lot of details yourself. You have to write your own window closing sub-program since clicking the `x` of an open window is not enough to close the window or close the application.

You also have to close both windows in your close sub-program because leaving a window exposed results in a program crash.

Thanks Greg, I still see this as a great addition to Euphoria

Thanks Irv, you have have a superior gui.

irv said...

Could tk/tcl be wrapped so it worked in a more Euphoric way?

The existing tk/tcl interface works by letting you write tk/tcl code (in the style of tk/tcl) within Euphoria and sending it to a running tk interpreter.

No clue how you would write an actual tcl wrapper.

_tom

new topic     » goto parent     » topic index » view message » categorize

7. Re: GUI libraries

_tom said...

The big incompatibility is the Euphoria map library. Maybe Pete can take a quick look to see if his tree equivalent can be make to work.

The only thing I use maps for is to make define_c_func/proc calls a little cleaner. That can be reverted back to a normal approach pretty simply. I may just remove it.

_tom said...

You have to write your own window closing sub-program since clicking the `x` of an open window is not enough to close the window or close the application.

I've been tinkering with doing this automatically and I think I've got something put together that works. It will be in my next release, date still TBD.

_tom said...

The existing tk/tcl interface works by letting you write tk/tcl code (in the style of tk/tcl) within Euphoria and sending it to a running tk interpreter.

Blarg. That's gross. AFAIK, Tk is actually a C library and should be usable directly. I've not dug into that very much.

-Greg

new topic     » goto parent     » topic index » view message » categorize

8. Re: GUI libraries

_tom said...
irv said...

So, perhaps 3 more questions:

Can EuGTK be ported to phix - yes, no doubt, but lots of work.

A massive project that I could not wish on one person.

Possibly not needed since Phix has IUP for everyone except me and my 32bit computer.

My biggest beef with GTK is that it has dropped 32-bit support on Windows!

_tom said...
irv said...

Can libui be wrapped for phix? - seems probable, but needs volunteers.

The big incompatibility is the Euphoria map library. Maybe Pete can take a quick look to see if his tree equivalent can be make to work.

I got libui working on Phix 11/2017, nearly two years ago, but never uploaded anything.

The map changes were quite straightforward:

--map:map id_lookup = map:new() 
constant id_lookup = new_dict() 
 
--in procedure Define_C_func and proc: 
--  map:put(id_lookup, name, id) 
    putd(name, id, id_lookup) 
 
--in function C_func/proc: 
--      func = map:get(id_lookup, func, -1) 
        integer k = getd_index(func,id_lookup) 
        if k=0 then ?9/0 end if 
        func = getd_by_index(k,id_lookup) 

What I never got round to was making anything work on Linux.

new topic     » goto parent     » topic index » view message » categorize

9. Re: GUI libraries

petelomax said...

My biggest beef with GTK is that it has dropped 32-bit support on Windows!

From GTK https://www.gtk.org/download/windows.php

Using GTK from MSYS2 packages 
Installation 
 
The MSYS2 project provides a UNIX-like development environment for Windows. It provides packages for many software applications and libraries, including the GTK stack. If you prefer developing using Visual Studio, you may be better off installing GTK from vcpkg instead. 
 
In MSYS2 packages are installed using the pacman package manager. 
 
Note: in the following steps, we will assume you're using a 64-bit Windows. Therefore, the package names include the x86_64 architecture identifier.  
 
If you're using a 32-bit Windows, please adapt the instructions below using the i686 architecture identifier. 

My biggest beef with Windows is that this OS has dropped 32-bit support on computers.

Windows never worked on my netbook. The Windows specification said a netbook must be limited to 1G ram. Then, since Windows did not work, they finally said that the word "netbook" must never be mentioned again (taken from official Microsoft documentation guidelines).

Hp discretely put a second memory slot in my netbook and make it easy to add memory and a SSD. Still works (with relaxed performance) using Mint Linux.

_tom

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu