# Dice.itcl 
# 
#       Creates a dice in a whiteboard canvas. 
# 
# 
# $Id: Dice.itcl,v 1.4 2004/09/03 07:47:07 matben Exp $

namespace eval Dice {
    
    variable infoScript [info script]
}

# This file may be sourced more than once; protect for this!
# Is there a better way? Ugly!

if {[itcl::find classes Dice] == ""} {
    
    class Dice {
	
	inherit BaseWBCanvas
	    
	# -----------------------
	# Private static methods.
	# -----------------------

	private {
	    proc Init {}
	    proc MakeImages {}
	    proc InitRand {}
	    proc UnifRand {x}
	    proc Handler {w type cmd args}
	    proc GetThisFromDiceUtag {utag}
	}

	# ------------------
	# Class constructor.
	# ------------------
	
	protected {
	    constructor {w x y args} {$this BaseWBCanvas::constructor $w} {}
	    destructor {}
	}
	
	# --------------
	# Class methods.
	# --------------

	public {
	    method Save {id args}
	    method Delete {id}
	}
	
	# ----------------------
	# Private class methods.
	# ----------------------
	
	protected {
	    method Draw {x y args}
	    method Turn {}
	    method AnimateAndSet {n}
	    method StopAnimation {n}
	    method SetOwnSide {n}
	    method GetValue {name}
	    method MoveInit {x y} {}
	    method MoveMotion {x y} {}
	    method MoveRelease {x y} {}
	    method DeleteCmd {}
	}
    
	# ----------------------------
	# Private static data members.
	# ----------------------------

	private {
	    common cardstackMenu
	    common inited 0
	    common icons
	    common animatemillis 200
	    common animatelength 3000
	    common animatesequence {3 1 5 4 6 2}
	    common animateicons
	    common animateuid
	}
	
	# ---------------------------
	# Private class data members.
	# ---------------------------
	
	protected {
	    variable iddice
	    variable utagdice
	}    
    }

    body Dice::constructor {w x y args} {	
	if {!$inited} {
	    Init
	}
	eval {Draw $x $y} $args
	
	set b1          {%W bind dice <Button-1>}
	set b1Motion    {%W bind dice <B1-Motion>}
	set b1Release   {%W bind dice <ButtonRelease-1>}

	set b1DoubleInst  [list %W bind $iddice <Double-1>]
	
	set classBindList [list \
	  move    [list $b1        [code $this MoveInit %x %y]] \
	  move    [list $b1Motion  [code $this MoveMotion %x %y]] \
	  move    [list $b1Release [code $this MoveRelease %x %y]] \
	  del     [list $b1        [code $this DeleteCmd]] \
	  ]
	set instBindList [list \
	  point   [list $b1DoubleInst   [code $this Turn]] \
	  ]
	
	RegisterCanvasClassBinds Dice $classBindList
	RegisterCanvasInstBinds  Dice:$this $instBindList	
    }
    
    body Dice::destructor {} {	
	if {[info exists animateuid]} {
	    ::Utils::AnimateStop $animateuid
	}
    }
    
    body Dice::Init {} {
	MakeImages
	InitRand
	set animateicons {}
	foreach i $animatesequence {
	    lappend animateicons $icons(marble-${i})
	}
	::WB::RegisterHandler DICE [code Handler]
	set inited 1
    }
    
    body Dice::Draw {x y args} {
	
	array set argsArr {
	    -number   1
	}
	array set argsArr $args
	if {[info exists argsArr(-tags)]} {
	    set utag $argsArr(-tags)
	} else {
	    set utag [NewUtag]
	}
	set utagdice $utag
	set n $argsArr(-number)
	set im $icons(marble-${n})
	set iddice [$tkCanvas create image $x $y -image $im -anchor nw  \
	  -tags [list image dice n:${n} object:${this} $utag]]
    }
    
    body Dice::Turn {} {
	
	set n [expr [UnifRand 6] + 1]
	AnimateAndSet  $n
	GenCommand "DICE: turn $utagdice $n" remote
    }
    
    body Dice::AnimateAndSet {n} {
	
	set animateuid [::Utils::AnimateStart $animatemillis $animateicons \
	  [list $tkCanvas itemconfigure $iddice -image %v]]
	after $animatelength [code $this StopAnimation $n]
    }
    
    body Dice::StopAnimation {n} {
	
	::Utils::AnimateStop $animateuid
	unset animateuid
	SetOwnSide $n
    }
    
    body Dice::SetOwnSide {n} {
    
	# First remove old number tag before adding new one.
	set tags [$tkCanvas gettags $iddice]
	regexp {n:([1-6])} $tags match number
	$tkCanvas dtag $iddice n:${number}
	$tkCanvas itemconfigure $iddice -image $icons(marble-${n})
	$tkCanvas addtag n:${n} withtag $iddice
    }
    
    body Dice::Handler {w type cmd args} {
		
	switch -- [lindex $cmd 1] {
	    turn {

		# The remote cardstack has picked this card. Remove from stack!
		set utag [lindex $cmd 2]
		set num  [lindex $cmd 3]
		
		# Need to backtrace from utag to actual object.
		set obj [GetThisFromDiceUtag $utag]
		if {$obj != ""} {
		    $obj AnimateAndSet $num
		}
	    }
	}
    }
    
    # GetThisFromDiceUtag --
    # 
    #   Static method to map from a stacks utag to the actual object.
    #   Needed since utags are the only globally uniqe identifier here.

    body Dice::GetThisFromDiceUtag {utag} {
	
	set ansObj ""
	foreach obj [itcl::find objects -class Dice] {
	    set tmputag [$obj GetValue utagdice]
	    if {[string equal $utag $tmputag]} {
		set ansObj $obj
		break
	    }
	}
	return $ansObj
    }

    body Dice::GetValue {name} {
	return [set $name]
    }

    body Dice::MoveInit {x y} {  
	InitMoveCurrent $x $y
    }
    
    body Dice::MoveMotion {x y} {
	DragMoveCurrent $x $y
    }
    
    body Dice::MoveRelease {x y} {
	FinalMoveCurrent $x $y
    }
    
    body Dice::DeleteCmd {} {
	
	if {[info exists animateuid]} {
	    ::Utils::AnimateStop $animateuid
	}
	
	# This actually calls back to our Delete method.
	DeleteCurrent
    }
    
    # Dice::Save --
    #
    #       Returns a oneline import command. Used from app.
    #       
    # Arguments:
    #       id          item id or tag
    #       args:
    #           -basepath absolutePath    translate image -file to a relative path.
    #           -uritype ( file | http )
    #           -keeputag 0|1
    #       
    # Results:
    #       a single command line.

    body Dice::Save {id args} {
	
	# Seemed to be the only way :-(
	upvar [namespace current]::infoScript infoScript

	set tags [$tkCanvas gettags $id]
	if {[lsearch $tags dice] < 0} {
	    return ""
	}
	array set argsArr {
	    -uritype file
	}
	array set argsArr $args
	set uriopts [eval {
	    ::CanvasUtils::GetImportOptsURI $argsArr(-uritype) $infoScript
	} $args]

	set impcmd [concat "import" [$tkCanvas coords $id] $uriopts]
	set im [$tkCanvas itemcget $id -image]
	lappend impcmd -mime application/x-itcl
	lappend impcmd -width [image width $im] -height [image height $im]
	regexp {n:([1-6])} $tags match number
	lappend impcmd -number $number
	
	return $impcmd
    }
    
    body Dice::Delete {id} {
	set utag [GetUtag $id]
	return [list [list delete $utag] {}]
    }

    body Dice::InitRand {} {    
	set seed [expr {abs([pid]+[clock clicks]%100000)}]
	expr {srand(int($seed))}
    }

    body Dice::UnifRand {x} {    
	return [expr {int($x*rand())}]
    }
    
    body Dice::MakeImages {} {
	
	set icons(marble-1) [image create photo -data {
	R0lGODlhLAAsAPcAMf////IQttPT0/v7+/j4+PLy8uPj49fX197e3vz8/PPz
	883Nzc/Pz8LCwsDAwO/v7/b29unp6dHR0bS0tKampre3t/39/f7+/ufn5/n5
	+e7u7u3t7fHx8ZCQkIyMjPT09PDw8Ojo6OXl5d/f3+zs7Obm5urq6uvr6+Hh
	4dnZ2dTU1NjY2NLS0tbW1rKysnt7e3R0dHh4eK+vr+Tk5OLi4uDg4Nra2tvb
	28rKyru7u4iIiHNzc01NTYGBgdzc3N3d3dDQ0M7OzsnJybi4uIqKin19fTEx
	MVxcXImJiYODgyYmJklJSbGxsZKSkqGhocXFxcfHx4aGhj8/P7m5ucHBwba2
	tr+/v62trZGRkSQkJDw8PNXV1by8vLq6usvLy5eXlx8fHzg4OMPDw7CwsJiY
	mKSkpBsbG66uroKCgh0dHampqaioqDQ0NKysrI+Pj5qamouLi6CgoHp6ehkZ
	GS8vL76+vpmZmXl5eXx8fBgYGCsrK5ycnG5ubmxsbDIyMn9/fzs7OyoqKjY2
	NllZWaurq8jIyDk5OX5+fjU1NSEhIUtLS3d3d8bGxjo6Op+fnz09PTc3N11d
	XbW1tcTExJWVlR4eHjAwMFNTU2JiYoWFhZ2dnWdnZ2tra/f39/X19UBAQJub
	m19fX5aWlqqqqhwcHPr6+jMzM6OjoxoaGqenp8zMzKWlpaKiop6enhUVFSws
	LI6OjoeHhxQUFCgoKHZ2dhISEiUlJYSEhBAQECkpKbOzs29vb0xMTAwMDFJS
	UiAgIAkJCb29vZSUlJOTk1BQUHV1dXFxcYCAgG1tbWZmZkdHRxEREVZWVmlp
	aWpqamVlZWFhYVdXV1VVVVtbW15eXmBgYGNjYy4uLg8PDycnJyMjIyIiIi0t
	LRMTE09PT0VFRUhISFFRUVpaWk5OTkZGRkJCQgAAAA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CG+BiE7GghSaYsIIVGOUDLRjFHHMxCx7YYCg0MKAH
	NCGESOBhPJ84wxEKmQI0vKIVutgFLyJBiF7cAQQJ+EACQuAKKuBBC1fwRS1U
	doAZuAsAIKCDFn5Bhk8gARhnkIARVoCGYOghE8IYhiSIYSI3gICBSnjCgRIU
	C2Bs6AExsOXcABAFU2SiGMZoAyVQESUaqEAVQihDHHZxjFPcwBGBQEYKejCD
	EVBhDclQRhuWkf8EMIRABh2owS2/MIxIKKMRipDAG2SwAq4xgRlTgIMcjAGL
	ICBjCSvQgZgKUQYyNOMTrBAcWg6QAYFu8xZkcMYYOMGETlgAIUtwxjCM8YlY
	oKIGPDDAR5ggCi6wwQyuQMUbWGCADADAE0e4JTCeAYwXBMEGWTsIC54QCWIg
	4QuI+IBMACChYkADCXRARg1iMDSDmGpuBJDAJKIhDUQ8LSEPGAUhnEAJaXjg
	rQcxgiH0mQsfMOEDCDlAIG5pg1r4IAT1UojjDJGFIvArIamYRiAKMYTGMgEF
	njgID0YAMQVoIAyV0IQNFBKDDvIRDEzQAUI8AQJVgMEWsKCGY1UQA4P/GCAR
	TljRADAgkU584AN4fRtpVGCEHnAgBgVgAAAoYJYUaCIEthgFItTWgQqgYBo+
	YAY3qlGBDighAf7ywFZL0EEVGGYGLNDBBRzAgAKAIG0sqAETXDsN55hgBi5I
	AhLywI1FREgWj7jL1ToRFh50EH+sMRwTWKCEs6SABc5hARoeEQhbiCAYgUBE
	FAoBB25wwxoBYEItojELEPDgAY0ZDllU8B/ELbhwhxNjCpKAYVugYgK2EAIe
	PAyHgUygD1BQxCxUcYQIIOLIIVBFBO5wB00gQhVO1oSRI1CJKlciEFGgxhmA
	4YRP/MLDVWCJGKBhhWt4+MxoTrOa16xmXrBEICAwwEYZsqENUkCCFHjOs573
	zGc8b2MbkKhGHkJhkYAAADs=
	}]
    }
}

# We must instantiate ourself...

eval {Dice #auto $w $x $y} $args


