ToolChain/bin/targets/m68k-amigaos/ndk/Examples/Reaction/ListBrowser/ListBrowserExample.c
BOOL make_list(struct List *list, UBYTE **labels1, LONG *labels2)
{
	struct Node *node;
	WORD i = 0;

	NewList(list);

	while (*labels1)
	{
		if (node = AllocListBrowserNode(3,
						LBNA_Column, 0,
							LBNCA_CopyText, TRUE,
							LBNCA_Text, *labels1,
							LBNCA_MaxChars, 40,
							LBNCA_Editable, TRUE,
						LBNA_Column, 1,
							LBNCA_CopyText, TRUE,
							LBNCA_Text, *labels1,
							LBNCA_MaxChars, 40,
							LBNCA_Editable, TRUE,
						LBNA_Column, 2,
							LBNCA_Integer, &labels2[i],
							LBNCA_Justification, LCJ_RIGHT,
						TAG_DONE))
		{
			AddTail(list, node);
		}
		else
			break;

		labels1++;
		i++;
	}
	return(TRUE);
}
/* Function to make a List of ListBrowserNodes from a couple of arrays.
 * Just to demonstrate things, we make make three columns, 2 with text
 * (the same text) and the third with numbers.
 */
Function to make a List of ListBrowserNodes from a couple of arrays.
Just to demonstrate things, we make make three columns, 2 with text
(the same text) and the third with numbers.
Function to make a List of ListBrowserNodes from a couple of arrays . Just to demonstrate things we make make three columns 2 with text ( the same text ) and the third with numbers .
BOOL make_list(struct List *list, UBYTE **labels1, LONG *labels2)
{
	struct Node *node;
	WORD i = 0;
	NewList(list);
	while (*labels1)
	{
		if (node = AllocListBrowserNode(3,
						LBNA_Column, 0,
							LBNCA_CopyText, TRUE,
							LBNCA_Text, *labels1,
							LBNCA_MaxChars, 40,
							LBNCA_Editable, TRUE,
						LBNA_Column, 1,
							LBNCA_CopyText, TRUE,
							LBNCA_Text, *labels1,
							LBNCA_MaxChars, 40,
							LBNCA_Editable, TRUE,
						LBNA_Column, 2,
							LBNCA_Integer, &labels2[i],
							LBNCA_Justification, LCJ_RIGHT,
						TAG_DONE))
		{
			AddTail(list, node);
		}
		else
			break;
		labels1++;
		i++;
	}
	return(TRUE);
}
BOOL make_list ( struct List * list , UBYTE * * labels1 , LONG * labels2 ) { struct Node * node ; WORD i = 0 ; NewList ( list ) ; while ( * labels1 ) { if ( node = AllocListBrowserNode ( 3 , LBNA_Column , 0 , LBNCA_CopyText , TRUE , LBNCA_Text , * labels1 , LBNCA_MaxChars , 40 , LBNCA_Editable , TRUE , LBNA_Column , 1 , LBNCA_CopyText , TRUE , LBNCA_Text , * labels1 , LBNCA_MaxChars , 40 , LBNCA_Editable , TRUE , LBNA_Column , 2 , LBNCA_Integer , & labels2 [ i ] , LBNCA_Justification , LCJ_RIGHT , TAG_DONE ) ) { AddTail ( list , node ) ; } else break ; labels1 ++ ; i ++ ; } return ( TRUE ) ; }
Function to make a List of ListBrowserNodes from a couple of arrays.
Function to make a List of ListBrowserNodes from a couple of arrays .