
/*
 *  Special DICE C header support file for the GTLayout.library system.
 *                      (it's not finished yet!)
 *
 *  Created on Sat/10/Apr/1999 By Andrew Bell
 *
 *  $VER: 1.0 (10/4/99)
 *
 */

#ifndef GTLAYOUT_SUPPORT_H
#define GTLAYOUT_SUPPORT_H

#ifndef _GTLAYOUT_H
#include <libraries/gtlayout.h>
#endif

#include <clib/gtlayout_protos.h>
#include <pragmas/gtlayout_pragmas.h>

/*
 *
 * These macros make it easier for the creation of GUI trees.
 *
 */

#define VGroup       LT_New( Handle, LA_Type, VERTICAL_KIND
#define HGroup       LT_New( Handle, LA_Type, HORIZONTAL_KIND
#define EndGroup     LT_New( Handle, LA_Type, END_KIND, TAG_DONE );
#define ObjSeparator LT_New( Handle, LA_Type, XBAR_KIND
#define ObjButton    LT_New( Handle, LA_Type, BUTTON_KIND
#define ObjListView  LT_New( Handle, LA_Type, LISTVIEW_KIND
#define ObjPopup     LT_New( Handle, LA_Type, POPUP_KIND
#define ObjCycle     LT_New( Handle, LA_Type, CYCLE_KIND
#define ObjString    LT_New( Handle, LA_Type, STRING_KIND
#define ObjText      LT_New( Handle, LA_Type, TEXT_KIND
#define ObjGauge     LT_New( Handle, LA_Type, GAUGE_KIND
#define ObjBox       LT_New( Handle, LA_Type, BOX_KIND
#define ObjCheckBox  LT_New( Handle, LA_Type, CHECKBOX_KIND
#define ObjSlider    LT_New( Handle, LA_Type, SLIDER_KIND
#define EndTags      TAG_DONE );

/* These lets you use tag based args in DICE */

void LT_New( struct LayoutHandle *handle, ULONG tag1, ... )
{
        LT_NewA( handle, (struct TagItem *) &tag1 );
}

struct LayoutHandle *LT_CreateHandleTags( struct Screen *screen, ULONG tag1, ... )
{
        return LT_CreateHandleTagList(screen, (struct TagItem *) &tag1 );
}

struct Window *LT_Build( struct LayoutHandle *handle, ULONG tag1, ...  )
{
        return LT_BuildA( handle, (struct TagItem *) &tag1 );
}

void LT_SetAttributes( struct LayoutHandle *handle, LONG ID, ULONG tag1, ...  )
{
        LT_SetAttributesA( handle, ID, (struct TagItem *) &tag1 );
}

LONG LT_GetAttributes( struct LayoutHandle *handle, LONG ID, ULONG tag1, ...  )
{
        return LT_GetAttributesA( handle, ID, (struct TagItem *) &tag1 );
}

#endif /* GTLAYOUT_SUPPORT_H */
