00001 // $Id: cmdctrl.cpp 1282 2006-06-09 09:46:49Z alex $ 00002 /* @@tag:xara-cn@@ DO NOT MODIFY THIS LINE 00003 ================================XARAHEADERSTART=========================== 00004 00005 Xara LX, a vector drawing and manipulation program. 00006 Copyright (C) 1993-2006 Xara Group Ltd. 00007 Copyright on certain contributions may be held in joint with their 00008 respective authors. See AUTHORS file for details. 00009 00010 LICENSE TO USE AND MODIFY SOFTWARE 00011 ---------------------------------- 00012 00013 This file is part of Xara LX. 00014 00015 Xara LX is free software; you can redistribute it and/or modify it 00016 under the terms of the GNU General Public License version 2 as published 00017 by the Free Software Foundation. 00018 00019 Xara LX and its component source files are distributed in the hope 00020 that it will be useful, but WITHOUT ANY WARRANTY; without even the 00021 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00022 See the GNU General Public License for more details. 00023 00024 You should have received a copy of the GNU General Public License along 00025 with Xara LX (see the file GPL in the root directory of the 00026 distribution); if not, write to the Free Software Foundation, Inc., 51 00027 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00028 00029 00030 ADDITIONAL RIGHTS 00031 ----------------- 00032 00033 Conditional upon your continuing compliance with the GNU General Public 00034 License described above, Xara Group Ltd grants to you certain additional 00035 rights. 00036 00037 The additional rights are to use, modify, and distribute the software 00038 together with the wxWidgets library, the wxXtra library, and the "CDraw" 00039 library and any other such library that any version of Xara LX relased 00040 by Xara Group Ltd requires in order to compile and execute, including 00041 the static linking of that library to XaraLX. In the case of the 00042 "CDraw" library, you may satisfy obligation under the GNU General Public 00043 License to provide source code by providing a binary copy of the library 00044 concerned and a copy of the license accompanying it. 00045 00046 Nothing in this section restricts any of the rights you have under 00047 the GNU General Public License. 00048 00049 00050 SCOPE OF LICENSE 00051 ---------------- 00052 00053 This license applies to this program (XaraLX) and its constituent source 00054 files only, and does not necessarily apply to other Xara products which may 00055 in part share the same code base, and are subject to their own licensing 00056 terms. 00057 00058 This license does not apply to files in the wxXtra directory, which 00059 are built into a separate library, and are subject to the wxWindows 00060 license contained within that directory in the file "WXXTRA-LICENSE". 00061 00062 This license does not apply to the binary libraries (if any) within 00063 the "libs" directory, which are subject to a separate license contained 00064 within that directory in the file "LIBS-LICENSE". 00065 00066 00067 ARRANGEMENTS FOR CONTRIBUTION OF MODIFICATIONS 00068 ---------------------------------------------- 00069 00070 Subject to the terms of the GNU Public License (see above), you are 00071 free to do whatever you like with your modifications. However, you may 00072 (at your option) wish contribute them to Xara's source tree. You can 00073 find details of how to do this at: 00074 http://www.xaraxtreme.org/developers/ 00075 00076 Prior to contributing your modifications, you will need to complete our 00077 contributor agreement. This can be found at: 00078 http://www.xaraxtreme.org/developers/contribute/ 00079 00080 Please note that Xara will not accept modifications which modify any of 00081 the text between the start and end of this header (marked 00082 XARAHEADERSTART and XARAHEADEREND). 00083 00084 00085 MARKS 00086 ----- 00087 00088 Xara, Xara LX, Xara X, Xara X/Xtreme, Xara Xtreme, the Xtreme and Xara 00089 designs are registered or unregistered trademarks, design-marks, and/or 00090 service marks of Xara Group Ltd. All rights in these marks are reserved. 00091 00092 00093 Xara Group Ltd, Gaddesden Place, Hemel Hempstead, HP2 6EX, UK. 00094 http://www.xara.com/ 00095 00096 =================================XARAHEADEREND============================ 00097 */ 00098 00099 00100 #include "camtypes.h" 00101 #include "cmdctrl.h" 00102 //#include "ensure.h" - in camtypes.h [AUTOMATICALLY REMOVED] 00103 //#include "mario.h" 00104 //#include "errors.h" - in camtypes.h [AUTOMATICALLY REMOVED] 00105 //#include "oilkeys.h" 00106 //#include "oilbtns.h" 00107 00108 DECLARE_SOURCE("$Revision: 1282 $"); 00109 00110 CC_IMPLEMENT_MEMDUMP(CmdControl, ListItem) 00111 //CC_IMPLEMENT_MEMDUMP(HotKeyO, CmdControl) 00112 //CC_IMPLEMENT_MEMDUMP(Button, CmdControl) 00113 00114 /******************************************************************************************** 00115 00116 > CmdControl::CmdControl( OpDescriptor *Owner ) 00117 00118 Author: Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com> 00119 Created: 12/10/93 00120 Inputs: Pointer to owner OpDescriptor 00121 Outputs: None 00122 Returns: None 00123 Purpose: Constructor for the CmdControl Class. 00124 Errors: None 00125 00126 ********************************************************************************************/ 00127 00128 CmdControl::CmdControl(OpDescriptor *Owner) 00129 { 00130 ENSURE( Owner, "No owner for CmdControl" ); 00131 00132 ControlId = 0; 00133 OwnerOperation = Owner; 00134 ControlState = OpState(FALSE, TRUE); 00135 00136 WhyDisabled.Empty(); 00137 } 00138 00139 /******************************************************************************************** 00140 00141 > BOOL CmdControl::IsEnabled() 00142 00143 Author: Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com> 00144 Created: 12/10/93 00145 Inputs: None 00146 Outputs: None 00147 Returns: True if CmdControl is enabled 00148 False if CmdControl is disabled 00149 Purpose: 00150 Identifies if the current CmdControl is available. This function is used when updating 00151 the state of a CmdControl. 00152 Errors: None 00153 00154 ********************************************************************************************/ 00155 00156 BOOL CmdControl::IsEnabled() 00157 { 00158 return (!ControlState.Greyed); 00159 } 00160 00161 /******************************************************************************************** 00162 00163 > String_256 *CmdControl::GetWhyDisabled() 00164 00165 Author: Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com> 00166 Created: 12/10/93 00167 Inputs: None 00168 Outputs: None 00169 Returns: If Succesful returns a string representing why the CmdControl is disabled 00170 otherwise NULL 00171 Purpose: Gets the reason why a CmdControl has been disabled 00172 Errors: None 00173 00174 ********************************************************************************************/ 00175 00176 String_256 *CmdControl::GetWhyDisabled() 00177 { 00178 return &WhyDisabled; 00179 } 00180 00181 /******************************************************************************************** 00182 00183 > void CmdControl::PerformAction() 00184 00185 Author: Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com> 00186 Created: 12/10/93 00187 Inputs: None 00188 Outputs: None 00189 Returns: None 00190 Purpose: Performs the action assoicated with a CmdControl. 00191 Errors: None 00192 00193 ********************************************************************************************/ 00194 00195 void CmdControl::PerformAction() 00196 { 00197 ENSURE(OwnerOperation, "Cannot Perform Action with NULL Owner"); 00198 00199 OwnerOperation->Invoke(); 00200 } 00201 00202 /******************************************************************************************** 00203 00204 > BOOL CmdControl::UpdateControlState() 00205 00206 Author: Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com> 00207 Created: 12/10/93 00208 Inputs: None 00209 Outputs: None 00210 Returns: TRUE if state is updated 00211 FALSE otherwise 00212 Purpose: Obtains the state of a CmdControl. 00213 Errors: None 00214 00215 ********************************************************************************************/ 00216 00217 BOOL CmdControl::UpdateControlState() 00218 { 00219 return TRUE; 00220 } 00221 00222 00223 00224 /******************************************************************************************** 00225 > virtual OpDescriptor* CmdControl::GetOpDescriptor() const 00226 00227 Author: Justin_Flude (Xara Group Ltd) <camelotdev@xara.com> 00228 Created: 23/5/95 00229 Returns: A pointer to the OpDescriptor associated with this object. 00230 ********************************************************************************************/ 00231 00232 OpDescriptor* CmdControl::GetOpDescriptor() const 00233 { 00234 return OwnerOperation; 00235 } 00236 00237 00238 00239 00240 /******************************************************************************************** 00241 HotKeyO CLASS 00242 ********************************************************************************************/ 00243 00244 // Here is the static list that belongs to OpDescriptor 00245 //List HotKeyO::HotKeys; 00246 00247 00248 /******************************************************************************************** 00249 00250 > HotKeyO::HotKeyO( OpDescriptor *Owner, String_256* MenuText ) 00251 00252 Author: Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com> 00253 Created: 13/10/93 00254 Inputs: Pointer to owner OpDescriptor 00255 Outputs: None 00256 Returns: None 00257 Purpose: Constructor for the HotKey Class.HotKey 00258 Errors: None 00259 00260 ********************************************************************************************/ 00261 00262 /* 00263 HotKeyO::HotKeyO( OpDescriptor *Owner, String_256* MenuText ) 00264 : CmdControl(Owner) 00265 { 00266 ControlId = GetNextAutomaticHotKeyID(); 00267 Owner->GetText(&Description, OP_DESC_TEXT); 00268 MenuTextDesc = *MenuText; 00269 LinkHotKey(this); 00270 } 00271 */ 00272 /******************************************************************************************** 00273 00274 > UINT32 HotKeyO::GetHotKeyId() 00275 00276 Author: Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com> 00277 Created: 13/10/93 00278 Inputs: None 00279 Outputs: None 00280 Returns: HotKey Id of current HotKey 00281 Purpose: Gets the HotKey Id of the current HotKey. 00282 Errors: None 00283 00284 ********************************************************************************************/ 00285 00286 /* 00287 UINT32 HotKeyO::GetHotKeyId() 00288 { 00289 return ControlId; 00290 } 00291 */ 00292 /******************************************************************************************** 00293 00294 > BOOL HotKeyO::UpdateControlState() 00295 00296 Author: Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com> 00297 Created: 13/10/93 00298 Inputs: None 00299 Outputs: None 00300 Returns: TRUE if state is updated 00301 FALSE otherwise 00302 Purpose: Obtains the state of a HotKey. 00303 Errors: None 00304 00305 **************************** ****************************************************************/ 00306 00307 /* 00308 BOOL HotKeyO::UpdateControlState() 00309 { 00310 ENSURE(OwnerOperation, "Cannot update the state of a NULL operation"); 00311 00312 String_256 HotKeyDesc; 00313 00314 // get new hotkey state 00315 OpState newState = OwnerOperation->GetOpsState( &HotKeyDesc); 00316 00317 // if a description has been returned 00318 if (!HotKeyDesc.IsEmpty() && (newState.Greyed)) 00319 { 00320 String_256 disabledStub(_R(IDS_DISABLED_BECAUSE)); 00321 00322 WhyDisabled = disabledStub; 00323 00324 // Set up reason why item is disabled 00325 WhyDisabled += HotKeyDesc; 00326 } 00327 00328 // if the state has changed 00329 if ((newState.Greyed != ControlState.Greyed) || // if changed then 00330 (newState.Ticked != ControlState.Ticked)) 00331 { 00332 ControlState = newState; // record new state 00333 return TRUE; 00334 } 00335 00336 return FALSE; 00337 } 00338 */ 00339 /******************************************************************************************** 00340 00341 > String_256 *HotKeyO::GetDescription() 00342 00343 Author: Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com> 00344 Created: 18/10/93 00345 Inputs: None 00346 Outputs: None 00347 Returns: If Succesfull returns a string representing a description of the HotKey 00348 otherwise NULL 00349 Purpose: Gets HotKey Text Description. 00350 Errors: None 00351 00352 ********************************************************************************************/ 00353 00354 /* 00355 String_256 *HotKeyO::GetDescription() 00356 { 00357 return &Description; 00358 } 00359 */ 00360 /******************************************************************************************** 00361 00362 > String_256 *HotKeyO::GetMenuTextDesc() 00363 00364 Author: Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com> 00365 Created: 10/11/93 00366 Inputs: None 00367 Outputs: None 00368 Returns: If Succesfull returns a string representing a menu text of the HotKey 00369 otherwise NULL 00370 Purpose: Gets HotKey Menu Text Description. 00371 Errors: None 00372 00373 ********************************************************************************************/ 00374 00375 /* 00376 String_256 *HotKeyO::GetMenuTextDesc() 00377 { 00378 return &MenuTextDesc; 00379 } 00380 00381 // this is used to automatically create unique HotKey IDs. It ranges from two (OIL specific) 00382 // values, AUTO_HKEY_ID_MIN and AUTO_HKEY_ID_MAX inclusive (defined in oilmenus.h) 00383 00384 UINT32 HotKeyO::AutomaticHotKeyID = AUTO_HKEY_ID_MIN; 00385 00386 */ 00387 /******************************************************************************************** 00388 00389 > static UINT32 GetNextAutomaticHotKeyID() 00390 00391 Author: Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com> 00392 Created: 13/10/93 00393 Inputs: None 00394 Outputs: None 00395 Returns: The next automatic HotKey ID value 00396 Purpose: Creates a unique ID for each HotKey, based on a monotonic increasing value 00397 (whose range is determined by the OIL layer). When the range fills, a search 00398 is done to find individual unused IDs. 00399 Friend: HotKey 00400 Errors: Will ENSURE when range is filled. 00401 Scope: Private 00402 00403 ********************************************************************************************/ 00404 00405 /* 00406 UINT32 HotKeyO::GetNextAutomaticHotKeyID() 00407 { 00408 if (AutomaticHotKeyID > AUTO_HKEY_ID_MAX) 00409 { 00410 // we have run out of IDs, so search for gaps in the allocation 00411 // UNFINISHED CODE!! 00412 ENSURE( FALSE, "Run out of HotKey IDs" ); 00413 return 0; 00414 } 00415 else 00416 { 00417 return AutomaticHotKeyID++; // return old value, inc for next time 00418 } 00419 00420 } 00421 */ 00422 /******************************************************************************************** 00423 00424 > HotKeyO* HotKeyO::FindHotKey(UINT32 HotKeyId) 00425 00426 Author: Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com> 00427 Created: 13/10/93 00428 Inputs: HotKey Identifier 00429 Returns: a pointer to the HotKey, or NULL if it could not be found 00430 Purpose: To search the HotKey list and find the HotKey described by the id passed in. 00431 00432 ********************************************************************************************/ 00433 00434 /* 00435 HotKeyO* HotKeyO::FindHotKey(UINT32 HotKeyId) 00436 { 00437 HotKeyO* CurrentItem = GetFirstHotKey(); 00438 00439 while (CurrentItem != NULL) 00440 { 00441 // if we have found a match, return a pointer to it 00442 if ( CurrentItem -> GetHotKeyId() == HotKeyId ) 00443 return CurrentItem; 00444 00445 CurrentItem = GetNextHotKey( CurrentItem ); // next item in the list 00446 } 00447 00448 return NULL; // failed to find a match, so return null 00449 } 00450 00451 */ 00452 /******************************************************************************************** 00453 00454 > HotKeyO* HotKeyO::FindHotKey(OpDescriptor* OpDesc) 00455 00456 Author: Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com> 00457 Created: 13/10/93 00458 Inputs: pointer to a op descriptor 00459 Returns: a pointer to the HotKey, or NULL if it could not be found 00460 Purpose: To search the HotKey list and find the HotKey containing the 00461 opdescriptor passed in. 00462 00463 ********************************************************************************************/ 00464 00465 /* 00466 HotKeyO* HotKeyO::FindHotKey(OpDescriptor* OpDesc) 00467 { 00468 HotKeyO* CurrentItem = GetFirstHotKey(); 00469 00470 while (CurrentItem != NULL) 00471 { 00472 // if we have found a match, return a pointer to it 00473 if ( CurrentItem -> OwnerOperation == OpDesc ) 00474 return CurrentItem; 00475 00476 CurrentItem = GetNextHotKey( CurrentItem ); // next item in the list 00477 } 00478 00479 return NULL; // failed to find a match, so return null 00480 } 00481 00482 */ 00483 /******************************************************************************************** 00484 00485 > void HotKeyO::DestroyAll() 00486 00487 Author: Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com> 00488 Created: 13/10/93 00489 Purpose: Since the HotKey maintains its own static list of all the 00490 HotKeys created in the program, and since none of them are actually 00491 destroyed with a call to a destructor, we have to do it ourselves by 00492 a call to this function in the DeInit kernel type of function. Basically 00493 it walks through the list of OpDescriptors and destroys them all. 00494 00495 ********************************************************************************************/ 00496 00497 /* 00498 void HotKeyO::DestroyAll() 00499 { 00500 ListItem* Item; 00501 00502 while( (Item = HotKeys.RemoveHead()) != NULL ) 00503 delete Item; 00504 } 00505 */ 00506 /******************************************************************************************** 00507 Button CLASS 00508 ********************************************************************************************/ 00509 /* 00510 00511 // Here is the static list that belongs to OpDescriptor 00512 List Button::ButtonBar; 00513 00514 UINT32 Button::NumberOfButtons = 0; 00515 UINT32 Button::NumberOfSeparators = 0; 00516 */ 00517 /******************************************************************************************** 00518 00519 > Button::Button( OpDescriptor *Owner, BOOL separator, UINT32 BitMapNo) 00520 00521 Author: Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com> 00522 Created: 13/10/93 00523 Inputs: Pointer to owner OpDescriptor 00524 Separator - TRUE if button is followed by a separator, FALSE otherwise 00525 BitMapNo - BitMap id of button icon 00526 Outputs: None 00527 Returns: None 00528 Purpose: Constructor for the Button Class. 00529 Errors: None 00530 00531 ********************************************************************************************/ 00532 00533 /* 00534 Button::Button( OpDescriptor *Owner, BOOL Separator, UINT32 BitMapNo) 00535 : CmdControl(Owner) 00536 { 00537 ControlId = GetNextAutomaticButtonID(); 00538 00539 Owner->GetText(&Description, OP_DESC_TEXT); 00540 00541 NumberOfButtons++; 00542 00543 FollowedBySeparator = Separator; 00544 00545 if (FollowedBySeparator) 00546 NumberOfSeparators++; 00547 00548 BitMapOffset = BitMapNo; 00549 00550 LinkButton(this); 00551 } 00552 */ 00553 /******************************************************************************************** 00554 00555 > UINT32 Button::GetButtonId() 00556 00557 Author: Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com> 00558 Created: 13/10/93 00559 Inputs: None 00560 Outputs: None 00561 Returns: Button Id of current Button 00562 Purpose: Gets the Button Id of the current Button. 00563 Errors: None 00564 00565 ********************************************************************************************/ 00566 00567 /* 00568 UINT32 Button::GetButtonId() 00569 { 00570 return ControlId; 00571 } 00572 */ 00573 /******************************************************************************************** 00574 00575 > BOOL Button::UpdateControlState() 00576 00577 Author: Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com> 00578 Created: 13/10/93 00579 Inputs: None 00580 Outputs: None 00581 Returns: TRUE if state is updated 00582 FALSE otherwise 00583 Purpose: Obtains the state of a Button. 00584 Errors: None 00585 00586 *********************************************************************************************/ 00587 00588 /* 00589 BOOL Button::UpdateControlState() 00590 { 00591 ENSURE(OwnerOperation, "Cannot update the state of a NULL operation"); 00592 00593 String_256 ButtonDesc; 00594 00595 // get new Button state 00596 OpState newState = OwnerOperation->GetOpsState( &ButtonDesc); 00597 00598 // if a description has been returned 00599 if (!ButtonDesc.IsEmpty() && (newState.Greyed)) 00600 { 00601 String_256 disabledStub(_R(IDS_DISABLED_BECAUSE)); 00602 00603 WhyDisabled = disabledStub; 00604 00605 // Set up reason why item is disabled 00606 WhyDisabled += ButtonDesc; 00607 } 00608 00609 // if the state has changed 00610 if ((newState.Greyed != ControlState.Greyed) || // if changed then 00611 (newState.Ticked != ControlState.Ticked)) 00612 { 00613 ControlState = newState; // record new state 00614 return TRUE; 00615 } 00616 00617 return FALSE; 00618 } 00619 */ 00620 /******************************************************************************************** 00621 00622 > String_256 *Button::GetDescription() 00623 00624 Author: Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com> 00625 Created: 18/10/93 00626 Inputs: None 00627 Outputs: None 00628 Returns: If Succesfull returns a string representing a description of the Button 00629 otherwise NULL 00630 Purpose: Gets Button Text Description. 00631 Errors: None 00632 00633 ********************************************************************************************/ 00634 00635 /* 00636 String_256 *Button::GetDescription() 00637 { 00638 return &Description; 00639 } 00640 00641 // this is used to automatically create unique Button IDs. It ranges from two (OIL specific) 00642 // values, AUTO_HKEY_ID_MIN and AUTO_HKEY_ID_MAX inclusive (defined in oilmenus.h) 00643 00644 UINT32 Button::AutomaticButtonID = AUTO_BUTN_ID_MIN; 00645 00646 */ 00647 /******************************************************************************************** 00648 00649 > static UINT32 GetNextAutomaticButtonID() 00650 00651 Author: Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com> 00652 Created: 13/10/93 00653 Inputs: None 00654 Outputs: None 00655 Returns: The next automatic Button ID value 00656 Purpose: Creates a unique ID for each Button, based on a monotonic increasing value 00657 (whose range is determined by the OIL layer). When the range fills, a search 00658 is done to find individual unused IDs. 00659 Friend: Button 00660 Errors: Will ENSURE when range is filled. 00661 Scope: Private 00662 00663 ********************************************************************************************/ 00664 00665 /* 00666 UINT32 Button::GetNextAutomaticButtonID() 00667 { 00668 if (AutomaticButtonID > AUTO_BUTN_ID_MAX) 00669 { 00670 // we have run out of IDs, so search for gaps in the allocation 00671 // UNFINISHED CODE!! 00672 ENSURE( FALSE, "Run out of Button IDs" ); 00673 return 0; 00674 } 00675 else 00676 { 00677 return AutomaticButtonID++; // return old value, inc for next time 00678 } 00679 00680 } 00681 */ 00682 /******************************************************************************************** 00683 00684 > Button* Button::FindButton(UINT32 ButtonId) 00685 00686 Author: Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com> 00687 Created: 13/10/93 00688 Inputs: Button Identifier 00689 Returns: a pointer to the Button or NULL if it could not be found 00690 Purpose: To search the Button list and find the Button described by the id passed in. 00691 00692 ********************************************************************************************/ 00693 00694 /* 00695 Button* Button::FindButton(UINT32 ButtonId) 00696 { 00697 Button* CurrentItem = GetFirstButton(); 00698 00699 while (CurrentItem != NULL) 00700 { 00701 // if we have found a match, return a pointer to it 00702 if ( CurrentItem -> GetButtonId() == ButtonId ) 00703 return CurrentItem; 00704 00705 CurrentItem = GetNextButton( CurrentItem ); // next item in the list 00706 } 00707 00708 return NULL; // failed to find a match, so return null 00709 } 00710 00711 00712 */ 00713 /******************************************************************************************** 00714 00715 > void Button::DestroyAll() 00716 00717 Author: Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com> 00718 Created: 13/10/93 00719 Purpose: Since the Button maintains its own static list of all the 00720 Buttons created in the program, and since none of them are actually 00721 destroyed with a call to a destructor, we have to do it ourselves by 00722 a call to this function in the DeInit kernel type of function. Basically 00723 it walks through the list of OpDescriptors and destroys them all. 00724 00725 ********************************************************************************************/ 00726 00727 /* 00728 void Button::DestroyAll() 00729 { 00730 ListItem* Item; 00731 00732 while( (Item = ButtonBar.RemoveHead()) != NULL ) 00733 delete Item; 00734 } 00735 00736 */