Welcome, Guest. Please login or register.
July 31, 2010, 07:54:44 PM
Home Help Search Login Register
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base

Qbasicnews.com  |  Qbasic "like" compilers/interpreters  |  FB Discussion & Programming Help  |  FB Projects  |  Topic: The FreeBASIC GUI Compiler « previous next »
Pages: [1] 2 3 Print
Author Topic: The FreeBASIC GUI Compiler  (Read 8673 times)
adosorken
*/-\*
*****
Posts: 3654



WWW
The FreeBASIC GUI Compiler
« on: December 24, 2004, 03:07:45 AM »

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. Smiley 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. Cheesy

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

'd knock on wood, but my desk is particle board.
adosorken
*/-\*
*****
Posts: 3654



WWW
The FreeBASIC GUI Compiler
« Reply #1 on: December 24, 2004, 05:07:25 AM »


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. Cheesy The icons in use for the toolbar on the side are very temporary.
Logged

'd knock on wood, but my desk is particle board.
adosorken
*/-\*
*****
Posts: 3654



WWW
The FreeBASIC GUI Compiler
« Reply #2 on: December 26, 2004, 12:00:18 AM »


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.
Logged

'd knock on wood, but my desk is particle board.
Ryan
Wandering Guru
***
Posts: 338



WWW
The FreeBASIC GUI Compiler
« Reply #3 on: December 26, 2004, 01:28:18 AM »

It's lookin real good man.  Keep it up!   Cool
Logged
jatos
Ancient QBer
****
Posts: 464



The FreeBASIC GUI Compiler
« Reply #4 on: December 26, 2004, 12:34:58 PM »

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

atos-Software
http://www.datacentertalk.com - interested in how web hosting works? Here the place to go to find out.
aetherfox
Been there, done that
*****
Posts: 1071



WWW
The FreeBASIC GUI Compiler
« Reply #5 on: December 26, 2004, 06:26:37 PM »

*drool*

Cannot wait for this.

I mean really.

Good good job.
Logged

·~¹'°¨°'¹i|¡~æthérFòx~¡|i¹'°¨°'¹~·-  
avinash.vora - http://www.avinashv.net
adosorken
*/-\*
*****
Posts: 3654



WWW
The FreeBASIC GUI Compiler
« Reply #6 on: December 26, 2004, 07:12:36 PM »

Quote from: "jatos"
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. Cheesy
Logged

'd knock on wood, but my desk is particle board.
zydon
Member
*
Posts: 69



I'm speechless!
« Reply #7 on: December 26, 2004, 08:37:44 PM »

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.
Logged

 = inc(¢) Cheesy
adosorken
*/-\*
*****
Posts: 3654



WWW
The FreeBASIC GUI Compiler
« Reply #8 on: December 26, 2004, 09:04:57 PM »

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. Cheesy Every type of control has its own little submodule that's included if necessary. Cheesy 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.
Logged

'd knock on wood, but my desk is particle board.
aetherfox
Been there, done that
*****
Posts: 1071



WWW
The FreeBASIC GUI Compiler
« Reply #9 on: December 27, 2004, 11:13:49 AM »

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?
Logged

·~¹'°¨°'¹i|¡~æthérFòx~¡|i¹'°¨°'¹~·-  
avinash.vora - http://www.avinashv.net
adosorken
*/-\*
*****
Posts: 3654



WWW
The FreeBASIC GUI Compiler
« Reply #10 on: December 27, 2004, 11:45:58 AM »

Icons in the menus are easy with...okay, we'll call it fbGUI. Wink There's a menu editor similar to the one in VB, except with a few extra options (such as...icon Wink ). I haven't touched on the status bar control yet so I'm not sure how that's going to be handled just yet. Each form (window, hehe) has a property which specifies the control to send menu status messages to. I don't even think even VB2005 has anything like that.

Right now, I'm still figuring out all the low-level stuff required to make the controls, and developing the interface of the editor. It doesn't yet output code, nor does it place controls just yet. VB's editor is really powerful, and emulating it is not going to be very easy. On the other hand, I could always just make the "windows" in the editor appear without captions or borders, and that would make drawing windows a hell of a lot easier...
Logged

'd knock on wood, but my desk is particle board.
adosorken
*/-\*
*****
Posts: 3654



WWW
The FreeBASIC GUI Compiler
« Reply #11 on: December 27, 2004, 01:29:21 PM »


Very early shot of the code editor...I just added the template today and it's far from finished but this is an early look at it. If at all possible, all the VB events will be supported for each control type, and I may be able to add a few more. Methods I'm still a little sketchy about, but we'll see what develops (no pun intended). Cheesy Events are b-l-o-o-d-y e-a-s-y. Cheesy
Logged

'd knock on wood, but my desk is particle board.
adosorken
*/-\*
*****
Posts: 3654



WWW
The FreeBASIC GUI Compiler
« Reply #12 on: December 27, 2004, 03:13:34 PM »

Okay...more screenies:

This is the standard VB6 menu editor:


and this is the fbGUI menu editor:
Logged

'd knock on wood, but my desk is particle board.
aetherfox
Been there, done that
*****
Posts: 1071



WWW
The FreeBASIC GUI Compiler
« Reply #13 on: December 27, 2004, 04:27:49 PM »

Me likes.

How can you get the buttons to look sexy?
Logged

·~¹'°¨°'¹i|¡~æthérFòx~¡|i¹'°¨°'¹~·-  
avinash.vora - http://www.avinashv.net
adosorken
*/-\*
*****
Posts: 3654



WWW
The FreeBASIC GUI Compiler
« Reply #14 on: December 27, 2004, 04:42:21 PM »

FreeBASIC GUI Compiler.exe.manifest

Cheesy

Any application which calls the InitCommonControls API function (or simply includes one of the Microsoft Windows Common Controls OCX files) and has a properly built .manifest file in the same directory with the same filename as the application itself (in this case, "FreeBASIC GUI Compiler.exe") will have XP-style controls in XP. Little trick fsw explained a few days ago. Cheesy
Logged

'd knock on wood, but my desk is particle board.
Pages: [1] 2 3 Print 
Qbasicnews.com  |  Qbasic "like" compilers/interpreters  |  FB Discussion & Programming Help  |  FB Projects  |  Topic: The FreeBASIC GUI Compiler « previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
SMF Theme © Gaia, Hosting by Employers Job Post
Valid XHTML 1.0! Valid CSS!