Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Widgets States

Every widget can exist in a variety of states. These states define what a user can and cannot do with a widget at that particular time. They also control the style of the widget. Various Kismet events can be triggered based on the current state of a UI widget. The following list details the available states. Note that not every widget can exist in all the states.

Active— This state is entered whenever a user hovers the mouse over a particular widget. For instance, you could use this state to produce rollover effects on a particular widget.

Disabled— Put simply, a widget that is in the Disabled state cannot be used. It cannot be placed into the Focused state, meaning that it cannot receive input from the user. A widget in the Disabled state cannot change its own state. Essentially, a Disabled widget will remain nonfunctional until some other event places it into the Enabled state.

Enabled— The Enabled state allows a widget to receive focus, or to be placed in the Focused state.

Focused— A widget in the Focused state can receive user input. Widgets can be placed into this state either through the Focus Chain or through the NextControl and PreviousControl input event aliases, both of which we discuss later in this chapter.

Pressed— This essentially means that a user has clicked the widget. To be more precise, a widget can enter this state when it is already in the Focused state and receives any user input that is bound to the “Clicked” input event alias. By default, this is bound to the left mouse button.

Global Sequence— In your sequence list, you will see the Global Sequence listed among all the available states. The Global Sequence is not really a state in and of itself; it is instead a means for you to attach events and styles to the widget regardless of the state it is currently in.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial