FB_GUI V1.20.4 (New Release Oct 29, 2011)

User projects written in or related to FreeBASIC.
BasicScience
Posts: 474
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Postby BasicScience » Feb 02, 2009 6:49

Slider with scroll bar and arrow buttons added as new control.

Window setup changed to be more flexible. Several simple example apps included and more updates to the Help file.

http://sites.google.com/site/freebasicgui/Home
phishguy
Posts: 1201
Joined: May 05, 2006 16:12
Location: West Richland, Wa

Postby phishguy » Feb 02, 2009 17:46

This is looking nice. I do have a problem on all the examples giving 100% CPU usage. I tested a previous version that didn't have that problem. Because of this, it is very sluggish at responding to menu buttons and even gave me a message that the program wasn't responding. I will try it on a different PC later.
BasicScience
Posts: 474
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Postby BasicScience » Feb 02, 2009 18:25

The simple examples I up-loaded were used to develop / debug individual controls. As such, they are in CPU-hogging loops that poll for events without a sleep cmmd to give time back to the CPU.

The full FB_GUI library uses the FB ScreenEvent function which is much more efficient and CPU friendly. In the small examples that were provided, the Slider program operates on top of the ScreenEvent polling used in the full FB_GUI library (the other examples don't). I expect Slider will perform better than the others. For any of the controls, however, they should operate in a CPU-friendly way when used with the full FB_GUI.

My overall goal in developing these routines was to develop a platform for real-time data acquisition for biomedical research (20 - 50 kHz bandwidth). As such, I have dedicated lots of CPU time to polling for detecting events on the A/D than come at unpredictable and irregular times.
phishguy
Posts: 1201
Joined: May 05, 2006 16:12
Location: West Richland, Wa

Postby phishguy » Feb 02, 2009 18:32

OK, that makes sense. However, the slider demo also uses 100% CPU and even caused my task manager to quit responding.
BasicScience
Posts: 474
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Postby BasicScience » Feb 02, 2009 18:42

Hmm....

I inserted a "sleep 5" into the main polling loop. See if this helps with CPU sharing.

Look for Slider_Sleep.zip on the download site.
phishguy
Posts: 1201
Joined: May 05, 2006 16:12
Location: West Richland, Wa

Postby phishguy » Feb 02, 2009 18:54

Yes, that cuts the CPU usage down to 0 -2 %. But, when you get the prompt to exit, the CPU utilization is back to 100%.
BasicScience
Posts: 474
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Postby BasicScience » Feb 02, 2009 19:04

Ah, the Query function polls in a separate loop.

Sounds like I better go back to all the polling loops in the library and introduce a brief sleep command. Fortunately the polling occurs at a reasonably small number of locations in the code... so I should be able to back and modify them all.

Thanks for pointing this out. Changes will be made with the next release (if not sooner).
BasicScience
Posts: 474
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Postby BasicScience » Feb 03, 2009 4:59

Sleep statement now added to every loop that polls for user input. CPU hogging now resolved. Default SleepTime = 2 msec, can be modified in FB_GUI.BI.

Thanks PhishGuy.
phishguy
Posts: 1201
Joined: May 05, 2006 16:12
Location: West Richland, Wa

Postby phishguy » Feb 03, 2009 14:48

That's much better. It's now responsive and doesn't hog the CPU. When I get a chance I'll spend more time playing with your GUI. Keep up the good work.

BTW, the upside down i's in the vera font bug me.
BasicScience
Posts: 474
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Postby BasicScience » Feb 03, 2009 17:41

Yeah, the GFX.Font routines have a lot of glitches with the glyphs (appreciate the effort though).

I'm thinking of switching to the API posted by Thorham to render fonts with FreeType2

http://www.freebasic.net/forum/viewtopic.php?p=115566#115566

Just figured out how to optionally render these fonts on a FB.Image Buf instead of the screen. This should now enable me to re-write the Controls in FB_GUI to use these cleaner Glyphs.
BasicScience
Posts: 474
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Postby BasicScience » Mar 31, 2009 4:53

Check out V1.09. Many new examples provided. FB_GUI_HELP.CHM extensively updated.
S.ean
Posts: 6
Joined: Feb 20, 2009 8:31

Missing ext/graphics.bi

Postby S.ean » Apr 06, 2009 5:48

Hi, I am missing the above library. Do you know where I can get it?
BasicScience
Posts: 474
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Postby BasicScience » Apr 06, 2009 15:37

It's in the FB-Extended Library at this link

http://code.google.com/p/fb-extended-lib/
BasicScience
Posts: 474
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Postby BasicScience » Apr 22, 2009 2:38

See new features in FB_GUI V1.10. April 21, 2009

(link updated at beginning of this post)
BasicScience
Posts: 474
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Postby BasicScience » Jun 24, 2009 12:38

FB_GUI_V1.11 is now available

http://sites.google.com/site/freebasicgui/Home

Go to Download page.

Return to “Projects”

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest