04-19-2022, 02:42 PM
This is the latest rewrite of my GUI.
It is not complete by any means, as always work-in-progress.
What's working:
Restore window from Icon
Move window
Move Icon
Minimize window to icon
Maximize window to screen size
Not working:
Restore window from maximized
Minimize window from maximized
Close window
Z-order focus (windows do not rise to the top of z-order when clicked (yet).)
Also, unlike some of my previous versions, there is no background implemented yet.
Here for the obligatory screenshots:
All windows minimized:
One window restored from minimized:
Window resizing:
Window resized (and z-order bug):
Window maximized (and z-order bug):
Installing:
Copy and paste k-win-upload.bas and blank.png into your qb64 folder. Compile and run k-win-upload.bas.
blank.png :
k-win-upload.bas :
It is not complete by any means, as always work-in-progress.
What's working:
Restore window from Icon
Move window
Move Icon
Minimize window to icon
Maximize window to screen size
Not working:
Restore window from maximized
Minimize window from maximized
Close window
Z-order focus (windows do not rise to the top of z-order when clicked (yet).)
Also, unlike some of my previous versions, there is no background implemented yet.
Here for the obligatory screenshots:
All windows minimized:
One window restored from minimized:
Window resizing:
Window resized (and z-order bug):
Window maximized (and z-order bug):
Installing:
Copy and paste k-win-upload.bas and blank.png into your qb64 folder. Compile and run k-win-upload.bas.
blank.png :
k-win-upload.bas :
Code: (Select All)
Type aSize
restoredSizeX As _Unsigned Integer
restoredSizeY As _Unsigned Integer
maximizedSizeX As _Unsigned Integer
maximizedSizeY As _Unsigned Integer
End Type
Type aProperty
isMinimizable As _Byte
isRestorable As _Byte
isMaximizable As _Byte
isMovable As _Byte
isResizable As _Byte
End Type
Type aStatus
isMinimized As _Byte
isRestored As _Byte
isMaximized As _Byte
isMoving As _Byte
isResizing As _Byte
End Type
Type aWindow
positionX As Integer
positionY As Integer
Size As aSize
restoredImageHandle As _Unsigned Long
maximizedImageHandle As _Unsigned Long
Properties As aProperty
Status As aStatus
isActive As _Byte
End Type
Type anIcon
positionX As Integer
positionY As Integer
sizeX As _Unsigned Integer
sizeY As _Unsigned Integer
imageHandle As _Unsigned Long
End Type
Type anObject
Title As String
Identifier As String
Windows As aWindow
Icons As anIcon
End Type
Type aMouse
positionX As Integer
positionY As Integer
buttonLeft As _Byte
buttonCenter As _Byte
buttonRight As _Byte
End Type
Type aZone
parentIdentifier As _Unsigned Integer
Identifier As _Unsigned Integer
positionX As Integer
positionY As Integer
sizeX As _Unsigned Integer
sizeY As _Unsigned Integer
Purpose As String
End Type
Type aLimit
Minimum As _Unsigned Integer
Current As _Unsigned Integer
Maximum As _Unsigned Integer
End Type
Dim Shared limitObjects As aLimit
limitObjects.Minimum = 0
limitObjects.Current = limitObjects.Minimum
limitObjects.Maximum = 0 - 1
Dim Shared limitZones As aLimit
limitZones.Minimum = 0
limitZones.Current = limitZones.Minimum
limitZones.Maximum = 0 - 1
ReDim Shared Objects(limitObjects.Current) As anObject
ReDim Shared Zones(limitZones.Current) As aZone
Dim Shared ZoneMatched As _Unsigned Integer
Dim Shared WindowMatched As _Unsigned Integer
Dim Shared Purpose As String
Dim Shared Mouse As aMouse
' BAS on down BI on up
Screen _NewImage(800, 600, 32)
'_FullScreen _SquarePixels
Dim Shared gray25 As _Unsigned Long: gray25 = _RGBA32(63, 63, 63, 255)
Dim Shared gray50 As _Unsigned Long: gray50 = _RGBA32(127, 127, 127, 255)
Dim Shared gray75 As _Unsigned Long: gray75 = _RGBA32(191, 191, 191, 255)
objectInit 100, 100, 200, 200, "Window 1", "Window Title 1"
'objectDisableMaximization limitObjects.Current
objectInit 200, 200, 200, 200, "Window 2", "Window Title 2"
'objectDisableMaximization limitObjects.Current
objectInit 300, 300, 200, 200, "Window 3", "Window Title 3"
'objectDisableMaximization limitObjects.Current
Do
Line (0, 0)-(_Width - 1, _Height - 1), _RGBA32(63, 0, 63, 255), BF
For i = 0 To limitObjects.Current
If Objects(i).Windows.Status.isMinimized Then
_PutImage (Objects(i).Icons.positionX, Objects(i).Icons.positionY), Objects(i).Icons.imageHandle
ElseIf Objects(i).Windows.Status.isRestored Then
_PutImage (Objects(i).Windows.positionX, Objects(i).Windows.positionY), Objects(i).Windows.restoredImageHandle
ElseIf Objects(i).Windows.Status.isMaximized Then
_PutImage (0, 0), Objects(i).Windows.maximizedImageHandle
End If
Next i
mouseProbe
If Mouse.buttonLeft Then
For i = 0 To limitObjects.Current
WindowMatched = isObject~%(i)
If WindowMatched Then
If Objects(WindowMatched).Windows.Status.isMinimized Then
_Delay .125
mouseProbe
If Mouse.buttonLeft Then
objectMove WindowMatched
Else
objectRestore WindowMatched
End If
ElseIf Objects(WindowMatched).Windows.Status.isRestored Then
If Mouse.positionX > Objects(WindowMatched).Windows.positionX + 4 And Mouse.positionX < Objects(WindowMatched).Windows.positionX + 24 Then
If Mouse.positionY > Objects(WindowMatched).Windows.positionY + 3 And Mouse.positionY < Objects(WindowMatched).Windows.positionY + 23 Then
' Close
End If
End If
If Mouse.positionX > Objects(WindowMatched).Windows.positionX + 24 And Mouse.positionX < Objects(WindowMatched).Windows.positionX + (_Width(Objects(WindowMatched).Windows.restoredImageHandle) - 69) Then
If Mouse.positionY > Objects(WindowMatched).Windows.positionY + 3 And Mouse.positionY < Objects(WindowMatched).Windows.positionY + 23 Then
objectMove WindowMatched
End If
End If
If Mouse.positionX > Objects(WindowMatched).Windows.positionX + (_Width(Objects(WindowMatched).Windows.restoredImageHandle) - 46) And Mouse.positionX < Objects(WindowMatched).Windows.positionX + (_Width(Objects(WindowMatched).Windows.restoredImageHandle) - 23) Then
If Mouse.positionY > Objects(WindowMatched).Windows.positionY + 3 And Mouse.positionY < Objects(WindowMatched).Windows.positionY + 23 Then
objectMinimize WindowMatched
End If
End If
If Mouse.positionX > Objects(WindowMatched).Windows.positionX + (_Width(Objects(WindowMatched).Windows.restoredImageHandle) - 23) And Mouse.positionX < Objects(WindowMatched).Windows.positionX + (_Width(Objects(WindowMatched).Windows.restoredImageHandle) - 3) Then
If Mouse.positionY > Objects(WindowMatched).Windows.positionY + 3 And Mouse.positionY < Objects(WindowMatched).Windows.positionY + 23 Then
objectMaximize WindowMatched
End If
End If
If Mouse.positionX > Objects(WindowMatched).Windows.positionX + (_Width(Objects(WindowMatched).Windows.restoredImageHandle) - 23) And Mouse.positionX < Objects(WindowMatched).Windows.positionX + (_Width(Objects(WindowMatched).Windows.restoredImageHandle) - 3) Then
If Mouse.positionY > Objects(WindowMatched).Windows.positionY + (_Height(Objects(WindowMatched).Windows.restoredImageHandle) - 23) And Mouse.positionY < Objects(WindowMatched).Windows.positionY + (_Height(Objects(WindowMatched).Windows.restoredImageHandle) - 3) Then
objectResize WindowMatched
End If
End If
End If
End If
Next i
End If
_Limit 60
_Display
Loop Until Len(InKey$)
Sub objectAdd
limitObjects.Current = limitObjects.Current + 1
ReDim _Preserve Objects(limitObjects.Current) As anObject
End Sub
Sub objectRemove (inIdentifier As _Unsigned Integer)
If Objects(inIdentifier).Icons.imageHandle Then
_FreeImage Objects(inIdentifier).Icons.imageHandle
End If
If Objects(inIdentifier).Windows.restoredImageHandle Then
_FreeImage Objects(inIdentifier).Windows.restoredImageHandle
End If
If Objects(inIdentifier).Windows.maximizedImageHandle Then
_FreeImage Objects(inIdentifier).Windows.maximizedImageHandle
End If
For i = inIdentifier To limitObjects.Current - 1 Step 1
Objects(i) = Objects(i + 1)
Next i
If limitObjects.Current > limitObjects.Minimum Then ' redim array
limitObjects.Current = limitObjects.Current - 1
ReDim _Preserve Objects(limitObjects.Current) As anObject
End If
End Sub
Sub objectInit (inPositionX As Integer, inPositionY As Integer, inSizeX As _Unsigned Integer, inSizeY As _Unsigned Integer, inIdentifier As String, inTitle As String)
objectAdd
Objects(limitObjects.Current).Title = inTitle
Objects(limitObjects.Current).Identifier = inIdentifier
Objects(limitObjects.Current).Windows.positionX = inPositionX
Objects(limitObjects.Current).Windows.positionY = inPositionY
Objects(limitObjects.Current).Windows.Size.restoredSizeX = inSizeX
Objects(limitObjects.Current).Windows.Size.restoredSizeY = inSizeY
Objects(limitObjects.Current).Windows.Size.maximizedSizeX = _Width
Objects(limitObjects.Current).Windows.Size.maximizedSizeY = _Height
Objects(limitObjects.Current).Windows.restoredImageHandle = _NewImage(Objects(limitObjects.Current).Windows.Size.restoredSizeX, Objects(limitObjects.Current).Windows.Size.restoredSizeY, 32)
Objects(limitObjects.Current).Windows.maximizedImageHandle = _NewImage(Objects(limitObjects.Current).Windows.Size.maximizedSizeX, Objects(limitObjects.Current).Windows.Size.maximizedSizeY, 32)
Objects(limitObjects.Current).Windows.Properties.isMinimizable = -1
Objects(limitObjects.Current).Windows.Properties.isRestorable = -1
Objects(limitObjects.Current).Windows.Properties.isMaximizable = -1
Objects(limitObjects.Current).Windows.Properties.isMovable = -1
Objects(limitObjects.Current).Windows.Properties.isResizable = -1
Objects(limitObjects.Current).Windows.Status.isMinimized = -1
Objects(limitObjects.Current).Windows.Status.isRestored = 0
Objects(limitObjects.Current).Windows.Status.isMaximized = 0
Objects(limitObjects.Current).Windows.Status.isMoving = 0
Objects(limitObjects.Current).Windows.Status.isResizing = 0
Objects(limitObjects.Current).Windows.isActive = 0
Objects(limitObjects.Current).Icons.positionX = Objects(limitObjects.Current).Windows.positionX + (Objects(limitObjects.Current).Windows.Size.restoredSizeX / 2)
Objects(limitObjects.Current).Icons.positionY = Objects(limitObjects.Current).Windows.positionY + (Objects(limitObjects.Current).Windows.Size.restoredSizeY / 2)
Objects(limitObjects.Current).Icons.imageHandle = _LoadImage("blank.png")
Objects(limitObjects.Current).Icons.sizeX = _Width(Objects(limitObjects.Current).Icons.imageHandle)
Objects(limitObjects.Current).Icons.sizeY = _Height(Objects(limitObjects.Current).Icons.imageHandle)
objectDraw limitObjects.Current, "Restored"
objectDraw limitObjects.Current, "Maximized"
End Sub
Sub objectDraw (inIdentifier As _Unsigned Integer, inMode As String)
inMode = LTrim$(RTrim$(UCase$(inMode)))
Select Case inMode
Case "RESTORED"
_Dest Objects(inIdentifier).Windows.restoredImageHandle
Line (0, 0)-(_Width - 1, _Height - 1), _RGBA32(127, 127, 127, 255), BF
box 0, 0, _Width - 1, _Height - 1, 1
box 0, 0, _Width - 1, _Height - 1, 1
If Objects(Identifier).Windows.isActive = -1 Then
Titlebar 2, 2, _Width - 5, 23, _RGBA32(0, 255, 255, 255)
Else
Titlebar 2, 2, _Width - 5, 23, _RGBA32(0, 127, 127, 255)
End If
box2 _Width - 48, 3, 20, 20, 1, 7
box2 _Width - 25, 3, 20, 20, 1, 2
box3 4, 3, 20, 20, 1, 1, 7
_Dest 0
Case "MAXIMIZED"
_Dest Objects(inIdentifier).Windows.maximizedImageHandle
Line (0, 0)-(_Width - 1, _Height - 1), _RGBA32(127, 127, 127, 255), BF
box 0, 0, _Width - 1, _Height - 1, 1
box 0, 0, _Width - 1, _Height - 1, 1
If Objects(Identifier).Windows.isActive = -1 Then
Titlebar 2, 2, _Width - 5, 23, _RGBA32(0, 255, 255, 255)
Else
Titlebar 2, 2, _Width - 5, 23, _RGBA32(0, 127, 127, 255)
End If
box2 _Width - 48, 3, 20, 20, 1, 7
box2 _Width - 25, 3, 20, 20, 1, 2
box3 4, 3, 20, 20, 1, 1, 7
_Dest 0
End Select
End Sub
Sub objectMinimize (inIdentifier As _Unsigned Integer)
If Objects(inIdentifier).Windows.Properties.isMinimizable = -1 Then
Objects(inIdentifier).Windows.Status.isMinimized = -1
Objects(inIdentifier).Windows.Status.isRestored = 0
Objects(inIdentifier).Windows.Status.isMaximized = 0
End If
End Sub
Sub objectRestore (inIdentifier As _Unsigned Integer)
If Objects(inIdentifier).Windows.Properties.isRestorable = -1 Then
Objects(inIdentifier).Windows.Status.isMinimized = 0
Objects(inIdentifier).Windows.Status.isRestored = -1
Objects(inIdentifier).Windows.Status.isMaximized = 0
End If
End Sub
Sub objectMaximize (inIdentifier As _Unsigned Integer)
If Objects(inIdentifier).Windows.Properties.isMaximizable = -1 Then
Objects(inIdentifier).Windows.Status.isMinimized = 0
Objects(inIdentifier).Windows.Status.isRestored = 0
Objects(inIdentifier).Windows.Status.isMaximized = -1
End If
End Sub
Sub objectMove (inIdentifier As _Unsigned Integer)
If Objects(inIdentifier).Windows.Properties.isMovable Then
Objects(inIdentifier).Windows.Status.isMoving = -1
Dim previousPositionX As _Unsigned Integer, previousPositionY As _Unsigned Integer
If Objects(inIdentifier).Windows.Status.isMinimized Then
previousPositionX = Objects(inIdentifier).Icons.positionX - Mouse.positionX
previousPositionY = Objects(inIdentifier).Icons.positionY - Mouse.positionY
While Mouse.buttonLeft
Line (0, 0)-(_Width - 1, _Height - 1), _RGBA32(63, 0, 63, 255), BF
mouseProbe
Objects(inIdentifier).Icons.positionX = Mouse.positionX + previousPositionX
Objects(inIdentifier).Icons.positionY = Mouse.positionY + previousPositionY
For i = 1 To limitObjects.Current
If Objects(i).Windows.Status.isMinimized Then
_PutImage (Objects(i).Icons.positionX, Objects(i).Icons.positionY), Objects(i).Icons.imageHandle
ElseIf Objects(i).Windows.Status.isRestored Then
_PutImage (Objects(i).Windows.positionX, Objects(i).Windows.positionY), Objects(i).Windows.restoredImageHandle
End If
Next i
_Display
Wend
ElseIf Objects(inIdentifier).Windows.Status.isRestored Then
previousPositionX = Objects(inIdentifier).Windows.positionX - Mouse.positionX
previousPositionY = Objects(inIdentifier).Windows.positionY - Mouse.positionY
While Mouse.buttonLeft
Line (0, 0)-(_Width - 1, _Height - 1), _RGBA32(63, 0, 63, 255), BF
mouseProbe
Objects(inIdentifier).Windows.positionX = Mouse.positionX + previousPositionX
Objects(inIdentifier).Windows.positionY = Mouse.positionY + previousPositionY
For i = 1 To limitObjects.Current
If Objects(i).Windows.Status.isMinimized Then
_PutImage (Objects(i).Icons.positionX, Objects(i).Icons.positionY), Objects(i).Icons.imageHandle
ElseIf Objects(i).Windows.Status.isRestored Then
_PutImage (Objects(i).Windows.positionX, Objects(i).Windows.positionY), Objects(i).Windows.restoredImageHandle
End If
Next i
_Display
Wend
End If
Objects(inIdentifier).Windows.Status.isMoving = 0
End If
End Sub
Sub objectResize (inIdentifier As _Unsigned Integer)
If Objects(inIdentifier).Windows.Properties.isResizable Then
Objects(inIdentifier).Windows.Status.isResizing = -1
Dim positionX As Integer, positionY As Integer
Dim sizeX As _Unsigned Integer, sizeY As _Unsigned Integer
positionX = Objects(inIdentifier).Windows.positionX
positionY = Objects(inIdentifier).Windows.positionY
While Mouse.buttonLeft
Line (0, 0)-(_Width - 1, _Height - 1), _RGBA32(63, 0, 63, 255), BF
mouseProbe
For i = 1 To limitObjects.Current
If Objects(i).Windows.Status.isMinimized Then
_PutImage (Objects(i).Icons.positionX, Objects(i).Icons.positionY), Objects(i).Icons.imageHandle
ElseIf Objects(i).Windows.Status.isRestored Then
_PutImage (Objects(i).Windows.positionX, Objects(i).Windows.positionY), Objects(i).Windows.restoredImageHandle
End If
Next i
sizeX = (Mouse.positionX - Objects(inIdentifier).Windows.positionX)
sizeY = (Mouse.positionY - Objects(inIdentifier).Windows.positionY)
Line (Objects(inIdentifier).Windows.positionX, Objects(inIdentifier).Windows.positionY)-(Objects(inIdentifier).Windows.positionX + sizeX, Objects(inIdentifier).Windows.positionY + sizeY), _RGBA32(255, 255, 255, 255), B
_Display
Wend
sizeX = (Mouse.positionX - Objects(inIdentifier).Windows.positionX)
sizeY = (Mouse.positionY - Objects(inIdentifier).Windows.positionY)
_FreeImage Objects(inIdentifier).Windows.restoredImageHandle
Objects(indentifier).Windows.restoredImageHandle = _NewImage(sizeX, sizeY, 32)
objectDraw inIdentifier, "Restored"
_PutImage (positionX, positionY), inIdentifier
Objects(inIdentifier).Windows.positionX = positionX
Objects(inIdentifier).Windows.positionY = positionY
Objects(inIdentifier).Windows.Size.restoredSizeX = sizeX
Objects(inIdentifier).Windows.Size.restoredSizeY = sizeY
Objects(inIdentifier).Windows.Status.isResizing = 0
End If
End Sub
Sub objectDisableMinimization (inIdentifier As _Unsigned Integer)
Objects(inIdentifier).Windows.Properties.isMinimizable = 0
End Sub
Sub objectDisableRestoration (inIdentifier As _Unsigned Integer)
Objects(inIdentifier).Windows.Properties.isRestorable = 0
End Sub
Sub objectDisableMaximization (inIdentifier As _Unsigned Integer)
Objects(inIdentifier).Windows.Properties.isMaximizable = 0
End Sub
Sub objectDisableMoving (inIdentifier As _Unsigned Integer)
Objects(inIdentifier).Windows.Properties.isMovable = 0
End Sub
Sub objectDisableResizing (inIdentifier As _Unsigned Integer)
Objects(inIdentifier).Windows.Properties.isResizable = 0
End Sub
Sub mouseProbe
While _MouseInput
Mouse.positionX = _MouseX
Mouse.positionY = _MouseY
Mouse.buttonLeft = _MouseButton(1)
Mouse.buttonCenter = _MouseButton(3)
Mouse.buttonRight = _MouseButton(2)
Wend
End Sub
Function isObject~% (inIdentifier As _Unsigned Integer)
If Objects(inIdentifier).Windows.Status.isMinimized Then
If Mouse.positionX >= Objects(inIdentifier).Icons.positionX Then
If Mouse.positionY >= Objects(inIdentifier).Icons.positionY Then
If Mouse.positionX <= Objects(inIdentifier).Icons.positionX + Objects(inIdentifier).Icons.sizeX Then
If Mouse.positionY <= Objects(inIdentifier).Icons.positionY + Objects(inIdentifier).Icons.sizeY Then
isObject~% = inIdentifier
End If
End If
End If
End If
ElseIf Objects(inIdentifier).Windows.Status.isRestored Then
If Mouse.positionX >= Objects(inIdentifier).Windows.positionX Then
If Mouse.positionY >= Objects(inIdentifier).Windows.positionY Then
If Mouse.positionX <= Objects(inIdentifier).Windows.positionX + Objects(inIdentifier).Windows.Size.restoredSizeX Then
If Mouse.positionY <= Objects(inIdentifier).Windows.positionY + Objects(inIdentifier).Windows.Size.restoredSizeY Then
isObject~% = inIdentifier
End If
End If
End If
End If
End If
End Function
Sub Titlebar (titlebarPositionX As _Unsigned Integer, titlebarPositionY As _Unsigned Integer, titlebarWidth As _Unsigned Integer, titlebarHeight As _Unsigned Integer, titlebarColor As _Unsigned Long)
Line (titlebarPositionX, titlebarPositionY)-(titlebarPositionX + titlebarWidth, titlebarPositionY + titlebarHeight), titlebarColor, BF
End Sub
Sub box (boxPositionX As _Unsigned Integer, boxPositionY As _Unsigned Integer, boxWidth As _Unsigned Integer, boxHeight As _Unsigned Integer, boxDepth As _Unsigned Integer)
Line (boxPositionX, boxPositionY)-(boxPositionX + boxWidth, boxPositionY + boxHeight), gray75, BF
Line (boxPositionX + boxDepth, boxPositionY + boxDepth)-(boxPositionX + boxWidth, boxPositionY + boxHeight), gray25, BF
Line (boxPositionX + boxDepth, boxPositionY + boxDepth)-((boxPositionX + boxWidth) - boxDepth, (boxPositionY + boxHeight) - boxDepth), gray50, BF
End Sub
Sub box2 (boxPositionX As _Unsigned Integer, boxPositionY As _Unsigned Integer, boxWidth As _Unsigned Integer, boxHeight As _Unsigned Integer, boxDepth As _Unsigned Integer, interiorDepth As _Unsigned Integer)
interiorDepth = interiorDepth * boxDepth
Line (boxPositionX, boxPositionY)-(boxPositionX + boxWidth, boxPositionY + boxHeight), gray25, BF
Line (boxPositionX + boxDepth, boxPositionY + boxDepth)-(boxPositionX + boxWidth, boxPositionY + boxHeight), gray75, BF
Line (boxPositionX + boxDepth, boxPositionY + boxDepth)-((boxPositionX + boxWidth) - boxDepth, (boxPositionY + boxHeight) - boxDepth), gray50, BF
Line (boxPositionX + boxDepth + interiorDepth, boxPositionY + boxDepth + interiorDepth)-(boxPositionX + boxWidth - boxDepth - interiorDepth, boxPositionY + boxHeight - boxDepth - interiorDepth), gray75, BF
Line (boxPositionX + (boxDepth * 2) + interiorDepth, boxPositionY + (boxDepth * 2) + interiorDepth)-(boxPositionX + boxWidth - boxDepth - interiorDepth, boxPositionY + boxHeight - boxDepth - interiorDepth), gray25, BF
Line (boxPositionX + (boxDepth * 2) + interiorDepth, boxPositionY + (boxDepth * 2) + interiorDepth)-(boxPositionX + boxWidth - (boxDepth * 2) - interiorDepth, boxPositionY + boxHeight - (boxDepth * 2) - interiorDepth), gray50, BF
End Sub
Sub box3 (boxPositionX As _Unsigned Integer, boxPositionY As _Unsigned Integer, boxWidth As _Unsigned Integer, boxHeight As _Unsigned Integer, boxDepth As _Unsigned Integer, interiorDepthX As _Unsigned Integer, interiorDepthY As _Unsigned Integer)
interiorDepthX = interiorDepthX * boxDepth
interiorDepthY = interiorDepthY * boxDepth
Line (boxPositionX, boxPositionY)-(boxPositionX + boxWidth, boxPositionY + boxHeight), gray25, BF
Line (boxPositionX + boxDepth, boxPositionY + boxDepth)-(boxPositionX + boxWidth, boxPositionY + boxHeight), gray75, BF
Line (boxPositionX + boxDepth, boxPositionY + boxDepth)-((boxPositionX + boxWidth) - boxDepth, (boxPositionY + boxHeight) - boxDepth), gray50, BF
Line (boxPositionX + boxDepth + interiorDepthX, boxPositionY + boxDepth + interiorDepthY)-(boxPositionX + boxWidth - boxDepth - interiorDepthX, boxPositionY + boxHeight - boxDepth - interiorDepthY), gray75, BF
Line (boxPositionX + (boxDepth * 2) + interiorDepthX, boxPositionY + (boxDepth * 2) + interiorDepthY)-(boxPositionX + boxWidth - boxDepth - interiorDepthX, boxPositionY + boxHeight - boxDepth - interiorDepthY), gray25, BF
Line (boxPositionX + (boxDepth * 2) + interiorDepthX, boxPositionY + (boxDepth * 2) + interiorDepthY)-(boxPositionX + boxWidth - (boxDepth * 2) - interiorDepthX, boxPositionY + boxHeight - (boxDepth * 2) - interiorDepthY), gray50, BF
End Sub