home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / YellowBox / Kits / MiscTableScroll-138.1 / Palettes / MiscTableScroll / Framework / MiscDelegateFlags.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-31  |  5.0 KB  |  118 lines

  1. #ifndef __MiscDelegateFlags_h
  2. #define __MiscDelegateFlags_h
  3. #ifdef __GNUC__
  4. #pragma interface
  5. #endif
  6. //=============================================================================
  7. //
  8. //  Copyright (C) 1995,1996,1997,1998 by Paul S. McCarthy and Eric Sunshine.
  9. //        Written by Paul S. McCarthy and Eric Sunshine.
  10. //                All Rights Reserved.
  11. //
  12. //    This notice may not be removed from this source code.
  13. //
  14. //    This object is included in the MiscKit by permission from the authors
  15. //    and its use is governed by the MiscKit license, found in the file
  16. //    "License.rtf" in the MiscKit distribution.  Please refer to that file
  17. //    for a list of all applicable permissions and restrictions.
  18. //
  19. //=============================================================================
  20. //-----------------------------------------------------------------------------
  21. // MiscDelegateFlags.h
  22. //
  23. //    Flags indicating which selectors a delegate responds to.
  24. //
  25. //-----------------------------------------------------------------------------
  26. //-----------------------------------------------------------------------------
  27. // $Id: MiscDelegateFlags.h,v 1.10 98/03/29 23:42:18 sunshine Exp $
  28. // $Log:    MiscDelegateFlags.h,v $
  29. // Revision 1.10  98/03/29  23:42:18  sunshine
  30. // v138.1: Added -tableScroll:shouldDelayWindowOrderingForEvent:.
  31. // 
  32. // Revision 1.9  98/03/23  07:46:41  sunshine
  33. // v134.1: Eliminated -tableScroll:edit:atRow:column:.
  34. // 
  35. // Revision 1.8  97/06/18  10:26:48  sunshine
  36. // v125.9: highlightTextColor --> selectedTextColor
  37. // highlightBackgroundColor --> selectedBackgroundColor
  38. // buffCount --> bufferCount
  39. //-----------------------------------------------------------------------------
  40. #include "bool.h"
  41. extern "Objective-C" {
  42. #import <Foundation/NSObject.h>
  43. }
  44.  
  45. class MiscDelegateFlags
  46.     {
  47. public:
  48.     enum Selector
  49.     {
  50.     DEL_SLOT_DRAGGED,        // tableScroll:border:slotDraggedFro...
  51.     DEL_SLOT_REVERSED,        // tableScroll:border:slotSortReversed:
  52.     DEL_SLOT_RESIZED,        // tableScroll:border:slotResized:
  53.     DEL_CHANGE_FONT,        // tableScroll:changeFont:to:
  54.     DEL_FONT_CHANGED,        // tableScroll:fontChangedFrom:to:
  55.     DEL_BACK_COLOR_CHANGED,        // tableScroll:backgroundColorChange...
  56.     DEL_BACK_SEL_COLOR_CHANGED,    // tableScroll:selectedBackgroundCol...
  57.     DEL_TEXT_COLOR_CHANGED,        // tableScroll:textColorChangedTo:
  58.     DEL_TEXT_SEL_COLOR_CHANGED,    // tableScroll:selectedTextColorChan...
  59.     DEL_GET_ISEARCH_COL,        // tableScroll:getISearchColumn:
  60.     DEL_BUFFER_COUNT,        // tableScrollBufferCount:
  61.     DEL_SLOT_PROTOTYPE,        // tableScroll:border:slotPrototype:
  62.     DEL_SLOT_TITLE,            // tableScroll:border:slotTitle:
  63.     DEL_CELL_AT,            // tableScroll:cellAtRow:column:
  64.     DEL_REVIVE_CELL,        // tableScroll:reviveCell:atRow:column:
  65.     DEL_RETIRE_CELL,        // tableScroll:retireCell:atRow:column:
  66.     DEL_TAG_AT,            // tableScroll:tagAtRow:column:
  67.     DEL_INT_VALUE_AT,        // tableScroll:intValueAtRow:column:
  68.     DEL_FLOAT_VALUE_AT,        // tableScroll:floatValueAtRow:column:
  69.     DEL_DOUBLE_VALUE_AT,        // tableScroll:doubleValueAtRow:column:
  70.     DEL_STRING_VALUE_AT,        // tableScroll:stringValueAtRow:column:
  71.     DEL_TITLE_AT,            // tableScroll:titleAtRow:column:
  72.     DEL_STATE_AT,            // tableScroll:stateAtRow:column:
  73.     DEL_REGISTER_SERVICE_TYPES,    // tableScrollRegisterServicesTypes:
  74.     DEL_VALID_REQUESTOR,        // tableScroll:validRequestorForSend...
  75.     DEL_CAN_WRITE_PB_TYPE,        // tableScroll:canWritePboardType:
  76.     DEL_STRING_FOR_PB_TYPE,        // tableScroll:stringForPboardType:
  77.     DEL_WRITE_SEL_TO_PB_TYPES,    // tableScroll:writeSelectionToPaste...
  78.     DEL_READ_SEL_FROM_PB,        // tableScroll:readSelectionFromPast...
  79.     DEL_ALLOW_DRAG,            // tableScroll:allowDragOperationAtR...
  80.     DEL_PREPARE_PB_FOR_DRAG,    // tableScroll:preparePasteboard:for...
  81.     DEL_IMAGE_FOR_DRAG,        // tableScroll:imageForDragOperation...
  82.     DEL_DRAG_OP_MASK,        // tableScroll:draggingSourceOperati...
  83.     DEL_DRAG_IGNORE_MODIFIERS,    // tableScrollIgnoreModifierKeysWhil...
  84.     DEL_DRAG_DELAY_WIN_ORDERING,    // tableScroll:shouldDelayWindowOrde...
  85.     DEL_WILL_PRINT,            // tableScrollWillPrint:
  86.     DEL_DID_PRINT,            // tableScrollDidPrint:
  87.     DEL_PRINT_PAGE_HEADER,        // tableScroll:willPrintPageHeader:i...
  88.     DEL_PRINT_PAGE_FOOTER,        // tableScroll:willPrintPageFooter:i...
  89.     DEL_CAN_EDIT_AT,        // tableScroll:canEdit:atRow:column:
  90.     DEL_SET_STRINGVALUE_AT,        // tableScroll:setStringValue:atRow:...
  91.     DEL_ABORT_EDIT_AT,        // tableScroll:abortEditAtRow:column:
  92.     DEL_WILL_EDIT_AT,        // tableScroll:willEditAtRow:column:
  93.     DEL_DID_EDIT_AT,        // tableScroll:didEdit:atRow:column:
  94.     DEL_TEXT_DID_END,        // controlTextDidEndEditing:
  95.     DEL_TEXT_DID_CHANGE,        // controlTextDidBeginEditing:
  96.     DEL_TEXT_DID_GET_KEYS,        // controlTextDidChange:
  97.     DEL_TEXT_WILL_CHANGE,        // control:textShouldBeginEditing:
  98.     DEL_TEXT_WILL_END,        // control:textShouldEndEditing:
  99.  
  100.     MAX_DEL_ENUM,
  101.     BAD_DEL_ENUM = -1
  102.     };
  103.  
  104. private:
  105.     int const SET_SIZE = ((MAX_DEL_ENUM - 1) / 8) + 1;
  106.     unsigned char set[ SET_SIZE ];
  107.  
  108. public:
  109.     MiscDelegateFlags( id delegate = 0 ) { setDelegate( delegate ); }
  110.     void setDelegate( id delegate );
  111.     bool respondsTo( Selector ) const;
  112.  
  113.     static SEL selToObjc( Selector );
  114.     static Selector objcToSel( SEL );    // Returns BAD_DEL_ENUM if not found.
  115.     };
  116.  
  117. #endif // __MiscDelegateFlags_h
  118.