Document widget mechanism