Module cSigCJRibbonBar.pkg
1//==============================================================================
2// Project : SigCj - VDF Classes for Codejock
3// File : cSigCJRibbonBar.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//==============================================================================
35Use VdfBase.pkg
36Use cCJStandardCommandBarSystem.pkg
37Use cSigCJMethods_Mixin.pkg
38
39Struct tdUnassignedControl
40 Handle hoObject
41 Variant vControl
42End_Struct
43
44
45{DocStart = Class}
46//-----------------------------------------------------------------------------
47//
48// Class : cSigCJRibbonBar
49//
50// Superclass : cCJCommandBarSystem
51//
52// Package : cSigCJRibbonBar.pkg
53//
54// Mixins :
55//
56// Description :
57//
58// Properties : pbShowHelpMenu
59// psHelpCaption
60// psHelpToolTip
61// psHelpDescription
62// psHelpImage
63// pbPrivateAllowQuickAccessCustomization
64//
65// Events : OnCreateQuickAccessToolbar
66// OnCommandBarsCreated
67//
68//
69// Methods : AddToQuickAccessToolbar Handle hoItem
70// Set pbAddToQuickAccessToolbar Handle hoItem Boolean bState
71//
72// Todo :
73//
74//-----------------------------------------------------------------------------
75{DocEnd}
76
77Use cSigCJCommandBarSystem.pkg
78
79Class cSigCJRibbonBar is a cSigCJCommandBarSystem
80 Procedure Construct_Object
81 Forward Send Construct_Object
82 {Visibility=Private}
83 Property tdUnassignedControl[] ptaUnassignedControls
84 {Visibility=Private}
85 Property Handle phoPrivateRibbonBar (Create(Self,U_cCJRibbonBar))
86 {Visibility=Private}
87 Property Handle phoSystemButton
88 {Visibility=Private}
89 Property Handle[] phaQuickAccessItems
90
91 Property Boolean pbShowHelpMenu True
92 Property String psHelpCaption "&Help"
93 Property String psHelpToolTip "Help"
94 Property String psHelpDescription "Access Information for learning and using this DataFlex application."
95 Property String psHelpImage "ActionHelp.ico"
96 {Visibility=Private}
97 Property Boolean pbPrivateAllowQuickAccessCustomization True
98
99 Property Boolean pbTabWorkspace True
100 End_Procedure
101
102 Function phoRibbonBar Returns Handle
103 Function_Return (phoPrivateRibbonBar(Self))
104 End_Function
105
106 {Visibility=Private}
107 Procedure RegisterUnAssignedControl Handle hoControl Variant vControl
108 tdUnassignedControl[] taUnassignedControls
109 Integer iControls
110
111 Get ptaUnassignedControls to taUnassignedControls
112 Move (SizeOfArray(taUnassignedControls)) to iControls
113 Move hoControl to taUnassignedControls[iControls].hoObject
114 Move vControl to taUnassignedControls[iControls].vControl
115 Set ptaUnassignedControls to taUnassignedControls
116 End_Procedure
117
118 {Visibility=Private}
119 Function FindUnassignedObjectID Variant vControl Returns Handle
120 Handle hoObject
121 Integer iSearch
122
123 tdUnassignedControl[] taUnassignedControls
124 Get ptaUnassignedControls to taUnassignedControls
125 For iSearch from 0 to (SizeOfArray(taUnassignedControls)-1)
126 If (IsSameComObject(vControl,taUnassignedControls[iSearch].vControl)) Begin
127 Move taUnassignedControls[iSearch].hoObject to hoObject
128 Move (SizeOfArray(taUnassignedControls)-1) to iSearch
129 End
130 Loop
131 Function_Return hoObject
132 End_Function
133
134 {MethodType=Property Category="Behaviour"}
135 {PropertyType=Boolean InitialValue=True}
136 Procedure Set pbAllowQuickAccessCustomization Boolean bAllow
137 Set pbPrivateAllowQuickAccessCustomization to bAllow
138 If (IsComObjectCreated(phoRibbonBar(Self))) Begin
139 Set ComAllowQuickAccessCustomization of (phoRibbonBar(Self)) to bAllow
140 End
141 End_Procedure
142
143 {MethodType=Property Category="Behaviour"}
144 Function pbAllowQuickAccessCustomization Returns Boolean
145 Function_Return (pbPrivateAllowQuickAccessCustomization(Self))
146 End_Function
147
148 {MethodType=Method}
149 Procedure AddToQuickAccessToolbar Handle hoItem
150 Integer eStyle
151 Boolean bBeginGroup
152 Handle hoControls
153
154 If (IsComObjectCreated(hoItem)) Begin
155 Get Create U_cCJCommandBarControls to hoControls
156 Set pvComObject of hoControls to (ComQuickAccessControls(phoRibbonBar(Self)))
157 //Store Settings
158 Get peControlStyle of hoItem to eStyle
159 Get pbControlBeginGroup of hoItem to bBeginGroup
160 //Apply Settings...
161 Set peControlStyle of hoItem to xtpButtonIcon
162 Set pbControlBeginGroup of hoItem to False
163 //Add item to Quick Access Toolbar
164 Send CreateComInstance of hoItem hoControls
165 //Reset...
166 Set peControlStyle of hoItem to eStyle
167 Set pbControlBeginGroup of hoItem to bBeginGroup
168 Send Destroy of hoControls
169 End
170 End_Procedure
171
172 {MethodType=Method}
173 Procedure Set pbAddToQuickAccessToolbar Handle hoItem Boolean bState
174 Handle[] haItems
175 Integer iItems
176
177 If (bState) Begin
178 Get phaQuickAccessItems to haItems
179 Move (SizeOfArray(haItems)) to iItems
180 Move hoItem to haItems[iItems]
181 Set phaQuickAccessItems to haItems
182 Send AddToQuickAccessToolbar hoItem
183 End
184 End_Procedure
185
186 {MethodType=Event}
187 Procedure OnCreateQuickAccessToolbar
188 Handle hoItem
189 Integer iItems iAdd
190 Handle[] haQuickAccessItems
191
192
193 Get phaQuickAccessItems to haQuickAccessItems
194 Move (SizeOfArray(haQuickAccessItems)) to iItems
195 For iAdd from 0 to (iItems-1)
196 Send AddToQuickAccessToolbar haQuickAccessItems[iAdd]
197 Loop
198 End_Procedure
199
200 Procedure DisplayTabWorkspace
201 Variant vTab
202 Handle hoTab
203 Boolean bShow
204 If (IsComObjectCreated(Self)) Begin
205 Get pbTabWorkspace to bShow
206 Get Create U_cCJTabWorkspace to hoTab
207 Get ComShowTabWorkspace bShow to vTab
208 Set pvComObject of hoTab to vTab
209 Set ComFlags of hoTab to xtpWorkspaceHideAll
210 Send destroy of hoTab
211 Send ComRecalcLayout
212 End
213 End_Procedure
214
215 {MethodType=Event}
216 Procedure OnCreateCommandBars
217 Handle hoRibbonBar
218
219 Forward Send OnCreateCommandBars
220
221 Get phoRibbonBar to hoRibbonBar
222 Set pvComObject of hoRibbonBar to (ComAddRibbonBar(Self,""))
223 Send ComEnableDocking of hoRibbonBar xtpFlagStretched
224 Send ComEnableFrameTheme of hoRibbonBar
225
226 Set pbAllowQuickAccessCustomization of hoRibbonBar to (pbPrivateAllowQuickAccessCustomization(Self))
227
228 Broadcast Send PrivateCreate (Self)
229 Send OnCreateQuickAccessToolbar
230 Send DisplayTabWorkspace
231
232 End_Procedure
233
234 {MethodType=Method Visibility=Private}
235 Procedure CreateCommandBars
236 Forward Send CreateCommandBars
237 Send OnCommandBarsCreated
238 End_Procedure
239
240 {MethodType=Event}
241 Procedure OnCommandBarsCreated
242 Handle hoControls hoHelpMenu hoHelp hoAbout
243
244 If (pbShowHelpMenu(Self)) Begin
245 Get Create U_cCJCommandBarControls to hoControls
246 Set pvComObject of hoControls to (ComControls(phoRibbonBar(Self)))
247 Get Create U_cCJMenuItem to hoHelpMenu
248 Set pbControlFlagRightAlign of hoHelpMenu to True
249 Set peControlType of hoHelpMenu to xtpControlPopup
250 Set peControlStyle of hoHelpMenu to xtpButtonIconAndCaption
251 //Set Caption, Description, Tooltip and Image for Help menu item
252 If (psHelpCaption(Self)<>"") Begin
253 Set psCaption of hoHelpMenu to (psHelpCaption(Self))
254 End
255 Else Begin
256 Set psCaption of hoHelpMenu to "&Help"
257 End
258 If (psHelpToolTip(Self)<>"") Begin
259 Set psToolTip of hoHelpMenu to (psHelpToolTip(Self))
260 End
261 Else Begin
262 Set psToolTip of hoHelpMenu to "Help"
263 End
264 If (psHelpDescription(Self)<>"") Begin
265 Set psDescription of hoHelpMenu to (psHelpDescription(Self))
266 End
267 Else Begin
268 Set psDescription of hoHelpMenu to "Access Information for learning and using this Visual DataFlex application."
269 End
270 If (psHelpImage(Self)<>"") Begin
271 Set psImage of hoHelpMenu to (psHelpImage(Self))
272 End
273 Else Begin
274 Set psImage of hoHelpMenu to "ActionHelp.ico"
275 End
276 Get Create of hoHelpMenu U_cCJHelpMenuItem to hoHelp
277 Get Create of hoHelpMenu U_cCJAboutMenuItem to hoAbout
278 Send CreateComInstance of hoHelpMenu hoControls
279
280 Send Destroy of hoControls
281 End
282
283 End_Procedure
284
285 { MethodType=Event }
286 Procedure OnUnhandledInitCommandsPopup Variant llCommandBar
287 Handle hoCommandBar hoCommandBarControls
288 Variant vCommandBarControl vCommandBarControls
289
290 Forward Send OnUnhandledInitCommandsPopup llCommandBar
291
292 Get Create U_cCJCommandbar to hoCommandBar
293 Get Create U_cCJCommandBarControls to hoCommandBarControls
294
295 Set pvComObject of hoCommandBar to llCommandBar
296 Get ComControls of hoCommandBar to vCommandBarControls
297 Set pvComObject of hoCommandBarControls to vCommandBarControls
298
299 Get ComParent of hoCommandBar to vCommandBarControl
300 If (IsSameComObject(vCommandBarControl,ComControlSystemButton(phoRibbonBar(Self)))) Begin
301 If (phoSystemButton(Self)<>0) Begin
302 Send OnPopupSystemMenuInit of (phoSystemButton(Self)) vCommandBarControl hoCommandBarControls
303 End
304 End
305 Send Destroy of hoCommandBarControls
306 Send Destroy of hoCommandBar
307 End_Procedure
308
309 Procedure OnUnhandledExecute Variant llControl
310 Handle hoObject
311
312 Get FindUnassignedObjectID llControl to hoObject
313 If (hoObject<>0) Begin
314 Send OnExecute of hoObject llControl
315 End
316 End_Procedure
317
318End_Class
319
320{DocStart = Class}
321//-----------------------------------------------------------------------------
322//
323// Class : cSigCJSystemButton
324//
325// Superclass : cCJCommandBarPopup
326//
327// Package : cSigCJRibbonBar.pkg
328//
329// Mixins :
330//
331// Description :
332//
333// Properties : psImage
334// piSystemMenuIconSize
335// pbSystemMenuShowGripper
336//
337// Events : OnPopupSystemMenuInit (Variant vCommandBarControl Handle hoCommandBarControls)
338//
339//
340// Methods : AddToSystemMenu (handle hoControl returns variant)
341// DeleteAllDynamicObjects
342//
343// Todo :
344//
345//-----------------------------------------------------------------------------
346{DocEnd}
347
348Class cSigCJSystemButton is a cCJCommandBarPopup
349
350 Procedure Construct_Object
351 Forward Send Construct_Object
352 {Visibility=Private}
353 Property Handle phoPrivateControls (Create(Self,U_cCJCommandBarControls))
354 {Visibility=Private}
355 Property String psPrivateImage ""
356 {Visibility=Private}
357 Property Integer piPrivateMenuIconSize
358 {Visibility=Private}
359 Property Boolean pbPrivateMenuGripper True
360 {Visibility=Private}
361 Property Handle[] phaAllDynamicControls
362
363 Delegate Set phoSystemButton to Self
364 End_Procedure
365
366 {MethodType=Property Category=Appearance}
367 Procedure Set psImage String sImage
368 Set psPrivateImage to sImage
369 End_Procedure
370
371 {MethodType=Property Category=Appearance}
372 Function psImage Returns String
373 Function_Return (psPrivateImage(Self))
374 End_Function
375
376 {MethodType=Property Category=Appearance}
377 {InitialValue=16,16}
378 Procedure Set piSystemMenuIconSize Integer iHeight Integer iWidth
379 Set piPrivateMenuIconSize to ((iHeight*65536)+iWidth)
380 End_Procedure
381
382 {MethodType=Property Category=Appearance}
383 Function piSystemMenuIconSize Returns Integer
384 Function_Return (piPrivateMenuIconSize(Self))
385 End_Function
386
387 {MethodType=Property Category=Appearance}
388 {PropertyType=Boolean InitialValue=True}
389 Procedure Set pbSystemMenuShowGripper Boolean bShow
390 Set pbPrivateMenuGripper to bShow
391 End_Procedure
392
393 {MethodType=Property Category=Appearance}
394 Function pbSystemMenuShowGripper Returns Boolean
395 Function_Return (pbPrivateMenuGripper(Self))
396 End_Function
397
398 {Visibility=Private}
399 Procedure PrivateCreate Handle hoParent
400 Handle hoCommandBar hoControls
401
402 Get phoPrivateControls to hoControls
403 Set pvComObject to (ComAddSystemButton(phoRibbonBar(hoParent)))
404
405 If (psImage(Self)<>"") Begin
406 Set ComIconId to (AddImage(Self,psImage(Self),0,0))
407 End
408 Get Create U_cCJCommandBar to hoCommandBar
409 Set pvComObject of hoCommandBar to (ComCommandBar(Self))
410 Set pvComObject of hoControls to (ComControls(hoCommandBar))
411
412 Send ComSetIconSize of hoCommandBar (Low(piSystemMenuIconSize(Self))) (Hi(piSystemMenuIconSize(Self)))
413 Set ComShowGripper of hoCommandBar to (pbSystemMenuShowGripper(Self))
414
415 Send Destroy of hoCommandBar
416 Broadcast Send CreateComInstance hoControls
417 End_Procedure
418
419 {DocStart = Method}
420 //-------------------------------------------------------------------------
421 //
422 // Function : AddToSystemMenu
423 //
424 // Scope : Public
425 //
426 // Paramaters : hoControl
427 //
428 // Returns : Variant
429 //
430 // Purpose : Can be called to dynamically add a control to the system button menu
431 //
432 // Notes :
433 //
434 // Todo :
435 //
436 //-------------------------------------------------------------------------
437 {DocEnd}
438
439 {MethodType=Method Visibility=Public}
440 Function AddToSystemMenu Handle hoControl Returns Variant
441 Handle[] haAllDynamicControls
442 Integer iControls
443
444 Get phaAllDynamicControls to haAllDynamicControls
445 Move (SizeOfArray(haAllDynamicControls)) to iControls
446 Move hoControl to haAllDynamicControls[iControls]
447 Set phaAllDynamicControls to haAllDynamicControls
448 Function_Return (AddDynamicControl(hoControl,phoPrivateControls(Self)))
449 End_Function
450
451 {MethodType=Method Visibility=Public}
452 Procedure DeleteAllDynamicObjects
453 Handle[] haAllDynamicControls
454 Integer iControl
455
456 Get phaAllDynamicControls to haAllDynamicControls
457 For iControl from 0 to (SizeOfArray(haAllDynamicControls)-1)
458 Send Destroy of haAllDynamicControls[iControl]
459 Loop
460 Move (ResizeArray(haAllDynamicControls,0)) to haAllDynamicControls
461 Set phaAllDynamicControls to haAllDynamicControls
462 End_Procedure
463
464 { MethodType=Event }
465 Procedure OnPopupSystemMenuInit Variant vCommandBarControl Handle hoCommandBarControls
466 End_Procedure
467
468 Procedure CreateComInstance Handle hoControls
469 End_Procedure
470
471End_Class
472
473{DocStart = Class}
474//-----------------------------------------------------------------------------
475//
476// Class : cSigCJQuickAccessToolbar
477//
478// Superclass : cCJCommandBarControls
479//
480// Package : cSigCJRibbonBar.pkg
481//
482// Mixins :
483//
484// Description : Allows developer to create an object instance into which they can add menu item objects
485//
486// Properties :
487//
488//
489// Events :
490//
491//
492// Methods :
493//
494// Todo :
495//
496//-----------------------------------------------------------------------------
497{DocEnd}
498
499Class cSigCJQuickAccessToolbar is a cCJCommandBarControls
500
501 {Visibility=Private}
502 Procedure PrivateCreate Handle hoParent
503 Handle hoCommandBar hoControls
504
505 Set pvComObject to (ComQuickAccessControls(phoRibbonBar(hoParent)))
506 Broadcast Send CreateComInstance (Self)
507 End_Procedure
508
509End_Class
510
511{DocStart = Class}
512//-----------------------------------------------------------------------------
513//
514// Class : cSigCJRibbonTab
515//
516// Superclass : cCJRibbonTab
517//
518// Package : cSigCJRibbonBar.pkg
519//
520// Mixins :
521//
522// Description :
523//
524// Properties : psCaption
525//
526//
527// Events :
528//
529//
530// Methods :
531//
532// Todo :
533//
534//-----------------------------------------------------------------------------
535{DocEnd}
536
537Class cSigCJRibbonTab is a cCJRibbonTab
538 Import_Class_Protocol cSigCJMethods_mixin
539
540 Procedure Construct_Object
541 Forward Send Construct_Object
542
543 {Visibility=Private}
544 Property String psPrivateCaption ""
545 {Visibility=Private}
546 Property Handle phoPrivateGroups (Create(Self,U_cCJRibbonGroups))
547 {Visibility=Private}
548 Property Boolean pbPrivateIsVisible True
549 End_Procedure
550
551 Function phoRibbonGroups Returns Handle
552 Function_Return (phoPrivateGroups(Self))
553 End_Function
554
555 {MethodType=Property Category="Appearance"}
556 Procedure Set psCaption String sCaption
557 Set psPrivateCaption to sCaption
558 If (IsComObjectCreated(Self)) Begin
559 Set ComCaption to sCaption
560 End
561 End_Procedure
562
563 {MethodType=Property Category="Appearance"}
564 Function psCaption Returns String
565 Function_Return (psPrivateCaption(Self))
566 End_Function
567
568 {MethodType=Property Category="Appearance"}
569 {PropertyType=Boolean InitialValue=True}
570 Procedure Set pbIsVisible Boolean bIsVisible
571 Set SigCJProperty Set_pbPrivateIsVisible Set_ComVisible to bIsVisible
572 End_Procedure
573
574 {MethodType=Property Category="Appearance"}
575 Function pbIsVisible Returns Boolean
576 Function_Return (pbPrivateIsVisible(Self))
577 End_Function
578
579 {Visibility=Private}
580 Procedure PrivateCreate Handle hoParent
581 Integer iTabCount
582 Handle hoRibbonBar
583
584 If (hoParent=0) Begin
585 Procedure_Return
586 End
587 Get phoRibbonBar of hoParent to hoRibbonBar
588 Get ComTabCount of hoRibbonBar to iTabCount
589 Set pvComObject to (ComInsertTab(hoRibbonBar,iTabCount,""))
590 Set pvComObject of (phoRibbonGroups(Self)) to (ComGroups(Self))
591 //Apply Settings
592 Set psCaption to (psPrivateCaption(Self))
593 Set pbIsVisible to (pbPrivateIsVisible(Self))
594
595 Broadcast Send PrivateCreate (Self)
596 End_Procedure
597
598End_Class
599
600{DocStart = Class}
601//-----------------------------------------------------------------------------
602//
603// Class : cSigCJRibbonTabGroup
604//
605// Superclass : cCJRibbonGroup
606//
607// Package : cSigCJRibbonBar.pkg
608//
609// Mixins :
610//
611// Description :
612//
613// Properties : psCaption
614//
615//
616// Events :
617//
618//
619// Methods :
620//
621// Todo :
622//
623//-----------------------------------------------------------------------------
624{DocEnd}
625
626Class cSigCJRibbonTabGroup is a cCJRibbonGroup
627
628 Procedure Construct_Object
629 Forward Send Construct_Object
630
631 {Visibility=Private}
632 Property String psPrivateCaption ""
633 {Visibility=Private}
634 Property Boolean pbPrivateControlsCentered False
635 End_Procedure
636
637 {MethodType=Property Category="Appearance"}
638 Procedure Set psCaption String sCaption
639 Set psPrivateCaption to sCaption
640 If (IsComObjectCreated(Self)) Begin
641 Set ComCaption to sCaption
642 End
643 End_Procedure
644
645 {MethodType=Property Category="Appearance"}
646 Function psCaption Returns String
647 Function_Return (psPrivateCaption(Self))
648 End_Function
649
650 {MethodType=Property Category="Behaviour"}
651 {PropertyType=Boolean InitialValue=False}
652 Procedure Set pbControlsCentered Boolean bCentered
653 Handle hoSettings
654 String sVersion
655
656 Set pbPrivateControlsCentered to bCentered
657 If (IsComObjectCreated(Self)) Begin
658 Get Create U_cCJCommandBarsGlobalSettings to hoSettings
659 If (not(IsComObjectCreated(hoSettings))) Begin
660 Send CreateComObject of hoSettings
661 Get ComVersion of hoSettings to sVersion
662 //ComControlsCentering Property only works with version 11.2 of the control (onwards)
663 Case Begin
664 Case (Left(sVersion,2) > "11")
665 Case ((Left(sVersion,2) = "11") and (Mid(sVersion,1,4) >= "2"))
666 Set ComControlsCentering to bCentered
667 Case Break
668 Case End
669 End
670 Send Destroy of hoSettings
671 End
672 End_Procedure
673
674 {MethodType=Property Category="Behaviour"}
675 Function pbControlsCentered Returns Boolean
676 Function_Return (pbPrivateControlsCentered(Self))
677 End_Function
678
679 {Visibility=Private}
680 Procedure PrivateCreate Handle hoParent
681 Handle hoGroups
682
683 If (hoParent=0) Begin
684 Procedure_Return
685 End
686 Get phoRibbonGroups of hoParent to hoGroups
687 Set pvComObject to (ComAddGroup(hoGroups,'',0))
688 //Apply Settings
689 Set psCaption to (psPrivateCaption(Self))
690 Set pbControlsCentered to (pbPrivateControlsCentered(Self))
691
692 Broadcast Send CreateComInstance (Self)
693 End_Procedure
694End_Class
695
696Class cCJPopupColorMenuItem is a cCJMenuItem
697
698 Procedure Construct_Object
699 Forward Send Construct_Object
700 Set peControlType to xtpControlSplitButtonPopup
701 Set pbControlPopupToolBar to True
702 End_Procedure
703
704 Function CreateCommandBarControl Handle hoControls Integer eType Integer iId Boolean bInCreateTempInstance Returns Variant
705 Variant vControl
706 Handle hoControl
707
708 Get ComCreateCommandBarControl "CXTPControlPopupColor" to vControl
709 Send ComAddControl of hoControls vControl Nothing
710 Get Create U_cCJCommandBarPopupColor to hoControl
711 Set pvComObject of hoControl to vControl
712 Set ComStyle of hoControl to xtpButtonIcon
713 Set ComId of hoControl to iId
714 Send Destroy of hoControl
715
716 Function_Return vControl
717 End_Function
718
719 Function ClassForControlType Integer eType Returns Integer
720 Function_Return U_cCJCommandBarPopupColor
721 End_Function
722
723End_Class
724
725Class cCJControlColorSelectorMenuItem is a cCJMenuItem
726
727 Procedure Construct_Object
728 Forward Send Construct_Object
729 Set peControlType to xtpControlButton
730 End_Procedure
731
732 Function CreateCommandBarControl Handle hoControls Integer eType Integer iId Boolean bInCreateTempInstance Returns Variant
733 Variant vControl
734 Handle hoControl
735
736 Get ComCreateCommandBarControl "CXTPControlColorSelector" to vControl
737 Send ComAddControl of hoControls vControl Nothing
738 Get Create U_cCJCommandBarControlColorSelector to hoControl
739 Set pvComObject of hoControl to vControl
740 Set ComId of hoControl to iId
741 Send Destroy of hoControl
742 Send RegisterUnAssignedControl Self vControl
743 Function_Return vControl
744 End_Function
745
746 Function ClassForControlType Integer eType Returns Integer
747 Function_Return U_cCJCommandBarControlColorSelector
748 End_Function
749
750End_Class
751//==============================================================================
752//End of Package - cSigCJRibbonBar.pkg
753//==============================================================================
754