
/* scroll.tks.m */

#include <builder.def>
#include <scroll.tks.md>

add_to_element [PACK_NAME] [ELE_NAME]
{
	map tkscroll
	{
#ifdef POS_IN
		pos_in POS_IN
#else
		pos_in DEFAULT_POS_IN
#endif

#ifdef POS_OUT
		pos_out POS_OUT
#else
		pos_out DEFAULT_POS_OUT
#endif
		(X Y WIDTH HEIGHT FOREGROUND BACKGROUND BORDER BORDERWIDTH)
#ifdef ORIENTATION
		orientation ORIENTATION
#endif

#ifdef DIM_NUM
#if DIM_NUM >= PACK_NDIMS || DIM_NUM > 5
		represents [PACK_NAME] [PACK_DIM_0_NAME] position
			[PACK_DIM_0_MAX - PACK_DIM_0_MIN + 1]
#else

#if DIM_NUM == 0
		represents [PACK_NAME] [PACK_DIM_0_NAME] position
			[PACK_DIM_0_MAX - PACK_DIM_0_MIN + 1]
#endif

#if DIM_NUM == 1
		represents [PACK_NAME] [PACK_DIM_1_NAME] position
			[PACK_DIM_1_MAX - PACK_DIM_1_MIN + 1]
#endif

#if DIM_NUM == 2
		represents [PACK_NAME] [PACK_DIM_2_NAME] position
			[PACK_DIM_2_MAX - PACK_DIM_2_MIN + 1]
#endif

#if DIM_NUM == 3
		represents [PACK_NAME] [PACK_DIM_3_NAME] position
			[PACK_DIM_3_MAX - PACK_DIM_3_MIN + 1]
#endif

#if DIM_NUM == 4
		represents [PACK_NAME] [PACK_DIM_4_NAME] position
			[PACK_DIM_4_MAX - PACK_DIM_4_MIN + 1]
#endif

#if DIM_NUM == 5
		represents [PACK_NAME] [PACK_DIM_5_NAME] position
			[PACK_DIM_5_MAX - PACK_DIM_5_MIN + 1]
#endif

#endif /* >= PACK_NDIMS */
#endif /* DIM_NUM */
	}
}
