Xlnt GUI Docs.

Disclaimer:
Xlnt-GUI and all assotiated files are supplied "as is": This program is still a work in progress and as such it may contain bugs or glitches that may effect its performance. As such the Author accepts no responsiblity for any accidents or acts that occur through the use of these files: In other words: 
PLEASE LEAVE YOUR DEBUG ON UNTIL YOU ARE COMPLETELY SATISFIED THAT YOUR PROGRAM WORKS-AND IF YOUR PC BLOWS UP ETC. IT`S AIN`T MY FAULT!

About Xlnt GUI:

Xlnt GUI is a fully functional Graphic User Interface add-on for you very own BlitzBasic programs. To be able to use this program you will need a copy of BlitzBasic - if you haven`t got Blitz then I can`t recomend it highly enough (check the offical site www.blitzbasic.com for more info - and a FREE demo).
I started work on Xlnt v1.0 in Feb 2001, as I needed a simple GUI for my own applications. This is why this early version is poorly commented and labelled, as I had no intention of releasing it. However, after v1.0 got to a useable (and stable) state I decided to release it to the BlitzBasic community just to get some feed-back and maybe improve on it a little.
One of my main aims in programming Xlnt was to keep it as self-contained as possible (it`s just one of my many fetishes!) therefore, Xlnt only needs to access 1 external file (not including the Fonts) which is the graphics image for the mouse pointer. Everything else; drawing, image handling etc. is done through the main program.

How to use Xlnt GUI:

Psuedo Code Overview:
;start of program
Place Setup Code here

Use GUI_WINDOW() function  to make a window
Use the various Gadget functions to attatch Gadgets to this Window

Use the GUI_OPENWIN()	-function to finalise the setup of this Window

;main program loop:
	REPEAT
		FLIP:SETBUFFER BACKBUFFER():CLS
			GUI()	-Process and display all WIndows and Gadgets
			SELECT EVENT$	-Select which GUI event has occured
				SELECT GUI_GADHIT	-Select which gadget has been hit
				END SELECT
			END SELECT
	UNTIL...
GUI_END()	-Clear the GUI data

;end of program

Firtsly, at the very start of your code you must place the Setup Code, this is about 10 lines which are used to load the fonts, mouse pointer, and to setup some basic system variables. This code can be found in Xlnt-Setup.bb, just copy and paste.
Now that the setup code is in place you can make some Windows and Gadgets (Note: you MUST make a Window BEFORE you try to attatch any Gadgets to it). See the list of functions for help.
Next you open the Window and enter the main loop. After you have processed your buffers (ooh-er Missus!), you use the GUI() function to process and display the GUI. This function also stores the GUI Event in EVENT$ and the id of the gadget hit in GUI_GADHIT.

User Functions:

TERMS:		X,Y,W,H	-XPos,YPos,Width,Height
		WIN		-Window ID number
		FLG_...		-Flag variable set to either 1 or 0
		HELP$		-Help text
		TXTLST$	-A list of textitems seperated by "#" eg. 							"one#two#three#four#"
		FLG_ACT	-1=Active
		VAL		-Current Value
		MIN,MAX	-Minimum and maximum values

========================================================
Setup a Window
GUI_WINDOW(X,Y,W,H,TITLE$,FLG_QUIT,FLG_SCALE,FLG_DRAG,FLG_MIN,FLG_BACK)
Returns a Window ID value.
FLG_QUIT		-Quit buttun active?
FLG_SCALE		-Scale window active?
FLG_DRAG		-Drag Window active?
FLG_MIN		-Minimise/Maximise buttun active?
FLG_BACK		-Window to back buttun active?
========================================================

========================================================
Normal Buttun
G=GUI_BUTTUN(WIN,X,Y,W,CAPTION$,FLG_ACT,HELP$)
========================================================
========================================================
Click ON or OFF Buttun
G=GUI_SWITCH(WIN,X,Y,W,CAPTION$,FLG_ON,GROUP,FLG_ACT,HELP$)
FLG_ON			-Set to On or Off
GROUP			-If >0 then this Gadget belongs to that Group
========================================================
========================================================
Cycle Buttun
G=GUI_CYCLE(WIN,X,Y,W,TXTLST$,START_ITEM,FLG_ACT,HELP$)
START_ITEM		-First Item Shown
========================================================
========================================================
Pulldown type menu
G=GUI_SELECTOR(WIN,X,Y,W,TXTLST$,FLG_ACT,HELP$)
========================================================
========================================================
Text input gadget
G=GUI_TXTINPUT(WIN,X,Y,W,CAPTION$,LABEL$,MAX_CHARS,FLG_ACT,HELP$)
========================================================
========================================================
Scrollable Text box
G=GUI_TXTBOX(WIN,X,Y,W,H,CAPTION$,FLG_ACT,HELP$)
========================================================
========================================================
Scrollable list of Text Items
G=GUI_TXTLIST(WIN,X,Y,W,H,TXTLST$,FLG_ACT,HELP$)
========================================================
========================================================
Horizontal or Vertical Scroll Bars
G=GUI_SLIDER(WIN,X,Y,SIZE,VAL,MIN,MAX,FLG_HORIZONTAL,FLG_ACT,HELP$)
SIZE			-Size of gadget
FLG_HORIZONTAL	-1 then Horizontal else Vertical
========================================================
========================================================
Number input
G=GUI_INTEGER(WIN,X,Y,LABEL$,VAL,MIN,MAX,FLG_ACT,HELP$)
========================================================
========================================================
Tick/Check Box
G=GUI_TICK(WIN,X,Y,CAPTION$,FLG_ON,GROUP,FLG_ACT,HELP$)
GROUP			-If >0 then this gadget belongs to that group
========================================================
========================================================
Graphics Frame
G=GUI_FRAME(WIN,X,Y,W,H,CAPTION$,TYPE,HELP$)
TYPE			-Three types of frame -0,1, or 2
========================================================
========================================================
Simple Text Message
G=GUI_TEXT(WIN,X,Y,W,H,CAPTION$,HELP$)
========================================================
========================================================
Image in a box
G=GUI_IMAGEBOX(WIN,X,Y,W,H,FILE$,FLG_SCALE,FLG_ACT,HELP$)
FILE$			-Filename of image to load
FLG_SCALE		-1 then image is made to fit the box
========================================================
========================================================
Progress Bar
G=GUI_PROG(WIN,X,Y,MIN,MAX,HELP$)
========================================================
========================================================
Window Tab Buttun
G=GUI_TAB(WIN,X,Y,CAPTION$,TAB_NUMBER,HELP$)
TAB_NUMBER		-Tab number for this tab (>0)
========================================================

Other Commands.

GUI_OPENWIN(W)			-Open Window (W)
GUI_HIDEWIN(W)			-Hide Window (W)
GUI_SHOWWIN(W)			-Show Hidden Window (W)
GUI_WINXY(W,NEWX,NEWY)		-Position Window(W)
GUI_FREEGAD(G)			-Delete Gadget (G)
GUI_FREEWIN(W)			-Delete Window (W)
GUI_END()				-Put at end of program to delete ALL GUI data
GUI_GAD_TO_TAB(GAD,TAB)		-Attach Gadget (gad) to Window Tab (tab)
GUI_WINTAB(W,TAB)			-Open Window (W) Tab (Tab)
GUI()					-Process and display the GUI. Also loads EVENT$ 					with any events that have happened, and 							GUI_GADHIT with the ID of any gadget that has 						been hit.
GUI_REFRESH(W)			-Redraw Window (W) and all of its Gadgets. Use this 					if you attach a Gadget to a Window AFTER you have 					opened it.
GUI_REFRESH_GAD(G)			-Redraw Gadget (G)
GUI_SETVAL(G,VAL)			-Set the value of gadget (G)	
GUI_SETTEXT(G,A$)			-Set the Caption$ or Textlst$ of gadget (G) or the 						Filename of an ImageBox`s Image.
GUI_GADVAL(G)			-Returns the Value of gadget (G) or the Image value of 					an ImageBox`s Image
GUI_GADTEXT$(G)			-Returns the Caption$ or currently selected TextItem 					of gadget (G) or the Filename of an ImageBox`s Image

GUI_MESSAGEBOX(TITLE$,A$)		-Display a message box.

GUI_FILEREQUEST(TITLE$,CARD$,DIR$)		-Returns a Filename or ""	
CARD$		-file wildcard eg ".bmp#.txt#.htm#All Files#"
DIR$		-start directory (optional)

GUI_IMAGEREQUEST(TITLE$,DIR$)		-Returns the Filename of an Image or ""
DIR$		-start directory (optional)

Versions:

v1.1
-Added the Setup Code to the main file.
-Made Windows with their flg_BACK flag cleared always stay on top. Forces user to use that Window.
-Re-named ALL of the functions to avoid clashes.
-Added GUI_MESSAGEBOX() to display simple messages.
-Added GUI_FILREQUEST() which is a simple file requester.
-Added GUI_IMAGEREQUEST() which is basically the same as the file requester but with an Imagebox.

v1.0
-First release
-Got 20+ downloads off Showcase alone! (wasn`t expecting this much interest).

Contact Me:

This is a program still in development, so PLEASE contact me with any feedback, Cheers!

www.members.fortunecity.com/yappy

or

email: stew.yapp@ic24.net

or

lookout for yappy at the BlitzBasement forum (www.blitzbasement.com)

See ya later!!