Box traps on an atom chip for one-dimensional quantum gases