This is MiscTableUtil.h in view mode; [Download] [Up]
#ifndef __MiscTableUtil_h #define __MiscTableUtil_h //============================================================================= // // Copyright (C) 1995 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. // //============================================================================= //----------------------------------------------------------------------------- // MiscTableTypes.h // // Common inline functions used by the MiscTableScroll object. // //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // $Id: MiscTableUtil.h,v 1.1 95/09/27 12:21:21 zarnuk Exp $ // $Log: MiscTableUtil.h,v $ // Revision 1.1 95/09/27 12:21:21 zarnuk // Initial revision // //----------------------------------------------------------------------------- #include <MiscTableTypes.h> #include "bool.h" inline MiscBorderType otherBorder( MiscBorderType t ) { return (t == MISC_COL_BORDER) ? MISC_ROW_BORDER : MISC_COL_BORDER; } inline bool isFixed( MiscTableSizing x ) { return x == MISC_NUSER_NDATA_NSPRINGY_SIZING; } inline bool isSpringy( MiscTableSizing x ) { return (((int)x) & MISC_SIZING_SPRINGY_BIT) != 0; } inline bool isSizeable( MiscTableSizing x ) { return (((int)x) & MISC_SIZING_USER_BIT) != 0; } inline bool isData( MiscTableSizing x ) { return (((int)x) & MISC_SIZING_DATA_BIT) != 0; } inline MiscTableSizing setAttribute( MiscTableSizing x, int bit, bool b ) { return (MiscTableSizing) (b ? ((int)x | bit) : ((int)x & ~bit)); } inline MiscTableSizing setSpringy( MiscTableSizing x, bool b ) { return setAttribute( x, MISC_SIZING_SPRINGY_BIT, b ); } inline MiscTableSizing setSizeable( MiscTableSizing x, bool b ) { return setAttribute( x, MISC_SIZING_USER_BIT, b ); } inline MiscTableSizing setData( MiscTableSizing x, bool b ) { return setAttribute( x, MISC_SIZING_DATA_BIT, b ); } #endif // __MiscTableUtil_h
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.