Qbasicnews.com
The FreeBASIC GUI Compiler - Printable Version

+- Qbasicnews.com (http://qbasicnews.com/newforum)
+-- Forum: Qbasic "like" compilers/interpreters (http://qbasicnews.com/newforum/forum-5.html)
+--- Forum: FB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-15.html)
+---- Forum: FB Projects (http://qbasicnews.com/newforum/forum-16.html)
+---- Thread: The FreeBASIC GUI Compiler (/thread-5466.html)

Pages: 1 2 3 4


The FreeBASIC GUI Compiler - adosorken - 12-24-2004

This is something I have been planning for a few days now and have started to code now. Basically (no pun intended), it's an editor similar to Visual Basic's, except that it generates sourcecode for FB that handles all the low-level stuff involved with making a GUI: the message loop, notifications, etc. As with FreeBASIC itself, I'm starting the project in Visual Basic, and then when it's advanced enough to compile itself, it will do so. It will not work exactly like VB, but it will be quite similar, with events (like Command1_Click, built from the message loop itself), properties (Command1.Caption, simple variables), and hopefully, methods (Command1.SetFocus, using FB's function field types). So if all goes according to plan, it will be sort of object-oriented. Smile Anyways, even if I cannot implement methods into it, the other two concepts have already been tested and will work. Also, there will be no need for bulky OCX files, as everything, even down to common dialogs and Windows Common Controls, will be built right into the compiler. And thanks to fsw, making programs with XP-style controls will be a breeze. Big Grin

So yeah...I guess I better stop blabbering on about this thing and get back to actually coding it, eh? Big Grin


The FreeBASIC GUI Compiler - adosorken - 12-24-2004

[Image: guicompiler.png]
Exceptionally early view of the editor. It's going to look a lot like the VB6 editor, but not completely. I figured it best to give it the overall appearance of the VB6 editor because familiarity is a good thing. Big Grin The icons in use for the toolbar on the side are very temporary.


The FreeBASIC GUI Compiler - adosorken - 12-26-2004

[Image: fb-gui-compiler-newicons.png]
All the placeable controls are shown here. The VB PictureBox is not a native control though, it's a construct, so it's going to take some extra code. The Image control in VB is also not completely native and will take a bit of extra code to implement. Most of the rest are pretty straightforward CreateWindowEx calls or calls to comctl32.dll. Notice that the Common Dialogs floating window has six icons on it: the first five icons represent the five most common functions of the common dialog (ShowOpen, ShowSave, ShowFont, ShowColor, and ShowPrinter), and the sixth is one you don't normally get in VB: GetFolder. I've included them as objects for VB adaptability reasons only; they're actually seperate functions that can be called manually if so desired.


The FreeBASIC GUI Compiler - Ryan - 12-26-2004

It's lookin real good man. Keep it up! 8)


The FreeBASIC GUI Compiler - jatos - 12-26-2004

with a bitta luck though it will have somewhat more customisability than VB, I find the real VB a pain to customise.


The FreeBASIC GUI Compiler - aetherfox - 12-27-2004

*drool*

Cannot wait for this.

I mean really.

Good good job.


The FreeBASIC GUI Compiler - adosorken - 12-27-2004

Quote:with a bitta luck though it will have somewhat more customisability than VB, I find the real VB a pain to customise.
Elaborate on this thought so I can make sure it meets the need. Big Grin


I'm speechless! - zydon - 12-27-2004

Wow nek! you're shaping up gui coding in fb really nice. I can't wait to learn from this project.

I got an idea for you:

while you adding new gui objects into your project, save it's snippet into a file of re-usable subs or functions. From the collections of these snippets, it will build up win32 GUI engine for FB with no time at all. It could also help you minimize the troubles when your project becoming more complex later on.

just my 2 cents.

zydon.


The FreeBASIC GUI Compiler - adosorken - 12-27-2004

I'm not 100% sure what you mean, but if you mean that each type of control would have its own module, then yeah, I'm already doing that. Big Grin Every type of control has its own little submodule that's included if necessary. Big Grin Makes everything really modular and far easier to debug later on.

As far as the screenshot goes...that's not an FB program, that's VB. However, it would not, at this point, take much work to make the same kind of thing in FB. I've not yet experimented with MDI windows though...that's next on the list of things to nail down. Also, importing resources is still something I've yet to conquer, as well as device contexts (for loading dynamic images at runtime and other such fun stuff). When the GUI abstraction layer for FB is complete though, I'll use it to make the GUI editor itself.


The FreeBASIC GUI Compiler - aetherfox - 12-27-2004

Delphi's GUI power with BASIC syntax. Allllllllright.

And no, the .NET series of VB don't count anymore, there is too much syntax change, it's gone fully OOP.

Are you going to make some of the pain-in-the-ass things in VB easy in fbGUI (GUI Compiler is really too long)? I'm talking stuff like icons in the menus, much better handling of the status bar from other controls, etc. etc.?

And also, have you got it working yet?