| 1 | <?php |
|---|
| 2 | /** |
|---|
| 3 | * The abstract QTabsGen class defined here is |
|---|
| 4 | * code-generated and contains options, events and methods scraped from the |
|---|
| 5 | * JQuery UI documentation Web site. It is not generated by the typical |
|---|
| 6 | * codegen process, but rather is generated periodically by the core QCubed |
|---|
| 7 | * team and checked in. However, the code to generate this file is |
|---|
| 8 | * in the assets/_core/php/_devetools/jquery_ui_gen/jq_control_gen.php file |
|---|
| 9 | * and you can regenerate the files if you need to. |
|---|
| 10 | * |
|---|
| 11 | * The comments in this file are taken from the JQuery UI site, so they do |
|---|
| 12 | * not always make sense with regard to QCubed. They are simply provided |
|---|
| 13 | * as reference. Note that this is very low-level code, and does not always |
|---|
| 14 | * update QCubed state variables. See the QTabsBase |
|---|
| 15 | * file, which contains code to interface between this generated file and QCubed. |
|---|
| 16 | * |
|---|
| 17 | * Because subsequent re-code generations will overwrite any changes to this |
|---|
| 18 | * file, you should leave this file unaltered to prevent yourself from losing |
|---|
| 19 | * any information or code changes. All customizations should be done by |
|---|
| 20 | * overriding existing or implementing new methods, properties and variables |
|---|
| 21 | * in the QTabs class file. |
|---|
| 22 | * |
|---|
| 23 | */ |
|---|
| 24 | |
|---|
| 25 | /* Custom event classes for this control */ |
|---|
| 26 | |
|---|
| 27 | |
|---|
| 28 | /** |
|---|
| 29 | * This event is triggered when tabs is created. |
|---|
| 30 | */ |
|---|
| 31 | class QTabs_CreateEvent extends QJqUiEvent { |
|---|
| 32 | const EventName = 'tabscreate'; |
|---|
| 33 | } |
|---|
| 34 | /** |
|---|
| 35 | * This event is triggered when clicking a tab. |
|---|
| 36 | */ |
|---|
| 37 | class QTabs_SelectEvent extends QJqUiEvent { |
|---|
| 38 | const EventName = 'tabsselect'; |
|---|
| 39 | } |
|---|
| 40 | /** |
|---|
| 41 | * This event is triggered after the content of a remote tab has been loaded. |
|---|
| 42 | */ |
|---|
| 43 | class QTabs_LoadEvent extends QJqUiEvent { |
|---|
| 44 | const EventName = 'tabsload'; |
|---|
| 45 | } |
|---|
| 46 | /** |
|---|
| 47 | * This event is triggered when a tab is shown. |
|---|
| 48 | */ |
|---|
| 49 | class QTabs_ShowEvent extends QJqUiEvent { |
|---|
| 50 | const EventName = 'tabsshow'; |
|---|
| 51 | } |
|---|
| 52 | /** |
|---|
| 53 | * This event is triggered when a tab is added. |
|---|
| 54 | */ |
|---|
| 55 | class QTabs_AddEvent extends QJqUiEvent { |
|---|
| 56 | const EventName = 'tabsadd'; |
|---|
| 57 | } |
|---|
| 58 | /** |
|---|
| 59 | * This event is triggered when a tab is removed. |
|---|
| 60 | */ |
|---|
| 61 | class QTabs_RemoveEvent extends QJqUiEvent { |
|---|
| 62 | const EventName = 'tabsremove'; |
|---|
| 63 | } |
|---|
| 64 | /** |
|---|
| 65 | * This event is triggered when a tab is enabled. |
|---|
| 66 | */ |
|---|
| 67 | class QTabs_EnableEvent extends QJqUiEvent { |
|---|
| 68 | const EventName = 'tabsenable'; |
|---|
| 69 | } |
|---|
| 70 | /** |
|---|
| 71 | * This event is triggered when a tab is disabled. |
|---|
| 72 | */ |
|---|
| 73 | class QTabs_DisableEvent extends QJqUiEvent { |
|---|
| 74 | const EventName = 'tabsdisable'; |
|---|
| 75 | } |
|---|
| 76 | |
|---|
| 77 | /* Custom "property" event classes for this control */ |
|---|
| 78 | |
|---|
| 79 | /** |
|---|
| 80 | * @property boolean $Disabled Disables (true) or enables (false) the tabs. Can be set when initialising |
|---|
| 81 | * (first creating) the tabs. |
|---|
| 82 | * @property array $AjaxOptions Additional Ajax options to consider when loading tab content (see $.ajax). |
|---|
| 83 | * @property boolean $Cache Whether or not to cache remote tabs content, e.g. load only once or with |
|---|
| 84 | * every click. Cached content is being lazy loaded, e.g once and only once |
|---|
| 85 | * for the first click. Note that to prevent the actual Ajax requests from |
|---|
| 86 | * being cached by the browser you need to provide an extra cache: false flag |
|---|
| 87 | * to ajaxOptions. |
|---|
| 88 | * @property boolean $Collapsible Set to true to allow an already selected tab to become unselected again |
|---|
| 89 | * upon reselection. |
|---|
| 90 | * @property mixed $Cookie Store the latest selected tab in a cookie. The cookie is then used to |
|---|
| 91 | * determine the initially selected tab if the selected option is not defined. |
|---|
| 92 | * Requires cookie plugin, which can also be found in the |
|---|
| 93 | * development-bundle>external folder from the download builder. The object |
|---|
| 94 | * needs to have key/value pairs of the form the cookie plugin expects as |
|---|
| 95 | * options. Available options (example): { expires: 7, path: '/', domain: |
|---|
| 96 | * 'jquery.com', secure: true }. Since jQuery UI 1.7 it is also possible |
|---|
| 97 | * to define the cookie name being used via name property. |
|---|
| 98 | * @property boolean $Deselectable deprecated in jQuery UI 1.7, use collapsible. |
|---|
| 99 | * @property array $Disabled1 An array containing the position of the tabs (zero-based index) that should |
|---|
| 100 | * be disabled on initialization. |
|---|
| 101 | * @property string $Event The type of event to be used for selecting a tab. |
|---|
| 102 | * @property mixed $Fx Enable animations for hiding and showing tab panels. The duration option |
|---|
| 103 | * can be a string representing one of the three predefined speeds ("slow", |
|---|
| 104 | * "normal", "fast") or the duration in milliseconds to run an animation |
|---|
| 105 | * (default is "normal"). |
|---|
| 106 | * @property string $IdPrefix If the remote tab, its anchor element that is, has no title attribute to |
|---|
| 107 | * generate an id from, an id/fragment identifier is created from this prefix |
|---|
| 108 | * and a unique id returned by $.data(el), for example "ui-tabs-54". |
|---|
| 109 | * @property string $PanelTemplate HTML template from which a new tab panel is created in case of adding a tab |
|---|
| 110 | * with the add method or when creating a panel for a remote tab on the fly. |
|---|
| 111 | * @property integer $Selected Zero-based index of the tab to be selected on initialization. To set all |
|---|
| 112 | * tabs to unselected pass -1 as value. |
|---|
| 113 | * @property string $Spinner The HTML content of this string is shown in a tab title while remote |
|---|
| 114 | * content is loading. Pass in empty string to deactivate that behavior. An |
|---|
| 115 | * span element must be present in the A tag of the title, for the spinner |
|---|
| 116 | * content to be visible. |
|---|
| 117 | * @property string $TabTemplate HTML template from which a new tab is created and added. The placeholders |
|---|
| 118 | * #{href} and #{label} are replaced with the url and tab |
|---|
| 119 | * label that are passed as arguments to the add method. |
|---|
| 120 | */ |
|---|
| 121 | |
|---|
| 122 | class QTabsGen extends QPanel { |
|---|
| 123 | protected $strJavaScripts = __JQUERY_EFFECTS__; |
|---|
| 124 | protected $strStyleSheets = __JQUERY_CSS__; |
|---|
| 125 | /** @var boolean */ |
|---|
| 126 | protected $blnDisabled = null; |
|---|
| 127 | /** @var array */ |
|---|
| 128 | protected $arrAjaxOptions = null; |
|---|
| 129 | /** @var boolean */ |
|---|
| 130 | protected $blnCache = null; |
|---|
| 131 | /** @var boolean */ |
|---|
| 132 | protected $blnCollapsible = null; |
|---|
| 133 | /** @var mixed */ |
|---|
| 134 | protected $mixCookie = null; |
|---|
| 135 | /** @var boolean */ |
|---|
| 136 | protected $blnDeselectable = null; |
|---|
| 137 | /** @var array */ |
|---|
| 138 | protected $arrDisabled1 = null; |
|---|
| 139 | /** @var string */ |
|---|
| 140 | protected $strEvent = null; |
|---|
| 141 | /** @var mixed */ |
|---|
| 142 | protected $mixFx = null; |
|---|
| 143 | /** @var string */ |
|---|
| 144 | protected $strIdPrefix = null; |
|---|
| 145 | /** @var string */ |
|---|
| 146 | protected $strPanelTemplate = null; |
|---|
| 147 | /** @var integer */ |
|---|
| 148 | protected $intSelected; |
|---|
| 149 | /** @var string */ |
|---|
| 150 | protected $strSpinner = null; |
|---|
| 151 | /** @var string */ |
|---|
| 152 | protected $strTabTemplate = null; |
|---|
| 153 | |
|---|
| 154 | protected function makeJsProperty($strProp, $strKey) { |
|---|
| 155 | $objValue = $this->$strProp; |
|---|
| 156 | if (null === $objValue) { |
|---|
| 157 | return ''; |
|---|
| 158 | } |
|---|
| 159 | |
|---|
| 160 | return $strKey . ': ' . JavaScriptHelper::toJsObject($objValue) . ', '; |
|---|
| 161 | } |
|---|
| 162 | |
|---|
| 163 | protected function makeJqOptions() { |
|---|
| 164 | $strJqOptions = ''; |
|---|
| 165 | $strJqOptions .= $this->makeJsProperty('Disabled', 'disabled'); |
|---|
| 166 | $strJqOptions .= $this->makeJsProperty('AjaxOptions', 'ajaxOptions'); |
|---|
| 167 | $strJqOptions .= $this->makeJsProperty('Cache', 'cache'); |
|---|
| 168 | $strJqOptions .= $this->makeJsProperty('Collapsible', 'collapsible'); |
|---|
| 169 | $strJqOptions .= $this->makeJsProperty('Cookie', 'cookie'); |
|---|
| 170 | $strJqOptions .= $this->makeJsProperty('Deselectable', 'deselectable'); |
|---|
| 171 | $strJqOptions .= $this->makeJsProperty('Disabled1', 'disabled'); |
|---|
| 172 | $strJqOptions .= $this->makeJsProperty('Event', 'event'); |
|---|
| 173 | $strJqOptions .= $this->makeJsProperty('Fx', 'fx'); |
|---|
| 174 | $strJqOptions .= $this->makeJsProperty('IdPrefix', 'idPrefix'); |
|---|
| 175 | $strJqOptions .= $this->makeJsProperty('PanelTemplate', 'panelTemplate'); |
|---|
| 176 | $strJqOptions .= $this->makeJsProperty('Selected', 'selected'); |
|---|
| 177 | $strJqOptions .= $this->makeJsProperty('Spinner', 'spinner'); |
|---|
| 178 | $strJqOptions .= $this->makeJsProperty('TabTemplate', 'tabTemplate'); |
|---|
| 179 | if ($strJqOptions) $strJqOptions = substr($strJqOptions, 0, -2); |
|---|
| 180 | return $strJqOptions; |
|---|
| 181 | } |
|---|
| 182 | |
|---|
| 183 | public function getJqControlId() { |
|---|
| 184 | return $this->ControlId; |
|---|
| 185 | } |
|---|
| 186 | |
|---|
| 187 | public function getJqSetupFunction() { |
|---|
| 188 | return 'tabs'; |
|---|
| 189 | } |
|---|
| 190 | |
|---|
| 191 | public function GetControlJavaScript() { |
|---|
| 192 | return sprintf('jQuery("#%s").%s({%s})', $this->getJqControlId(), $this->getJqSetupFunction(), $this->makeJqOptions()); |
|---|
| 193 | } |
|---|
| 194 | |
|---|
| 195 | public function GetEndScript() { |
|---|
| 196 | return $this->GetControlJavaScript() . '; ' . parent::GetEndScript(); |
|---|
| 197 | } |
|---|
| 198 | |
|---|
| 199 | /** |
|---|
| 200 | * Call a JQuery UI Method on the object. Takes variable number of arguments. |
|---|
| 201 | * |
|---|
| 202 | * @param string $strMethodName the method name to call |
|---|
| 203 | * @internal param $mixed [optional] $mixParam1 |
|---|
| 204 | * @internal param $mixed [optional] $mixParam2 |
|---|
| 205 | */ |
|---|
| 206 | protected function CallJqUiMethod($strMethodName /*, ... */) { |
|---|
| 207 | $args = array(); |
|---|
| 208 | $args = func_get_args(); |
|---|
| 209 | |
|---|
| 210 | $strArgs = JavaScriptHelper::toJsObject($args); |
|---|
| 211 | $strJs = sprintf('jQuery("#%s").%s(%s)', |
|---|
| 212 | $this->getJqControlId(), |
|---|
| 213 | $this->getJqSetupFunction(), |
|---|
| 214 | substr($strArgs, 1, strlen($strArgs)-2)); // params without brackets |
|---|
| 215 | QApplication::ExecuteJavaScript($strJs); |
|---|
| 216 | } |
|---|
| 217 | |
|---|
| 218 | |
|---|
| 219 | /** |
|---|
| 220 | * Remove the tabs functionality completely. This will return the element back |
|---|
| 221 | * to its pre-init state. |
|---|
| 222 | */ |
|---|
| 223 | public function Destroy() { |
|---|
| 224 | $this->CallJqUiMethod("destroy"); |
|---|
| 225 | } |
|---|
| 226 | /** |
|---|
| 227 | * Disable the tabs. |
|---|
| 228 | */ |
|---|
| 229 | public function Disable() { |
|---|
| 230 | $this->CallJqUiMethod("disable"); |
|---|
| 231 | } |
|---|
| 232 | /** |
|---|
| 233 | * Enable the tabs. |
|---|
| 234 | */ |
|---|
| 235 | public function Enable() { |
|---|
| 236 | $this->CallJqUiMethod("enable"); |
|---|
| 237 | } |
|---|
| 238 | /** |
|---|
| 239 | * Get or set any tabs option. If no value is specified, will act as a getter. |
|---|
| 240 | * @param $optionName |
|---|
| 241 | * @param $value |
|---|
| 242 | */ |
|---|
| 243 | public function Option($optionName, $value = null) { |
|---|
| 244 | $this->CallJqUiMethod("option", $optionName, $value); |
|---|
| 245 | } |
|---|
| 246 | /** |
|---|
| 247 | * Set multiple tabs options at once by providing an options object. |
|---|
| 248 | * @param $options |
|---|
| 249 | */ |
|---|
| 250 | public function Option1($options) { |
|---|
| 251 | $this->CallJqUiMethod("option", $options); |
|---|
| 252 | } |
|---|
| 253 | /** |
|---|
| 254 | * Add a new tab. The second argument is either a URL consisting of a fragment |
|---|
| 255 | * identifier only to create an in-page tab or a full url (relative or |
|---|
| 256 | * absolute, no cross-domain support) to turn the new tab into an Ajax |
|---|
| 257 | * (remote) tab. The third is the zero-based position where to insert the new |
|---|
| 258 | * tab. Optional, by default a new tab is appended at the end. |
|---|
| 259 | * @param $url |
|---|
| 260 | * @param $label |
|---|
| 261 | * @param $index |
|---|
| 262 | */ |
|---|
| 263 | public function Add($url, $label, $index = null) { |
|---|
| 264 | $this->CallJqUiMethod("add", $url, $label, $index); |
|---|
| 265 | } |
|---|
| 266 | /** |
|---|
| 267 | * Remove a tab. The second argument is the zero-based index of the tab to be |
|---|
| 268 | * removed. |
|---|
| 269 | * @param $index |
|---|
| 270 | */ |
|---|
| 271 | public function Remove($index) { |
|---|
| 272 | $this->CallJqUiMethod("remove", $index); |
|---|
| 273 | } |
|---|
| 274 | /** |
|---|
| 275 | * Enable a disabled tab. To enable more than one tab at once reset the |
|---|
| 276 | * disabled property like: $('#example').tabs("option","disabled",[]);. The |
|---|
| 277 | * second argument is the zero-based index of the tab to be enabled. |
|---|
| 278 | * @param $index |
|---|
| 279 | */ |
|---|
| 280 | public function Enable1($index) { |
|---|
| 281 | $this->CallJqUiMethod("enable", $index); |
|---|
| 282 | } |
|---|
| 283 | /** |
|---|
| 284 | * Disable a tab. The selected tab cannot be disabled. To disable more than |
|---|
| 285 | * one tab at once use: $('#example').tabs("option","disabled", [1, 2, 3]); |
|---|
| 286 | * The second argument is the zero-based index of the tab to be disabled. |
|---|
| 287 | * @param $index |
|---|
| 288 | */ |
|---|
| 289 | public function Disable1($index) { |
|---|
| 290 | $this->CallJqUiMethod("disable", $index); |
|---|
| 291 | } |
|---|
| 292 | /** |
|---|
| 293 | * Select a tab, as if it were clicked. The second argument is the zero-based |
|---|
| 294 | * index of the tab to be selected or the id selector of the panel the tab is |
|---|
| 295 | * associated with (the tab's href fragment identifier, e.g. hash, points to |
|---|
| 296 | * the panel's id). |
|---|
| 297 | * @param $index |
|---|
| 298 | */ |
|---|
| 299 | public function Select($index) { |
|---|
| 300 | $this->CallJqUiMethod("select", $index); |
|---|
| 301 | } |
|---|
| 302 | /** |
|---|
| 303 | * Reload the content of an Ajax tab programmatically. This method always |
|---|
| 304 | * loads the tab content from the remote location, even if cache is set to |
|---|
| 305 | * true. The second argument is the zero-based index of the tab to be |
|---|
| 306 | * reloaded. |
|---|
| 307 | * @param $index |
|---|
| 308 | */ |
|---|
| 309 | public function Load($index) { |
|---|
| 310 | $this->CallJqUiMethod("load", $index); |
|---|
| 311 | } |
|---|
| 312 | /** |
|---|
| 313 | * Change the url from which an Ajax (remote) tab will be loaded. The |
|---|
| 314 | * specified URL will be used for subsequent loads. Note that you can not only |
|---|
| 315 | * change the URL for an existing remote tab with this method, but also turn |
|---|
| 316 | * an in-page tab into a remote tab. The second argument is the zero-based |
|---|
| 317 | * index of the tab of which its URL is to be updated. The third is a URL the |
|---|
| 318 | * content of the tab is loaded from. |
|---|
| 319 | * @param $index |
|---|
| 320 | * @param $url |
|---|
| 321 | */ |
|---|
| 322 | public function Url($index, $url) { |
|---|
| 323 | $this->CallJqUiMethod("url", $index, $url); |
|---|
| 324 | } |
|---|
| 325 | /** |
|---|
| 326 | * Retrieve the number of tabs of the first matched tab pane. |
|---|
| 327 | */ |
|---|
| 328 | public function Length() { |
|---|
| 329 | $this->CallJqUiMethod("length"); |
|---|
| 330 | } |
|---|
| 331 | /** |
|---|
| 332 | * Terminate all running tab ajax requests and animations. |
|---|
| 333 | */ |
|---|
| 334 | public function Abort() { |
|---|
| 335 | $this->CallJqUiMethod("abort"); |
|---|
| 336 | } |
|---|
| 337 | /** |
|---|
| 338 | * Set up an automatic rotation through tabs of a tab pane. The second |
|---|
| 339 | * argument is an amount of time in milliseconds until the next tab in the |
|---|
| 340 | * cycle gets activated. Use 0 or null to stop the rotation. The third |
|---|
| 341 | * controls whether or not to continue the rotation after a tab has been |
|---|
| 342 | * selected by a user. Default: false. |
|---|
| 343 | * @param $ms |
|---|
| 344 | * @param $continuing |
|---|
| 345 | */ |
|---|
| 346 | public function Rotate($ms, $continuing = null) { |
|---|
| 347 | $this->CallJqUiMethod("rotate", $ms, $continuing); |
|---|
| 348 | } |
|---|
| 349 | |
|---|
| 350 | |
|---|
| 351 | public function __get($strName) { |
|---|
| 352 | switch ($strName) { |
|---|
| 353 | case 'Disabled': return $this->blnDisabled; |
|---|
| 354 | case 'AjaxOptions': return $this->arrAjaxOptions; |
|---|
| 355 | case 'Cache': return $this->blnCache; |
|---|
| 356 | case 'Collapsible': return $this->blnCollapsible; |
|---|
| 357 | case 'Cookie': return $this->mixCookie; |
|---|
| 358 | case 'Deselectable': return $this->blnDeselectable; |
|---|
| 359 | case 'Disabled1': return $this->arrDisabled1; |
|---|
| 360 | case 'Event': return $this->strEvent; |
|---|
| 361 | case 'Fx': return $this->mixFx; |
|---|
| 362 | case 'IdPrefix': return $this->strIdPrefix; |
|---|
| 363 | case 'PanelTemplate': return $this->strPanelTemplate; |
|---|
| 364 | case 'Selected': return $this->intSelected; |
|---|
| 365 | case 'Spinner': return $this->strSpinner; |
|---|
| 366 | case 'TabTemplate': return $this->strTabTemplate; |
|---|
| 367 | default: |
|---|
| 368 | try { |
|---|
| 369 | return parent::__get($strName); |
|---|
| 370 | } catch (QCallerException $objExc) { |
|---|
| 371 | $objExc->IncrementOffset(); |
|---|
| 372 | throw $objExc; |
|---|
| 373 | } |
|---|
| 374 | } |
|---|
| 375 | } |
|---|
| 376 | |
|---|
| 377 | public function __set($strName, $mixValue) { |
|---|
| 378 | $this->blnModified = true; |
|---|
| 379 | |
|---|
| 380 | switch ($strName) { |
|---|
| 381 | case 'Disabled': |
|---|
| 382 | try { |
|---|
| 383 | $this->blnDisabled = QType::Cast($mixValue, QType::Boolean); |
|---|
| 384 | if ($this->Rendered) { |
|---|
| 385 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 386 | } |
|---|
| 387 | break; |
|---|
| 388 | } catch (QInvalidCastException $objExc) { |
|---|
| 389 | $objExc->IncrementOffset(); |
|---|
| 390 | throw $objExc; |
|---|
| 391 | } |
|---|
| 392 | |
|---|
| 393 | case 'AjaxOptions': |
|---|
| 394 | try { |
|---|
| 395 | $this->arrAjaxOptions = QType::Cast($mixValue, QType::ArrayType); |
|---|
| 396 | if ($this->Rendered) { |
|---|
| 397 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 398 | } |
|---|
| 399 | break; |
|---|
| 400 | } catch (QInvalidCastException $objExc) { |
|---|
| 401 | $objExc->IncrementOffset(); |
|---|
| 402 | throw $objExc; |
|---|
| 403 | } |
|---|
| 404 | |
|---|
| 405 | case 'Cache': |
|---|
| 406 | try { |
|---|
| 407 | $this->blnCache = QType::Cast($mixValue, QType::Boolean); |
|---|
| 408 | if ($this->Rendered) { |
|---|
| 409 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 410 | } |
|---|
| 411 | break; |
|---|
| 412 | } catch (QInvalidCastException $objExc) { |
|---|
| 413 | $objExc->IncrementOffset(); |
|---|
| 414 | throw $objExc; |
|---|
| 415 | } |
|---|
| 416 | |
|---|
| 417 | case 'Collapsible': |
|---|
| 418 | try { |
|---|
| 419 | $this->blnCollapsible = QType::Cast($mixValue, QType::Boolean); |
|---|
| 420 | if ($this->Rendered) { |
|---|
| 421 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 422 | } |
|---|
| 423 | break; |
|---|
| 424 | } catch (QInvalidCastException $objExc) { |
|---|
| 425 | $objExc->IncrementOffset(); |
|---|
| 426 | throw $objExc; |
|---|
| 427 | } |
|---|
| 428 | |
|---|
| 429 | case 'Cookie': |
|---|
| 430 | $this->mixCookie = $mixValue; |
|---|
| 431 | |
|---|
| 432 | if ($this->Rendered) { |
|---|
| 433 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 434 | } |
|---|
| 435 | break; |
|---|
| 436 | |
|---|
| 437 | case 'Deselectable': |
|---|
| 438 | try { |
|---|
| 439 | $this->blnDeselectable = QType::Cast($mixValue, QType::Boolean); |
|---|
| 440 | if ($this->Rendered) { |
|---|
| 441 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 442 | } |
|---|
| 443 | break; |
|---|
| 444 | } catch (QInvalidCastException $objExc) { |
|---|
| 445 | $objExc->IncrementOffset(); |
|---|
| 446 | throw $objExc; |
|---|
| 447 | } |
|---|
| 448 | |
|---|
| 449 | case 'Disabled1': |
|---|
| 450 | try { |
|---|
| 451 | $this->arrDisabled1 = QType::Cast($mixValue, QType::ArrayType); |
|---|
| 452 | if ($this->Rendered) { |
|---|
| 453 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 454 | } |
|---|
| 455 | break; |
|---|
| 456 | } catch (QInvalidCastException $objExc) { |
|---|
| 457 | $objExc->IncrementOffset(); |
|---|
| 458 | throw $objExc; |
|---|
| 459 | } |
|---|
| 460 | |
|---|
| 461 | case 'Event': |
|---|
| 462 | try { |
|---|
| 463 | $this->strEvent = QType::Cast($mixValue, QType::String); |
|---|
| 464 | if ($this->Rendered) { |
|---|
| 465 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 466 | } |
|---|
| 467 | break; |
|---|
| 468 | } catch (QInvalidCastException $objExc) { |
|---|
| 469 | $objExc->IncrementOffset(); |
|---|
| 470 | throw $objExc; |
|---|
| 471 | } |
|---|
| 472 | |
|---|
| 473 | case 'Fx': |
|---|
| 474 | $this->mixFx = $mixValue; |
|---|
| 475 | |
|---|
| 476 | if ($this->Rendered) { |
|---|
| 477 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 478 | } |
|---|
| 479 | break; |
|---|
| 480 | |
|---|
| 481 | case 'IdPrefix': |
|---|
| 482 | try { |
|---|
| 483 | $this->strIdPrefix = QType::Cast($mixValue, QType::String); |
|---|
| 484 | if ($this->Rendered) { |
|---|
| 485 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 486 | } |
|---|
| 487 | break; |
|---|
| 488 | } catch (QInvalidCastException $objExc) { |
|---|
| 489 | $objExc->IncrementOffset(); |
|---|
| 490 | throw $objExc; |
|---|
| 491 | } |
|---|
| 492 | |
|---|
| 493 | case 'PanelTemplate': |
|---|
| 494 | try { |
|---|
| 495 | $this->strPanelTemplate = QType::Cast($mixValue, QType::String); |
|---|
| 496 | if ($this->Rendered) { |
|---|
| 497 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 498 | } |
|---|
| 499 | break; |
|---|
| 500 | } catch (QInvalidCastException $objExc) { |
|---|
| 501 | $objExc->IncrementOffset(); |
|---|
| 502 | throw $objExc; |
|---|
| 503 | } |
|---|
| 504 | |
|---|
| 505 | case 'Selected': |
|---|
| 506 | try { |
|---|
| 507 | $this->intSelected = QType::Cast($mixValue, QType::Integer); |
|---|
| 508 | if ($this->Rendered) { |
|---|
| 509 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 510 | } |
|---|
| 511 | break; |
|---|
| 512 | } catch (QInvalidCastException $objExc) { |
|---|
| 513 | $objExc->IncrementOffset(); |
|---|
| 514 | throw $objExc; |
|---|
| 515 | } |
|---|
| 516 | |
|---|
| 517 | case 'Spinner': |
|---|
| 518 | try { |
|---|
| 519 | $this->strSpinner = QType::Cast($mixValue, QType::String); |
|---|
| 520 | if ($this->Rendered) { |
|---|
| 521 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 522 | } |
|---|
| 523 | break; |
|---|
| 524 | } catch (QInvalidCastException $objExc) { |
|---|
| 525 | $objExc->IncrementOffset(); |
|---|
| 526 | throw $objExc; |
|---|
| 527 | } |
|---|
| 528 | |
|---|
| 529 | case 'TabTemplate': |
|---|
| 530 | try { |
|---|
| 531 | $this->strTabTemplate = QType::Cast($mixValue, QType::String); |
|---|
| 532 | if ($this->Rendered) { |
|---|
| 533 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 534 | } |
|---|
| 535 | break; |
|---|
| 536 | } catch (QInvalidCastException $objExc) { |
|---|
| 537 | $objExc->IncrementOffset(); |
|---|
| 538 | throw $objExc; |
|---|
| 539 | } |
|---|
| 540 | |
|---|
| 541 | |
|---|
| 542 | case 'Enabled': |
|---|
| 543 | $this->Disabled = !$mixValue; // Tie in standard QCubed functionality |
|---|
| 544 | parent::__set($strName, $mixValue); |
|---|
| 545 | break; |
|---|
| 546 | |
|---|
| 547 | default: |
|---|
| 548 | try { |
|---|
| 549 | parent::__set($strName, $mixValue); |
|---|
| 550 | break; |
|---|
| 551 | } catch (QCallerException $objExc) { |
|---|
| 552 | $objExc->IncrementOffset(); |
|---|
| 553 | throw $objExc; |
|---|
| 554 | } |
|---|
| 555 | } |
|---|
| 556 | } |
|---|
| 557 | } |
|---|
| 558 | |
|---|
| 559 | ?> |
|---|