State - SirePi/duality-ui GitHub Wiki
A [Control]] has 4 States, which affect its [Appearance and potentially its response to input:
- Normal - the default state; it's how it looks when at rest and is not currently being interacted with in any way.
- Hover - once the mouse goes inside the Control's area, its status changes to Hover. Again, there shouldn't be anything else happening other than using another kind of visual representation.
- Active - the Control has the focus, and is ready to be, or actually being, interacted with.
- Disabled - the Control has been disabled and should not respond to any event. Keep in mind that it's still receiving Hover and Active status changes, and events: it's your job, if you decide to create a new type of Control, to manage this situation.
The State is a Flag enumerator, in order to keep it easy to switch from one state to another, when more than one might apply. In terms of priority, it goes as follows (see here to see how it's implemented):
- Disabled
- Active
- Hover
- Normal