Alternative GUI libraries with PureBasic ?

Everything else that doesn't fall into one of the other PB categories.
agb2008
User
User
Posts: 60
Joined: Fri Jan 15, 2016 2:22 pm

Alternative GUI libraries with PureBasic ?

Post by agb2008 »

I've seen few posts (mostly related to the older version of PureBasic) regarding alternative GUI libraries usage
with PureBasic in particular: wxWidget wrapper for x86 windows and linux by ts-soft (seems to be quite interesting implementation using wx-c.dll library on Windows, but seems to be not functional for current PB version)... I would like to find out were there any other attempts to use alternative GUI libraries with PB ? For example modern version of wxWidgets with X86 and X64 versions support ? Or probably something more exotic like IUP or Ultimate GUI ? Probably I missed some other possible options - please advice...

P.S. I am looking for cross-platform GUI libs. Windows were mentioned just as an example...
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Alternative GUI libraries with PureBasic ?

Post by IdeasVacuum »

IUP sounds very good but it is not at all exotic, it is using the OS's native forms. Ultimate GUI is not a GUI? It's a rapid dev platform (like PB) and it is using the OS's native forms?

QT is a GUI Lib but for commercial use it is ludicrously expensive.

Seems to me that there is still room in the market for a new GUI lib.....
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Justin
Addict
Addict
Posts: 948
Joined: Sat Apr 26, 2003 2:49 pm

Re: Alternative GUI libraries with PureBasic ?

Post by Justin »

GTK Works with win/Linux and partially mac i think. i tested on Windows and works. The problem is importing the libs, it works on 32bit but not in 64, so you have to use loadlibrary and abandoned it because there is a huge amount of functions. I posted a thread about this, also PB failed to import the 64 bit libs of vlc player(works 32 bit) i think there is a bug in PB, i also posted it but it did not get much interest, so i also abandoned the vlc project.
agb2008
User
User
Posts: 60
Joined: Fri Jan 15, 2016 2:22 pm

Re: Alternative GUI libraries with PureBasic ?

Post by agb2008 »

Justin:

In my project I use external libraries (right now using Windows platform 32/64 bit) and was able to load external functions
from .dll library files without any issues. I've used .dll built with Microsoft Visual Studio compiler and as well ones compiled by myself using GNU MinGW/TDM compilers on Windows platform.

Of cause important to note that if x64 platform used (for OS and PureBasic) - only 64 bit .dll libraries have to be used. And for 32 bit OS and PureBasic - 32 bit .dll libraries.

Second issue that have to be noted (at least for me) - I have to use Prototype or PrototypeC functions (depends of type of .dll):

For 'C' .dll libraries:

Code: Select all

PrototypeC.d func1(x.d, y.d)

If OpenLibrary(0, "mylib.dll")

     func1.func1 = GetFunction(0, "func1")

     val.d = func1(25.4,17.6)

EndIf
Reason for using "PrototypeC" function was ability to correctly specify type of returning value. Because, for example, CallCFunctionFast
way of calling external functions is not very flexible and does not handle string/float/double/quad parameters or string/float/double/quad returns... (quote from help file). When I was just starting using .dll libraries - I've got a lot of issues due to the fact that I missed that note in PureBasic help file - and was unable to understood why my .dll functions not working correctly. After switching to Prototype external functions call - all issues were solved on both 32 and 64 bit platform.
User avatar
hallodri
Enthusiast
Enthusiast
Posts: 208
Joined: Tue Nov 08, 2005 7:59 am
Location: Germany
Contact:

Re: Alternative GUI libraries with PureBasic ?

Post by hallodri »

HanPBF
Enthusiast
Enthusiast
Posts: 570
Joined: Fri Feb 19, 2010 3:42 am

Re: Alternative GUI libraries with PureBasic ?

Post by HanPBF »

Thanks for the hint!

Seems to be under current development.
Examples are great and work (in PureBasic!).

It got a iupWebBrowser control.
On windows it uses the IE web browser control -> so old version, correct?

Any hints available for problems or disadvantages or traps to care of to this lib?
Styling 'only' native?
Why not yet integrated in PB -> at first look seems great to me!

Many thanks in advance, regards!
HanPBF
Enthusiast
Enthusiast
Posts: 570
Joined: Fri Feb 19, 2010 3:42 am

Re: Alternative GUI libraries with PureBasic ?

Post by HanPBF »

Current version of iup is 3.18

Which version are the pb examples of?

Is current version for PureBasic maintained?

Thanks a lot!

Got it...
#IUP_VERSION = "3.7"
#IUP_VERSION_NUMBER = 307000
#IUP_VERSION_DATE = "2012/11/29"
User avatar
hallodri
Enthusiast
Enthusiast
Posts: 208
Joined: Tue Nov 08, 2005 7:59 am
Location: Germany
Contact:

Re: Alternative GUI libraries with PureBasic ?

Post by hallodri »

Is the current version for PureBasic maintained?
That was only for testing. The version (3.7) is about 3 years old. It misses some new features and controls. I do it no longer, but it still works :)
HanPBF
Enthusiast
Enthusiast
Posts: 570
Joined: Fri Feb 19, 2010 3:42 am

Re: Alternative GUI libraries with PureBasic ?

Post by HanPBF »

Thanks a lot for the info!


I downloaded 3.18 lib but got error POLINK due to ImportC shall be changed, I assume.
I see, how far I can build it up...

Would be interesting to know what PB team would ask as price to embed this library into PB (assuming it's also usable for the PB community free) :wink:


Will walk through the C code later...


Thanks!
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Alternative GUI libraries with PureBasic ?

Post by IdeasVacuum »

Would be interesting to know what PB team would ask as price to embed this library into PB
If they were going to do that, wxWidgets is a better bet, but what we really want is a GUI Lib similar to QT but without the huge price tag.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Ramihyn_
Enthusiast
Enthusiast
Posts: 314
Joined: Fri Feb 24, 2006 9:40 am

Re: Alternative GUI libraries with PureBasic ?

Post by Ramihyn_ »

soweit, so gut ... aber
Die Libs laufen nicht unter dem Unicodemodus.
und prompt wird PB Unicode only ;)

Wie sieht es da aktuell also mit aus?
HanPBF
Enthusiast
Enthusiast
Posts: 570
Joined: Fri Feb 19, 2010 3:42 am

Re: Alternative GUI libraries with PureBasic ?

Post by HanPBF »

Unicode: did test it under 5.42LTS; won't run under PB 5.50b1 -> will check this
wxWidgets and Qt -> should be unicode able.

Which lib for GUI to use doesn't matter en detail; iup is small/smart and fits very good to PB; wxWidgets has already many bindings; Qt is more than a GUI framework (maybe it's more an environment like NetBeans/Java; really powerful)
agb2008
User
User
Posts: 60
Joined: Fri Jan 15, 2016 2:22 pm

Re: Alternative GUI libraries with PureBasic ?

Post by agb2008 »

hallodri:

Thanks for link ! IUP, together with IM and CD toolkits seems to be quite interesting...
Have to give a closer look at these libraries and as well possibility of utilizing them with
PureBasic...

BTW are there any GUI builder for IUP ?

P.S. As I could see all bindings were done to static libs - but is it possible to use dynamic ones ?
Any hints ? I am a bit lost how to set pointers in the PrototypeC functions definitions...
User avatar
hallodri
Enthusiast
Enthusiast
Posts: 208
Joined: Tue Nov 08, 2005 7:59 am
Location: Germany
Contact:

Re: Alternative GUI libraries with PureBasic ?

Post by hallodri »

HanPBF wrote:Unicode: did test it under 5.42LTS; won't run under PB 5.50b1
You have to specify the parameters with p-utf8, then it works well with 5.50b1
agb2008 wrote:P.S. As I could see all bindings were done to static libs - but is it possible to use dynamic ones ?
Any hints ? I am a bit lost how to set pointers in the PrototypeC functions definitions...
Yes, should be possible. Create a lib from dynamic libraries and use this one.
agb2008
User
User
Posts: 60
Joined: Fri Jan 15, 2016 2:22 pm

Re: Alternative GUI libraries with PureBasic ?

Post by agb2008 »

hallodri:

Thank you for suggestion. I would try to that method. But so far unfortunately I was unable to make static library solution (that you mentionedin your post)
to work on my Windows x64 system. Tested with msvc10 and gcc4 static libraries provided by IUP project on Sourceforge site (for IUP 3.18 64 bit) but without
any luck so far.
Experiments (quick ones) with shared libraries allowed me to successfully create very basic window - but unfortunately it completely ignored settings (size, position, color e.t.c.) that I was trying to set. But it was just first attempt. :?
Post Reply