Design Considerations for Proxy Objects

Proxy and accessible object design depends on the design of the server UI elements. Regardless of the design, a UI element must notify its proxy object right before it is destroyed so that the proxy object handles calls from clients appropriately.

The following list describes two design possibilities:

  • Place the code that implements the IAccessible interface in the same module as the code that implements the user interface element if the user interface code is easily extensible. In this case, the proxy is "lightweight" in the sense that all it does is monitor the life span of the accessible object, forward calls to the accessible object, and return the results.
  • Place the code that implements IAccessible in the same module as the code that implements the proxy object. In this case, the accessible object uses internal functions to obtain information about the UI element.

Trackbar Controls

When implementing trackbar controls, use the trackbar style TBS_REVERSED to provide more meaningful information. This style reverses the scale used by IAccessible::get_accValue.

For vertical trackbars without this style, IAccessible::get_accValue returns zero (0) when the trackbar thumb is at the top of the control; the values increase as you slide the thumb toward the bottom. With the TBS_REVERSED style, IAccessible::get_accValue returns one hundred (100) when the trackbar thumb is at the top; the numbers decrease as you move the trackbar thumb toward the bottom.

For horizontal trackbars without this style, zero (0) is returned when the trackbar thumb is at the left end of the control; the values increase as you move the trackbar thumb to the right. With the TBS_REVERSED style, IAccessible::get_accValue returns one hundred (100) when the trackbar thumb is at the left; the values decrease as you move the trackbar thumb to the right.

 

 

Show: