home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / Button / Sources / Select.cpp < prev    next >
Encoding:
Text File  |  1996-09-17  |  3.6 KB  |  142 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                Select.cpp
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Author:                M.Boetcher
  7. //
  8. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #ifndef SELECT_H
  13. #include "Select.h"
  14. #endif
  15.  
  16. #ifndef PART_H
  17. #include "Part.h"
  18. #endif
  19.  
  20. #ifndef BINDING_K
  21. #include "Binding.k"
  22. #endif
  23.  
  24. #ifndef ACTIONS_H
  25. #include "Actions.h"
  26. #endif
  27.  
  28. #ifndef CONTENT_H
  29. #include "Content.h"
  30. #endif
  31.  
  32. // ----- Framework Includes -----
  33.  
  34. #ifndef FWPRESEN_H
  35. #include "FWPresen.h"
  36. #endif
  37.  
  38. // ----- OS Layer -----
  39.  
  40. #ifndef FWBARRAY_H
  41. #include "FWBArray.h"
  42. #endif
  43.  
  44. #ifndef FWMEMMGR_H
  45. #include "FWMemMgr.h"
  46. #endif
  47.  
  48. // ----- OpenDoc Includes -----
  49.  
  50. #ifndef SOM_Module_OpenDoc_StdProps_defined
  51. #include <StdProps.xh>
  52. #endif
  53.  
  54. // ----- Macintosh Includes -----
  55.  
  56. #if defined(FW_BUILD_MAC) && !defined(__DRAG__)
  57. #include <Drag.h>
  58. #endif
  59.  
  60. //========================================================================================
  61. //    Runtime information
  62. //========================================================================================
  63.  
  64. #ifdef FW_BUILD_MAC
  65. #pragma segment odfbutton
  66. #endif
  67.  
  68. FW_DEFINE_AUTO(CButtonSelection)
  69.     
  70. //========================================================================================
  71. //    CLASS CButtonSelection
  72. //========================================================================================
  73.  
  74. //----------------------------------------------------------------------------------------
  75. //    CButtonSelection constructor
  76. //----------------------------------------------------------------------------------------
  77.  
  78. CButtonSelection::CButtonSelection(Environment* ev, CButtonContent* content) :
  79.     FW_CSelection(ev, FALSE, FALSE),
  80.     fSelectedContent(content)
  81. {
  82. }
  83.  
  84. //----------------------------------------------------------------------------------------
  85. //    CButtonSelection destructor
  86. //----------------------------------------------------------------------------------------
  87.  
  88. CButtonSelection::~CButtonSelection()
  89. {
  90. }
  91.  
  92. //----------------------------------------------------------------------------------------
  93. //    CButtonSelection::CloseSelection
  94. //----------------------------------------------------------------------------------------
  95.  
  96. void CButtonSelection::CloseSelection(Environment* ev)
  97. {
  98. FW_UNUSED(ev);
  99.     // Nothing to do
  100. }
  101.  
  102. //----------------------------------------------------------------------------------------
  103. //    CButtonSelection::ClearSelection
  104. //----------------------------------------------------------------------------------------
  105.  
  106. void CButtonSelection::ClearSelection(Environment* ev)
  107. {
  108. FW_UNUSED(ev);
  109.     // Nothing to do
  110. }
  111.  
  112. //----------------------------------------------------------------------------------------
  113. //    CButtonSelection::IsEmpty
  114. //----------------------------------------------------------------------------------------
  115.  
  116. FW_Boolean CButtonSelection::IsEmpty(Environment* ev) const
  117. {
  118. FW_UNUSED(ev);
  119.     return fSelectedContent->GetAction() == NULL;
  120. }
  121.  
  122. //----------------------------------------------------------------------------------------
  123. //    CButtonSelection::SelectAll
  124. //----------------------------------------------------------------------------------------
  125.  
  126. void CButtonSelection::SelectAll(Environment* ev)
  127. {
  128. FW_UNUSED(ev);
  129.     // Nothing to do
  130. }
  131.  
  132. //----------------------------------------------------------------------------------------
  133. //    CButtonSelection::GetSelectedContent
  134. //----------------------------------------------------------------------------------------
  135.  
  136. FW_CContent* CButtonSelection::GetSelectedContent(Environment* ev)
  137. {
  138. FW_UNUSED(ev);
  139.     return fSelectedContent;
  140. }
  141.  
  142.