Next: , Previous: , Up: Native GUI Widgets   [Contents][Index]


50.3.6.2 Lisp API to Native Widgets

Native widgets are manipulated as glyphs (see Glyphs). Thus they are created using make-glyph, with a format of one of the widget types and a :data property specific to the widget being instanced.

However, there is a technical difference between widgets and other kinds of glyphs that is theoretically important. Because widgets are active (that is, they can respond to user input events themselves), it is possible for the user to become aware that two appearances of the “same” glyph are actually separate instances. For example, if a user changes an image glyph from red to blue, and the buffer containing the glyph appears in more than one window, the user will perceive all the appearances to change from red to blue simultaneously.

However, suppose the glyph is a button glyph (e.g., as used in the Customize buffer for the Set, Save, and Done buttons). Then if the Customize buffer appears in several windows at the same time, and the user clicks on the button, she will only perceive the button to be depressed in the window where she clicked the button.

It seems from this example that it is unlikely to be a problem in practice. When the user is faced with an active widget, it seems likely that attention will focus on the widget being manipulated, and having other instances of the widget respond simultaneously might be more disconcerting than the actual case.