43 #if PRAGMA_STRUCT_ALIGN
44 #pragma options align = mac68k
45 #elif PRAGMA_STRUCT_PACKPUSH
47 #elif PRAGMA_STRUCT_PACK
53 typedef char DataArray[32001];
54 typedef char *DataPtr;
55 typedef DataPtr *DataHandle;
56 typedef CALLBACK_API(
short, ListSearchProcPtr)(Ptr aPtr, Ptr bPtr,
short aLen,
66 listNotifyNothing = FOUR_CHAR_CODE(
'nada'),
69 FOUR_CHAR_CODE(
'dblc'),
111 lDoVAutoscrollBit = 1,
112 lDoHAutoscrollBit = 0
173 short lDataOffset,
short lDataLen,
186 #if !OPAQUE_UPP_TYPES
189 uppListSearchProcInfo = 0x00002BE0
195 (ProcPtr)(userRoutine), uppListSearchProcInfo, GetCurrentArchitecture());
198 #define NewListSearchUPP(userRoutine) \
199 (ListSearchUPP) NewRoutineDescriptor( \
200 (ProcPtr)(userRoutine), uppListSearchProcInfo, GetCurrentArchitecture())
214 #if !OPAQUE_UPP_TYPES
217 uppListClickLoopProcInfo = 0x00000012
223 uppListClickLoopProcInfo,
224 GetCurrentArchitecture());
227 #define NewListClickLoopUPP(userRoutine) \
229 NewRoutineDescriptor((ProcPtr)(userRoutine), uppListClickLoopProcInfo, \
230 GetCurrentArchitecture())
244 #if !OPAQUE_UPP_TYPES
247 uppListDefProcInfo = 0x000EBD80
254 (ProcPtr)(userRoutine), uppListDefProcInfo, GetCurrentArchitecture());
257 #define NewListDefUPP(userRoutine) \
258 (ListDefUPP) NewRoutineDescriptor( \
259 (ProcPtr)(userRoutine), uppListDefProcInfo, GetCurrentArchitecture())
273 #if !OPAQUE_UPP_TYPES
280 #define DisposeListSearchUPP(userUPP) DisposeRoutineDescriptor(userUPP)
294 #if !OPAQUE_UPP_TYPES
301 #define DisposeListClickLoopUPP(userUPP) DisposeRoutineDescriptor(userUPP)
315 #if !OPAQUE_UPP_TYPES
322 #define DisposeListDefUPP(userUPP) DisposeRoutineDescriptor(userUPP)
336 ListSearchUPP userUPP);
337 #if !OPAQUE_UPP_TYPES
340 ListSearchUPP userUPP)
342 return (
short)CALL_FOUR_PARAMETER_UPP(userUPP, uppListSearchProcInfo, aPtr,
346 #define InvokeListSearchUPP(aPtr, bPtr, aLen, bLen, userUPP) \
347 (short)CALL_FOUR_PARAMETER_UPP((userUPP), uppListSearchProcInfo, (aPtr), \
348 (bPtr), (aLen), (bLen))
360 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
361 #pragma parameter __D0 InvokeListClickLoopUPP(__A0)
365 #if !OPAQUE_UPP_TYPES && \
366 (!TARGET_OS_MAC || !TARGET_CPU_68K || TARGET_RT_MAC_CFM)
373 #define InvokeListClickLoopUPP(userUPP) \
374 (Boolean) CALL_ZERO_PARAMETER_UPP((userUPP), uppListClickLoopProcInfo)
388 short lDataOffset,
short lDataLen,
ListHandle lHandle,
390 #if !OPAQUE_UPP_TYPES
393 Cell lCell,
short lDataOffset,
short lDataLen,
396 CALL_SEVEN_PARAMETER_UPP(userUPP, uppListDefProcInfo, lMessage, lSelect,
397 lRect, lCell, lDataOffset, lDataLen, lHandle);
400 #define InvokeListDefUPP(lMessage, lSelect, lRect, lCell, lDataOffset, \
401 lDataLen, lHandle, userUPP) \
402 CALL_SEVEN_PARAMETER_UPP((userUPP), uppListDefProcInfo, (lMessage), \
403 (lSelect), (lRect), (lCell), (lDataOffset), \
404 (lDataLen), (lHandle))
408 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
410 #define NewListSearchProc(userRoutine) NewListSearchUPP(userRoutine)
411 #define NewListClickLoopProc(userRoutine) NewListClickLoopUPP(userRoutine)
412 #define NewListDefProc(userRoutine) NewListDefUPP(userRoutine)
413 #define CallListSearchProc(userRoutine, aPtr, bPtr, aLen, bLen) \
414 InvokeListSearchUPP(aPtr, bPtr, aLen, bLen, userRoutine)
415 #define CallListClickLoopProc(userRoutine) InvokeListClickLoopUPP(userRoutine)
416 #define CallListDefProc(userRoutine, lMessage, lSelect, lRect, lCell, \
417 lDataOffset, lDataLen, lHandle) \
418 InvokeListDefUPP(lMessage, lSelect, lRect, lCell, lDataOffset, lDataLen, \
419 lHandle, userRoutine)
425 kListDefUserProcType = kListDefProcPtr,
426 kListDefStandardTextType = 1,
427 kListDefStandardIconType = 2
430 typedef UInt32 ListDefType;
461 typedef ListNotificationProcPtr ListNotificationUPP;
462 #if CALL_NOT_IN_CARBON
795 * \copyright THINK Reference © 1991 - 1992 Symantec Corporation
796 * \non_carbon_cfm in InterfaceLib 7.1 and
798 * \carbon_lib in CarbonLib 1.0 and
800 * \mac_os_x in version 10.0 and
836 if ( LSearch (
"Geneva", 6, NIL, &theCell, theList ) {
837 LSetSelect(TRUE, theCell, theList);
838 LAutoScroll(theList);
840 Callback Comparison Function
841 By
default, LSearch uses
IUMagIDString as the comparison
function (a
843 * \copyright THINK Reference © 1991-1992 Symantec Corporation
844 * \non_carbon_cfm in InterfaceLib 7.1 and later
845 * \carbon_lib in CarbonLib 1.0 and later
846 * \mac_os_x in version 10.0 and later
849 LSearch(
const void *dataPtr,
short dataLen, ListSearchUPP searchProc,
889 LSize(
short listWidth,
short listHeight,
ListHandle lHandle);
934 LSearch (
"Geneva", 6, nil, &theCell, theList );
935 LDoDraw (FALSE, theList );
936 LScroll ( -1000,-1000, theList );
937 LDoDraw (TRUE, theList );
938 LScroll ( theCell. h,theCell.v, theList );
939 LSetSelect ( TRUE, theCell, theList );
940 Note that LScroll uses relative positioning. The example first scrolls to
941 the top of the
list by scrolling up and left by 1000. The scroll will actually
943 * \copyright THINK Reference © 1991-1992 Symantec Corporation
944 * \non_carbon_cfm in InterfaceLib 7.1 and later
945 * \carbon_lib in CarbonLib 1.0 and later
946 * \mac_os_x in version 10.0 and later
949 LScroll(
short dCols,
short dRows,
ListHandle lHandle);
1008 if (
theEvent.message == (
long)listWindow)
1011 LUpdate(listWindow->visRgn, theList);
1017 Update events are generated when you call
InvalRect for a portion of the
1021 Hint: You may find it advantageous to store the
ListHandle (theList ) into
1022 its
window's WindowRecord .refCon field; that way, you can use
1024 * \copyright THINK Reference © 1991-1992 Symantec Corporation
1025 * \non_carbon_cfm in InterfaceLib 7.1 and later
1026 * \carbon_lib in CarbonLib 1.0 and later
1027 * \mac_os_x in version 10.0 and later
1030 LUpdate(RgnHandle theRgn, ListHandle lHandle);
1076 LActivate(Boolean act, ListHandle lHandle);
1104 LCellSize ( cellSz, theList ); /* change the size */
1105 FillRect ( &listWindow-> portRect , white );/* clear the window */
1106 InvalRect ( &listWindow-> portRect ); /* indicate redraw all */
1107 LUpdate ( listWindow->visRgn, theList ); /*force update (in evt loop)*/
1109 * \copyright THINK Reference © 1991-1992 Symantec Corporation
1110 * \non_carbon_cfm in InterfaceLib 7.1 and later
1111 * \carbon_lib in CarbonLib 1.0 and later
1112 * \mac_os_x in version 10.0 and later
1115 LCellSize(Point cSize, ListHandle lHandle);
1163 LClick(Point pt, EventModifiers modifiers, ListHandle lHandle);
1191 LAddToCell(const void *dataPtr, short dataLen, Cell theCell, ListHandle lHandle);
1216 LClrCell(Cell theCell, ListHandle lHandle);
1250 LGetCell(void *dataPtr, short *dataLen, Cell theCell, ListHandle lHandle);
1286 LRect(Rect *cellRect, Cell theCell, ListHandle lHandle);
1318 LSetCell(const void *dataPtr, short dataLen, Cell theCell, ListHandle lHandle);
1349 pascal Boolean cmp1stChar(); /* custom comparison function */
1350 if ( LSearch ( &theChar, 1, cmp1stChar, &theCell, theList ) ){
1351 LSetSelect(TRUE, theCell, theList);
1352 LAutoScroll(theList); /* make sure selection is visible */
1354 See LSearch for an example of how to make a first-character search
1355 routine, similar to that used by Standard File.
1356 Another use for LSetSelect might be to make a double-clicked selection
1358 * \copyright THINK Reference © 1991-1992 Symantec Corporation
1359 * \non_carbon_cfm in InterfaceLib 7.1 and later
1360 * \carbon_lib in CarbonLib 1.0 and later
1361 * \mac_os_x in version 10.0 and later
1364 LSetSelect(Boolean setIt, Cell theCell, ListHandle lHandle);
1403 LDraw( theCell, theList ); /* force cell to be redrawn */
1405 * \copyright THINK Reference © 1991-1992 Symantec Corporation
1406 * \non_carbon_cfm in InterfaceLib 7.1 and later
1407 * \carbon_lib in CarbonLib 1.0 and later
1408 * \mac_os_x in version 10.0 and later
1411 LDraw(Cell theCell, ListHandle lHandle);
1422 LGetCellDataLocation(short *offset, short *len, Cell theCell,
1423 ListHandle lHandle);
1459 RegisterListDefinition(SInt16 inResID, ListDefSpecPtr inDefSpec);
1461 #if CALL_NOT_IN_CARBON
1462 #if CALL_NOT_IN_CARBON
1472 SetListDefinitionProc(SInt16 resID, ListDefUPP defProc);
1474 #endif /** CALL_NOT_IN_CARBON */
1476 #endif /** CALL_NOT_IN_CARBON */
1480 #if CALL_NOT_IN_CARBON
1490 LSetLDEF(ListDefProcPtr proc, ListRef lHandle);
1492 #endif /** CALL_NOT_IN_CARBON */
1494 #endif /** !TARGET_OS_MAC */
1496 #if CALL_NOT_IN_CARBON
1506 laddtocell(const void *dataPtr, short dataLen, const Cell *theCell,
1507 ListHandle lHandle);
1518 lclrcell(const Cell *theCell, ListHandle lHandle);
1529 lgetcelldatalocation(short *offset, short *len, const Cell *theCell,
1530 ListHandle lHandle);
1541 lgetcell(void *dataPtr, short *dataLen, const Cell *theCell,
1542 ListHandle lHandle);
1553 lnew(const Rect *rView, const ListBounds *dataBounds, Point *cSize,
1554 short theProc, WindowRef theWindow, Boolean drawIt, Boolean hasGrow,
1555 Boolean scrollHoriz, Boolean scrollVert);
1566 lrect(Rect *cellRect, const Cell *theCell, ListHandle lHandle);
1577 lsetcell(const void *dataPtr, short dataLen, const Cell *theCell,
1578 ListHandle lHandle);
1589 lsetselect(Boolean setIt, const Cell *theCell, ListHandle lHandle);
1600 ldraw(const Cell *theCell, ListHandle lHandle);
1611 lclick(Point *pt, EventModifiers modifiers, ListHandle lHandle);
1622 lcellsize(Point *cSize, ListHandle lHandle);
1624 #endif /** CALL_NOT_IN_CARBON */
1627 #define LDoDraw(drawIt, lHandle) LSetDrawingMode(drawIt, lHandle)
1628 #define LFind(offset, len, theCell, lHandle) \
1629 LGetCellDataLocation(offset, len, theCell, lHandle)
1631 #define lfind(offset, len, theCell, lHandle) \
1632 lgetcelldatalocation(offset, len, theCell, lHandle)
1634 #endif /** OLDROUTINENAMES */
1636 #if ACCESSOR_CALLS_ARE_FUNCTIONS
1647 GetListViewBounds(ListRef list, Rect *view);
1658 GetListPort(ListRef list);
1669 GetListCellIndent(ListRef list, Point *indent);
1680 GetListCellSize(ListRef list, Point *size);
1691 GetListVisibleCells(ListRef list, ListBounds *visible);
1702 GetListVerticalScrollBar(ListRef list);
1713 GetListHorizontalScrollBar(ListRef list);
1724 GetListActive(ListRef list);
1735 GetListClickTime(ListRef list);
1746 GetListClickLocation(ListRef list, Point *click);
1757 GetListMouseLocation(ListRef list, Point *mouse);
1768 GetListClickLoop(ListRef list);
1779 GetListRefCon(ListRef list);
1790 GetListDefinition(ListRef list);
1801 GetListUserHandle(ListRef list);
1812 GetListDataBounds(ListRef list, ListBounds *bounds);
1823 GetListDataHandle(ListRef list);
1834 GetListFlags(ListRef list);
1845 GetListSelectionFlags(ListRef list);
1857 SetListViewBounds(ListRef list, const Rect *view);
1868 SetListPort(ListRef list, CGrafPtr port);
1879 SetListCellIndent(ListRef list, Point *indent);
1890 SetListClickTime(ListRef list, SInt32 time);
1901 SetListClickLoop(ListRef list, ListClickLoopUPP clickLoop);
1912 SetListLastClick(ListRef list, Cell *lastClick);
1923 SetListRefCon(ListRef list, SInt32 refCon);
1934 SetListUserHandle(ListRef list, Handle userHandle);
1945 SetListFlags(ListRef list, OptionBits listFlags);
1956 SetListSelectionFlags(ListRef list, OptionBits selectionFlags);
1958 #endif /** ACCESSOR_CALLS_ARE_FUNCTIONS */
1960 #if PRAGMA_STRUCT_ALIGN
1961 #pragma options align = reset
1962 #elif PRAGMA_STRUCT_PACKPUSH
1964 #elif PRAGMA_STRUCT_PACK
1968 #ifdef PRAGMA_IMPORT_OFF
1971 #pragma import reset
1978 #endif /** __LISTS__ */
1979 * /*/*/ * /*/*/ * /*/*/ * /*/*/ * /*/*/ * /*/*/ * /*/*/ */*/
Control Manager interfaces.
EndUpdate(updtWin)
Draw all controls visible in a window.
@ everyEvent
Definition: Events.h:91
OSStatus CreateCustomList(const Rect *rView, const ListBounds *dataBounds, Point cellSize, const ListDefSpec *theSpec, WindowRef theWindow, Boolean drawIt, Boolean hasGrow, Boolean scrollHoriz, Boolean scrollVert, ListHandle *outList)
@ lDrawingModeOffBit
Definition: Lists.h:110
typedef CALLBACK_API(void, ListNotificationProcPtr)(ListHandle theList
ListHandle ListRef
Definition: Lists.h:105
Boolean InvokeListClickLoopUPP(ListClickLoopUPP userUPP)
ListHandle LNew(const Rect *rView, const ListBounds *dataBounds, Point cSize, short theProc, WindowRef theWindow, Boolean drawIt, Boolean hasGrow, Boolean scrollHoriz, Boolean scrollVert)
void InvokeListDefUPP(short lMessage, Boolean lSelect, Rect *lRect, Cell lCell, short lDataOffset, short lDataLen, ListHandle lHandle, ListDefUPP userUPP)
void GetListVisibleBounds(ListHandle theList, Rect *visibleBounds)
void DisposeListDefUPP(ListDefUPP userUPP)
Cell LLastClick(ListHandle lHandle)
Query which cell was clicked last.
@ lDrawingModeOff
Definition: Lists.h:118
long ListNotification
Definition: Lists.h:63
@ listNotifyDoubleClick
Definition: Lists.h:68
@ listNotifyClick
Definition: Lists.h:67
@ listNotifyPreClick
Definition: Lists.h:70
@ lInitMsg
Definition: Lists.h:150
void DisposeListClickLoopUPP(ListClickLoopUPP userUPP)
#define NewListClickLoopUPP(userRoutine)
Definition: Lists.h:227
#define NewListDefUPP(userRoutine)
Definition: Lists.h:257
void LDispose(ListHandle lHandle)
Discard a list and release all its memory.
@ lOnlyOne
Definition: Lists.h:138
void LSetNotificationCallback(ListNotificationProcPtr callBack, ListHandle lHandle)
Boolean LGetSelect(Boolean next, Cell *theCell, ListHandle lHandle)
Insert column(s) of empty cells into a list.
void DisposeListSearchUPP(ListSearchUPP userUPP)
#define NewListSearchUPP(userRoutine)
Definition: Lists.h:198
@ lOnlyOneBit
Definition: Lists.h:126
short InvokeListSearchUPP(Ptr aPtr, Ptr bPtr, short aLen, short bLen, ListSearchUPP userUPP)
Basic Macintosh data types.
unsigned char Boolean
Definition: MacTypes.h:318
void BeginUpdate(WindowRef window)
void DrawGrowIcon(WindowRef window)
void InvalRect(const Rect *badRect)
#define CALL_ZERO_PARAMETER_UPP(upp, procInfo)
Definition: MixedMode.h:790
void DisposeRoutineDescriptor(UniversalProcPtr theUPP)
#define STACK_UPP_TYPE(name)
Definition: MixedMode.h:734
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)
typedef CALLBACK_API_REGISTER68K(void, SIInterruptProcPtr,(SPBPtr inParamPtr, Ptr dataBuffer, short peakAmplitude, long sampleSize))
short IUMagIDString(const void *aPtr, const void *bPtr, short aLen, short bLen)
typedef REGISTER_UPP_TYPE(HighHookProcPtr) HighHookUPP
Definition: Controls.h:165
Definition: Quickdraw.h:1648
ListBounds visible
Definition: Lists.h:81
ControlRef hScroll
Definition: Lists.h:83
Point cellSize
Definition: Lists.h:80
Handle userHandle
Definition: Lists.h:95
SInt8 selFlags
Definition: Lists.h:84
Point mouseLoc
Definition: Lists.h:90
short cellArray[1]
Definition: Lists.h:99
ListBounds dataBounds
Definition: Lists.h:96
ControlRef vScroll
Definition: Lists.h:82
ListClickLoopUPP lClickLoop
Definition: Lists.h:91
short maxIndex
Definition: Lists.h:98
Boolean lActive
Definition: Lists.h:85
Handle listDefProc
Definition: Lists.h:94
Cell lastClick
Definition: Lists.h:92
Point clikLoc
Definition: Lists.h:89
long refCon
Definition: Lists.h:93
Point indent
Definition: Lists.h:79
long clikTime
Definition: Lists.h:88
GrafPtr port
Definition: Lists.h:78
DataHandle cells
Definition: Lists.h:97
SInt8 lReserved
Definition: Lists.h:86
SInt8 listFlags
Definition: Lists.h:87
Definition: MacTypes.h:520
Definition: MacTypes.h:527
Definition: TranslationExtensions.h:114