How to use WizGui ZX
Commands
Window Commands
Button Commands
TextBox commands
System Command
Drawing Command
Text commands
like: DO RunSystem LOOP
SUBs/FUNCTIONs:
SUB SetWindow (Xpos, Ypos, XSize, YSize, Title$, WinID) - creates a new window
on the screen. WinID - identification number of the window. Every window must
have a fiffrent WinID!
SUB CloseWindow (WinID) - Closes a specific window and deletes it's contents
(by WinID)
SUB SetActiveWindow (WinID) - Brings specific window to front and set it active
SUB DefWin (WinID) - start's window definatiot cycle
SUB EndDefWin () - end's window defination cycle
SUB HideWindow (WinID) - hide's specific window
SUB HideWindows () - hide's all windows
SUB ShowWindow (WinID) - show's specific window
SUB ShowWindows () - show's all hidden windows
SUB ReFreshWindows () - refreshes window contents. useful when you change a
color theme.
SUB DeleteWindowContents (WinID) - delete specific window contents - buttons,
textboxes and so on.
FUNCTION FreeWindow () - get's free windo ID number
FUNCTION WinX(WinID) - get's a lenght in pixels window left outside border from
left side of the screen
FUNCTION WinY(WinID) - get's a lenght in pixels window upper outside border
from top of the screen
FUNCTION WinX1(WinID) - get's a lenght in pixels window right outside border
from left side of the screen
FUNCTION WinY1(WinID) - get's a lenght in pixels window bottom outside border
from left side of the screen
FUNCTION WinXSize(WinID) - Get's window internal size in X tangle (in pixels)
FUNCTION WinYSize(WinID) - Get's window internal size in Y tangle (in pixels)
FU
FUNCTION X(WinID) - get's a lenght in pixels window left inside border from
left side of the screen
FUNCTION Y(WinID) - get's a lenght in pixels window upper inside border from
top of the screen
FUNCTION X1(WinID) - get's a lenght in pixels window right inside border from
left side of the screen
FUNCTION Y1(WinID) - get's a lenght in pixels window bottom outside border from
left side of the screen
Useful Window variables:
VARIABLE Win(WinID).Status - shows window status. if -1 then window is hidden,
0 - not exist's, 1 - is not active 2 - is active
VARIABLE Win(WinID).DisableCloseOption - if you put this True then possibility
to close window by pressing F4 and window closebutton are disabled
VARIABLE ActiveWin - gives ID of active window. if no active window then it's
value is 0
VARIABLE NofW - maximum number of windows.
VARIABLE Win(WinID).Title - window title.
SUBs/FUNCTIONs:
SUB SetButton (Xpos, Ypos, Title$, WinID, ButID) - creates a new button in to
the specific window (WinID). As Windows so do have Button it's own ID -ButID.
SUB SetAdvButton (Xpos, Ypos, XSize, YSize, Title$, WinID, ButID) - Similar
to SetButton only you can set any size of the button by XSize and YSize
SUB DefButton (WinID, ButID) - You can definate button. Change it's look or
pu pictures on it.
SUB EndDefBut () - end's button defination
SUB BMP2Button (File$, Xpos, Ypos, WinID, ButID) - Put's BMP file on the button
SUB DeleteButton (WinID, ButID) -Deletes specific button.
Useful Button variables:
VARIABLE But(WinID, ButID).Status - shows Button status. 0 - not exist's, 1
- not pressed 2 - pressed
SUBs/FUNCTIONs:
SUB SetTextBox (Xpos, Ypos, Lenght, WinID, TbID) - Creates new TextBox into
the specific window. TbID -TextBox identification number, Lenght - size of the
textbox.
SUB DeleteTextBox (WinID, TbID) -Deletes specific TextBox.
Useful TextBox variables:
VARIABLE Tb(WinID).Status - shows TextBox status. 0 - not exist's, 1 - is not
active 2 - is active (you are writing in to it)
VARIABLE TbText(WinID, TbID) - gives a value from specific textbox (string what
you wrote)
VARIABLE Tb(WinID, TbID).PasswordType - if True then textbox is set to password
type so text what you write is not visible.
SUBs/FUNCTIONs:
SUB Initalise () -Start's wizGui. Set's screennode, allocates memory and check's
system requements.
SUB RunSystem () -Main sub what run's all WizGui ZX work. It must be placed
between DO and LOOP cycle.
SUB EndGui () -End's wizgui work. Deallocates memory and swich screen mode back
to normal.
FUNCTION WizGuiVersion$() - get's wizGui verion
FUNCTION WizGuiCodename$() -Get's wizGui codename
Useful system variables:
VARIABLE Theme$ - active rheme.
VARIABLE Deph - color deph
VARIABLE Xres - screen X resolution
VARIABLE Yres - screen Y resolution
VARIABLE SWCWD - show window contents while dragging. If True then shows. VARIABLE
Key$ - if key on keyboard is pressed then it's value is given to Key$
VARIABLE MouseX - Currect mouse position on X tangle
VARIABLE MouseY - currect Mouse position on Y tangle
VARIABLE MouseL - if mouse left button is pressed then it's value is True
VARIABLE MouseR - if mouse right button is pressed then it's value as True
VARIABLE OldMouseX - Mouse position on X tangle on previous tact
VARIABLE OldMouseY - Mouse Position on Y tangle on previous tact
SUBs/FUNCTIONs:
SUB SetTextLoc (Xpos, Ypos, WinID) - Sets text cursor location.
SUB SetTextColor (FgColor, BgColor) - like normal color statament. if FgColor
= -1 then theme text color is used. If BgColor = -1 then text background is
transperent.
SUB SetText (Text$) - Print's text to the window.
SUB SetSmartTextArea (Xpos, X1pos, WinID) -set's smart text virtual windows(text
wrapping).
SUB SetSmartText (Text$) - Set's smart text -wrap's at the end of the window
or virtual window.
SUB SetTextFont (File$) -Set font.
Useful text variables:
VARIABLE CursorX - Cursor X position in window
VARIABLE CursorY -Cursor Y position in window
VARIABLE CursorWinID - Show's in wich window cursor is located
SUBs/FUNCTIONs:
SUB PaintWin (C&, WinID) - Paint's window
SUB DrawBox (Xpos%, Ypos%, XSize%, YSize%, C&, WinID%)
SUB DrawBox3D (Xpos%, Ypos%, XSize%, YSize%, Style%, WinID%)
SUB DrawFillBox (Xpos%, Ypos%, XSize%, YSize%, C&, WinID%)
SUB DrawFillBox3D (Xpos%, Ypos%, XSize%, YSize%, Style%, C&, WinID%)
SUB DrawCircle (Xpos%, Ypos%, R%, C&, WinID%)
SUB DrawFillCircle (Xpos%, Ypos%, R%, C&, WinID%)
SUB DrawLine (Xpos%, Ypos%, X1pos%, Y1pos%, C&, WinID%)
SUB DrawHLine (Xpos%, Ypos%, XLenght%, C&, WinID%)
SUB DrawVLine (Xpos%, Ypos%, YLenght%, C&, WinID%)
SUB DrawHLine3D (Xpos%, Ypos%, XLenght%, WinID%)
SUB DrawVLine3D (Xpos%, Ypos%, YLenght%, WinID%)
SUB DrawPset (Xpos%, Ypos%, C&, WinID%)
SUB BMP2Window (FailName$, Xpos%, Ypos%, WinID%)
How to get a color?
Color is given by C& - to get the color you can:
1) C& = RGB2Color(R%, G%, B%) '-where r,g,b are intensivity of red, green
and blue. their values can be between 0 and 255.
2) C& = GetColor(number) ' -8 bit color system. There are 16 color's from
0to 15. These are most common color's what you find in qbasic normal screen
mode (0, 9, 12, 13). but works at any color deph.