Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Generalized and easy GUI coding
#1
Hi!

What about a libary for FB with that you can create GUIs in about 5 lines of code?

Example of what i mean:
Code:
' We create our empty form
Form = CreateForm("Hello World",0,0,640,480)
Button = CreateButton("Exit",Form,10,10,80,40)

' The inevitable message loop
do
  event = GetEvent
  select case event
    case WM_COMMAND:
       if cbctl = Button.id then end
    case WM_CLOSE
       end
   end select
loop

This could be coded for usage with Win32 and X11(Use gnome!Use gnome!Use gnome!Use gnome!Use gnome!Use gnome!) Big Grin Big Grin Big Grin Big Grin Big Grin

So Long, The Werelion!
color=red]Look at you, Hacker. A pathetic creature of meat and bone, panting and sweating as you run through my corridors. How can you challenge a perfect, immortal machine?" - Shodan, AI at Citadel Station orbiting Earth[/color]
Reply
#2
Gnome is slow and bloated. And I am suffering it at work :barf:

This is being worked by Nekrophidius. And I believe that someone was porting GTK headers. Plus you can use GLADE, someone's playing with it as well.

:lol: I love giving "proper" info Tongue Wink I'm sure some other will post here to name the two "someone"s I've mentioned :lol:
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#3
Quote:Gnome is slow and bloated. And I am suffering it at work :barf:

Cant tell, the times i used linux here i used gnome and was more than satisfied when compared versus KDE...
(German joke on KDE: Kann Das Etwas?!? Can that do something? Wink )
color=red]Look at you, Hacker. A pathetic creature of meat and bone, panting and sweating as you run through my corridors. How can you challenge a perfect, immortal machine?" - Shodan, AI at Citadel Station orbiting Earth[/color]
Reply
#4
You know, my box is a 450 Mhz PIII with 128 megs of RAM and it is running two apaches...

This craaaaaaaaaaaaaaaaaaawwwwwwwwwwwwwwwlllllllllllllllllllllssssssss...
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#5
I am pretty sure a library like that will come. Same as a 3D-engine...
Just a matter of time...
Mipooh
Reply
#6
KrisKhaos i belive is working on his own win API wrapper to make gui programming easyer and adosorken working on that GUI compiler thing for FB
Reply
#7
I played with GLADE and it works pretty well, and since Vic added the export function it's also possible to declare the event function in the xml file.

The downsides are:
You need GTK and GLADE installed (~18mb) and you need to edit a xml file that has all your gui settings (this file could be manipulated from anybody and destroy your gui...). Maybe it's possible to include the xml file in the exe as a resource and go from there, but I didn't investigate this.
Actually every resource inside a exe file can be manipulated too :barf:

On the WinAPI front: I've some experience with it, and had started a lib with some windows and controls, but I didn't get the static control to show me a image from a file (not as resource).
The strange thing is if I have the same code in c or purebasic it works, but not with freebasic.
So as it stands now I could code the gui lib in c but I don't like the idea to not be able to do it in fb.
So I stopped working on it. For now.

Also the fact that Micro$oft is abbandoning the Win32-API in the future makes me unhappy too, because with newer WindowsOS the API will be totally different (named Avalon) and the Win32-API will only be emulated (slower) for "older" programs.
Avalon will be available for WinXP and WinLonghorn (actually there is a beta version already available for WinXP).

Because all of this I'm in the process to investigate how usable VonGodric's WizGUI would be for a 'general purpose gui'. (VonGodric did already a nice job with his WizGUI - a very nice job...)
With that, the dependency would be SDL (which depends on Win32-API) and for 3D stuff OpenGL.

On the other hand Trolltech will open up QT4 for Windows if you code under the GPL. Another API to investigate. But AFAIK QT needs c++, so I don't know if it can be used with fb.

Oh well :roll:
Reply
#8
Quote:Also the fact that Micro$oft is abbandoning the Win32-API in the future makes me unhappy too, because with newer WindowsOS the API will be totally different (named Avalon) and the Win32-API will only be emulated (slower) for "older" programs.
Avalon will be available for WinXP and WinLonghorn (actually there is a beta version already available for WinXP).

Ok, new food for ReactOS DevTeam :barf:

Quote:Because all of this I'm in the process to investigate how usable VonGodric's WizGUI would be for a 'general purpose gui'. (VonGodric did already a nice job with his WizGUI - a very nice job...)
With that, the dependency would be SDL (which depends on Win32-API) and for 3D stuff OpenGL.

SDL depends on what he gets.
SDL can be done on everything that has at least 16bit and somebody did a port to.
You can even compile a SDL App for Amiga ^.^

Quote:On the other hand Trolltech will open up QT4 for Windows if you code under the GPL. Another API to investigate. But AFAIK QT needs c++, so I don't know if it can be used with fb.

So, i dont like it if i am forced to go GPL.
If i want to write a closed source for profit programm, i want to.

For that stuff that you have coding problems with, have a look at BCX, maybee FreeBASIC will get some enlightment from it Wink
Ok, BCX is a Basic to C translator, but maybee after looking at their code you see what you did wrong.
color=red]Look at you, Hacker. A pathetic creature of meat and bone, panting and sweating as you run through my corridors. How can you challenge a perfect, immortal machine?" - Shodan, AI at Citadel Station orbiting Earth[/color]
Reply
#9
Quote:For that stuff that you have coding problems with, have a look at BCX, maybee FreeBASIC will get some enlightment from it Wink
Ok, BCX is a Basic to C translator, but maybee after looking at their code you see what you did wrong.
Already did :wink:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)