VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "FolderFactory"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

'Class FolderFactory
'Returns selected or unselected folder
Private Selected As Folder, unSelected As Folder
Const selColor = vbActiveTitleBar ' &H5FF5F1C
'---------
Public Sub init(Pic As PictureBox)
  'create one instance of each of 2 folders
  Set Selected = New Folder
  Selected.init Pic, selColor

  Set unSelected = New Folder
  unSelected.init Pic, vbYellow
End Sub
'---------
Public Function getFolder(isSelected As Boolean) As Folder
  If isSelected Then
    Set getFolder = Selected
  Else
    Set getFolder = unSelected
  End If
End Function
