#######################################################################################################
##########################   Visual QB v.04   #########################################################
#######################################################################################################
######################   SUB/FUNCTION Reference   #####################################################
#######################################################################################################


SUB VQB_Screen (X%, Y%, Width%, Height%, CLR&, Title$)

	- Creates a Screen (Width% * Height), positioned at X%, Y%.
	- CLR& is a _RGB32 value and designates the background colour.
	- Title$ sets the program title.


SUB VQB_StoreScreen (ImageHandle&)

	- Stores a copy of the screen to the given handle.


SUB VQB_RestoreScreen (ImageHandle&)

	- Restores a previously saved screen image


SUB VQB_Frame (X%, Y%, Width%, Height%, CLR&)

	- Draws a graduated frame at X%, Y%
	- CLR& is an _RGB32 value


SUB VQB_Button_New (Button AS Button, X%, Y%, Width%, Height%, CLR&, TextClr&, Text$, Shape%)

	- Creates a new button
	- X%, Y%, Width% and Height% are dicated by the Shape% variable
	  1 = Rectangle(X%, Y% are top left, Width% and Height% are obvious)
	  2 = Circular (X%,Y% are center, Width% and Height% dictate shape of ellipse)

	
SUB VQB_Button_Draw (Button AS Button)

	- Draws the button specified


FUNCTION VQB_Button_Click (Button AS Button, Mouse AS MouseInfo)

	- Returns TRUE if the button was clicked by the left mouse button, FALSE if not.


SUB VQB_CheckBox_New (CBox AS CheckBox, X%, Y%, Width%, Height%, CheckVal%)

	- Creates a new check box at X%, Y%, Dimensions are controlled with Width%, Height%
	- CheckVal% is TRUE or FALSE

 
SUB VQB_CheckBox_Draw (CBox AS CheckBox)

	- Draws a specified checkbox


FUNCTION VQB_CheckBox_Click (cBox AS CheckBox, Mouse AS MouseInfo)

	- Checks if the checkbox has been clicked, returns either TRUE or FALSE
	- DOES NOT CHANGE CHECK VALUE - YOU MUST DO IT MANUALY


SUB EllipseXS (X%, Y%, XRadius!, YRadius!, Wide%, CLR&, ShadeClr&)

	- Only called by VQB_BUTTON_DRAW when round buttons are used.


SUB VQB_Mouse_GetInfo (Mouse AS MouseInfo)

	- Gets the state of the left and right mouse buttons and X, Y position of the mouse, stored in the given MOUSE_INFO array


SUB VQB_AutoFont (Size%)

	- Loads and sets the VQB standard font to the specified Size%



########################################### NEW FEATURES ##########################################

SUB VQB_Dialog_Font_Load (DState AS DIALOG, FontFile$, Size%)

	- Internal SUB, NOT USED BY END USER


SUB VQB_Dialog_Font_Set (Dstate AS DIALOG)

	- INTERNAL SUB, NOT USED BY END USER


SUB VQB_PROGRAM_STATE_NEW (PState AS PROGRAM_STATE, GFX_Mouse%%, TotalApps%%, WSI%, HSI%)

	- Sets up the initial program info
	- GFX_Mouse%% - Either TRUE or FALSE, dictates if the program uses the custom mouse pointers
	- TotalApps%% - Total number of dialogs in the program
	- WSI% - Screen Image Width
	- HSI% - Screen Image Height


FUNCTION VQB_PROGRAM_STATE_UPDATE (PState AS PROGRAM_STATE, Mouse() AS MouseInfo, Dialog() AS DIALOG)
	
	- Updates all active dialogs
	- Draws all active dialogs in order
	- Draws GFX mouse pointer (if in use)


SUB VQB_DOCK_NEW (Dock AS DOCK, NumItems%%, MaxItems%%, Colour~&, Allign%%, Reflect%%, Hide%%, WSI%, HSI%)
	
SUB VQB_DOCK_ITEM_NEW (DockItem AS DOCK_ITEM, FileName$, Text$)

FUNCTION VQB_DOCK_UPDATE (Dock AS DOCK, DockItem() AS DOCK_ITEM, Mouse() AS MouseInfo)
	
	

SUB VQB_IMAGE_BUTTON_NEW (ImageButton AS IMAGE_BUTTON, X%, Y%, WIDTH%, HEIGHT%, CLR&, IMAGEFILE$)

	- Creates a new image button.
	- CLR& is a _RGB32 value and dicates the buttons colour.
	- IMAGEFILE$ is the given image for the button, no 


SUB VQB_IMAGE_BUTTON_DRAW (Btn AS IMAGE_BUTTON)

	- Draws the specified image button	


SUB VQB_DIALOG_NEW (State AS DIALOG, MultiTaskApp%, X%, Y%, WIDTH%, HEIGHT%, CLR&, Title$, Resizeable%)

	- Sets the initial values for the given dialog.
	- MultiTaskApp% is a TRUE or FALSE value and dicates if the given dialog's control
	  sub should update even if its not the top window.
	- CLR& is the background colour.
	- Title$ is as 32 character limited string.
	- Resizeable% is a TRUE or FALSE value and dictates if the window can be resized or not.


SUB VQB_DIALOG_SET_MIN_MAX (PState AS PROGRAM_STATE, DIALOG AS DIALOG, MinWidth%, MinHeight%, MaxWidth%, MaxHeight%)

	- Sets the minimum and maximum resize dimensions for the given dialog.
	- Sizes are limited to the following
		- Minimum width. Title$ length (Given by _PRINTWIDTH) + 100 pixels
		- Minimum height. 28 pixels
		- Maximum width and height values are dictated by screen image width and screen image height.
			- These are stored in the PROGRAM_STATE variable


SUB VQB_DIALOG_DRAW (PState AS PROGRAM_STATE, DIALOG AS DIALOG)

	- Draws a given Dialog - CAN be called by end user but is primarily an internal sub.


SUB VQB_RUN_PROGRAM (PState AS PROGRAM_STATE, ProgramID%, Program() AS DIALOG)

	- Controls dialog states and dialog layers. 
	- Any programs that have been minimised will return to NORMAL size when Un-Minimised


SUB DrawRoundedRectangle (X%, Y%, Width%, Height%, Colour AS _UNSIGNED LONG, Radius)
	
	- INTERNAL SUB, NOT CALLED BY END USER
	- WILL BE MADE AND OPTIONAL FEATURE SO THE LIBRARY DRAWS DIALOGS FASTER.


FUNCTION TRIM$ (StringToTrim$)

	- Removes all leading and end spaces from the given string
	- INTERNAL FUNCTION, NOT CALLED BY END USER


SUB VQB_Mouse_Adjust (DState AS DIALOG, MouseSource AS MouseInfo, MouseDest AS MouseInfo)

	- Adjusts Mouse position relative to given DIALOG
	- Called in each control sub at the start of the UPDATE case
	

FUNCTION VQB_Mouse_WithinBounds (Position AS MouseInfo, X%, Y%, XX%, YY%)

	- Returns TRUE or FALSE if the mouse pointer is within the given area.