home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12osr1.exe / src / FocusItr.cpp < prev    next >
C/C++ Source or Header  |  1997-03-21  |  5KB  |  177 lines

  1. /* @(#)Z 1.3 com/src/ui/FocusItr.cpp, odui, od96os2, odos29712d 97/03/21 17:20:18 (96/07/15 18:26:33) */
  2. //====START_GENERATED_PROLOG======================================
  3. //
  4. //
  5. //   COMPONENT_NAME: odui
  6. //
  7. //   CLASSES: none
  8. //
  9. //   ORIGINS: 82,27
  10. //
  11. //
  12. //   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  13. //   All Rights Reserved
  14. //   Licensed Materials - Property of IBM
  15. //   US Government Users Restricted Rights - Use, duplication or
  16. //   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  17. //       
  18. //   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  19. //   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  20. //   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  21. //   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  22. //   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  23. //   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  24. //   OR PERFORMANCE OF THIS SOFTWARE.
  25. //
  26. //====END_GENERATED_PROLOG========================================
  27. //
  28. /*
  29.     File:        FocusItr.cpp
  30.  
  31.     Contains:    xxx put contents here xxx
  32.  
  33.     Owned by:    xxx put writers here xxx
  34.  
  35.     Copyright:    ⌐ 1994 - 1995 by Apple Computer, Inc., all rights reserved.
  36.  
  37.     Change History (most recent first):
  38.  
  39.          <7>      8/3/95    RR        #1257260: Collapse B classes. Remove
  40.                                     somInit methods. Don't call IsInitialized
  41.                                     or SubclassResponsibility
  42.          <6>     6/22/95    RR        Call InitObject
  43.          <5>     5/26/95    RR        #1251403: Multithreading naming support
  44.          <4>     5/25/95    jpa        List.h --> LinkList.h [1253324]
  45.          <3>      4/7/95    RR        #1216618 Added SOM_TRY etc.
  46.          <2>     2/22/95    RR        #1209427 Changed private api between
  47.                                     iterator and iteratee
  48.          <1>     9/26/94    RR        first checked in
  49.  
  50.     To Do:
  51.     In Progress:
  52. */
  53.  
  54.  
  55. /*
  56.  *  This file was generated by the SOM Compiler.
  57.  *  Generated using: 
  58.  *      SOM Emitter emitxtm.dll: somc/smmain.c
  59.  */
  60.  
  61. #define ODFocusSetIterator_Class_Source
  62. #define VARIABLE_MACROS
  63. #include <FocusItr.xih>
  64.  
  65. #ifndef SOM_ODFocusSet_xh
  66. #include "FocusSet.xh"
  67. #endif
  68.  
  69. #ifndef SOM_Module_OpenDoc_Foci_defined
  70. #include "Foci.xh"    // For kODNULLFocus. 
  71. #endif
  72.  
  73. #ifndef _ARBUTILS_
  74. #include "ArbUtils.h"
  75. #endif
  76.  
  77. #ifndef _LINKLIST_
  78. #include <LinkList.h>
  79. #endif
  80.  
  81. #ifndef _EXCEPT_
  82. #include "Except.h"
  83. #endif
  84.  
  85.  
  86. #if !defined(_PLATFORM_OS2_) && !defined(_PLATFORM_WIN32_)
  87. #pragma segment ODFocusSet
  88. #endif
  89.  
  90. SOM_Scope ODTypeToken  SOMLINK ODFocusSetIteratorFirst(ODFocusSetIterator *somSelf, Environment *ev)
  91. {
  92.     ODFocusSetIteratorData *somThis = ODFocusSetIteratorGetData(somSelf);
  93.     ODFocusSetIteratorMethodDebug("ODFocusSetIterator","ODFocusSetIteratorFirst");
  94.  
  95.     ODTypeToken focus = kODNullFocus;
  96.     
  97.     SOM_TRY
  98.  
  99.         focus = _fFocusSet->First(ev, _fIteratorID);
  100.     
  101.     SOM_CATCH_ALL
  102.     SOM_ENDTRY
  103.     
  104.     return focus;
  105. }
  106.  
  107. SOM_Scope ODTypeToken  SOMLINK ODFocusSetIteratorNext(ODFocusSetIterator *somSelf, Environment *ev)
  108. {
  109.     ODFocusSetIteratorData *somThis = ODFocusSetIteratorGetData(somSelf);
  110.     ODFocusSetIteratorMethodDebug("ODFocusSetIterator","ODFocusSetIteratorNext");
  111.  
  112.     ODTypeToken focus = kODNullFocus;
  113.     
  114.     SOM_TRY
  115.  
  116.         focus = _fFocusSet->Next(ev, _fIteratorID);
  117.     
  118.     SOM_CATCH_ALL
  119.     SOM_ENDTRY
  120.  
  121.     return focus;
  122. }
  123.  
  124. SOM_Scope ODBoolean  SOMLINK ODFocusSetIteratorIsNotComplete(ODFocusSetIterator *somSelf, Environment *ev)
  125. {
  126.     ODFocusSetIteratorData *somThis = ODFocusSetIteratorGetData(somSelf);
  127.     ODFocusSetIteratorMethodDebug("ODFocusSetIterator","ODFocusSetIteratorIsNotComplete");
  128.  
  129.     ODBoolean isNotComplete = kODFalse;
  130.     
  131.     SOM_TRY
  132.  
  133.         isNotComplete = _fFocusSet->IsNotComplete(ev, _fIteratorID);
  134.     
  135.     SOM_CATCH_ALL
  136.     SOM_ENDTRY
  137.  
  138.     return isNotComplete;
  139. }
  140.  
  141. SOM_Scope void  SOMLINK ODFocusSetIteratorInitFocusSetIterator(ODFocusSetIterator *somSelf, Environment *ev,
  142.         ODFocusSet* focusSet)
  143. {
  144.     ODFocusSetIteratorData *somThis = ODFocusSetIteratorGetData(somSelf);
  145.     ODFocusSetIteratorMethodDebug("ODFocusSetIterator","ODFocusSetIteratorInitFocusSetIterator");
  146.  
  147.     _fFocusSet = focusSet;
  148.  
  149.     SOM_TRY
  150.     
  151.         /* Moved from somInit. SOM itself sets fields to zero
  152.         _fFocusSet = kODNULL;
  153.         _fIteratorID = 0;
  154.         */
  155.         
  156.         somSelf->InitObject(ev);
  157.     
  158.         if (_fFocusSet)
  159.             _fIteratorID = _fFocusSet->AddIterator(ev, somSelf);
  160.  
  161.     SOM_CATCH_ALL
  162.     SOM_ENDTRY
  163. }
  164.  
  165.  
  166. SOM_Scope void  SOMLINK ODFocusSetIteratorsomUninit(ODFocusSetIterator *somSelf)
  167. {
  168.     ODFocusSetIteratorData *somThis = ODFocusSetIteratorGetData(somSelf);
  169.     ODFocusSetIteratorMethodDebug("ODFocusSetIterator","ODFocusSetIteratorsomUninit");
  170.  
  171.  
  172.     _fFocusSet->RemoveIterator(somGetGlobalEnvironment(), _fIteratorID);
  173.     _fIteratorID = 0;
  174.     _fFocusSet = kODNULL;
  175.     parent_somUninit(somSelf);
  176. }
  177.