-- ----------------------------------------------------------------------------
layoutCryptMedfile.mIOs =
{
	[objectIoXRay1] =
	{
		cursor = kCursorPointer,
	},
	[objectIoXRay2] =
	{
		cursor = kCursorPointer,
	},
	[objectIoXRay3] =
	{
		cursor = kCursorPointer,
	},
	[objectIoFingerprints] =
	{
		cursor = kCursorPointer,
	},	
}
-- ----------------------------------------------------------------------------
layoutCryptMedfile.mFirstTime = true
-- ----------------------------------------------------------------------------
function layoutCryptMedfile:onInitialize()

	Layout.onInitialize(self)
	
	-- create chain table
	self.mChainElements = 
	{
		objectIoXRay1,
		objectIoXRay2,
		objectIoXRay3,
		objectIoFingerprints,
	}
	self.mChainIndex = 1
	
	-- update visuals
	self:calcChain()

end
-- ----------------------------------------------------------------------------
function layoutCryptMedfile:onShow()

	Layout.onShow(self)
	
	if (self.mFirstTime) then
		think("MESSAGE_MEDFILE_CHRISTINE")
		self.mFirstTime = false
	end

end
-- ----------------------------------------------------------------------------
function layoutCryptMedfile:onHide()

	if (goalGatherFilesSamples:isActive()) then
		if (objectPoiMedfileChristine:isActive()) then
			objectHoFileChristine:ss(kFound)
			objectPoiMedfileChristine:ss(kDone)
		end
	end

	Layout.onHide(self)
	
end
-- ----------------------------------------------------------------------------
function layoutCryptMedfile:onClickIO(object, x, y)

	playAudioTrack("MANUAL_PAGE")
	self.mChainIndex = self.mChainIndex % #(self.mChainElements)
	self.mChainIndex = self.mChainIndex + 1
	assert(self.mChainIndex >= 1)
	assert(self.mChainIndex <= #(self.mChainElements))
	self:calcChain()
	return true, false
	
end
-- ----------------------------------------------------------------------------
function layoutCryptMedfile:calcChain()

	-- disable input on all elements
	for i, object in ipairs(self.mChainElements) do
		object:ss(kIdle)
	end
	
	-- enable input on the index
	self.mChainElements[self.mChainIndex]:ss(kActive)
	self.mChainElements[self.mChainIndex]:bringToFront()

end