debugvisualizers.txt

Sat, 08 Mar 2014 13:55:46 +0200

author
larukedi
date
Sat, 08 Mar 2014 13:55:46 +0200
changeset 401
85c7261e590a
parent 58
d113eb748c04
permissions
-rw-r--r--

added LICENSE and README.md files

***************************************
* For Visual studio add the following *
* code to autoexp.dat in folder:      *
* Common7\Packages\Debugger from      *
* installation folder under           *
* [Visualizer] section, default       *
* installation  folder for Visual     *
* Studio 2010 is C:\Program Files\    *
* Microsoft Visual Studio 10.0        *
***************************************

gge::utils::Collection<*> {
    preview (
        #(
            "size=", [*$c.count, i]
        )
		
    )
	children (
        #(
            [size]: [*$c.count, i],
			[capacity]: [*$c.list.size_],
			[raw]: [$c.list],
            #array (
                expr: (*$c.list.data)+$i,
                size: *$c.count
            ) : #if ($e != 0) (
				$e
			)
        )
    )
}

gge::utils::basic_Size2D<*> {
	preview (
		#(
			"{",[$c.Width],"x",[$c.Height],"}"
		)
	)
}

gge::utils::basic_Point2D<*> {
	preview (
		#(
			"(",[$c.x],", ",[$c.y],")"
		)
	)
}

gge::utils::basic_Rectangle2D<*> {
	preview (
		#(
			"(",[$c.Left],", ",[$c.Top],") {",[$c.Width],"x",[$c.Height],"}"
		)
	)
	children (
		#(
			#(Left: $c.Left),
			#(Top: $c.Top),
			#(Width: $c.Width),
			#(Height: $c.Height),
			#(Right: $c.Left+$c.Width),
			#(Bottom: $c.Top+$c.Height)			
		)
	)
}

gge::utils::basic_Bounds2D<*> {
	preview (
		#(
			"<",[$c.Left],"-",[$c.Right],">, <",[$c.Top],"-",[$c.Bottom],">"
		)
	)
	children (
		#(
			#(Left: $c.Left),
			#(Top: $c.Top),
			#(Right: $c.Right),
			#(Bottom: $c.Bottom),			
			#(Width: $c.Right-$c.Left),
			#(Height: $c.Bottom-$c.Top)
		)
	)
}

gge::animation::AnimationController {
	preview (
		# (
			[$c.progress],"ms",
			#if ($c.ispaused != 0) (
				", paused"
			),
			#if ($c.isfinished != 0) (
				", finished"
			),
			#if ($c.pauseat != -1) (
				#(", target=",[$c.pauseat])
			),
			#if ($c.speed != 1) (
				#if ($c.speed == -1) (
					", reverse"
				) #else (
					#(", speed=",[$c.speed])
				)
			)
		)
	)
	
	children (
		#(
			#([Raw]: [$c,!]),
			#(Progress: $c.progress),
			#(Speed: $c.speed),
			#(Pause at: $c.pauseat),
			#(Paused: $c.ispaused),			
			#(Finished: $c.isfinished)
		)
	)
	
}
gge::animation::AnimationTimer {
	preview (
		# (
			[$c.progress],"ms"
		)
	)
	
	children (
		#(
			#([Raw]: [$c,!]),
			#(Progress: $c.progress)
		)
	)
	
}

gge::utils::SGuid {
	preview (
		#(
			[($c.ints[1]>>8) & 0xffffff,x],
			"-",
			[*(int*)($c.bytes+2) & 0xffffff,x],
			"-",
			[*((short*)$c.ints),x]
		)
	)
	
	children (
		#(
			#(Serial: [($c.ints[1]>>8) & 0xffffff,x]),
			#(Random: [*(int*)($c.bytes+2) & 0xffffff,x]),
			#(Time: [*((short*)$c.ints),x]),
			#(Next Serial: [$c.serial,x]),
			#(Is empty: [$c.int64==0]),
			#(Int 64: [$c.int64,x]),
			#(Ints: [$c.ints,!]),
			#(Bytes: [$c.bytes,!])
		)
	)
}	

gge::utils::SortedCollection<*> {
	children (
		#list (
			head: *$c.head,
			next: next,
		): $e.item
	)
}	

gge::Font {
	preview (
		#if($c.Shadow.Type==1) (
			#(
				[$c.Style], ", (", [*((int*)&$c.Color), X], "), ", "Flat shadow{ ", [*((int*)&$c.Shadow.Color), X], ", ", "(",$c.Shadow.Offset.x,", ",$c.Shadow.Offset.y , ") }"
			)
		) #elif($c.Shadow.Type==2) (
			#(
				[$c.Style], ", (", [*((int*)&$c.Color), X], "), ", "Drop shadow{ ", [*((int*)&$c.Shadow.Color), X], ", ", [$c.Shadow.Blur, g], ", ", "(",$c.Shadow.Offset.x,", ",$c.Shadow.Offset.y , ") }"
			)
		) #else (
			#(
				[$c.Style], ", (", [*((int*)&$c.Color), X], "), No shadow"
			)
		)
	)
}

gge::graphics::RGBint {
	preview (
		# (
			[*((int*)&$c), X]
		)
	)
	
	children (
		# (
			#(Alpha: [$c.a,X]),
			#(Red: [$c.r, X]),
			#(Green: [$c.g, X]),
			#(Blue: [$c.b, X])
		)
	)
}

gge::resource::GID::Type {
	preview (
		#([$c, X])
	)
}

mercurial