| 1 | <?php |
|---|
| 2 | /** |
|---|
| 3 | * The abstract QDialogGen 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 QDialogBase |
|---|
| 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 QDialog class file. |
|---|
| 22 | * |
|---|
| 23 | */ |
|---|
| 24 | |
|---|
| 25 | /* Custom event classes for this control */ |
|---|
| 26 | |
|---|
| 27 | |
|---|
| 28 | /** |
|---|
| 29 | * This event is triggered when dialog is created. |
|---|
| 30 | */ |
|---|
| 31 | class QDialog_CreateEvent extends QJqUiEvent { |
|---|
| 32 | const EventName = 'dialogcreate'; |
|---|
| 33 | } |
|---|
| 34 | /** |
|---|
| 35 | * This event is triggered when a dialog attempts to close. If the beforeClose |
|---|
| 36 | * event handler (callback function) returns false, the close will be |
|---|
| 37 | * prevented. |
|---|
| 38 | */ |
|---|
| 39 | class QDialog_BeforeCloseEvent extends QJqUiEvent { |
|---|
| 40 | const EventName = 'dialogbeforeclose'; |
|---|
| 41 | } |
|---|
| 42 | /** |
|---|
| 43 | * This event is triggered when dialog is opened. |
|---|
| 44 | */ |
|---|
| 45 | class QDialog_OpenEvent extends QJqUiEvent { |
|---|
| 46 | const EventName = 'dialogopen'; |
|---|
| 47 | } |
|---|
| 48 | /** |
|---|
| 49 | * This event is triggered when the dialog gains focus. |
|---|
| 50 | */ |
|---|
| 51 | class QDialog_FocusEvent extends QJqUiEvent { |
|---|
| 52 | const EventName = 'dialogfocus'; |
|---|
| 53 | } |
|---|
| 54 | /** |
|---|
| 55 | * This event is triggered at the beginning of the dialog being dragged. |
|---|
| 56 | */ |
|---|
| 57 | class QDialog_DragStartEvent extends QJqUiEvent { |
|---|
| 58 | const EventName = 'dialogdragstart'; |
|---|
| 59 | } |
|---|
| 60 | /** |
|---|
| 61 | * This event is triggered when the dialog is dragged. |
|---|
| 62 | */ |
|---|
| 63 | class QDialog_DragEvent extends QJqUiEvent { |
|---|
| 64 | const EventName = 'dialogdrag'; |
|---|
| 65 | } |
|---|
| 66 | /** |
|---|
| 67 | * This event is triggered after the dialog has been dragged. |
|---|
| 68 | */ |
|---|
| 69 | class QDialog_DragStopEvent extends QJqUiEvent { |
|---|
| 70 | const EventName = 'dialogdragstop'; |
|---|
| 71 | } |
|---|
| 72 | /** |
|---|
| 73 | * This event is triggered at the beginning of the dialog being resized. |
|---|
| 74 | */ |
|---|
| 75 | class QDialog_ResizeStartEvent extends QJqUiEvent { |
|---|
| 76 | const EventName = 'dialogresizestart'; |
|---|
| 77 | } |
|---|
| 78 | /** |
|---|
| 79 | * This event is triggered when the dialog is resized. demo |
|---|
| 80 | */ |
|---|
| 81 | class QDialog_ResizeEvent extends QJqUiEvent { |
|---|
| 82 | const EventName = 'dialogresize'; |
|---|
| 83 | } |
|---|
| 84 | /** |
|---|
| 85 | * This event is triggered after the dialog has been resized. |
|---|
| 86 | */ |
|---|
| 87 | class QDialog_ResizeStopEvent extends QJqUiEvent { |
|---|
| 88 | const EventName = 'dialogresizestop'; |
|---|
| 89 | } |
|---|
| 90 | /** |
|---|
| 91 | * This event is triggered when the dialog is closed. |
|---|
| 92 | */ |
|---|
| 93 | class QDialog_CloseEvent extends QJqUiEvent { |
|---|
| 94 | const EventName = 'dialogclose'; |
|---|
| 95 | } |
|---|
| 96 | |
|---|
| 97 | /* Custom "property" event classes for this control */ |
|---|
| 98 | |
|---|
| 99 | /** |
|---|
| 100 | * @property boolean $Disabled Disables (true) or enables (false) the dialog. Can be set when initialising |
|---|
| 101 | * (first creating) the dialog. |
|---|
| 102 | * @property boolean $AutoOpen When autoOpen is true the dialog will open automatically when dialog is |
|---|
| 103 | * called. If false it will stay hidden until .dialog("open") is called on it. |
|---|
| 104 | * @property mixed $Buttons Specifies which buttons should be displayed on the dialog. The property key |
|---|
| 105 | * is the text of the button. The value is the callback function for when the |
|---|
| 106 | * button is clicked. The context of the callback is the dialog element; if |
|---|
| 107 | * you need access to the button, it is available as the target of the event |
|---|
| 108 | * object. |
|---|
| 109 | * @property array $Buttons1 Specifies which buttons should be displayed on the dialog. Each element of |
|---|
| 110 | * the array must be an Object defining the properties to set on the button. |
|---|
| 111 | * @property boolean $CloseOnEscape Specifies whether the dialog should close when it has focus and the user |
|---|
| 112 | * presses the esacpe (ESC) key. |
|---|
| 113 | * @property string $CloseText Specifies the text for the close button. Note that the close text is |
|---|
| 114 | * visibly hidden when using a standard theme. |
|---|
| 115 | * @property string $DialogClass The specified class name(s) will be added to the dialog, for additional |
|---|
| 116 | * theming. |
|---|
| 117 | * @property boolean $Draggable If set to true, the dialog will be draggable will be draggable by the |
|---|
| 118 | * titlebar. |
|---|
| 119 | * @property integer $Height The height of the dialog, in pixels. Specifying 'auto' is also supported to |
|---|
| 120 | * make the dialog adjust based on its content. |
|---|
| 121 | * @property mixed $Hide The effect to be used when the dialog is closed. |
|---|
| 122 | * @property integer $MaxHeight The maximum height to which the dialog can be resized, in pixels. |
|---|
| 123 | * @property integer $MaxWidth The maximum width to which the dialog can be resized, in pixels. |
|---|
| 124 | * @property integer $MinHeight The minimum height to which the dialog can be resized, in pixels. |
|---|
| 125 | * @property integer $MinWidth The minimum width to which the dialog can be resized, in pixels. |
|---|
| 126 | * @property boolean $Modal If set to true, the dialog will have modal behavior; other items on the |
|---|
| 127 | * page will be disabled (i.e. cannot be interacted with). Modal dialogs |
|---|
| 128 | * create an overlay below the dialog but above other page elements. |
|---|
| 129 | * @property mixed $Position Specifies where the dialog should be displayed. Possible values: 1) a |
|---|
| 130 | * single string representing position within viewport: 'center', 'left', |
|---|
| 131 | * 'right', 'top', 'bottom'. 2) an array containing an x,y coordinate pair in |
|---|
| 132 | * pixel offset from left, top corner of viewport (e.g. [350,100]) 3) an array |
|---|
| 133 | * containing x,y position string values (e.g. ['right','top'] for top right |
|---|
| 134 | * corner). |
|---|
| 135 | * @property boolean $Resizable If set to true, the dialog will be resizable. |
|---|
| 136 | * @property mixed $Show The effect to be used when the dialog is opened. |
|---|
| 137 | * @property boolean $Stack Specifies whether the dialog will stack on top of other dialogs. This will |
|---|
| 138 | * cause the dialog to move to the front of other dialogs when it gains focus. |
|---|
| 139 | * @property string $Title Specifies the title of the dialog. Any valid HTML may be set as the title. |
|---|
| 140 | * The title can also be specified by the title attribute on the dialog source |
|---|
| 141 | * element. |
|---|
| 142 | * @property integer $Width The width of the dialog, in pixels. |
|---|
| 143 | * @property integer $ZIndex The starting z-index for the dialog. |
|---|
| 144 | */ |
|---|
| 145 | |
|---|
| 146 | class QDialogGen extends QPanel { |
|---|
| 147 | protected $strJavaScripts = __JQUERY_EFFECTS__; |
|---|
| 148 | protected $strStyleSheets = __JQUERY_CSS__; |
|---|
| 149 | /** @var boolean */ |
|---|
| 150 | protected $blnDisabled = null; |
|---|
| 151 | /** @var boolean */ |
|---|
| 152 | protected $blnAutoOpen = null; |
|---|
| 153 | /** @var mixed */ |
|---|
| 154 | protected $mixButtons = null; |
|---|
| 155 | /** @var array */ |
|---|
| 156 | protected $arrButtons1 = null; |
|---|
| 157 | /** @var boolean */ |
|---|
| 158 | protected $blnCloseOnEscape = null; |
|---|
| 159 | /** @var string */ |
|---|
| 160 | protected $strCloseText = null; |
|---|
| 161 | /** @var string */ |
|---|
| 162 | protected $strDialogClass = null; |
|---|
| 163 | /** @var boolean */ |
|---|
| 164 | protected $blnDraggable = null; |
|---|
| 165 | /** @var integer */ |
|---|
| 166 | protected $intHeight = null; |
|---|
| 167 | /** @var mixed */ |
|---|
| 168 | protected $mixHide = null; |
|---|
| 169 | /** @var integer */ |
|---|
| 170 | protected $intMaxHeight = null; |
|---|
| 171 | /** @var integer */ |
|---|
| 172 | protected $intMaxWidth = null; |
|---|
| 173 | /** @var integer */ |
|---|
| 174 | protected $intMinHeight = null; |
|---|
| 175 | /** @var integer */ |
|---|
| 176 | protected $intMinWidth = null; |
|---|
| 177 | /** @var boolean */ |
|---|
| 178 | protected $blnModal = null; |
|---|
| 179 | /** @var mixed */ |
|---|
| 180 | protected $mixPosition = null; |
|---|
| 181 | /** @var boolean */ |
|---|
| 182 | protected $blnResizable = null; |
|---|
| 183 | /** @var mixed */ |
|---|
| 184 | protected $mixShow = null; |
|---|
| 185 | /** @var boolean */ |
|---|
| 186 | protected $blnStack = null; |
|---|
| 187 | /** @var string */ |
|---|
| 188 | protected $strTitle = null; |
|---|
| 189 | /** @var integer */ |
|---|
| 190 | protected $intWidth = null; |
|---|
| 191 | /** @var integer */ |
|---|
| 192 | protected $intZIndex = null; |
|---|
| 193 | |
|---|
| 194 | protected function makeJsProperty($strProp, $strKey) { |
|---|
| 195 | $objValue = $this->$strProp; |
|---|
| 196 | if (null === $objValue) { |
|---|
| 197 | return ''; |
|---|
| 198 | } |
|---|
| 199 | |
|---|
| 200 | return $strKey . ': ' . JavaScriptHelper::toJsObject($objValue) . ', '; |
|---|
| 201 | } |
|---|
| 202 | |
|---|
| 203 | protected function makeJqOptions() { |
|---|
| 204 | $strJqOptions = ''; |
|---|
| 205 | $strJqOptions .= $this->makeJsProperty('Disabled', 'disabled'); |
|---|
| 206 | $strJqOptions .= $this->makeJsProperty('AutoOpen', 'autoOpen'); |
|---|
| 207 | $strJqOptions .= $this->makeJsProperty('Buttons', 'buttons'); |
|---|
| 208 | $strJqOptions .= $this->makeJsProperty('Buttons1', 'buttons'); |
|---|
| 209 | $strJqOptions .= $this->makeJsProperty('CloseOnEscape', 'closeOnEscape'); |
|---|
| 210 | $strJqOptions .= $this->makeJsProperty('CloseText', 'closeText'); |
|---|
| 211 | $strJqOptions .= $this->makeJsProperty('DialogClass', 'dialogClass'); |
|---|
| 212 | $strJqOptions .= $this->makeJsProperty('Draggable', 'draggable'); |
|---|
| 213 | $strJqOptions .= $this->makeJsProperty('Height', 'height'); |
|---|
| 214 | $strJqOptions .= $this->makeJsProperty('Hide', 'hide'); |
|---|
| 215 | $strJqOptions .= $this->makeJsProperty('MaxHeight', 'maxHeight'); |
|---|
| 216 | $strJqOptions .= $this->makeJsProperty('MaxWidth', 'maxWidth'); |
|---|
| 217 | $strJqOptions .= $this->makeJsProperty('MinHeight', 'minHeight'); |
|---|
| 218 | $strJqOptions .= $this->makeJsProperty('MinWidth', 'minWidth'); |
|---|
| 219 | $strJqOptions .= $this->makeJsProperty('Modal', 'modal'); |
|---|
| 220 | $strJqOptions .= $this->makeJsProperty('Position', 'position'); |
|---|
| 221 | $strJqOptions .= $this->makeJsProperty('Resizable', 'resizable'); |
|---|
| 222 | $strJqOptions .= $this->makeJsProperty('Show', 'show'); |
|---|
| 223 | $strJqOptions .= $this->makeJsProperty('Stack', 'stack'); |
|---|
| 224 | $strJqOptions .= $this->makeJsProperty('Title', 'title'); |
|---|
| 225 | $strJqOptions .= $this->makeJsProperty('Width', 'width'); |
|---|
| 226 | $strJqOptions .= $this->makeJsProperty('ZIndex', 'zIndex'); |
|---|
| 227 | if ($strJqOptions) $strJqOptions = substr($strJqOptions, 0, -2); |
|---|
| 228 | return $strJqOptions; |
|---|
| 229 | } |
|---|
| 230 | |
|---|
| 231 | public function getJqControlId() { |
|---|
| 232 | return $this->ControlId; |
|---|
| 233 | } |
|---|
| 234 | |
|---|
| 235 | public function getJqSetupFunction() { |
|---|
| 236 | return 'dialog'; |
|---|
| 237 | } |
|---|
| 238 | |
|---|
| 239 | public function GetControlJavaScript() { |
|---|
| 240 | return sprintf('jQuery("#%s").%s({%s})', $this->getJqControlId(), $this->getJqSetupFunction(), $this->makeJqOptions()); |
|---|
| 241 | } |
|---|
| 242 | |
|---|
| 243 | public function GetEndScript() { |
|---|
| 244 | return $this->GetControlJavaScript() . '; ' . parent::GetEndScript(); |
|---|
| 245 | } |
|---|
| 246 | |
|---|
| 247 | /** |
|---|
| 248 | * Call a JQuery UI Method on the object. Takes variable number of arguments. |
|---|
| 249 | * |
|---|
| 250 | * @param string $strMethodName the method name to call |
|---|
| 251 | * @internal param $mixed [optional] $mixParam1 |
|---|
| 252 | * @internal param $mixed [optional] $mixParam2 |
|---|
| 253 | */ |
|---|
| 254 | protected function CallJqUiMethod($strMethodName /*, ... */) { |
|---|
| 255 | $args = array(); |
|---|
| 256 | $args = func_get_args(); |
|---|
| 257 | |
|---|
| 258 | $strArgs = JavaScriptHelper::toJsObject($args); |
|---|
| 259 | $strJs = sprintf('jQuery("#%s").%s(%s)', |
|---|
| 260 | $this->getJqControlId(), |
|---|
| 261 | $this->getJqSetupFunction(), |
|---|
| 262 | substr($strArgs, 1, strlen($strArgs)-2)); // params without brackets |
|---|
| 263 | QApplication::ExecuteJavaScript($strJs); |
|---|
| 264 | } |
|---|
| 265 | |
|---|
| 266 | |
|---|
| 267 | /** |
|---|
| 268 | * Remove the dialog functionality completely. This will return the element |
|---|
| 269 | * back to its pre-init state. |
|---|
| 270 | */ |
|---|
| 271 | public function Destroy() { |
|---|
| 272 | $this->CallJqUiMethod("destroy"); |
|---|
| 273 | } |
|---|
| 274 | /** |
|---|
| 275 | * Disable the dialog. |
|---|
| 276 | */ |
|---|
| 277 | public function Disable() { |
|---|
| 278 | $this->CallJqUiMethod("disable"); |
|---|
| 279 | } |
|---|
| 280 | /** |
|---|
| 281 | * Enable the dialog. |
|---|
| 282 | */ |
|---|
| 283 | public function Enable() { |
|---|
| 284 | $this->CallJqUiMethod("enable"); |
|---|
| 285 | } |
|---|
| 286 | /** |
|---|
| 287 | * Get or set any dialog option. If no value is specified, will act as a |
|---|
| 288 | * getter. |
|---|
| 289 | * @param $optionName |
|---|
| 290 | * @param $value |
|---|
| 291 | */ |
|---|
| 292 | public function Option($optionName, $value = null) { |
|---|
| 293 | $this->CallJqUiMethod("option", $optionName, $value); |
|---|
| 294 | } |
|---|
| 295 | /** |
|---|
| 296 | * Set multiple dialog options at once by providing an options object. |
|---|
| 297 | * @param $options |
|---|
| 298 | */ |
|---|
| 299 | public function Option1($options) { |
|---|
| 300 | $this->CallJqUiMethod("option", $options); |
|---|
| 301 | } |
|---|
| 302 | /** |
|---|
| 303 | * Close the dialog. |
|---|
| 304 | */ |
|---|
| 305 | public function Close() { |
|---|
| 306 | $this->CallJqUiMethod("close"); |
|---|
| 307 | } |
|---|
| 308 | /** |
|---|
| 309 | * Returns true if the dialog is currently open. |
|---|
| 310 | */ |
|---|
| 311 | public function IsOpen() { |
|---|
| 312 | $this->CallJqUiMethod("isOpen"); |
|---|
| 313 | } |
|---|
| 314 | /** |
|---|
| 315 | * Move the dialog to the top of the dialogs stack. |
|---|
| 316 | */ |
|---|
| 317 | public function MoveToTop() { |
|---|
| 318 | $this->CallJqUiMethod("moveToTop"); |
|---|
| 319 | } |
|---|
| 320 | /** |
|---|
| 321 | * Open the dialog. |
|---|
| 322 | */ |
|---|
| 323 | public function Open() { |
|---|
| 324 | $this->CallJqUiMethod("open"); |
|---|
| 325 | } |
|---|
| 326 | |
|---|
| 327 | |
|---|
| 328 | public function __get($strName) { |
|---|
| 329 | switch ($strName) { |
|---|
| 330 | case 'Disabled': return $this->blnDisabled; |
|---|
| 331 | case 'AutoOpen': return $this->blnAutoOpen; |
|---|
| 332 | case 'Buttons': return $this->mixButtons; |
|---|
| 333 | case 'Buttons1': return $this->arrButtons1; |
|---|
| 334 | case 'CloseOnEscape': return $this->blnCloseOnEscape; |
|---|
| 335 | case 'CloseText': return $this->strCloseText; |
|---|
| 336 | case 'DialogClass': return $this->strDialogClass; |
|---|
| 337 | case 'Draggable': return $this->blnDraggable; |
|---|
| 338 | case 'Height': return $this->intHeight; |
|---|
| 339 | case 'Hide': return $this->mixHide; |
|---|
| 340 | case 'MaxHeight': return $this->intMaxHeight; |
|---|
| 341 | case 'MaxWidth': return $this->intMaxWidth; |
|---|
| 342 | case 'MinHeight': return $this->intMinHeight; |
|---|
| 343 | case 'MinWidth': return $this->intMinWidth; |
|---|
| 344 | case 'Modal': return $this->blnModal; |
|---|
| 345 | case 'Position': return $this->mixPosition; |
|---|
| 346 | case 'Resizable': return $this->blnResizable; |
|---|
| 347 | case 'Show': return $this->mixShow; |
|---|
| 348 | case 'Stack': return $this->blnStack; |
|---|
| 349 | case 'Title': return $this->strTitle; |
|---|
| 350 | case 'Width': return $this->intWidth; |
|---|
| 351 | case 'ZIndex': return $this->intZIndex; |
|---|
| 352 | default: |
|---|
| 353 | try { |
|---|
| 354 | return parent::__get($strName); |
|---|
| 355 | } catch (QCallerException $objExc) { |
|---|
| 356 | $objExc->IncrementOffset(); |
|---|
| 357 | throw $objExc; |
|---|
| 358 | } |
|---|
| 359 | } |
|---|
| 360 | } |
|---|
| 361 | |
|---|
| 362 | public function __set($strName, $mixValue) { |
|---|
| 363 | $this->blnModified = true; |
|---|
| 364 | |
|---|
| 365 | switch ($strName) { |
|---|
| 366 | case 'Disabled': |
|---|
| 367 | try { |
|---|
| 368 | $this->blnDisabled = QType::Cast($mixValue, QType::Boolean); |
|---|
| 369 | if ($this->Rendered) { |
|---|
| 370 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 371 | } |
|---|
| 372 | break; |
|---|
| 373 | } catch (QInvalidCastException $objExc) { |
|---|
| 374 | $objExc->IncrementOffset(); |
|---|
| 375 | throw $objExc; |
|---|
| 376 | } |
|---|
| 377 | |
|---|
| 378 | case 'AutoOpen': |
|---|
| 379 | try { |
|---|
| 380 | $this->blnAutoOpen = QType::Cast($mixValue, QType::Boolean); |
|---|
| 381 | if ($this->Rendered) { |
|---|
| 382 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 383 | } |
|---|
| 384 | break; |
|---|
| 385 | } catch (QInvalidCastException $objExc) { |
|---|
| 386 | $objExc->IncrementOffset(); |
|---|
| 387 | throw $objExc; |
|---|
| 388 | } |
|---|
| 389 | |
|---|
| 390 | case 'Buttons': |
|---|
| 391 | $this->mixButtons = $mixValue; |
|---|
| 392 | |
|---|
| 393 | if ($this->Rendered) { |
|---|
| 394 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 395 | } |
|---|
| 396 | break; |
|---|
| 397 | |
|---|
| 398 | case 'Buttons1': |
|---|
| 399 | try { |
|---|
| 400 | $this->arrButtons1 = QType::Cast($mixValue, QType::ArrayType); |
|---|
| 401 | if ($this->Rendered) { |
|---|
| 402 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 403 | } |
|---|
| 404 | break; |
|---|
| 405 | } catch (QInvalidCastException $objExc) { |
|---|
| 406 | $objExc->IncrementOffset(); |
|---|
| 407 | throw $objExc; |
|---|
| 408 | } |
|---|
| 409 | |
|---|
| 410 | case 'CloseOnEscape': |
|---|
| 411 | try { |
|---|
| 412 | $this->blnCloseOnEscape = QType::Cast($mixValue, QType::Boolean); |
|---|
| 413 | if ($this->Rendered) { |
|---|
| 414 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 415 | } |
|---|
| 416 | break; |
|---|
| 417 | } catch (QInvalidCastException $objExc) { |
|---|
| 418 | $objExc->IncrementOffset(); |
|---|
| 419 | throw $objExc; |
|---|
| 420 | } |
|---|
| 421 | |
|---|
| 422 | case 'CloseText': |
|---|
| 423 | try { |
|---|
| 424 | $this->strCloseText = QType::Cast($mixValue, QType::String); |
|---|
| 425 | if ($this->Rendered) { |
|---|
| 426 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 427 | } |
|---|
| 428 | break; |
|---|
| 429 | } catch (QInvalidCastException $objExc) { |
|---|
| 430 | $objExc->IncrementOffset(); |
|---|
| 431 | throw $objExc; |
|---|
| 432 | } |
|---|
| 433 | |
|---|
| 434 | case 'DialogClass': |
|---|
| 435 | try { |
|---|
| 436 | $this->strDialogClass = QType::Cast($mixValue, QType::String); |
|---|
| 437 | if ($this->Rendered) { |
|---|
| 438 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 439 | } |
|---|
| 440 | break; |
|---|
| 441 | } catch (QInvalidCastException $objExc) { |
|---|
| 442 | $objExc->IncrementOffset(); |
|---|
| 443 | throw $objExc; |
|---|
| 444 | } |
|---|
| 445 | |
|---|
| 446 | case 'Draggable': |
|---|
| 447 | try { |
|---|
| 448 | $this->blnDraggable = QType::Cast($mixValue, QType::Boolean); |
|---|
| 449 | if ($this->Rendered) { |
|---|
| 450 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 451 | } |
|---|
| 452 | break; |
|---|
| 453 | } catch (QInvalidCastException $objExc) { |
|---|
| 454 | $objExc->IncrementOffset(); |
|---|
| 455 | throw $objExc; |
|---|
| 456 | } |
|---|
| 457 | |
|---|
| 458 | case 'Height': |
|---|
| 459 | try { |
|---|
| 460 | $this->intHeight = QType::Cast($mixValue, QType::Integer); |
|---|
| 461 | if ($this->Rendered) { |
|---|
| 462 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 463 | } |
|---|
| 464 | break; |
|---|
| 465 | } catch (QInvalidCastException $objExc) { |
|---|
| 466 | $objExc->IncrementOffset(); |
|---|
| 467 | throw $objExc; |
|---|
| 468 | } |
|---|
| 469 | |
|---|
| 470 | case 'Hide': |
|---|
| 471 | $this->mixHide = $mixValue; |
|---|
| 472 | |
|---|
| 473 | if ($this->Rendered) { |
|---|
| 474 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 475 | } |
|---|
| 476 | break; |
|---|
| 477 | |
|---|
| 478 | case 'MaxHeight': |
|---|
| 479 | try { |
|---|
| 480 | $this->intMaxHeight = QType::Cast($mixValue, QType::Integer); |
|---|
| 481 | if ($this->Rendered) { |
|---|
| 482 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 483 | } |
|---|
| 484 | break; |
|---|
| 485 | } catch (QInvalidCastException $objExc) { |
|---|
| 486 | $objExc->IncrementOffset(); |
|---|
| 487 | throw $objExc; |
|---|
| 488 | } |
|---|
| 489 | |
|---|
| 490 | case 'MaxWidth': |
|---|
| 491 | try { |
|---|
| 492 | $this->intMaxWidth = QType::Cast($mixValue, QType::Integer); |
|---|
| 493 | if ($this->Rendered) { |
|---|
| 494 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 495 | } |
|---|
| 496 | break; |
|---|
| 497 | } catch (QInvalidCastException $objExc) { |
|---|
| 498 | $objExc->IncrementOffset(); |
|---|
| 499 | throw $objExc; |
|---|
| 500 | } |
|---|
| 501 | |
|---|
| 502 | case 'MinHeight': |
|---|
| 503 | try { |
|---|
| 504 | $this->intMinHeight = QType::Cast($mixValue, QType::Integer); |
|---|
| 505 | if ($this->Rendered) { |
|---|
| 506 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 507 | } |
|---|
| 508 | break; |
|---|
| 509 | } catch (QInvalidCastException $objExc) { |
|---|
| 510 | $objExc->IncrementOffset(); |
|---|
| 511 | throw $objExc; |
|---|
| 512 | } |
|---|
| 513 | |
|---|
| 514 | case 'MinWidth': |
|---|
| 515 | try { |
|---|
| 516 | $this->intMinWidth = QType::Cast($mixValue, QType::Integer); |
|---|
| 517 | if ($this->Rendered) { |
|---|
| 518 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 519 | } |
|---|
| 520 | break; |
|---|
| 521 | } catch (QInvalidCastException $objExc) { |
|---|
| 522 | $objExc->IncrementOffset(); |
|---|
| 523 | throw $objExc; |
|---|
| 524 | } |
|---|
| 525 | |
|---|
| 526 | case 'Modal': |
|---|
| 527 | try { |
|---|
| 528 | $this->blnModal = QType::Cast($mixValue, QType::Boolean); |
|---|
| 529 | if ($this->Rendered) { |
|---|
| 530 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 531 | } |
|---|
| 532 | break; |
|---|
| 533 | } catch (QInvalidCastException $objExc) { |
|---|
| 534 | $objExc->IncrementOffset(); |
|---|
| 535 | throw $objExc; |
|---|
| 536 | } |
|---|
| 537 | |
|---|
| 538 | case 'Position': |
|---|
| 539 | $this->mixPosition = $mixValue; |
|---|
| 540 | |
|---|
| 541 | if ($this->Rendered) { |
|---|
| 542 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 543 | } |
|---|
| 544 | break; |
|---|
| 545 | |
|---|
| 546 | case 'Resizable': |
|---|
| 547 | try { |
|---|
| 548 | $this->blnResizable = QType::Cast($mixValue, QType::Boolean); |
|---|
| 549 | if ($this->Rendered) { |
|---|
| 550 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 551 | } |
|---|
| 552 | break; |
|---|
| 553 | } catch (QInvalidCastException $objExc) { |
|---|
| 554 | $objExc->IncrementOffset(); |
|---|
| 555 | throw $objExc; |
|---|
| 556 | } |
|---|
| 557 | |
|---|
| 558 | case 'Show': |
|---|
| 559 | $this->mixShow = $mixValue; |
|---|
| 560 | |
|---|
| 561 | if ($this->Rendered) { |
|---|
| 562 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 563 | } |
|---|
| 564 | break; |
|---|
| 565 | |
|---|
| 566 | case 'Stack': |
|---|
| 567 | try { |
|---|
| 568 | $this->blnStack = QType::Cast($mixValue, QType::Boolean); |
|---|
| 569 | if ($this->Rendered) { |
|---|
| 570 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 571 | } |
|---|
| 572 | break; |
|---|
| 573 | } catch (QInvalidCastException $objExc) { |
|---|
| 574 | $objExc->IncrementOffset(); |
|---|
| 575 | throw $objExc; |
|---|
| 576 | } |
|---|
| 577 | |
|---|
| 578 | case 'Title': |
|---|
| 579 | try { |
|---|
| 580 | $this->strTitle = QType::Cast($mixValue, QType::String); |
|---|
| 581 | if ($this->Rendered) { |
|---|
| 582 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 583 | } |
|---|
| 584 | break; |
|---|
| 585 | } catch (QInvalidCastException $objExc) { |
|---|
| 586 | $objExc->IncrementOffset(); |
|---|
| 587 | throw $objExc; |
|---|
| 588 | } |
|---|
| 589 | |
|---|
| 590 | case 'Width': |
|---|
| 591 | try { |
|---|
| 592 | $this->intWidth = QType::Cast($mixValue, QType::Integer); |
|---|
| 593 | if ($this->Rendered) { |
|---|
| 594 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 595 | } |
|---|
| 596 | break; |
|---|
| 597 | } catch (QInvalidCastException $objExc) { |
|---|
| 598 | $objExc->IncrementOffset(); |
|---|
| 599 | throw $objExc; |
|---|
| 600 | } |
|---|
| 601 | |
|---|
| 602 | case 'ZIndex': |
|---|
| 603 | try { |
|---|
| 604 | $this->intZIndex = QType::Cast($mixValue, QType::Integer); |
|---|
| 605 | if ($this->Rendered) { |
|---|
| 606 | $this->CallJqUiMethod("option", $strName, $mixValue); |
|---|
| 607 | } |
|---|
| 608 | break; |
|---|
| 609 | } catch (QInvalidCastException $objExc) { |
|---|
| 610 | $objExc->IncrementOffset(); |
|---|
| 611 | throw $objExc; |
|---|
| 612 | } |
|---|
| 613 | |
|---|
| 614 | |
|---|
| 615 | case 'Enabled': |
|---|
| 616 | $this->Disabled = !$mixValue; // Tie in standard QCubed functionality |
|---|
| 617 | parent::__set($strName, $mixValue); |
|---|
| 618 | break; |
|---|
| 619 | |
|---|
| 620 | default: |
|---|
| 621 | try { |
|---|
| 622 | parent::__set($strName, $mixValue); |
|---|
| 623 | break; |
|---|
| 624 | } catch (QCallerException $objExc) { |
|---|
| 625 | $objExc->IncrementOffset(); |
|---|
| 626 | throw $objExc; |
|---|
| 627 | } |
|---|
| 628 | } |
|---|
| 629 | } |
|---|
| 630 | } |
|---|
| 631 | |
|---|
| 632 | ?> |
|---|