Naive implementation for getting all states of a selection

Added a method to the state detector to allow getting all of the states of a selection. This is useful when we want to disable buttons based on the state (ie: bold being unavailable for certain fonts) and need to know what is being used in the selection.