Module cSigCJTaskDialog.pkg
1//==============================================================================
2// Project : SigCj - VDF Classes for Codejock
3// File : cSigCJTaskDialog.pkg
4// Description : VDF Class for Codejock control
5//
6// Revision : $Rev: 599 $
7// $Date: 2009-10-14 05:39:01 -0400 (Wed, 14 Oct 2009) $
8// $Author: pak $ Martin Pincott
9//
10// Requirements : Visual DataFlex 12.1+
11// Codejock SuitePro - Version 12.0.0+
12//
13// Copyright : (c) 2008 VDF SIG UK
14// Visual DataFlex Special Interest Group UK.
15// http://www.vdfsig.co.uk/
16// dev@vdfsig.co.uk
17//
18// This file is part of SigCj.
19//
20// SigCj is free software: you can redistribute it and/or modify
21// it under the terms of the GNU Lesser General Public License
22// as published by the Free Software Foundation, either version
23// 2.1 of the License, or (at your option) any later version.
24//
25// SigCj is distributed in the hope that it will be useful, but
26// WITHOUT ANY WARRANTY; without even the implied warranty of
27// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28// GNU Lesser General Public License for more details.
29//
30// If you have the complete SigCj workspace then a copy of the
31// GNU Lesser General Public License is in the Docs folder. If
32// not, see <http://www.gnu.org/licenses/>.
33//
34//==============================================================================
35
36Use SigCjW_Controls.pkg
37Use cSigCJMethods_Mixin.pkg
38Use cSigCJGlobalSettings.pkg
39
40Define eBtn_OK for OLExtpTaskButtonOk
41Define eBtn_Yes for OLExtpTaskButtonYes
42Define eBtn_No for OLExtpTaskButtonNo
43Define eBtn_Cancel for OLExtpTaskButtonCancel
44Define eBtn_Retry for OLExtpTaskButtonRetry
45Define eBtn_Close for OLExtpTaskButtonClose
46
47Define eTaskIcon_None for OLExtpTaskIconNone
48Define eTaskIconWarning for OLExtpTaskIconWarning
49Define eTaskIconError for OLExtpTaskIconError
50Define eTaskIconInfo for OLExtpTaskIconInformation
51Define eTaskIconShield for OLExtpTaskIconShield
52Define eTaskIconCustom for OLExtpTaskIconCustom
53
54Define eTaskProgressBar_None for OLExtpTaskProgressBarNone
55Define eTaskProgressBar_Normal for OLExtpTaskProgressBarNormal
56Define eTaskProgressBar_Marquee for OLExtpTaskProgressBarMarquee
57
58Define CLF for (character(13)+ character(10))
59
60
61{DocStart = Class}
62//---------------------------------------------------
63//
64// Class : cSigCJTaskDialog
65//
66// Superclass : cSigCjComTaskDialog
67//
68// Package : cSigCJTaskDialog.pkg
69//
70// Mixins :
71//
72// Description : The TaskDialog Control creates, displays, and operates a task dialog. A task dialog is similar to,
73// While much more flexible than, a basic message box. The task dialog contains application-defined messages,
74// title, verification check box, command links and push buttons, plus any combination of predefined icons
75// and push buttons.
76//
77// Properties : pbShowWindowsExitButton (boolean)
78// psCollapsedControlText (string)
79// pbShowButtonOk (boolean)
80// pbShowButtonYes (boolean)
81// pbShowButtonNo (boolean)
82// pbShowButtonCancel (boolean)
83// pbShowButtonRetry (boolean)
84// pbShowButtonClose (boolean)
85// psContentText (string)
86// piDefaultButton (integer)
87// piDefaultRadioOption (integer)
88// piWidth (integer)
89// pbEnableCallbackTimer (boolean)
90// pbEnableCommandLinks (boolean)
91// pbEnableHyperLinks (boolean)
92// psExpandedControlText (string)
93// psExpandedInformationText (string)
94// pbExpandFooterArea (boolean)
95// piFooterIcon (integer)
96// psFooterIconImage (string)
97// psFooterText (string)
98// piMainIcon (integer)
99// psMainIconImage (string)
100// psMainInstructionText (string)
101// pbMessageBoxStyle (boolean)
102// phParentHwnd (handle)
103// piProgressBarPos (integer)
104// peProgressBarStyle (integer)
105// pbRelativePosition (boolean)
106// pbRtLLayout (boolean)
107// pbShowCommandLinkIcons (boolean)
108// pbUseComCtl32 (boolean)
109// psVerificationText (string)
110// pbVerifyCheckState (boolean)
111// psTitle (string)
112//
113// Events : OnButtonClicked
114// OnHyperlinkClicked
115// OnRadioSelected
116// OnVerificationClicked
117// OnExpandButtonClicked
118// OnTimer
119// OnConstructed
120// OnCreate
121//
122// Methods : ShowDialog
123// Set TaskDialogOptionButton
124// Set TaskDialogOptionRadio
125// Set pbButtonEnabledState
126// Set pbRadioOptionEnabledState
127// Reset
128// Set ProgressBarRange
129// StartProgressBarMarquee
130//
131// Notes :
132//
133// To Do :
134//
135//---------------------------------------------------
136{DocEnd}
137
138{ OverrideProperty=psLicenseKey DesignTime=False }
139{ OverrideProperty=psProgID DesignTime=False }
140Class cSigCJTaskDialog is a cSigCjComTaskDialog
141 Import_Class_Protocol cSigCJMethods_Mixin
142
143 Procedure Construct_Object
144 Forward Send Construct_Object
145 // Define new Properties:
146
147 On_Key Key_Escape Send Close_panel
148
149 { DesignTime=False Visibility=Private }
150 Property Boolean Private.pbShowWindowsExitButton True
151 { DesignTime=False Visibility=Private }
152 Property String Private.psCollapsedControlText "Details"
153 { DesignTime=False Visibility=Private }
154 Property Integer Private.peCommonButtons 0
155 { DesignTime=False Visibility=Private }
156 Property Boolean Private.pbOKButton False
157 { DesignTime=False Visibility=Private }
158 Property Boolean Private.pbYesButton False
159 { DesignTime=False Visibility=Private }
160 Property Boolean Private.pbNoButton False
161 { DesignTime=False Visibility=Private }
162 Property Boolean Private.pbCancelButton False
163 { DesignTime=False Visibility=Private }
164 Property Boolean Private.pbRetryButton False
165 { DesignTime=False Visibility=Private }
166 Property Boolean Private.pbCloseButton False
167 { DesignTime=False Visibility=Private }
168 Property String Private.psContentText ""
169 { DesignTime=False Visibility=Private }
170 Property Integer Private.piDefaultButton 0
171 { DesignTime=False Visibility=Private }
172 Property Integer Private.piDefaultRadioOption 0
173 { DesignTime=False Visibility=Private }
174 Property Integer Private.piWidth 0
175 { DesignTime=False Visibility=Private }
176 Property Boolean Private.pbEnableCallbackTimer False
177 { DesignTime=False Visibility=Private }
178 Property Boolean Private.pbEnableCommandLinks False
179 { DesignTime=False Visibility=Private }
180 Property Boolean Private.pbEnableHyperLinks True
181 { DesignTime=False Visibility=Private }
182 Property Boolean Private.pbExpandInfoTextByDefault True
183 { DesignTime=False Visibility=Private }
184 Property String Private.psExpandedControlText "Hide Details"
185 { DesignTime=False Visibility=Private }
186 Property String Private.psExpandedInformationText ""
187 { DesignTime=False Visibility=Private }
188 Property Boolean Private.pbExpandFooterArea False
189 { DesignTime=False Visibility=Private }
190 Property Integer Private.piFooterIcon eTaskIcon_None
191 { DesignTime=False Visibility=Private }
192 Property Integer Private.piFooterIconHandle 0
193 { DesignTime=False Visibility=Private }
194 Property String Private.psFooterText ""
195 { DesignTime=False Visibility=Private }
196 Property Integer Private.piMainIcon eTaskIcon_None
197 { DesignTime=False Visibility=Private }
198 Property Integer Private.piMainIconHandle 0
199 { DesignTime=False Visibility=Private }
200 Property String Private.psMainInstructionText ""
201 { DesignTime=False Visibility=Private }
202 Property Boolean Private.pbMessageBoxStyle True
203 { DesignTime=False Visibility=Private }
204 Property Handle Private.phParentHwnd 0
205 { DesignTime=False Visibility=Private }
206 Property Integer Private.piProgressBarPos 0
207 { DesignTime=False Visibility=Private }
208 Property Integer Private.peProgressBarStyle eTaskProgressBar_None
209 { DesignTime=False Visibility=Private }
210 Property Boolean Private.pbRelativePosition False
211 { DesignTime=False Visibility=Private }
212 Property Boolean Private.pbRtLLayout False
213 { DesignTime=False Visibility=Private }
214 Property Boolean Private.pbShowCommandLinkIcons True
215 { DesignTime=False Visibility=Private }
216 Property Boolean Private.pbUseComCtl32 False
217 // Warning setting this to true on a vista or 2008 server will stop the modal state
218 { DesignTime=False Visibility=Private }
219 Property String Private.psVerificationText ""
220 { DesignTime=False Visibility=Private }
221 Property Boolean Private.pbVerifyCheckState False
222 { DesignTime=False Visibility=Private }
223 Property String Private.psTitle ""
224 { DesignTime=False Visibility=Private }
225 Property String Private.psMainIconImage ""
226 { DesignTime=False Visibility=Private }
227 Property String Private.psFooterIconImage ""
228 { DesignTime=False Visibility=Private }
229 Property Integer piProcessCounter
230 End_Procedure
231
232 Procedure End_Construct_Object
233 Set location to -100 -100
234 Forward Send End_Construct_Object
235 End_Procedure
236
237// { MethodType=Method Visibility=Private }
238// Procedure SetTaskDialogProperty Handle hmPrivateProperty Handle hmCOMProperty Variant vValue
239// Set hmPrivateProperty to vValue
240// If (IsComObjectCreated(Self)) Begin
241// Set hmCOMProperty to vValue
242// End
243// End_Procedure
244
245 { MethodType=Property Category="CodeJock" }
246 { PropertyType=Image }
247 Procedure Set psMainIconImage String sImage
248 Integer iImageID
249 Handle hWnd
250
251 Get AddImage of ghoSigCjGlobalSetting sImage 0 0 to iImageID
252 Get ImageHwndFromId of ghoSigCjGlobalSetting iImageID to hWnd
253 Set piMainIconHandle to hWnd
254 Set Private.psMainIconImage to sImage
255 End_Procedure
256
257 { MethodType=Property Category="CodeJock" }
258 { PropertyType=Image }
259 Function psMainIconImage Returns String
260 Function_Return (Private.psMainIconImage(Self))
261 End_Function
262
263 { MethodType=Property Category="CodeJock" }
264 { PropertyType=Image }
265 Procedure Set psFooterIconImage String sImage
266 Integer iImageID
267 Handle hWnd
268
269 Get AddImage of ghoSigCjGlobalSetting sImage 0 0 to iImageID
270 Get ImageHwndFromId of ghoSigCjGlobalSetting iImageID to hWnd
271 Set piFooterIconHandle to hWnd
272 Set Private.psFooterIconImage to sImage
273 End_Procedure
274
275 { MethodType=Property Category="CodeJock" }
276 { PropertyType=Image }
277 Function psFooterIconImage Returns String
278 Function_Return (Private.psFooterIconImage(Self))
279 End_Function
280
281 { MethodType=Property Category="CodeJock" }
282 { PropertyType=Boolean InitialValue=True }
283 Procedure Set pbShowWindowsExitButton Boolean bState
284 Set SigCJProperty Set_Private.pbShowWindowsExitButton Set_ComAllowCancellation to bState
285 End_Procedure
286
287 { MethodType=Property Category="CodeJock" }
288 Function pbShowWindowsExitButton Returns Boolean
289 Function_Return (Private.pbShowWindowsExitButton(Self))
290 End_Function
291
292 { MethodType=Property Category="CodeJock" }
293 { InitialValue="Details" }
294 Procedure Set psCollapsedControlText String sText
295 Set SigCJProperty Set_Private.psCollapsedControlText Set_ComCollapsedControlText to sText
296 End_Procedure
297
298 { MethodType=Property Category="CodeJock" }
299 Function psCollapsedControlText Returns String
300 Function_Return (Private.psCollapsedControlText(Self))
301 End_Function
302
303 { MethodType=Property Visibility=Private }
304 Procedure Set peCommonButtons Integer iButtons
305 Set SigCJProperty Set_Private.peCommonButtons Set_ComCommonButtons to iButtons
306 End_Procedure
307
308 { MethodType=Property Visibility=Private }
309 Function peCommonButtons Returns Integer
310 Function_Return (Private.peCommonButtons(Self))
311 End_Function
312
313 { MethodType=Property Category="CodeJock" }
314 { PropertyType=Boolean InitialValue=False }
315 Procedure Set pbShowButtonOk Boolean bState
316 Set Private.pbOKButton to bState
317 Send SetCommonButtons
318 End_Procedure
319
320 Function pbShowButtonOk Returns Boolean
321 Function_Return (Private.pbOKButton(Self))
322 End_Function
323
324 { MethodType=Property Category="CodeJock" }
325 { PropertyType=Boolean InitialValue=False }
326 Procedure Set pbShowButtonYes Boolean bState
327 Set Private.pbYesButton to bState
328 Send SetCommonButtons
329 End_Procedure
330
331 { MethodType=Property Category="CodeJock" }
332 Function pbShowButtonYes Returns Boolean
333 Function_Return (Private.pbYesButton(Self))
334 End_Function
335
336 { MethodType=Property Category="CodeJock" }
337 { PropertyType=Boolean InitialValue=False }
338 Procedure Set pbShowButtonNo Boolean bState
339 Set Private.pbNoButton to bState
340 Send SetCommonButtons
341 End_Procedure
342
343 { MethodType=Property Category="CodeJock" }
344 Function pbShowButtonNo Returns Boolean
345 Function_Return (Private.pbNoButton(Self))
346 End_Function
347
348 { MethodType=Property Category="CodeJock" }
349 { PropertyType=Boolean InitialValue=False }
350 Procedure Set pbShowButtonCancel Boolean bState
351 Set Private.pbCancelButton to bState
352 Send SetCommonButtons
353 End_Procedure
354
355 { MethodType=Property Category="CodeJock" }
356 Function pbShowButtonCancel Returns Boolean
357 Function_Return (Private.pbCancelButton(Self))
358 End_Function
359
360 { MethodType=Property Category="CodeJock" }
361 { PropertyType=Boolean InitialValue=False }
362 Procedure Set pbShowButtonRetry Boolean bState
363 Set Private.pbRetryButton to bState
364 Send SetCommonButtons
365 End_Procedure
366
367 { MethodType=Property Category="CodeJock" }
368 Function pbShowButtonRetry Returns Boolean
369 Function_Return (Private.pbRetryButton(Self))
370 End_Function
371
372 { MethodType=Property Category="CodeJock" }
373 { PropertyType=Boolean InitialValue=False }
374 Procedure Set pbShowButtonClose Boolean bState
375 Set Private.pbCloseButton to bState
376 Send SetCommonButtons
377 End_Procedure
378
379 { MethodType=Property Category="CodeJock" }
380 Function pbShowButtonClose Returns Boolean
381 Function_Return (Private.pbCloseButton(Self))
382 End_Function
383
384 { MethodType=Method Visibility=Private }
385 Procedure SetCommonButtons
386 Set peCommonButtons to (If(pbShowButtonOk(Self),eBtn_OK,0) ;
387 + If(pbShowButtonYes(Self),eBtn_Yes,0) ;
388 + If(pbShowButtonNo(Self),eBtn_No,0) ;
389 + If(pbShowButtonCancel(Self),eBtn_Cancel,0) ;
390 + If(pbShowButtonRetry(Self),eBtn_Retry,0) ;
391 + If(pbShowButtonClose(Self),eBtn_Close,0))
392 End_Procedure
393
394 { MethodType=Property Category="CodeJock" }
395 Procedure Set psContentText String sText
396 Set SigCJProperty Set_Private.psContentText Set_ComContentText to sText
397 End_Procedure
398
399 { MethodType=Property Category="CodeJock" }
400 Function psContentText Returns String
401 Function_Return (Private.psContentText(Self))
402 End_Function
403
404 { MethodType=Property Category="CodeJock" }
405 //{ EnumList="eBtn_OK, eBtn_Yes, eBtn_No, eBtn_Cancel, eBtn_Retry, eBtn_Close" }
406 Procedure Set piDefaultButton Integer iButton
407 Set SigCJProperty Set_Private.piDefaultButton Set_ComDefaultButton to iButton
408 End_Procedure
409
410 { MethodType=Property Category="CodeJock" }
411 Function piDefaultButton Returns Integer
412 Function_Return (Private.piDefaultButton(Self))
413 End_Function
414
415 { MethodType=Property Category="CodeJock" }
416 Procedure Set piDefaultRadioOption Integer iButton
417 Set SigCJProperty Set_Private.piDefaultRadioOption Set_ComDefaultRadioButton to iButton
418 End_Procedure
419
420 { MethodType=Property Category="CodeJock" }
421 Function piDefaultRadioOption Returns Integer
422 Function_Return (Private.piDefaultRadioOption(Self))
423 End_Function
424
425 { MethodType=Property Category="CodeJock" }
426 Procedure Set piWidth Integer iWidth
427 Set SigCJProperty Set_Private.piWidth Set_ComDialogWidth to iWidth
428 End_Procedure
429
430 { MethodType=Property Category="CodeJock" }
431 Function piWidth Returns Integer
432 Function_Return (Private.piWidth(Self))
433 End_Function
434
435 { MethodType=Property Category="CodeJock" }
436 { PropertyType=Boolean InitialValue=False }
437 Procedure Set pbEnableCallbackTimer Boolean bState
438 Set SigCJProperty Set_Private.pbEnableCallbackTimer Set_ComEnableCallbackTimer to bState
439 End_Procedure
440
441 { MethodType=Property Category="CodeJock" }
442 Function pbEnableCallbackTimer Returns Boolean
443 Function_Return (Private.pbEnableCallbackTimer(Self))
444 End_Function
445
446 { MethodType=Property Category="CodeJock" }
447 { PropertyType=Boolean InitialValue=False }
448 Procedure Set pbEnableCommandLinks Boolean bState
449 Set SigCJProperty Set_Private.pbEnableCommandLinks Set_ComEnableCommandLinks to bState
450 End_Procedure
451
452 { MethodType=Property Category="CodeJock" }
453 Function pbEnableCommandLinks Returns Boolean
454 Function_Return (Private.pbEnableCommandLinks(Self))
455 End_Function
456
457 { MethodType=Property Category="CodeJock" }
458 { PropertyType=Boolean InitialValue=True }
459 Procedure Set pbEnableHyperLinks Boolean bState
460 Set SigCJProperty Set_Private.pbEnableHyperLinks Set_ComEnableHyperlinks to bState
461 End_Procedure
462
463 { MethodType=Property Category="CodeJock" }
464 Function pbEnableHyperLinks Returns Boolean
465 Function_Return (Private.pbEnableHyperLinks(Self))
466 End_Function
467
468 { MethodType=Property Category="CodeJock" }
469 { PropertyType=Boolean InitialValue=False }
470 Procedure Set pbExpandInfoTextByDefault Boolean bState
471 Set SigCJProperty Set_Private.pbExpandInfoTextByDefault Set_ComExpandedByDefault to bState
472 End_Procedure
473
474 { MethodType=Property Category="CodeJock" }
475 Function pbExpandInfoTextByDefault Returns Boolean
476 Function_Return (Private.pbExpandInfoTextByDefault(Self))
477 End_Function
478
479 { MethodType=Property Category="CodeJock" }
480 { InitialValue="Hide Details" }
481 Procedure Set psExpandedControlText String sText
482 Set SigCJProperty Set_Private.psExpandedControlText Set_ComExpandedControlText to sText
483 End_Procedure
484
485 { MethodType=Property Category="CodeJock" }
486 Function psExpandedControlText Returns String
487 Function_Return (Private.psExpandedControlText(Self))
488 End_Function
489
490 { MethodType=Property Category="CodeJock" }
491 Procedure Set psExpandedInformationText String sText
492 Set SigCJProperty Set_Private.psExpandedInformationText Set_ComExpandedInformationText to sText
493 End_Procedure
494
495 { MethodType=Property Category="CodeJock" }
496 Function psExpandedInformationText Returns String
497 Function_Return (Private.psExpandedInformationText(Self))
498 End_Function
499
500 { MethodType=Property Category="CodeJock" }
501 { PropertyType=Boolean InitialValue=False }
502 Procedure Set pbExpandFooterArea Boolean bState
503 Set SigCJProperty Set_Private.pbExpandFooterArea Set_ComExpandFooterArea to bState
504 End_Procedure
505
506 { MethodType=Property Category="CodeJock" }
507 Function pbExpandFooterArea Returns Boolean
508 Function_Return (Private.pbExpandFooterArea(Self))
509 End_Function
510
511 { MethodType=Property Category="CodeJock" }
512 { EnumList="eTaskIcon_None, eTaskIconWarning, eTaskIconError, eTaskIconInfo, eTaskIconShield, eTaskIconCustom" }
513 { InitialValue=eTaskIcon_None }
514 Procedure Set piFooterIcon Integer iID
515 Set SigCJProperty Set_Private.piFooterIcon Set_ComFooterIcon to iID
516 End_Procedure
517
518 { MethodType=Property Category="CodeJock" }
519 Function piFooterIcon Returns Boolean
520 Function_Return (Private.piFooterIcon(Self))
521 End_Function
522
523 { MethodType=Property Category="CodeJock" }
524 { Visibility = Private }
525 Procedure Set piFooterIconHandle Integer iHandle
526 Set SigCJProperty Set_Private.piFooterIconHandle Set_ComFooterIconHandle to iHandle
527 End_Procedure
528
529 { MethodType=Property Category="CodeJock" }
530 { Visibility = Private }
531 Function piFooterIconHandle Returns Boolean
532 Function_Return (Private.piFooterIconHandle(Self))
533 End_Function
534
535 { MethodType=Property Category="CodeJock" }
536 Procedure Set psFooterText String sText
537 Set SigCJProperty Set_Private.psFooterText Set_ComFooterText to sText
538 End_Procedure
539
540 { MethodType=Property Category="CodeJock" }
541 Function psFooterText Returns String
542 Function_Return (Private.psFooterText(Self))
543 End_Function
544
545 { MethodType=Property Category="CodeJock" }
546 { EnumList="eTaskIcon_None, eTaskIconWarning, eTaskIconError, eTaskIconInfo, eTaskIconShield, eTaskIconCustom" }
547 { InitialValue=eTaskIcon_None }
548 Procedure Set piMainIcon Integer iID
549 Set SigCJProperty Set_Private.piMainIcon Set_ComMainIcon to iID
550 End_Procedure
551
552 { MethodType=Property Category="CodeJock" }
553 Function piMainIcon Returns Boolean
554 Function_Return (Private.piMainIcon(Self))
555 End_Function
556
557 { MethodType=Property Category="CodeJock" }
558 { Visibility = Private }
559 Procedure Set piMainIconHandle Integer iHandle
560 Set SigCJProperty Set_Private.piMainIconHandle Set_ComMainIconHandle to iHandle
561 End_Procedure
562
563 { MethodType=Property Category="CodeJock" }
564 { Visibility = Private }
565 Function piMainIconHandle Returns Boolean
566 Function_Return (Private.piMainIconHandle(Self))
567 End_Function
568
569 { MethodType=Property Category="CodeJock" }
570 Procedure Set psMainInstructionText String sText
571 Set SigCJProperty Set_Private.psMainInstructionText Set_ComMainInstructionText to sText
572 End_Procedure
573
574 { MethodType=Property Category="CodeJock" }
575 Function psMainInstructionText Returns String
576 Function_Return (Private.psMainInstructionText(Self))
577 End_Function
578
579 { MethodType=Property Category="CodeJock" }
580 { PropertyType=Boolean InitialValue=True }
581 Procedure Set pbMessageBoxStyle Boolean bState
582 Set SigCJProperty Set_Private.pbMessageBoxStyle Set_ComMessageBoxStyle to bState
583 End_Procedure
584
585 { MethodType=Property Category="CodeJock" }
586 Function pbMessageBoxStyle Returns Boolean
587 Function_Return (Private.pbMessageBoxStyle(Self))
588 End_Function
589
590 { MethodType=Property Category="CodeJock" }
591 Procedure Set phParentHwnd Handle hParent
592 Set SigCJProperty Set_Private.phParentHwnd Set_ComParentHwnd to hParent
593 End_Procedure
594
595 { MethodType=Property Category="CodeJock" }
596 Function phParentHwnd Returns Boolean
597 Function_Return (Private.phParentHwnd(Self))
598 End_Function
599
600 { MethodType=Property Category="CodeJock" }
601 Procedure Set piProgressBarPos Integer iPos
602 Set SigCJProperty Set_Private.piProgressBarPos Set_ComProgressBarPos to iPos
603 End_Procedure
604
605 { MethodType=Property Category="CodeJock" }
606 Function piProgressBarPos Returns Integer
607 Function_Return (Private.piProgressBarPos(Self))
608 End_Function
609
610 { MethodType=Property Category="CodeJock" }
611 { EnumList="eTaskProgressBar_None, eTaskProgressBar_Normal, eTaskProgressBar_Marquee" }
612 { InitialValue=eTaskProgressBar_None }
613 Procedure Set peProgressBarStyle Integer eStyle
614 Set SigCJProperty Set_Private.piProgressBarPos Set_ComProgressBarStyle to eStyle
615 End_Procedure
616
617 { MethodType=Property Category="CodeJock" }
618 Function peProgressBarStyle Returns Integer
619 Function_Return (Private.peProgressBarStyle(Self))
620 End_Function
621
622 { MethodType=Property Category="CodeJock" }
623 { PropertyType=Boolean InitialValue=False }
624 Procedure Set pbRelativePosition Boolean bState
625 Set SigCJProperty Set_Private.pbRelativePosition Set_ComRelativePosition to bState
626 End_Procedure
627
628 { MethodType=Property Category="CodeJock" }
629 Function pbRelativePosition Returns Boolean
630 Function_Return (Private.pbRelativePosition(Self))
631 End_Function
632
633 { MethodType=Property Category="CodeJock" }
634 { PropertyType=Boolean InitialValue=False }
635 Procedure Set pbRtLLayout Boolean bState
636 Set SigCJProperty Set_Private.pbRtLLayout Set_ComRtlLayout to bState
637 End_Procedure
638
639 { MethodType=Property Category="CodeJock" }
640 Function pbRtLLayout Returns Boolean
641 Function_Return (Private.pbRtLLayout(Self))
642 End_Function
643
644 { MethodType=Property Category="CodeJock" }
645 { PropertyType=Boolean InitialValue=True }
646 Procedure Set pbShowCommandLinkIcons Boolean bState
647 Set SigCJProperty Set_Private.pbShowCommandLinkIcons Set_ComShowCommandLinkIcons to bState
648 End_Procedure
649
650 { MethodType=Property Category="CodeJock" }
651 Function pbShowCommandLinkIcons Returns Boolean
652 Function_Return (Private.pbShowCommandLinkIcons(Self))
653 End_Function
654
655 { MethodType=Property Category="CodeJock" }
656 { PropertyType=Boolean InitialValue=False }
657 { Visibility=Private }
658 Procedure Set pbUseComCtl32 Boolean bState
659 Set SigCJProperty Set_Private.pbUseComCtl32 Set_ComUseComCtl32 to bState
660 End_Procedure
661
662 { MethodType=Property Category="CodeJock" }
663 { Visibility=Private }
664 Function pbUseComCtl32 Returns Boolean
665 Function_Return (Private.pbUseComCtl32(Self))
666 End_Function
667
668 { MethodType=Property Category="CodeJock" }
669 Procedure Set psVerificationText String sText
670 Set SigCJProperty Set_Private.psVerificationText Set_ComVerificationText to sText
671 End_Procedure
672
673 { MethodType=Property Category="CodeJock" }
674 Function psVerificationText Returns String
675 Function_Return (Private.psVerificationText(Self))
676 End_Function
677
678 { MethodType=Property Category="CodeJock" }
679 { PropertyType=Boolean InitialValue=False }
680 Procedure Set pbVerifyCheckState Boolean bState
681 Set SigCJProperty Set_Private.pbVerifyCheckState Set_ComVerifyCheckState to bState
682 End_Procedure
683
684 { MethodType=Property Category="CodeJock" }
685 Function pbVerifyCheckState Returns Boolean
686 Function_Return (Private.pbVerifyCheckState(Self))
687 End_Function
688
689 { MethodType=Property Category="CodeJock" }
690 Procedure Set psTitle String sTitle
691 Set SigCJProperty Set_Private.psTitle Set_ComWindowTitle to sTitle
692 End_Procedure
693
694 { MethodType=Property Category="CodeJock" }
695 Function psTitle Returns String
696 Function_Return (Private.psTitle(Self))
697 End_Function
698
699 {DocStart = Method}
700 //---------------------------------------------------
701 //
702 // Procedure : ShowDialog
703 //
704 // Scope : Public Method
705 //
706 // Paramaters : None
707 //
708 // Returns : Integer
709 //
710 // Purpose : Displays the task dialog and return the selected button (id) when done
711 //
712 //
713 // Notes :
714 //
715 //---------------------------------------------------
716 {DocEnd}
717 { MethodType=Method Visibility=Public}
718 Function ShowDialog Returns Integer
719 Function_Return (ComShowDialog(Self))
720 End_Function
721
722 {DocStart = Method}
723 //---------------------------------------------------
724 //
725 // Procedure : Set TaskDialogOptionButton
726 //
727 // Scope : Public Method
728 //
729 // Paramaters : sButtonText (string), iButtonID (integer)
730 //
731 // Returns :
732 //
733 // Purpose : Adds a user defined button to the task dialog's command area.
734 // Example: Set TaskDialogOptionButton "Run" to 100
735 // Set TaskDialogOptionButton "Don't Run" to 101
736 //
737 // Notes : The iButtonID indicates the value to be returned when this button is selected and the
738 // OnButtonClicked Event fires
739 //
740 //---------------------------------------------------
741 {DocEnd}
742 { MethodType=Method Visibility=Public}
743 Procedure Set TaskDialogOptionButton String sButtonText Integer iButtonID
744 Boolean bIsCreated
745
746 Get IsComObjectCreated to bIsCreated
747 If (bIsCreated) Begin
748 Send ComAddButton sButtonText iButtonID
749 End
750 End_Procedure
751
752 {DocStart = Method}
753 //---------------------------------------------------
754 //
755 // Procedure : Set TaskDialogOptionRadio
756 //
757 // Scope : Public Method
758 //
759 // Paramaters : sRadioText (string), iButtonID (integer)
760 //
761 // Returns :
762 //
763 // Purpose : Adds a user defined button to the task dialog's command area.
764 // Example: Set TaskDialogOptionRadio "Allow" to 100
765 // Set TaskDialogOptionRadio "Don't Allow" to 101
766 //
767 // Notes : The iButtonID indicates the value to be returned when this button is selected and the
768 // OnRadioSelected Event fires
769 //
770 //---------------------------------------------------
771 {DocEnd}
772 { MethodType=Method Visibility=Public}
773 Procedure Set TaskDialogOptionRadio String sRadioText Integer iButtonID
774 Boolean bIsCreated
775
776 Get IsComObjectCreated to bIsCreated
777 If (bIsCreated) Begin
778 Send ComAddRadioButton sRadioText iButtonID
779 End
780 End_Procedure
781
782 {DocStart = Method}
783 //---------------------------------------------------
784 //
785 // Procedure : Set pbButtonEnabledState
786 //
787 // Scope : Public Method
788 //
789 // Paramaters : Integer iButtonID Boolean bState
790 //
791 // Returns :
792 //
793 // Purpose : Sets the enabled_state for the specified button
794 //
795 // Notes :
796 //
797 //---------------------------------------------------
798 {DocEnd}
799 { MethodType=Method Visibility=Public}
800 Procedure Set pbButtonEnabledState Integer iButtonID Boolean bState
801 Boolean bIsCreated
802
803 Get IsComObjectCreated to bIsCreated
804 If (bIsCreated) Begin
805 Send ComEnableButton iButtonID bState
806 End
807 End_Procedure
808
809 {DocStart = Method}
810 //---------------------------------------------------
811 //
812 // Procedure : Set pbRadioOptionEnabledState
813 //
814 // Scope : Public Method
815 //
816 // Paramaters : Integer iRadioID Boolean bState
817 //
818 // Returns :
819 //
820 // Purpose : Sets the enabled_state for the specified radio option
821 //
822 // Notes :
823 //
824 //---------------------------------------------------
825 {DocEnd}
826 { MethodType=Method Visibility=Public}
827 Procedure Set pbRadioOptionEnabledState Integer iRadioID Boolean bState
828 Boolean bIsCreated
829
830 Get IsComObjectCreated to bIsCreated
831 If (bIsCreated) Begin
832 Send ComEnableRadioButton iRadioID bState
833 End
834 End_Procedure
835
836 {DocStart = Method}
837 //---------------------------------------------------
838 //
839 // Procedure : ClickButton
840 //
841 // Scope : Public Method
842 //
843 // Paramaters : Integer iButtonID
844 //
845 // Returns :
846 //
847 // Purpose : Simulate the action of a button click in the task dialog
848 //
849 // Notes :
850 //
851 //---------------------------------------------------
852 {DocEnd}
853 { MethodType=Method Visibility=Public}
854 Procedure ClickButton Integer iButtonID
855 Boolean bIsCreated
856
857 Get IsComObjectCreated to bIsCreated
858 If (bIsCreated) Begin
859 Send ComClickButton iButtonID
860 End
861 End_Procedure
862
863 {DocStart = Method}
864 //---------------------------------------------------
865 //
866 // Procedure : Reset
867 //
868 // Scope : Public Method
869 //
870 // Paramaters :
871 //
872 // Returns :
873 //
874 // Purpose : Resets the configuration attributes for the task dialog to the default state
875 //
876 // Notes :
877 //
878 //---------------------------------------------------
879 {DocEnd}
880 { MethodType=Method Visibility=Public}
881 Procedure Reset
882 Boolean bIsCreated
883
884 Set pbShowButtonOk to False
885 Set pbShowButtonYes to False
886 Set pbShowButtonNo to False
887 Set pbShowButtonCancel to False
888 Set pbShowButtonRetry to False
889 Set pbShowButtonClose to False
890 Set pbUseComCtl32 to False
891
892 Get IsComObjectCreated to bIsCreated
893 If (bIsCreated) Begin
894 Send ComReset
895 End
896 End_Procedure
897
898 {DocStart = Method}
899 //---------------------------------------------------
900 //
901 // Procedure : ProgressBarRange
902 //
903 // Scope : Public Method
904 //
905 // Paramaters : Integer iMin Integer iMax
906 //
907 // Returns :
908 //
909 // Purpose : Sets the minimum and maximum values for the progress bar
910 //
911 // Notes : By default the min is zero and the max is 100
912 //
913 //---------------------------------------------------
914 {DocEnd}
915 Procedure Set ProgressBarRange Integer iMin Integer iMax
916 Boolean bIsCreated
917
918 Get IsComObjectCreated to bIsCreated
919 If (bIsCreated) Begin
920 Send ComSetProgressBarRange iMin iMax
921 End
922 End_Procedure
923
924 {DocStart = Method}
925 //---------------------------------------------------
926 //
927 // Procedure : StartProgressBarMarquee
928 //
929 // Scope : Public Method
930 //
931 // Paramaters : Boolean bStart Integer imilliseconds
932 //
933 // Returns :
934 //
935 // Purpose : Specifies whether the progress bar should be displayed in marquee mode or not with the ability to
936 // determine marquee speed as well
937 //
938 // Notes : peProgressBarStyle must first be set to eTaskProgressBar_Marquee and StartProgressBarMarquee
939 // must be called in the OnConstructed event before it can be turned on or off.
940 // After StartProgressBarMarquee is called in the OnConstructed event you can freely Use StartProgressBarMarquee
941 // anytime to start and stop the marquee.
942 //
943 //---------------------------------------------------
944 {DocEnd}
945 Procedure StartProgressBarMarquee Boolean bStart Integer imilliseconds
946 Boolean bIsCreated
947
948 Get IsComObjectCreated to bIsCreated
949 If (bIsCreated) Begin
950 Send ComStartProgressBarMarquee bStart imilliseconds
951 End
952 End_Procedure
953
954 {MethodType=Event}
955 Procedure OnCreate
956 //Apply settings...
957 Set pbShowWindowsExitButton to (Private.pbShowWindowsExitButton(Self))
958 Set psCollapsedControlText to (Private.psCollapsedControlText(Self))
959 Set peCommonButtons to (Private.peCommonButtons(Self))
960 Set psContentText to (Private.psContentText(Self))
961 Set piDefaultButton to (Private.piDefaultButton(Self))
962 Set piDefaultRadioOption to (Private.piDefaultRadioOption(Self))
963 Set piWidth to (Private.piWidth(Self))
964 Set pbEnableCallbackTimer to (Private.pbEnableCallbackTimer(Self))
965 Set pbEnableCommandLinks to (Private.pbEnableCommandLinks(Self))
966 Set pbEnableHyperLinks to (Private.pbEnableHyperLinks(Self))
967 Set psExpandedControlText to (Private.psExpandedControlText(Self))
968 Set psExpandedInformationText to (Private.psExpandedInformationText(Self))
969 Set pbExpandFooterArea to (Private.pbExpandFooterArea(Self))
970 Set piFooterIcon to (Private.piFooterIcon(Self))
971 Set piFooterIconHandle to (Private.piFooterIconHandle(Self))
972 Set psFooterText to (Private.psFooterText(Self))
973 Set piMainIcon to (Private.piMainIcon(Self))
974 Set piMainIconHandle to (Private.piMainIconHandle(Self))
975 Set psMainInstructionText to (Private.psMainInstructionText(Self))
976 Set pbMessageBoxStyle to (Private.pbMessageBoxStyle(Self))
977 Set phParentHwnd to (Private.phParentHwnd(Self))
978 Set piProgressBarPos to (Private.piProgressBarPos(Self))
979 Set peProgressBarStyle to (Private.peProgressBarStyle(Self))
980 Set pbRelativePosition to (Private.pbRelativePosition(Self))
981 Set pbRtLLayout to (Private.pbRtLLayout(Self))
982 Set pbShowCommandLinkIcons to (Private.pbShowCommandLinkIcons(Self))
983 Set pbUseComCtl32 to (Private.pbUseComCtl32(Self))
984 Set psVerificationText to (Private.psVerificationText(Self))
985 Set pbVerifyCheckState to (Private.pbVerifyCheckState(Self))
986 Set psTitle to (Private.psTitle(Self))
987 End_Procedure
988
989 {DocStart = Method}
990 //---------------------------------------------------
991 //
992 // Procedure : OnButtonClicked
993 //
994 // Scope : Public Event
995 //
996 // Paramaters : Integer iButton_ID Boolean ByRef bCloseDialog
997 //
998 // Returns :
999 //
1000 // Purpose : Occurs when a user selects a button or command link in the task dialog
1001 //
1002 //
1003 // Notes :
1004 //
1005 //---------------------------------------------------
1006 {DocEnd}
1007 {MethodType=Event Visibility=Public}
1008 Procedure OnButtonClicked Integer iButton_ID Boolean ByRef bCloseDialog
1009 End_Procedure
1010
1011 {DocStart = Method}
1012 //---------------------------------------------------
1013 //
1014 // Procedure : OnHyperlinkClicked
1015 //
1016 // Scope : Public Event
1017 //
1018 // Paramaters : String llURL
1019 //
1020 // Returns :
1021 //
1022 // Purpose : Occurs when a user clicks on a hyperlink in the Task Dialog's content
1023 //
1024 // Notes :
1025 //
1026 //---------------------------------------------------
1027 {DocEnd}
1028 {MethodType=Event Visibility=Public}
1029 Procedure OnHyperlinkClicked String llURL
1030 End_Procedure
1031
1032 {DocStart = Method}
1033 //---------------------------------------------------
1034 //
1035 // Procedure : OnRadioSelected
1036 //
1037 // Scope : Public Event
1038 //
1039 // Paramaters : Integer iRadio_ID
1040 //
1041 // Returns :
1042 //
1043 // Purpose : Occurs when a user selects a radio button in the task dialog.
1044 //
1045 // Notes :
1046 //
1047 //---------------------------------------------------
1048 {DocEnd}
1049 {MethodType=Event Visibility=Public}
1050 Procedure OnRadioSelected Integer iRadio_ID
1051 End_Procedure
1052
1053 {DocStart = Method}
1054 //---------------------------------------------------
1055 //
1056 // Procedure : OnVerificationClicked
1057 //
1058 // Scope : Public Event
1059 //
1060 // Paramaters : Boolean bChecked
1061 //
1062 // Returns :
1063 //
1064 // Purpose : Occurs when the user clicks on the task dialog's verification check box
1065 //
1066 // Notes :
1067 //
1068 //---------------------------------------------------
1069 {DocEnd}
1070 {MethodType=Event Visibility=Public}
1071 Procedure OnVerificationClicked Boolean bChecked
1072 End_Procedure
1073
1074 {DocStart = Method}
1075 //---------------------------------------------------
1076 //
1077 // Procedure : OnExpandButtonClicked
1078 //
1079 // Scope : Public Event
1080 //
1081 // Paramaters : Boolean bExpanded
1082 //
1083 // Returns :
1084 //
1085 // Purpose : Occurs when the user clicks on the expand in the Task Dialog.
1086 //
1087 // Notes :
1088 //
1089 //---------------------------------------------------
1090 {DocEnd}
1091 {MethodType=Event Visibility=Public}
1092 Procedure OnExpandButtonClicked Boolean bExpanded
1093 End_Procedure
1094
1095 {DocStart = Method}
1096 //---------------------------------------------------
1097 //
1098 // Procedure : OnTimer
1099 //
1100 // Scope : Integer iMilliSeconds Boolean ByRef bResetCounter
1101 //
1102 // Paramaters : Boolean bStart Integer imilliseconds
1103 //
1104 // Returns :
1105 //
1106 // Purpose : This event is sent by the Task Dialog approximately every
1107 // 200 milliseconds when the pbEnableCallbackTimer Property has been Set (to True).
1108 //
1109 // Notes :
1110 //
1111 //---------------------------------------------------
1112 {DocEnd}
1113 {MethodType=Event Visibility=Public}
1114 Procedure OnTimer Integer iMilliSeconds Boolean ByRef bResetCounter
1115 End_Procedure
1116
1117 {DocStart = Method}
1118 //---------------------------------------------------
1119 //
1120 // Procedure : OnConstructed
1121 //
1122 // Scope : Public Event
1123 //
1124 // Paramaters :
1125 //
1126 // Returns :
1127 //
1128 // Purpose : Occurs once the task dialog has been created and before it is displayed.
1129 //
1130 // Notes :
1131 //
1132 //---------------------------------------------------
1133 {DocEnd}
1134 {MethodType=Event Visibility=Public}
1135 Procedure OnConstructed
1136 End_Procedure
1137
1138 { MethodType=Event Visibility=Private}
1139 Procedure OnComButtonClicked Integer llId Variant llCloseDialog
1140 Send OnButtonClicked llId (&llCloseDialog)
1141 End_Procedure
1142
1143 { MethodType=Event Visibility=Private}
1144 Procedure OnComHyperlinkClicked String llURL
1145 Send OnHyperlinkClicked llURL
1146 End_Procedure
1147
1148 { MethodType=Event Visibility=Private}
1149 Procedure OnComRadioButtonClicked Integer llId
1150 Send OnRadioSelected llId
1151 End_Procedure
1152
1153 { MethodType=Event Visibility=Private}
1154 Procedure OnComVerificationClicked Boolean llChecked
1155 Send OnVerificationClicked llChecked
1156 End_Procedure
1157
1158 { MethodType=Event Visibility=Private}
1159 Procedure OnComExpandButtonClicked Boolean llExpanded
1160 Send OnExpandButtonClicked llExpanded
1161 End_Procedure
1162
1163 { MethodType=Event Visibility=Private}
1164 Procedure OnComTimer Integer llMilliSeconds Variant llReset
1165 Send OnTimer llMilliSeconds (&llReset)
1166 End_Procedure
1167
1168 { MethodType=Event Visibility=Private}
1169 Procedure OnComConstructed
1170 Send OnConstructed
1171 End_Procedure
1172
1173 // Standard User interface functions
1174 Function Initialise Returns Handle
1175 Handle hoDialog
1176
1177 Get Object_Id to hoDialog
1178 Send Reset of hoDialog
1179 Set piProcessCounter to 0
1180 // This must always be set to false
1181 Set pbUseComCtl32 of hoDialog to False
1182 Set Modal_State to True
1183 Set phParentHwnd to (Window_Handle(Client_Id(Self)))
1184 Function_Return hoDialog
1185 End_Function
1186
1187 Procedure Base_Box Handle hoDialog String sMessage String sTitle
1188 Set pbShowWindowsExitButton of hoDialog to True
1189 Set psTitle of hoDialog to sTitle
1190 Set piMainIcon of hoDialog to eTaskIconCustom
1191 Set psMainInstructionText of hoDialog to sMessage
1192 End_Procedure
1193
1194 Procedure sigCJInfo_Box String sMessage String sTitle
1195 Integer iRetval
1196 Handle hoDialog
1197
1198 Get Initialise to hoDialog
1199 If (num_arguments = 1) Send Base_Box hoDialog sMessage " "
1200 Else Send Base_Box hoDialog sMessage sTitle
1201
1202 Set piMainIcon of hoDialog to eTaskIconInfo
1203 Set pbShowButtonOk of hoDialog to True
1204 Set piDefaultButton of hoDialog to eBtn_OK
1205
1206 Get ShowDialog to iRetval
1207 End_Procedure
1208
1209 Procedure sigCJWarning_Box String sMessage String sTitle
1210 Integer iRetval
1211 Handle hoDialog
1212
1213 Get Initialise to hoDialog
1214 If (num_arguments = 1) Send Base_Box hoDialog sMessage " "
1215 Else Send Base_Box hoDialog sMessage sTitle
1216
1217 Set piMainIcon of hoDialog to eTaskIconWarning
1218 Set pbShowButtonOk of hoDialog to True
1219 Set piDefaultButton of hoDialog to eBtn_OK
1220
1221 Get ShowDialog to iRetval
1222 End_Procedure
1223
1224 Procedure sigCJStop_Box String sMessage String sTitle
1225 Integer iRetval
1226 Handle hoDialog
1227
1228 Get Initialise to hoDialog
1229 If (num_arguments = 1) Send Base_Box hoDialog sMessage " "
1230 Else Send Base_Box hoDialog sMessage sTitle
1231
1232 Set piMainIcon of hoDialog to eTaskIconError
1233 Set pbShowButtonOk of hoDialog to True
1234 Set piDefaultButton of hoDialog to eBtn_OK
1235
1236 Get ShowDialog to iRetval
1237 End_Procedure
1238
1239 Function sigCJYesNo_Box String sMessage String sTitle Integer eBtn Returns Integer
1240 Integer iRetval
1241 Handle hoDialog
1242
1243 Get Initialise to hoDialog
1244 If (num_arguments = 1) Send Base_Box hoDialog sMessage " "
1245 Else Send Base_Box hoDialog sMessage sTitle
1246
1247 Set psMainIconImage of hoDialog to "Question_32.ico"
1248 Set pbShowButtonYes of hoDialog to True
1249 Set pbShowButtonNo of hoDialog to True
1250 If (num_arguments < 3) Set piDefaultButton of hoDialog to eBtn_No
1251 Else Set piDefaultButton of hoDialog to eBtn
1252
1253 Get ShowDialog to iRetval
1254
1255 If (iRetval = 2) Function_Return MBR_Yes
1256 If (iRetval = 4) Function_Return MBR_No
1257
1258 Function_Return 0 // iRetval
1259 End_Function
1260
1261 Function sigCJYesNoCancel_Box String sMessage String sTitle Integer eBtn Returns Integer
1262 Integer iRetval
1263 Handle hoDialog
1264
1265 Get Initialise to hoDialog
1266 If (num_arguments = 1) Send Base_Box hoDialog sMessage " "
1267 Else Send Base_Box hoDialog sMessage sTitle
1268
1269 Set psMainIconImage of hoDialog to "Question_32.ico"
1270 Set pbShowButtonYes of hoDialog to True
1271 Set pbShowButtonNo of hoDialog to True
1272 Set pbShowButtonCancel of hoDialog to True
1273 If (num_arguments < 3) Set piDefaultButton of hoDialog to eBtn_Cancel
1274 Else Set piDefaultButton of hoDialog to eBtn
1275
1276 Get ShowDialog to iRetval
1277
1278 If (iRetval = 2) Function_Return MBR_Yes
1279 If (iRetval = 4) Function_Return MBR_No
1280 If (iRetval = 8) Function_Return MBR_Cancel
1281
1282 Function_Return 0 // iRetval
1283 End_Function
1284End_Class
1285
1286//==============================================================================
1287//End of Package - cSigCJTaskDialog.pkg
1288//==============================================================================
1289