/*
 * Kangaroo Punch MultiPlayer Game Server Mark II
 * Copyright (C) 2020-2021  Scott Duensing
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 *
 */


#ifndef TAGLIST_H
#define TAGLIST_H


#include "os.h"


#ifdef BITS64
typedef uint64_t TagItemT;
#else
typedef uint32_t TagItemT;
#endif

#define O(x) ((TagItemT)&x)  // Widget Objects
#define P(x) ((TagItemT)x)   // Pointers

#define T_FALSE  0
#define T_TRUE   1


enum TagItemsE {
	T_END = 0,
	T_START,
	T_DONE,

	T_META_START_OF_WIDGETS,

	T_BUTTON,     // 4
	T_CHECKBOX,
	T_FRAME,
	T_LABEL,
	T_LISTBOX,
	T_PICTURE,
	T_RADIOBUTTON,
	T_TERMINAL,
	T_TEXTBOX,
	T_TIMER,
	T_UPDOWN,
	T_WINDOW,

	T_META_END_OF_WIDGETS,
	T_META_START_OF_ATTRIBUTES,

	T_CLICK,             // 17
	T_COLOR_ACTIVE,
	T_COLOR_BACKGROUND,
	T_COLOR_FOREGROUND,
	T_ENABLED,
	T_EVENT,
	T_FILENAME,
	T_GROUP,
	T_HEIGHT,
	T_INDEX,
	T_ITEM,
	T_LENGTH,
	T_MASK,
	T_MAXIMUM,
	T_MINIMUM,
	T_SELECTED,
	T_STEP,
	T_TITLE,
	T_USER_DATA,
	T_VALUE,
	T_VISIBLE,
	T_WIDTH,
	T_X,
	T_Y,

	T_META_END_OF_ATTRIBUTES
};


uint8_t tagListRun(TagItemT *list);


#endif // TAGLIST_H
