FB_GUI V1.20.5 (New Release Dec 19, 2019)

Headers, Bindings, Libraries for use with FreeBASIC, Please include example of use to help ensure they are tested and usable.
Post Reply
BasicScience
Posts: 489
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Post by BasicScience »

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

Post by phishguy »

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: 489
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Post by BasicScience »

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

Post by phishguy »

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

Post by BasicScience »

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

Post by phishguy »

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: 489
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Post by BasicScience »

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: 489
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Post by BasicScience »

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

Post by phishguy »

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: 489
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Post by BasicScience »

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/viewtopi ... 566#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: 489
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Post by BasicScience »

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

Post by S.ean »

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

Post by BasicScience »

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

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

Post by BasicScience »

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

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

Post by BasicScience »

FB_GUI_V1.11 is now available

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

Go to Download page.
Post Reply