org.symbian.wrttools.doc.WRTKit/html/WRTKit_UIElement_Class-GUID-37b82f75-720c-4f54-9769-cda18453ffa3.html
changeset 230 7848c135d915
parent 229 716254ccbcc0
child 231 611be8d22832
equal deleted inserted replaced
229:716254ccbcc0 230:7848c135d915
     1 <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       
     2 <html lang="en" xml:lang="en">
       
     3 <head>
       
     4 <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
       
     5 <meta name="copyright" content="(C) Copyright 2005" />
       
     6 <meta name="DC.rights.owner" content="(C) Copyright 2005" />
       
     7 <meta content="concept" name="DC.Type" />
       
     8 <meta name="DC.Title" content="WRTKit UIElement Class" />
       
     9 <meta scheme="URI" name="DC.Relation" content="WRTKit_API_Reference-GUID-00e47c27-0a1a-443f-ae85-cf3381635170.html" />
       
    10 <meta content="XHTML" name="DC.Format" />
       
    11 <meta content="GUID-37B82F75-720C-4F54-9769-CDA18453FFA3" name="DC.Identifier" />
       
    12 <meta content="en" name="DC.Language" />
       
    13 <link href="commonltr.css" type="text/css" rel="stylesheet" />
       
    14 <title>
       
    15 WRTKit UIElement Class</title>
       
    16 </head>
       
    17 <body id="GUID-37B82F75-720C-4F54-9769-CDA18453FFA3"><a name="GUID-37B82F75-720C-4F54-9769-CDA18453FFA3"><!-- --></a>
       
    18 
       
    19 
       
    20 
       
    21     <h1 class="topictitle1">
       
    22 WRTKit UIElement Class</h1>
       
    23 
       
    24     <div>
       
    25 
       
    26         <div class="section"><h2 class="sectiontitle">
       
    27 Description</h2>
       
    28 
       
    29             
       
    30             <p>
       
    31 
       
    32                 The UIElement class is the base class for all user interface elements
       
    33                 such as views and controls. Don't instantiate UIElement directly but rather
       
    34                 use one of its subclasses.
       
    35             </p>
       
    36 
       
    37         </div>
       
    38 
       
    39     </div>
       
    40 
       
    41     <div>
       
    42 <div class="familylinks">
       
    43 <div class="parentlink"><strong>Parent topic:</strong> <a href="WRTKit_API_Reference-GUID-00e47c27-0a1a-443f-ae85-cf3381635170.html">WRTKit API Reference</a></div>
       
    44 </div>
       
    45 </div>
       
    46 <div class="nested1" id="GUID-B15AF535-27D2-4C6A-9956-65EED6F40FE8"><a name="GUID-B15AF535-27D2-4C6A-9956-65EED6F40FE8"><!-- --></a>
       
    47 
       
    48         <h2 class="topictitle2">
       
    49 getEventListeners()</h2>
       
    50 
       
    51         <div>
       
    52 
       
    53             <div class="section"><h3 class="sectiontitle">
       
    54 Syntax</h3>
       
    55 
       
    56                 
       
    57                 <pre>
       
    58 [Array] UIElement.getEventListeners(void)</pre>
       
    59 
       
    60             </div>
       
    61 
       
    62             <div class="section"><h3 class="sectiontitle">
       
    63 Description</h3>
       
    64 
       
    65                 
       
    66                 <p>
       
    67 
       
    68                     Allows retrieval of the currently registered event listeners for this user interface element.
       
    69                 </p>
       
    70 
       
    71             </div>
       
    72 
       
    73             <div class="section"><h3 class="sectiontitle">
       
    74 Arguments</h3>
       
    75 
       
    76                 
       
    77                 <p>
       
    78 
       
    79                     This method does not take any arguments.
       
    80                 </p>
       
    81 
       
    82             </div>
       
    83 
       
    84             <div class="section"><h3 class="sectiontitle">
       
    85 Return value</h3>
       
    86 
       
    87                 
       
    88                 <p>
       
    89 
       
    90                     An array of event listeners currently registered to the user interface element.
       
    91                 </p>
       
    92 
       
    93             </div>
       
    94 
       
    95         </div>
       
    96 
       
    97     </div>
       
    98 
       
    99     <div class="nested1" id="GUID-5C747208-730D-4ACF-BB07-CAEF1A26CAA3"><a name="GUID-5C747208-730D-4ACF-BB07-CAEF1A26CAA3"><!-- --></a>
       
   100 
       
   101         <h2 class="topictitle2">
       
   102 addEventListener()</h2>
       
   103 
       
   104         <div>
       
   105 
       
   106             <div class="section"><h3 class="sectiontitle">
       
   107 Syntax</h3>
       
   108 
       
   109                 
       
   110                 <pre>
       
   111 [void] UIElement.addEventListener(String eventType, Function listener)</pre>
       
   112 
       
   113             </div>
       
   114 
       
   115             <div class="section"><h3 class="sectiontitle">
       
   116 Description</h3>
       
   117 
       
   118                 
       
   119                 <p>
       
   120 
       
   121                     Allows registration of a callback function to a user interface element in order to get
       
   122                     notifications of events in the user interface element. Event registration can be done
       
   123                     for a specific type of event or for all events.
       
   124                 </p>
       
   125 
       
   126             </div>
       
   127 
       
   128             <div class="section"><h3 class="sectiontitle">
       
   129 Arguments</h3>
       
   130 
       
   131                 
       
   132                 <br /><ul>
       
   133 
       
   134                     <li>
       
   135 
       
   136                         <p>
       
   137 eventType</p>
       
   138 
       
   139                         
       
   140 
       
   141                             <p>
       
   142 
       
   143                                 The name of the event type the listener should be called for or null if
       
   144                                 all event types. The available event type names depend on the actual user
       
   145                                 interface element class that this method is caled for.
       
   146                             </p>
       
   147 
       
   148                             <p>
       
   149 
       
   150                                 The most common event type names are ActionPerformed for button control clicks,
       
   151                                 SelectionChanged for selection controls, FocusStateChanged for all controls to
       
   152                                 indicate that focus was gained or lost and FocusedControlChanged for views to
       
   153                                 announce that a new control has been brought into (or out of) focus.
       
   154                             </p>
       
   155 
       
   156                         
       
   157                     </li>
       
   158 
       
   159                     <li>
       
   160 
       
   161                         <p>
       
   162 listener</p>
       
   163 
       
   164                         
       
   165 
       
   166                             <p>
       
   167 
       
   168                                 The function that should be called when the specified event type occurs.
       
   169                                 The function should be defined with a single argument that will receive the
       
   170                                 event object. The object has three properties: source, type and value. The
       
   171                                 source property specifies the user interface element (e.g. control) from where
       
   172                                 the event originated. The type property contains the event type name. The
       
   173                                 contents of the value property depends between event types but contains
       
   174                                 additional information about the event. For example if the value changes in
       
   175                                 a selection control then the value property contains the new value.
       
   176                             </p>
       
   177 
       
   178                         
       
   179                     </li>
       
   180 
       
   181                 </ul>
       
   182 
       
   183             </div>
       
   184 
       
   185             <div class="section"><h3 class="sectiontitle">
       
   186 Return value</h3>
       
   187 
       
   188                 
       
   189                 <p>
       
   190 
       
   191                     This method does not return a value.
       
   192                 </p>
       
   193 
       
   194             </div>
       
   195 
       
   196         </div>
       
   197 
       
   198     </div>
       
   199 
       
   200     <div class="nested1" id="GUID-A39809F7-CEC7-45E9-85E4-EC1F36E255EB"><a name="GUID-A39809F7-CEC7-45E9-85E4-EC1F36E255EB"><!-- --></a>
       
   201 
       
   202         <h2 class="topictitle2">
       
   203 removeEventListener()</h2>
       
   204 
       
   205         <div>
       
   206 
       
   207             <div class="section"><h3 class="sectiontitle">
       
   208 Syntax</h3>
       
   209 
       
   210                 
       
   211                 <pre>
       
   212 [void] UIElement.removeEventListener(String eventType, Function listener)</pre>
       
   213 
       
   214             </div>
       
   215 
       
   216             <div class="section"><h3 class="sectiontitle">
       
   217 Description</h3>
       
   218 
       
   219                 
       
   220                 <p>
       
   221 
       
   222                     Allows a specific event listener to be unregistered from a user interface control.
       
   223                 </p>
       
   224 
       
   225             </div>
       
   226 
       
   227             <div class="section"><h3 class="sectiontitle">
       
   228 Arguments</h3>
       
   229 
       
   230                 
       
   231                 <br /><ul>
       
   232 
       
   233                     <li>
       
   234 
       
   235                         <p>
       
   236 eventType</p>
       
   237 
       
   238                         
       
   239 
       
   240                             <p>
       
   241 
       
   242                                 The event type name of the listener that should be removed. Use the exact
       
   243                                 same event type name as when adding the event listener.
       
   244                             </p>
       
   245 
       
   246                         
       
   247                     </li>
       
   248 
       
   249                     <li>
       
   250 
       
   251                         <p>
       
   252 listener</p>
       
   253 
       
   254                         
       
   255 
       
   256                             <p>
       
   257 
       
   258                                 The callback function of the listener that should be removed.
       
   259                             </p>
       
   260 
       
   261                         
       
   262                     </li>
       
   263 
       
   264                 </ul>
       
   265 
       
   266             </div>
       
   267 
       
   268             <div class="section"><h3 class="sectiontitle">
       
   269 Return value</h3>
       
   270 
       
   271                 
       
   272                 <p>
       
   273 
       
   274                     This method does not return a value.
       
   275                 </p>
       
   276 
       
   277             </div>
       
   278 
       
   279         </div>
       
   280 
       
   281     </div>
       
   282 
       
   283     <div class="nested1" id="GUID-A48BCE83-38D7-4DF3-B9C1-FF9A305359BD"><a name="GUID-A48BCE83-38D7-4DF3-B9C1-FF9A305359BD"><!-- --></a>
       
   284 
       
   285         <h2 class="topictitle2">
       
   286 id</h2>
       
   287 
       
   288         <div>
       
   289 
       
   290             <div class="section"><h3 class="sectiontitle">
       
   291 Syntax</h3>
       
   292 
       
   293                 
       
   294                 <pre>
       
   295 [String] UIElement.id</pre>
       
   296 
       
   297             </div>
       
   298 
       
   299             <div class="section"><h3 class="sectiontitle">
       
   300 Description</h3>
       
   301 
       
   302                 
       
   303                 <p>
       
   304 
       
   305                     The id property is a unique identifier for the user interface element.
       
   306                     The identifier is used for the root HTML element in the element hierarchy
       
   307                     that defines the user interface element and is useful for example in
       
   308                     specifying specific CSS rules for a particular user interface element.
       
   309                     The identifier can also be used to recognize the source of an event in an
       
   310                     event callback by accessing the id property of the source property in the
       
   311                     event object passed to the event listener callback.
       
   312                 </p>
       
   313 
       
   314             </div>
       
   315 
       
   316         </div>
       
   317 
       
   318     </div>
       
   319 
       
   320 
       
   321 </body>
       
   322 </html>