This is MiscDelegateFlags.h in view mode; [Download] [Up]
#ifndef __MiscDelegateFlags_h #define __MiscDelegateFlags_h #ifdef __GNUC__ # pragma interface #endif //============================================================================= // // Copyright (C) 1995-1997 by Paul S. McCarthy and Eric Sunshine. // Written by Paul S. McCarthy and Eric Sunshine. // All Rights Reserved. // // This notice may not be removed from this source code. // // This object is included in the MiscKit by permission from the authors // and its use is governed by the MiscKit license, found in the file // "License.rtf" in the MiscKit distribution. Please refer to that file // for a list of all applicable permissions and restrictions. // //============================================================================= //----------------------------------------------------------------------------- // MiscDelegateFlags.h // // Flags indicating which selectors a delegate responds to. // //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // $Id: MiscDelegateFlags.h,v 1.6 97/07/01 10:34:29 sunshine Exp $ // $Log: MiscDelegateFlags.h,v $ // Revision 1.6 97/07/01 10:34:29 sunshine // v128: Fixed bug: Text color and highlighted text color delegate messages // were reversed. One was sent when the other should have been & vice versa. // // Revision 1.5 96/12/30 16:21:55 zarnuk // Added editing call backs. // // Revision 1.4 96/10/24 22:44:37 zarnuk // Added printing messages. //----------------------------------------------------------------------------- #include "bool.h" extern "Objective-C" { #import <objc/Object.h> } class MiscDelegateFlags { public: enum Selector { DEL_SLOT_DRAGGED, // tableScroll:border:slotDraggedFro... DEL_SLOT_REVERSED, // tableScroll:border:slotSortReversed: DEL_SLOT_RESIZED, // tableScroll:border:slotResized: DEL_CHANGE_FONT, // tableScroll:changeFont:to: DEL_FONT_CHANGED, // tableScroll:fontChangedFrom:to: DEL_BACK_COLOR_CHANGED, // tableScroll:backgroundColorChange... DEL_BACKH_COLOR_CHANGED, // tableScroll:highlightBackgroundCo... DEL_TEXT_COLOR_CHANGED, // tableScroll:textColorChangedTo: DEL_TEXTH_COLOR_CHANGED, // tableScroll:highlightTextColorCha... DEL_GET_ISEARCH_COL, // tableScroll:getISearchCol: DEL_BUFF_COUNT, // tableScrollBuffCount: DEL_SLOT_PROTOTYPE, // tableScroll:border:slotPrototype: DEL_SLOT_TITLE, // tableScroll:border:slotTitle: DEL_CELL_AT, // tableScroll:cellAt:: DEL_REVIVE_CELL, // tableScroll:reviveCell:at:: DEL_RETIRE_CELL, // tableScroll:retireCell:at:: DEL_TAG_AT, // tableScroll:tagAt:: DEL_INT_VALUE_AT, // tableScroll:intValueAt:: DEL_FLOAT_VALUE_AT, // tableScroll:floatValueAt:: DEL_DOUBLE_VALUE_AT, // tableScroll:doubleValueAt:: DEL_STRING_VALUE_AT, // tableScroll:stringValueAt:: DEL_TITLE_AT, // tableScroll:titleAt:: DEL_STATE_AT, // tableScroll:stateAt:: DEL_REGISTER_SERVICE_TYPES, // tableScrollRegisterServicesTypes: DEL_VALID_REQUESTOR, // tableScroll:validRequestorForSend... DEL_CAN_WRITE_PB_TYPE, // tableScroll:canWritePboardType: DEL_WRITE_PB_TYPE_TO_STREAM, // tableScroll:writePboard:type:toSt... DEL_WRITE_SEL_TO_PB_TYPES, // tableScroll:writeSelectionToPaste... DEL_READ_SEL_FROM_PB, // tableScroll:readSelectionFromPast... DEL_ALLOW_DRAG, // tableScroll:allowDragOperationAt:... DEL_PREPARE_PB_FOR_DRAG, // tableScroll:preparePasteboard:for... DEL_IMAGE_FOR_DRAG, // tableScroll:imageForDragOperation... DEL_DRAG_OP_MASK, // tableScroll:draggingSourceOperati... DEL_DRAG_IGNORE_MODIFIERS, // tableScrollIgnoreModifierKeysWhil... DEL_WILL_PRINT, // tableScrollWillPrint: DEL_DID_PRINT, // tableScroll:didPrint: DEL_PRINT_PAGE_HEADER, // tableScroll:willPrintPageHeader:i... DEL_PRINT_PAGE_FOOTER, // tableScroll:willPrintPageFooter:i... DEL_CAN_EDIT_AT, // tableScroll:canEdit:at:: DEL_EDIT_AT, // tableScroll:edit:at:: DEL_SET_STRINGVALUE_AT, // tableScroll:setStringValue:at:: DEL_ABORT_EDIT_AT, // tableScroll:abortEditAt:: DEL_WILL_EDIT_AT, // tableScroll:willEditAt:: DEL_DID_EDIT_AT, // tableScroll:didEdit:at:: DEL_TEXT_DID_END, // textDidEnd:endChar: DEL_TEXT_DID_CHANGE, // textDidChange: DEL_TEXT_DID_GET_KEYS, // textDidGetKeys:isEmpty: DEL_TEXT_WILL_CHANGE, // textWillChange: DEL_TEXT_WILL_END, // textWillEnd: MAX_DEL_ENUM, BAD_DEL_ENUM = -1 }; private: int const SET_SIZE = ((MAX_DEL_ENUM - 1) / 8) + 1; unsigned char set[ SET_SIZE ]; public: MiscDelegateFlags( id delegate = 0 ) { setDelegate( delegate ); } void setDelegate( id delegate ); bool respondsTo( Selector ) const; static SEL selToObjc( Selector ); static Selector objcToSel( SEL ); // Returns BAD_DEL_ENUM if not found. }; #endif // __MiscDelegateFlags_h
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.