#ifndef GADGETS_POPUP_H
#define GADGETS_POPUP_H

/* includes for popup.gadget
*
* popup.gadget is COPYRIGHT 1995 by Chad Randall
* Permission is granted for reuse in all applications,
* provided no modification are done on original source,
* and the original copyright is retained in all applicable
* locations.
*
*/

/* I'm not fluent in C.  This header file was created
*  from a converted "showmodule" file from AmigaE.
*  Sorry if it doesn't compile right...send me
*  any corrections, and I'll repay you with many thanks.!
*/


#ifndef EXEC_NODES_H
#include <exec/nodes.h>
#endif

#ifndef GRAPHICS_TEXT_H
#include <graphics/text.h>
#endif

#ifndef INTUITION_INTUITION_H
#include <intuition/intuition.h>
#endif

struct imagenode {

/* These are PUBLIC fields.  But, *do not* modify after attaching the node/list to a popup gadget! */

   struct  Node listnode;
   struct  Image *object;         /* normal object image */
   struct  Image *selobject;      /* selected ""   - may be NIL */
   ULONG   frametype;             /* -1 for no frame, or FRAME_DEFAULT *_BUTTON *_RIDGE _ICONDROPBOX */
   ULONG   selfillcolor;          /* Not a pen#, rather "BACKGROUNDPEN", "FILLPEN", "FILLTEXTPEN", etc... */
   ULONG   selframetype;          /* same a frametype, but for selected state. */

/* below are OFF-LIMITS */

   ULONG   private_offsetx;
   ULONG   private_offsety;
   ULONG   private_sel_offsetx;
   ULONG   private_sel_offsety;
   ULONG   private_lastdrawn;
   ULONG   private_iallocated;
   struct  IntuiText *private_itextn;
   struct  IntuiText *private_itexts;
   struct  TextFont *private_textfont;
   struct  TextAttr *private_textattr;
   APTR    private_text;                 /* This points to a "EString" structure */
 }

#define PUA_ACTIVE 0x86900200
#define PUA_NUMBEROFOBJECTS 0x86900209
#define PUA_OBJECTS 0x86900201
#define PUA_COLUMNS 0x86900203
#define PUA_CENTERIMAGES 0x8690020C
#define PUA_ROWS 0x86900202
#define PUA_CENTERGADGETIMAGE 0x8690020D
#define PUARROW_TINY 1
#define PUARROW_POPUP 2
#define PUA_POPUPARROW 0x86900204
#define PUARROW_NONE 0
#define PUA_IMAGESPACING 0x86900208
#define PUA_WINDOWSPACING 0x86900207
#define PUA_WINDOWBORDER 0x86900206
#define PUA_GADGETBORDER 0x86900205
#define PUA_AUTOGADGETRESIZE 0x8690020A
#define PUA_AUTOWINDOWLAYOUT 0x8690020B

#endif
