I'm looking for a nice, compact user interface for input of a ternary value: true, false and don't case. It might be used, for example, in a grid view for filtering a column that displays a binary value: don't care shows all records, true filters for rows with the property, and false filters for those without.
I was considering something like an empty ballot box ☐ for don't care, check mark ✔ true, and ballot X ✘ for false. When the user clicks on the control it cycles to the next.
I think this would work for anglo-saxons but I'm not sure check marks and Xs are understood the same in other places.
Maybe you're looking for a tri-state checkbox?

The third state is generally used for values such as "don't care", "indeterminate", "both", "neither", and so on.