Could someone make a list of FreeBASIC GUI libraries/frameworks?
Could someone make a list of FreeBASIC GUI libraries/frameworks?
Similar to this one? viewtopic.php?f=17&t=28347
There are too many of them and new guy like me really confused. Having a list to choose from is always better than check everything yourself.
There are too many of them and new guy like me really confused. Having a list to choose from is always better than check everything yourself.
Re: Could someone make a list of FreeBASIC GUI libraries/frameworks?
I'm pretty certain, that some could. Do they want to do "your work"? Probably not.
(I can only speak for myself here, but I think that others might be similarly inclined.)
.
(What is good for one, is crap for somebody else. Requirements differ.)
(I can only speak for myself here, but I think that others might be similarly inclined.)
That is typical for beginners and, there is no cure for that availlable, AFAIK.There are too many of them and new guy like me really confused.
.
No, that is just wistful thinking. You'll have to find out yourself anyway.Having a list to choose from is always better than check everything yourself.
(What is good for one, is crap for somebody else. Requirements differ.)
-
- Posts: 3906
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: Could someone make a list of FreeBASIC GUI libraries/frameworks?
deleted misread the post
Last edited by BasicCoder2 on Apr 13, 2020 1:59, edited 1 time in total.
Re: Could someone make a list of FreeBASIC GUI libraries/frameworks?
@BasicCoder2,
(Btw.: Both IDE's are multi OS and, could easily be used on both systems alike.)
you are shurely joking, because you reference IDE's and not: either GUI Library, or Framework.BasicCoder2 wrote: ...
What IDE do you use for FreeBasic programming and why?
For my simple needs I use FBIDE on my Windows pc and Geany on my Linux based Raspberry Pi.
(Btw.: Both IDE's are multi OS and, could easily be used on both systems alike.)
-
- Posts: 782
- Joined: Jul 26, 2018 18:28
Re: Could someone make a list of FreeBASIC GUI libraries/frameworks?
Good idea, for this need a person who has tried almost all the libraries. Not mentioned is added later.
-
- Posts: 2958
- Joined: Jun 02, 2015 16:24
Re: Could someone make a list of FreeBASIC GUI libraries/frameworks?
I don't use any gui framework with fb. But yes, I would be interested if a list of those things made by people who use some with FB. We could see what is the choices around, and which ones are the prefered ones.
Re: Could someone make a list of FreeBASIC GUI libraries/frameworks?
For windows the obvious choice is the winApi.
By using the winApi you learn the core routines (for many languages) as you progress, and not some wrapped up local version of the winApi.
For Linux it is another story of course.
Here is a simple example of some WinApi routines mixed with FreeBASIC routines -- (Fifteens)
By using the winApi you learn the core routines (for many languages) as you progress, and not some wrapped up local version of the winApi.
For Linux it is another story of course.
Here is a simple example of some WinApi routines mixed with FreeBASIC routines -- (Fifteens)
Code: Select all
Randomize
#include once "windows.bi"
Declare Sub digits(t As String,x As Long,y As Long,clr As Ulong,sz As Single,gap As Long=1,img As Any Pointer=0)
Dim Shared As Any Ptr i(1 To 16)
Dim szBitmap(Lbound(i) To Ubound(i)) As String
Dim As Point p(1 To 16)
freeconsole
#define distance(p1,p2) sqr( (p1.x-p2.x)^2 + (p1.y-p2.y)^2 )
#define r(f,l) int(Rnd*(((l)+1)-(f)))+(f)
Dim As Long w,h
w=150
h=150-5
'=======================================
Screenres w,h,32,,-1 'create a temp [hidden] screen
For n As Long=Lbound(i) To Ubound(i)
If n<>Ubound(i) Then i(n)=Imagecreate(w,h,0) Else i(n)=Imagecreate(w,h,Rgb(255,255,255))
Var ln=80-30*Len(Str(n))
If n<>Ubound(i) Then digits(Str(n),ln,30,Rgb(200,200,0),35,0,i(n))
Bsave ("small"+Str(n)+".bmp",i(n))
szbitmap(n)="small"+Str(n)+".bmp"
Next n
Screen 0 'return to console in case you want it shown
'=========================================
Dim As MSG msg
Dim Shared As HWND hWnd, Button(Lbound(i) To Ubound(i))
Dim Shared hbitmap(1 To 16) As handle
hWnd = CreateWindowEx( 0, "#32770", "Fb & WinApi mix",WS_OVERLAPPEDWINDOW Or WS_VISIBLE , 100, 0, 620, 620, 0, 0, 0, 0 )
'==== create the buttons =======
Dim As Integer k,y=0,start
For n As Long=Lbound(i) To Ubound(i)
k+=1
If (k) Mod 5=0 Then y+=h:k=1
p(n)=Type((k-1)*150+w/2,y+h/2)
Button(n) = CreateWindowEx( 0, "BUTTON", "" , WS_VISIBLE Or WS_CHILD Or ANSI_CHARSET Or BS_PUSHBUTTON Or BS_BITMAP, (k-1)*150 , y , w , h , hWnd, 0, 0, 0 )
Next n
#macro update
For n As Long=Lbound(i) To Ubound(i)
deleteobject(hbitmap(n))
hBitmap(n) = LoadImage(0, szBitmap(n), IMAGE_BITMAP, w, h, LR_LOADFROMFILE )
If hbitmap(n) Then SendMessage(Button(n), BM_SETIMAGE, IMAGE_BITMAP, Cast(LPARAM, hbitmap(n)))
Next n
#endmacro
update
'========= quick shuffle ========
Dim As Long fnum=16
For m As Long=1 To 10
For n As Long=1 To 16
Var n1=r(1,15)
If distance(p(n1),p(fnum))<155 Then
Swap szBitmap(n),szBitmap(fnum)
fnum=n
Swap p(n),p(fnum)
update
End If
Next n
Next m
'==================================
While GetMessage( @msg, 0, 0, 0 )
DispatchMessage( @msg )
Select Case msg.hwnd
Case hWnd
Select Case msg.message
Case 273 : PostQuitMessage(0)
End Select
End Select
For n As Long=1 To 16
Select Case msg.hwnd
Case Button(n)
If msg.message = WM_LBUTTONDOWN Then
If distance(p(n),p(fnum))<155 Then
Swap szBitmap(n),szBitmap(fnum)
fnum=n
Swap p(n),p(fnum)
update
End If
End If
End Select
Next n
Wend
PostQuitMessage(0)
Sub digits(t As String,x As Long,y As Long,clr As Ulong,sz As Single,gap As Long=1,img As Any Pointer=0)
x=x-2*sz
Dim As Single s=Any,c=Any
Dim As Single d =Iif(gap, sz/10,0)
#macro thickline(x1,y1,x2,y2)
s=(y1-y2)/10
c=(x2-x1)/10
Line img,(x1-s,y1-c)-(x2+s,y2+c),clr,bf
#endmacro
#macro display(_a,_b,_c,_d,_e,_f,_g)
x=x+2*sz
If _a=1 Then :thickline(x+d,y,(x-d+sz),y):End If
If _b=1 Then :thickline((x+sz),y+d,(x+sz),(y-d+sz)):End If
If _c=1 Then :thickline((x+sz),(y+d+sz),(x+sz),(y-d+2*sz)):End If
If _d=1 Then :thickline((x-d+sz),(y+2*sz),x+d,(y+2*sz)):End If ''
If _e=1 Then :thickline(x,(y-d+2*sz),x,(y+d+sz)):End If
If _f=1 Then :thickline(x,(y-d+sz),x,y+d):End If
If _g=1 Then :thickline(x+d,(y+sz),(x-d+sz),(y+sz)):End If
#endmacro
For z As Long=0 To Len(t)-1
Select Case As Const t[z]
Case 48 :display(1,1,1,1,1,1,0) '"0"
Case 49 :display(0,1,1,0,0,0,0) '"1"
Case 50 :display(1,1,0,1,1,0,1) '"2"
Case 51 :display(1,1,1,1,0,0,1) '"3"
Case 52 :display(0,1,1,0,0,1,1) '"4"
Case 53 :display(1,0,1,1,0,1,1) '"5"
Case 54 :display(1,0,1,1,1,1,1) '"6"
Case 55 :display(1,1,1,0,0,0,0) '"7"
Case 56 :display(1,1,1,1,1,1,1) '"8"
Case 57 :display(1,1,1,1,0,1,1) '"9"
Case 58 '":"
Circle img,((x+2*sz),(y+sz/2)),(sz/5),clr,,,,f
Circle img,((x+2*sz),(y+1.5*sz)),(sz/5),clr,,,,f
x=x+sz
Case 45 :display(0,0,0,0,0,0,1) '"-"
Case 46 '"."
Circle img,((x+2*sz),(y+1.9*sz)),(sz/5),clr,,,,f
x=x+sz
Case 32 '" "
x=x+sz
End Select
Next z
End Sub
sub speak(text as string)
dim as string x="mshta vbscript:Execute(""CreateObject(""""SAPI.SpVoice"""").Speak("""""+text+""""")(window.close)"")"
print text
shell x
end sub
Sub finish Destructor
AllocConsole
For n As Long=Lbound(i) To Ubound(i)
deleteobject(hbitmap(n))
Imagedestroy(i(n)):i(n)=0
Kill "small"+Str(n)+".bmp"
Print "destroying ";n
Next
speak "Goodbye"
End Sub
Re: Could someone make a list of FreeBASIC GUI libraries/frameworks?
I think the best advice here is to suggest the gui libraries that are most mature that you can search in posts. They should be C, or C++ with wrapper, or native fb code
FLTK multi platform
FBGUI
IUP
Win API but that is probably better by a helper like FreeQ or?
WX-C
To me there is only one gui for fb and that is FLTK
SHEESH, MR SWISS JUST ANSWER THE QUESTION !!!
FLTK multi platform
FBGUI
IUP
Win API but that is probably better by a helper like FreeQ or?
WX-C
To me there is only one gui for fb and that is FLTK
SHEESH, MR SWISS JUST ANSWER THE QUESTION !!!
Last edited by JohnK_RQ on Apr 17, 2020 2:50, edited 2 times in total.
Re: Could someone make a list of FreeBASIC GUI libraries/frameworks?
It depends from where you are starting. A helper might be useful if you know absolutely nothing about Windows, but for those who know what CreateWindowEx means, it's not a good option. WinApi is very well documented, and you find lots of forums helping with specific problems.JohnK_RQ wrote:I think the best advice here is to suggest the gui libraries that are most mature that you can search in posts. They should be C, or C++ with wrapper, or native fb code
FLTK multi platform
FBGUI
IUP
Win API but that is probably better by a helper like FreeQ or?
WX-C
Last edited by jj2007 on Apr 16, 2020 3:08, edited 1 time in total.
-
- Posts: 4292
- Joined: Jan 02, 2017 0:34
- Location: UK
- Contact:
Re: Could someone make a list of FreeBASIC GUI libraries/frameworks?
Indeed, as I know only too well but that does not justify JohnK_RQ's statement in this thread, so I complained to admin. You did what I hear among the crowd. "Yes, I'd give the Devil benefit of law, for my own safety's sake!" by Thomas More from 'A Man for All Seasons'.jj2007 wrote:A known problem.
Re: Could someone make a list of FreeBASIC GUI libraries/frameworks?
I have reached out to JohnK_RQ with a request to edit his post.
@jj2007: Could you please edit yours so that I don't have to remove the quote there as well?
If these are not removed in a couple days, I will remove them myself.
@jj2007: Could you please edit yours so that I don't have to remove the quote there as well?
If these are not removed in a couple days, I will remove them myself.
-
- Posts: 534
- Joined: Dec 02, 2011 22:51
- Location: France
Re: Could someone make a list of FreeBASIC GUI libraries/frameworks?
I agree. Nothing should be able to justify a gratuitous insult.
Re: Could someone make a list of FreeBASIC GUI libraries/frameworks?
You are absolutely right, Lost Zergling!Lost Zergling wrote:I agree. Nothing should be able to justify a gratuitous insult.
MrSwiss wrote:That is typical for beginners and, there is no cure for that availlable, AFAIK.There are too many of them and new guy like me really confused.
Re: Could someone make a list of FreeBASIC GUI libraries/frameworks?
I think we should remove GRX and WX-C from FreeBASIC. These things shouldn't be used because they'are no longer developed. There is MGRX which still developed but the binding has to be updated to work with it: https://www.fgrim.com/mgrx/. WX-C is completely dead and there is no reason to use it.
I'm against the use of C++ based GUI library. Maintaining them is a lot of work. We have to flattern it into pure C to be able to use it from FreeBASIC. Then creating binding to the C flatterned version. It's doubled the effort. If there is a C based solution it's definitely the way to go.
One exception could be D.J.Peters' FLTK binding. Because I found he make it fit well with FreeBASIC. But I don't like FLTK, though. Because FLTK applications looked alien to the environment around them. On Win32 pretty much everything is the same. But on Linux it's matter. Perhaps we could workaround it with theming? It's a known limitation for toolkit that draw their widgets themselves like FLTK. I would said the same thing for Java Swing.
I think the future for FreeBASIC GUI is library like Window9 or MyFbFramework. They're portable across Windows and Linux and they use the native toolkit underlying so they fit very well with everything else. If we want something more powerful GTK+ and IUP is the way to go.
But I myself if I have to the skills to do so I would do an OOP wrapping for GTK+ the way GTKMM does. This way FreeBASIC will be more widely adopted by the GNOME/GTK+ community and it's even possible for a FreeBASIC based applications to be included by default by a GTK+ based desktop environment.
BTW, Anyone or just me think the bindings shipped with FreeBASIC is too old and need to be updated? IUP binding is at version 3.15 and the current version of IUP is already 3.28. The same for GTK+.
I'm against the use of C++ based GUI library. Maintaining them is a lot of work. We have to flattern it into pure C to be able to use it from FreeBASIC. Then creating binding to the C flatterned version. It's doubled the effort. If there is a C based solution it's definitely the way to go.
One exception could be D.J.Peters' FLTK binding. Because I found he make it fit well with FreeBASIC. But I don't like FLTK, though. Because FLTK applications looked alien to the environment around them. On Win32 pretty much everything is the same. But on Linux it's matter. Perhaps we could workaround it with theming? It's a known limitation for toolkit that draw their widgets themselves like FLTK. I would said the same thing for Java Swing.
I think the future for FreeBASIC GUI is library like Window9 or MyFbFramework. They're portable across Windows and Linux and they use the native toolkit underlying so they fit very well with everything else. If we want something more powerful GTK+ and IUP is the way to go.
But I myself if I have to the skills to do so I would do an OOP wrapping for GTK+ the way GTKMM does. This way FreeBASIC will be more widely adopted by the GNOME/GTK+ community and it's even possible for a FreeBASIC based applications to be included by default by a GTK+ based desktop environment.
BTW, Anyone or just me think the bindings shipped with FreeBASIC is too old and need to be updated? IUP binding is at version 3.15 and the current version of IUP is already 3.28. The same for GTK+.
-
- Posts: 782
- Joined: Jul 26, 2018 18:28
Re: Could someone make a list of FreeBASIC GUI libraries/frameworks?
Here is the headers update of GTK. There is even a GTK4.systemctl wrote: BTW, Anyone or just me think the bindings shipped with FreeBASIC is too old and need to be updated? IUP binding is at version 3.15 and the current version of IUP is already 3.28. The same for GTK+.
https://github.com/DTJF/gir_headers