Density-functional theory of quantum wires and dots in a strong magnetic field