

class guiPropertyPagesNotebook {
    inherit guiObject
    variable elements {}
    variable noteBook
    variable pageToXuiMapping
    constructor { frame xuiObject guiBuilder} {
	set subject $xuiObject
	set i 0
	
	set noteBook [NoteBook $frame.nb -width 400 -height 300]


	foreach item [$subject getComponents] {
	

        set itemName [$item getName]
	$noteBook insert end $itemName  -text [$item getLabel] \
	   -image [$item cget -icon] 
	set pageToXuiMapping($itemName) $item
	set newFrame [$noteBook getframe $itemName]

	lappend elements [$guiBuilder render $newFrame $item]
        lappend items $itemName
	}
	#$noteBook compute_size
	pack $noteBook -fill both -expand true
	$noteBook raise [lindex $items 0]
    }
    destructor {
       eval delete object $elements
       eval destroy $noteBook
    }
    method enable {}
    method disable {}
    method queryState {} 
    method getSelectedPropertyPageXui {} {
	return $pageToXuiMapping([$noteBook raise])
    }
}

