Bearsampp 2026.3.26
API documentation
Loading...
Searching...
No Matches
class.winbinder.php
Go to the documentation of this file.
1<?php
2/*
3 *
4 * * Copyright (c) 2022-2025 Bearsampp
5 * * License: GNU General Public License version 3 or later; see LICENSE.txt
6 * * Website: https://bearsampp.com
7 * * Github: https://github.com/Bearsampp
8 *
9 */
10
19{
20 // Constants for control IDs and objects
21 const CTRL_ID = 0;
22 const CTRL_OBJ = 1;
23
24 // Constants for progress bar increment and new line
25 const INCR_PROGRESS_BAR = '++';
26 const NEW_LINE = '@nl@';
27
28 // Constants for message box types
29 const BOX_INFO = WBC_INFO;
30 const BOX_OK = WBC_OK;
31 const BOX_OKCANCEL = WBC_OKCANCEL;
32 const BOX_QUESTION = WBC_QUESTION;
33 const BOX_ERROR = WBC_STOP;
34 const BOX_WARNING = WBC_WARNING;
35 const BOX_YESNO = WBC_YESNO;
36 const BOX_YESNOCANCEL = WBC_YESNOCANCEL;
37
38 // Constants for cursor types
39 const CURSOR_ARROW = 'arrow';
40 const CURSOR_CROSS = 'cross';
41 const CURSOR_FINGER = 'finger';
42 const CURSOR_FORBIDDEN = 'forbidden';
43 const CURSOR_HELP = 'help';
44 const CURSOR_IBEAM = 'ibeam';
45 const CURSOR_NONE = null;
46 const CURSOR_SIZEALL = 'sizeall';
47 const CURSOR_SIZENESW = 'sizenesw';
48 const CURSOR_SIZENS = 'sizens';
49 const CURSOR_SIZENWSE = 'sizenwse';
50 const CURSOR_SIZEWE = 'sizewe';
51 const CURSOR_UPARROW = 'uparrow';
52 const CURSOR_WAIT = 'wait';
53 const CURSOR_WAITARROW = 'waitarrow';
54
55 // Constants for system information types
56 const SYSINFO_SCREENAREA = 'screenarea';
57 const SYSINFO_WORKAREA = 'workarea';
58 public $callback;
59 public $gauge;
61 private $countCtrls;
62
68 public function __construct()
69 {
70 global $bearsamppCore;
71 Util::logInitClass($this);
72
73 $this->defaultTitle = APP_TITLE . ' ' . $bearsamppCore->getAppVersion();
74 $this->reset();
75 }
76
80 public function reset(): void
81 {
82 $this->countCtrls = 1000;
83 $this->callback = array();
84 }
85
97 public function createAppWindow($caption, $width, $height, $style = null, $params = null): mixed
98 {
99 return $this->createWindow(null, AppWindow, $caption, WBC_CENTER, WBC_CENTER, $width, $height, $style, $params);
100 }
101
117 public function createWindow($parent, $wclass, $caption, $xPos, $yPos, $width, $height, $style = null, $params = null): mixed
118 {
119 global $bearsamppCore;
120
121 // Fix for PHP 8.4: Convert null to 0 for parent parameter
122 $parent = $parent === null ? 0 : $parent;
123
124 // Fix for PHP 8.4: Ensure style and params are proper types
125 $style = $style === null ? 0 : $style;
126 $params = $params === null ? 0 : $params;
127
128 // Log window creation attempt for debugging
129 $this->writeLog('Creating window: class=' . $wclass . ', caption=' . $caption . ', pos=(' . $xPos . ',' . $yPos . '), size=(' . $width . 'x' . $height . '), style=' . $style . ', params=' . $params);
130
131 $caption = empty($caption) ? $this->defaultTitle : $this->defaultTitle . ' - ' . $caption;
132 $window = $this->callWinBinder('wb_create_window', array($parent, $wclass, $caption, $xPos, $yPos, $width, $height, $style, $params));
133
134 if ($window === false || $window === null) {
135 $this->writeLog('ERROR: Failed to create window - wb_create_window returned: ' . var_export($window, true));
136 // Check if WinBinder extension is loaded
137 if (!extension_loaded('winbinder')) {
138 $this->writeLog('ERROR: WinBinder extension is not loaded!');
139 }
140 // Check if the function exists
141 if (!function_exists('wb_create_window')) {
142 $this->writeLog('ERROR: wb_create_window function does not exist!');
143 }
144 } else {
145 $this->writeLog('Window created successfully: handle=' . $window);
146 // Set tiny window icon
147 $this->setImage($window, $bearsamppCore->getIconsPath() . '/app.ico');
148 }
149
150 return $window;
151 }
152
162 private function callWinBinder($function, $params = array(), $removeErrorHandler = false): mixed
163 {
164 $result = false;
165 if (function_exists($function)) {
166 if ($removeErrorHandler) {
167 // Suppress all errors for this call
168 $oldErrorLevel = error_reporting(0);
169 $result = @call_user_func_array($function, $params);
170 error_reporting($oldErrorLevel);
171 } else {
172 $result = call_user_func_array($function, $params);
173 }
174 }
175
176 return $result;
177 }
178
187 public function setImage($wbobject, $path): mixed
188 {
189 if ($wbobject === null) {
190 error_log('Error: $wbobject is null.');
191
192 return false;
193 }
194
195 if (!file_exists($path)) {
196 error_log('Error: Image file does not exist at path: ' . $path);
197
198 return false;
199 }
200
201 return $this->callWinBinder('wb_set_image', array($wbobject, $path));
202 }
203
215 public function createNakedWindow($caption, $width, $height, $style = null, $params = null): mixed
216 {
217 $window = $this->createWindow(null, NakedWindow, $caption, WBC_CENTER, WBC_CENTER, $width, $height, $style, $params);
218 $this->setArea($window, $width, $height);
219
220 return $window;
221 }
222
232 public function setArea($wbobject, $width, $height): mixed
233 {
234 return $this->callWinBinder('wb_set_area', array($wbobject, WBC_TITLE, 0, 0, $width, $height));
235 }
236
243 public function destroyWindow($window): bool
244 {
245 // Check if window exists and is valid
246 if (!$window || !$this->windowIsValid($window)) {
247 return true; // Already closed or invalid window
248 }
249
250 // Get window title before destruction for fallback
251 $windowTitle = $this->getText($window);
252 $currentPid = Win32Ps::getCurrentPid();
253
254 // Attempt standard destruction
255 $this->callWinBinder('wb_destroy_window', array($window));
256
257 // Verify closure with retries
258 $maxAttempts = 3;
259 $attempt = 0;
260 $destroyed = false;
261
262 while ($attempt < $maxAttempts && !$destroyed) {
263 $this->processMessages();
264 usleep(100000); // 100ms delay
265 $destroyed = !$this->windowIsValid($window);
266 $attempt++;
267 }
268
269 // Fallback to process termination if window still exists
270 if (!$destroyed) {
271 // 1. Try to close using window title
272 $this->exec('taskkill', '/FI "WINDOWTITLE eq ' . $windowTitle . '" /F', true);
273
274 // 2. Try to kill process directly using Winbinder's PID method
275 $currentPid = Win32Ps::getCurrentPid();
276 if (!empty($currentPid)) {
277 $this->exec('taskkill', '/PID ' . $currentPid . ' /T /F', true);
278 $this->writeLog('Force-killed PID: ' . $currentPid . ' for window: ' . $window);
279 }
280
281 // 3. Final sanity check
282 if ($this->windowIsValid($window)) {
283 $this->callWinBinder('wb_destroy_window', array($window), true); // Force native call
284 }
285
286 // 4. Reset internal state to prevent memory leaks
287 $this->reset();
288 }
289
290 // Final verification
291 return !$this->windowIsValid($window);
292 }
293
301 public function getText($wbobject): mixed
302 {
303 return $this->callWinBinder('wb_get_text', array($wbobject));
304 }
305
312 private function windowIsValid($window): bool
313 {
314 if (!$window) {
315 return false;
316 }
317
318 // Try to get window text - if window is invalid, this will fail
319 $text = $this->callWinBinder('wb_get_text', array($window), true);
320 return ($text !== false);
321 }
322
328 private function processMessages(): void
329 {
330 $this->callWinBinder('wb_wait', array(null, 1), true);
331 }
332
342 public function exec($cmd, $params = null, $silent = false): mixed
343 {
344 global $bearsamppCore;
345
346 if ($silent) {
347 $silent = '"' . $bearsamppCore->getScript(Core::SCRIPT_EXEC_SILENT) . '" "' . $cmd . '"';
348 $cmd = 'wscript.exe';
349 $params = !empty($params) ? $silent . ' "' . $params . '"' : $silent;
350 }
351
352 $this->writeLog('exec: ' . $cmd . ' ' . $params);
353
354 return $this->callWinBinder('wb_exec', array($cmd, $params));
355 }
356
362 private static function writeLog($log): void
363 {
364 global $bearsamppRoot;
365 Util::logDebug($log, $bearsamppRoot->getWinbinderLogFilePath());
366 }
367
373 public function mainLoop(): mixed
374 {
375 return $this->callWinBinder('wb_main_loop');
376 }
377
385 public function refresh($wbobject): mixed
386 {
387 return $this->callWinBinder('wb_refresh', array($wbobject, true));
388 }
389
397 public function getSystemInfo($info): mixed
398 {
399 return $this->callWinBinder('wb_get_system_info', array($info));
400 }
401
414 public function drawImage($wbobject, $path, $xPos = 0, $yPos = 0, $width = 0, $height = 0): mixed
415 {
416 $image = $this->callWinBinder('wb_load_image', array($path));
417
418 return $this->callWinBinder('wb_draw_image', array($wbobject, $image, $xPos, $yPos, $width, $height));
419 }
420
434 public function drawText($parent, $caption, $xPos, $yPos, $width = null, $height = null, $font = null)
435 {
436 // Fix for PHP 8+: Convert null to empty string before str_replace
437 $caption = $caption === null ? '' : $caption;
438 $caption = str_replace(self::NEW_LINE, PHP_EOL, $caption);
439 $width = $width == null ? 120 : $width;
440 $height = $height == null ? 25 : $height;
441
442 return $this->callWinBinder('wb_draw_text', array($parent, $caption, $xPos, $yPos, $width, $height, $font));
443 }
444
458 public function drawRect($parent, $xPos, $yPos, $width, $height, $color = 15790320, $filled = true)
459 {
460 return $this->callWinBinder('wb_draw_rect', array($parent, $xPos, $yPos, $width, $height, $color, $filled));
461 }
462
476 public function drawLine($wbobject, $xStartPos, $yStartPos, $xEndPos, $yEndPos, $color, $height = 1)
477 {
478 return $this->callWinBinder('wb_draw_line', array($wbobject, $xStartPos, $yStartPos, $xEndPos, $yEndPos, $color, $height));
479 }
480
491 public function createFont($fontName, $size = null, $color = null, $style = null)
492 {
493 return $this->callWinBinder('wb_create_font', array($fontName, $size, $color, $style));
494 }
495
503 public function wait($wbobject = null)
504 {
505 return $this->callWinBinder('wb_wait', array($wbobject), true);
506 }
507
516 public function destroyTimer($wbobject, $timerobject)
517 {
518 return $this->callWinBinder('wb_destroy_timer', array($wbobject, $timerobject));
519 }
520
528 public function findFile($filename)
529 {
530 $result = $this->callWinBinder('wb_find_file', array($filename));
531 $this->writeLog('findFile ' . $filename . ': ' . $result);
532
533 return $result != $filename ? $result : false;
534 }
535
546 public function setHandler($wbobject, $classCallback, $methodCallback, $launchTimer = null)
547 {
548 if ($launchTimer != null) {
549 $launchTimer = $this->createTimer($wbobject, $launchTimer);
550 }
551
552 $this->callback[$wbobject] = array($classCallback, $methodCallback, $launchTimer);
553
554 return $this->callWinBinder('wb_set_handler', array($wbobject, '__winbinderEventHandler'));
555 }
556
565 public function createTimer($wbobject, $wait = 1000)
566 {
567 $this->countCtrls++;
568
569 return array(
570 self::CTRL_ID => $this->countCtrls,
571 self::CTRL_OBJ => $this->callWinBinder('wb_create_timer', array($wbobject, $this->countCtrls, $wait))
572 );
573 }
574
583 public function setText($wbobject, $content)
584 {
585 // Fix for PHP 8+: Convert null to empty string before str_replace
586 $content = $content === null ? '' : $content;
587 $content = str_replace(self::NEW_LINE, PHP_EOL, $content);
588
589 return $this->callWinBinder('wb_set_text', array($wbobject, $content));
590 }
591
597 public function getFocus()
598 {
599 return $this->callWinBinder('wb_get_focus');
600 }
601
609 public function setFocus($wbobject)
610 {
611 return $this->callWinBinder('wb_set_focus', array($wbobject));
612 }
613
621 public function isEnabled($wbobject)
622 {
623 return $this->callWinBinder('wb_get_enabled', array($wbobject));
624 }
625
633 public function setDisabled($wbobject)
634 {
635 return $this->setEnabled($wbobject, false);
636 }
637
646 public function setEnabled($wbobject, $enabled = true)
647 {
648 return $this->callWinBinder('wb_set_enabled', array($wbobject, $enabled));
649 }
650
659 public function setStyle($wbobject, $style)
660 {
661 return $this->callWinBinder('wb_set_style', array($wbobject, $style));
662 }
663
673 public function sysDlgPath($parent, $title, $path = null)
674 {
675 return $this->callWinBinder('wb_sys_dlg_path', array($parent, $title, $path));
676 }
677
688 public function sysDlgOpen($parent, $title, $filter = null, $path = null)
689 {
690 return $this->callWinBinder('wb_sys_dlg_open', array($parent, $title, $filter, $path));
691 }
692
707 public function createLabel($parent, $caption, $xPos, $yPos, $width = null, $height = null, $style = null, $params = null)
708 {
709 $caption = str_replace(self::NEW_LINE, PHP_EOL, $caption);
710 $width = $width == null ? 120 : $width;
711 $height = $height == null ? 25 : $height;
712
713 return $this->createControl($parent, Label, $caption, $xPos, $yPos, $width, $height, $style, $params);
714 }
715
731 public function createControl($parent, $ctlClass, $caption, $xPos, $yPos, $width, $height, $style = null, $params = null)
732 {
733 $this->countCtrls++;
734
735 // Fix for PHP 8.4: Ensure style and params are proper types
736 $style = $style === null ? 0 : $style;
737 $params = $params === null ? 0 : $params;
738
739 return array(
740 self::CTRL_ID => $this->countCtrls,
741 self::CTRL_OBJ => $this->callWinBinder('wb_create_control', array(
742 $parent,
743 $ctlClass,
744 $caption,
745 $xPos,
746 $yPos,
747 $width,
748 $height,
749 $this->countCtrls,
750 $style,
751 $params
752 )),
753 );
754 }
755
771 public function createInputText($parent, $value, $xPos, $yPos, $width = null, $height = null, $maxLength = null, $style = null, $params = null)
772 {
773 // Fix for PHP 8+: Convert null to empty string before str_replace
774 $value = $value === null ? '' : $value;
775 $value = str_replace(self::NEW_LINE, PHP_EOL, $value);
776 $width = $width == null ? 120 : $width;
777 $height = $height == null ? 25 : $height;
778 $inputText = $this->createControl($parent, EditBox, (string)$value, $xPos, $yPos, $width, $height, $style, $params);
779 if (is_numeric($maxLength) && $maxLength > 0) {
780 $this->setMaxLength($inputText[self::CTRL_OBJ], $maxLength);
781 }
782
783 return $inputText;
784 }
785
794 public function setMaxLength($wbobject, $length)
795 {
796 // Use error suppression for wb_send_message as it may be disabled in some PHP configurations
797 // This is a non-critical operation - if it fails, the input will just not have a max length
798 return $this->callWinBinder('wb_send_message', array($wbobject, 0x00c5, $length, 0), true);
799 }
800
815 public function createEditBox($parent, $value, $xPos, $yPos, $width = null, $height = null, $style = null, $params = null)
816 {
817 $value = str_replace(self::NEW_LINE, PHP_EOL, $value);
818 $width = $width == null ? 540 : $width;
819 $height = $height == null ? 340 : $height;
820 $editBox = $this->createControl($parent, RTFEditBox, (string)$value, $xPos, $yPos, $width, $height, $style, $params);
821
822 return $editBox;
823 }
824
839 public function createHyperLink($parent, $caption, $xPos, $yPos, $width = null, $height = null, $style = null, $params = null)
840 {
841 $caption = str_replace(self::NEW_LINE, PHP_EOL, $caption);
842 $width = $width == null ? 120 : $width;
843 $height = $height == null ? 15 : $height;
844 $hyperLink = $this->createControl($parent, HyperLink, (string)$caption, $xPos, $yPos, $width, $height, $style, $params);
845 $this->setCursor($hyperLink[self::CTRL_OBJ], self::CURSOR_FINGER);
846
847 return $hyperLink;
848 }
849
858 public function setCursor($wbobject, $type = self::CURSOR_ARROW)
859 {
860 return $this->callWinBinder('wb_set_cursor', array($wbobject, $type));
861 }
862
877 public function createRadioButton($parent, $caption, $checked, $xPos, $yPos, $width = null, $height = null, $startGroup = false)
878 {
879 $caption = str_replace(self::NEW_LINE, PHP_EOL, $caption);
880 $width = $width == null ? 120 : $width;
881 $height = $height == null ? 25 : $height;
882
883 return $this->createControl($parent, RadioButton, (string)$caption, $xPos, $yPos, $width, $height, $startGroup ? WBC_GROUP : null, $checked ? 1 : 0);
884 }
885
900 public function createButton($parent, $caption, $xPos, $yPos, $width = null, $height = null, $style = null, $params = null)
901 {
902 $width = $width == null ? 80 : $width;
903 $height = $height == null ? 25 : $height;
904
905 return $this->createControl($parent, PushButton, $caption, $xPos, $yPos, $width, $height, $style, $params);
906 }
907
922 public function createProgressBar($parent, $max, $xPos, $yPos, $width = null, $height = null, $style = null, $params = null)
923 {
924 global $bearsamppLang;
925
926 $width = $width == null ? 200 : $width;
927 $height = $height == null ? 15 : $height;
928 $progressBar = $this->createControl($parent, Gauge, $bearsamppLang->getValue(Lang::LOADING), $xPos, $yPos, $width, $height, $style, $params);
929
930 $this->setRange($progressBar[self::CTRL_OBJ], 0, $max);
931 $this->gauge[$progressBar[self::CTRL_OBJ]] = 0;
932
933 return $progressBar;
934 }
935
943 public function getValue($wbobject)
944 {
945 return $this->callWinBinder('wb_get_value', array($wbobject));
946 }
947
957 public function setRange($wbobject, $min, $max)
958 {
959 return $this->callWinBinder('wb_set_range', array($wbobject, $min, $max));
960 }
961
967 public function incrProgressBar($progressBar)
968 {
969 $this->setProgressBarValue($progressBar, self::INCR_PROGRESS_BAR);
970 }
971
978 public function setProgressBarValue($progressBar, $value)
979 {
980 if ($progressBar != null && isset($progressBar[self::CTRL_OBJ]) && isset($this->gauge[$progressBar[self::CTRL_OBJ]])) {
981 if (strval($value) == self::INCR_PROGRESS_BAR) {
982 $value = $this->gauge[$progressBar[self::CTRL_OBJ]] + 1;
983 }
984 if (is_numeric($value)) {
985 $this->gauge[$progressBar[self::CTRL_OBJ]] = $value;
986
987 // Check if the control is still valid before setting the value
988 // This prevents errors when the parent window has been destroyed
989 $this->callWinBinder('wb_set_value', array($progressBar[self::CTRL_OBJ], $value), true);
990 }
991 }
992 }
993
1002 public function setValue($wbobject, $content)
1003 {
1004 return $this->callWinBinder('wb_set_value', array($wbobject, $content));
1005 }
1006
1012 public function resetProgressBar($progressBar)
1013 {
1014 $this->setProgressBarValue($progressBar, 0);
1015 }
1016
1023 public function setProgressBarMax($progressBar, $max)
1024 {
1025 $this->setRange($progressBar[self::CTRL_OBJ], 0, $max);
1026 }
1027
1036 public function messageBoxInfo($message, $title = null)
1037 {
1038 return $this->messageBox($message, self::BOX_INFO, $title);
1039 }
1040
1050 public function messageBox($message, $type, $title = null)
1051 {
1052 global $bearsamppCore;
1053
1054 $message = str_replace(self::NEW_LINE, PHP_EOL, $message);
1055 $messageBox = $this->callWinBinder('wb_message_box', array(
1056 0, // Use 0 instead of null for the window handle parameter
1057 strlen($message) < 64 ? str_pad($message, 64) : $message, // Pad message to display entire title
1058 $title == null ? $this->defaultTitle : $this->defaultTitle . ' - ' . $title,
1059 $type
1060 ));
1061
1062 return $messageBox;
1063 }
1064
1073 public function messageBoxOk($message, $title = null)
1074 {
1075 return $this->messageBox($message, self::BOX_OK, $title);
1076 }
1077
1086 public function messageBoxOkCancel($message, $title = null)
1087 {
1088 return $this->messageBox($message, self::BOX_OKCANCEL, $title);
1089 }
1090
1099 public function messageBoxQuestion($message, $title = null)
1100 {
1101 return $this->messageBox($message, self::BOX_QUESTION, $title);
1102 }
1103
1112 public function messageBoxError($message, $title = null)
1113 {
1114 return $this->messageBox($message, self::BOX_ERROR, $title);
1115 }
1116
1125 public function messageBoxWarning($message, $title = null)
1126 {
1127 return $this->messageBox($message, self::BOX_WARNING, $title);
1128 }
1129
1138 public function messageBoxYesNo($message, $title = null)
1139 {
1140 return $this->messageBox($message, self::BOX_YESNO, $title);
1141 }
1142
1151 public function messageBoxYesNoCancel($message, $title = null)
1152 {
1153 return $this->messageBox($message, self::BOX_YESNOCANCEL, $title);
1154 }
1155
1156}
1157
1171function __winbinderEventHandler($window, $id, $ctrl, $param1, $param2)
1172{
1173 global $bearsamppWinbinder;
1174
1175 if ($bearsamppWinbinder->callback[$window][2] != null) {
1176 $bearsamppWinbinder->destroyTimer($window, $bearsamppWinbinder->callback[$window][2][0]);
1177 }
1178
1179 call_user_func_array(
1180 array($bearsamppWinbinder->callback[$window][0], $bearsamppWinbinder->callback[$window][1]),
1181 array($window, $id, $ctrl, $param1, $param2)
1182 );
1183}
$result
global $bearsamppLang
global $bearsamppRoot
global $bearsamppCore
__winbinderEventHandler($window, $id, $ctrl, $param1, $param2)
const SCRIPT_EXEC_SILENT
const LOADING
static logInitClass($classInstance)
static logDebug($data, $file=null)
static getCurrentPid()
setCursor($wbobject, $type=self::CURSOR_ARROW)
messageBoxYesNoCancel($message, $title=null)
getValue($wbobject)
setHandler($wbobject, $classCallback, $methodCallback, $launchTimer=null)
createFont($fontName, $size=null, $color=null, $style=null)
drawLine($wbobject, $xStartPos, $yStartPos, $xEndPos, $yEndPos, $color, $height=1)
findFile($filename)
setDisabled($wbobject)
messageBox($message, $type, $title=null)
const CURSOR_SIZEALL
createProgressBar($parent, $max, $xPos, $yPos, $width=null, $height=null, $style=null, $params=null)
const CURSOR_FINGER
static writeLog($log)
createButton($parent, $caption, $xPos, $yPos, $width=null, $height=null, $style=null, $params=null)
messageBoxError($message, $title=null)
destroyTimer($wbobject, $timerobject)
const CURSOR_SIZEWE
callWinBinder($function, $params=array(), $removeErrorHandler=false)
const CURSOR_FORBIDDEN
incrProgressBar($progressBar)
setImage($wbobject, $path)
setValue($wbobject, $content)
createAppWindow($caption, $width, $height, $style=null, $params=null)
windowIsValid($window)
createInputText($parent, $value, $xPos, $yPos, $width=null, $height=null, $maxLength=null, $style=null, $params=null)
getSystemInfo($info)
getText($wbobject)
const CURSOR_SIZENESW
setArea($wbobject, $width, $height)
wait($wbobject=null)
setStyle($wbobject, $style)
setProgressBarValue($progressBar, $value)
createControl($parent, $ctlClass, $caption, $xPos, $yPos, $width, $height, $style=null, $params=null)
refresh($wbobject)
setRange($wbobject, $min, $max)
const SYSINFO_SCREENAREA
const BOX_YESNOCANCEL
drawText($parent, $caption, $xPos, $yPos, $width=null, $height=null, $font=null)
const CURSOR_SIZENWSE
setFocus($wbobject)
createNakedWindow($caption, $width, $height, $style=null, $params=null)
messageBoxWarning($message, $title=null)
const INCR_PROGRESS_BAR
messageBoxOk($message, $title=null)
createHyperLink($parent, $caption, $xPos, $yPos, $width=null, $height=null, $style=null, $params=null)
drawRect($parent, $xPos, $yPos, $width, $height, $color=15790320, $filled=true)
isEnabled($wbobject)
resetProgressBar($progressBar)
messageBoxInfo($message, $title=null)
setText($wbobject, $content)
createRadioButton($parent, $caption, $checked, $xPos, $yPos, $width=null, $height=null, $startGroup=false)
exec($cmd, $params=null, $silent=false)
createEditBox($parent, $value, $xPos, $yPos, $width=null, $height=null, $style=null, $params=null)
const SYSINFO_WORKAREA
destroyWindow($window)
const CURSOR_UPARROW
sysDlgPath($parent, $title, $path=null)
const CURSOR_SIZENS
messageBoxOkCancel($message, $title=null)
messageBoxQuestion($message, $title=null)
sysDlgOpen($parent, $title, $filter=null, $path=null)
setProgressBarMax($progressBar, $max)
const CURSOR_WAITARROW
createLabel($parent, $caption, $xPos, $yPos, $width=null, $height=null, $style=null, $params=null)
setMaxLength($wbobject, $length)
createTimer($wbobject, $wait=1000)
createWindow($parent, $wclass, $caption, $xPos, $yPos, $width, $height, $style=null, $params=null)
drawImage($wbobject, $path, $xPos=0, $yPos=0, $width=0, $height=0)
setEnabled($wbobject, $enabled=true)
messageBoxYesNo($message, $title=null)
const APP_TITLE
Definition root.php:13