/*
  NList.mcc (c) Copyright 1996 by Gilles NASSON
  Registered MUI class, Serial Number: 1d51                            0x9d510030 to 0x9d51008F
  *** use only YOUR OWN Serial Number for your public custom class ***
  NList_mcc.h
*/


/* MUI Prop and Scroller classes stuff which is still not in libraries/mui.h  (in MUI3.6) */
/* it gives to the prop object it's increment value */
#ifndef MUIA_Prop_DeltaFactor
#define MUIA_Prop_DeltaFactor 0x80427C5E
#endif


#ifndef MUI_NList_MCC_H
#define MUI_NList_MCC_H

#ifndef LIBRARIES_MUI_H
#include <libraries/mui.h>
#endif



#define MUIC_NList "NList.mcc"
#define NListObject MUI_NewObject(MUIC_NList


/* Attributes */

#define MUIA_NList_TypeSelect               0x9d510030 /* GM  is.  LONG              */
#define MUIA_NList_VertDeltaFactor          0x9d510031 /* GM  ..gn LONG              */
#define MUIA_NList_HorizDeltaFactor         0x9d510032 /* GM  ..gn LONG              */

#define MUIA_NList_Horiz_First              0x9d510033 /* GM  .sgn LONG              */
#define MUIA_NList_Horiz_Visible            0x9d510034 /* GM  ..gn LONG              */
#define MUIA_NList_Horiz_Entries            0x9d510035 /* GM  ..gn LONG              */

#define MUIA_NList_Prop_First               0x9d510036 /* GM  .sgn LONG              */
#define MUIA_NList_Prop_Visible             0x9d510037 /* GM  ..gn LONG              */
#define MUIA_NList_Prop_Entries             0x9d510038 /* GM  ..gn LONG              */

#define MUIA_NList_TitlePen                 0x9d510039 /* GM  isg  LONG              */
#define MUIA_NList_ListPen                  0x9d51003a /* GM  isg  LONG              */
#define MUIA_NList_SelectPen                0x9d51003b /* GM  isg  LONG              */
#define MUIA_NList_CursorPen                0x9d51003c /* GM  isg  LONG              */
#define MUIA_NList_UnselCurPen              0x9d51003d /* GM  isg  LONG              */

#define MUIA_NList_ListBackground           0x9d51003e /* GM  isg  LONG              */
#define MUIA_NList_TitleBackground          0x9d51003f /* GM  isg  LONG              */
#define MUIA_NList_SelectBackground         0x9d510040 /* GM  isg  LONG              */
#define MUIA_NList_CursorBackground         0x9d510041 /* GM  isg  LONG              */
#define MUIA_NList_UnselCurBackground       0x9d510042 /* GM  isg  LONG              */

#define MUIA_NList_MultiClick               0x9d510043 /* GM  ..gn LONG              */

#define MUIA_NList_DefaultObjectOnClick     0x9d510044 /* GM  is.  BOOL              */

#define MUIA_NList_ClickColumn              0x9d510045 /* GM  ..g  LONG              */
#define MUIA_NList_DefClickColumn           0x9d510046 /* GM  isg  LONG              */
#define MUIA_NList_DoubleClick              0x9d510047 /* GM  isgn BOOL              */
#define MUIA_NList_DragType                 0x9d510048 /* GM  isg  LONG              */
#define MUIA_NList_Input                    0x9d510049 /* GM  isg  BOOL              */
#define MUIA_NList_MultiSelect              0x9d51004a /* GM  is.  LONG              */
#define MUIA_NList_SelectChange             0x9d51004b /* GM  ...n BOOL              */

#define MUIA_NList_Active                   0x9d51004c /* GM  isgn LONG              */
#define MUIA_NList_AdjustHeight             0x9d51004d /* GM  i..  BOOL              */
#define MUIA_NList_AdjustWidth              0x9d51004e /* GM  i..  BOOL              */
#define MUIA_NList_AutoVisible              0x9d51004f /* GM  isg  BOOL              */
#define MUIA_NList_CompareHook              0x9d510050 /* GM  is.  struct Hook *     */
#define MUIA_NList_ConstructHook            0x9d510051 /* GM  is.  struct Hook *     */
#define MUIA_NList_DestructHook             0x9d510052 /* GM  is.  struct Hook *     */
#define MUIA_NList_DisplayHook              0x9d510053 /* GM  is.  struct Hook *     */
#define MUIA_NList_DragSortable             0x9d510054 /* GM  isg  BOOL              */
#define MUIA_NList_DropMark                 0x9d510055 /* GM  ..g  LONG              */
#define MUIA_NList_Entries                  0x9d510056 /* GM  ..g  LONG              */
#define MUIA_NList_First                    0x9d510057 /* GM  isg  LONG              */
#define MUIA_NList_Format                   0x9d510058 /* GM  isg  STRPTR            */
#define MUIA_NList_InsertPosition           0x9d510059 /* GM  ..g  LONG              */
#define MUIA_NList_MinLineHeight            0x9d51005a /* GM  is.  LONG              */
#define MUIA_NList_MultiTestHook            0x9d51005b /* GM  is.  struct Hook *     */
#define MUIA_NList_Pool                     0x9d51005c /* GM  i..  APTR              */
#define MUIA_NList_PoolPuddleSize           0x9d51005d /* GM  i..  ULONG             */
#define MUIA_NList_PoolThreshSize           0x9d51005e /* GM  i..  ULONG             */
#define MUIA_NList_Quiet                    0x9d51005f /* GM  .s.  BOOL              */
#define MUIA_NList_ShowDropMarks            0x9d510060 /* GM  isg  BOOL              */
#define MUIA_NList_SourceArray              0x9d510061 /* GM  i..  APTR *            */
#define MUIA_NList_Title                    0x9d510062 /* GM  isg  char *            */
#define MUIA_NList_Visible                  0x9d510063 /* GM  ..g  LONG              */
#define MUIA_NList_CopyEntryToClipHook      0x9d510064 /* GM  is.  struct Hook *     */
#define MUIA_NList_KeepActive               0x9d510065 /* GM  .s.  Obj *             */
#define MUIA_NList_MakeActive               0x9d510066 /* GM  .s.  Obj *             */
#define MUIA_NList_SourceString             0x9d510067 /* GM  i..  char *            */
#define MUIA_NList_CopyColumnToClipHook     0x9d510068 /* GM  is.  struct Hook *     */
#define MUIA_NList_ListCompatibility        0x9d510069 /* GM  i..  LONG              */
#define MUIA_NList_AutoCopyToClip           0x9d51006A /* GM  is.  BOOL              */



/* Attributes special datas */

#define MUIV_NList_NoListNotifies         0
#define MUIV_NList_BothNotifies          -1
#define MUIV_NList_ListNotifies          -2

#define MUIV_NList_TypeSelect_Line        0
#define MUIV_NList_TypeSelect_Char        1

#define MUIV_NList_Font                 -20
#define MUIV_NList_Font_Little          -21
#define MUIV_NList_Font_Fixed           -22

#define MUIV_NList_ConstructHook_String  -1
#define MUIV_NList_DestructHook_String   -1

#define MUIV_NList_Active_Off            -1
#define MUIV_NList_Active_Top            -2
#define MUIV_NList_Active_Bottom         -3
#define MUIV_NList_Active_Up             -4
#define MUIV_NList_Active_Down           -5
#define MUIV_NList_Active_PageUp         -6
#define MUIV_NList_Active_PageDown       -7

#define MUIV_NList_First_Top             -2
#define MUIV_NList_First_Bottom          -3
#define MUIV_NList_First_Up              -4
#define MUIV_NList_First_Down            -5
#define MUIV_NList_First_PageUp          -6
#define MUIV_NList_First_PageDown        -7
#define MUIV_NList_First_Up2             -8
#define MUIV_NList_First_Down2           -9
#define MUIV_NList_First_Up4            -10
#define MUIV_NList_First_Down4          -11

#define MUIV_NList_Horiz_First_Start     -2
#define MUIV_NList_Horiz_First_End       -3
#define MUIV_NList_Horiz_First_Left      -4
#define MUIV_NList_Horiz_First_Right     -5
#define MUIV_NList_Horiz_First_PageLeft  -6
#define MUIV_NList_Horiz_First_PageRight -7
#define MUIV_NList_Horiz_First_Left2     -8
#define MUIV_NList_Horiz_First_Right2    -9
#define MUIV_NList_Horiz_First_Left4    -10
#define MUIV_NList_Horiz_First_Right4   -11

#define MUIV_NList_MultiSelect_None       0
#define MUIV_NList_MultiSelect_Default    1
#define MUIV_NList_MultiSelect_Shifted    2
#define MUIV_NList_MultiSelect_Always     3

#define MUIV_NList_Insert_Top             0
#define MUIV_NList_Insert_Active         -1
#define MUIV_NList_Insert_Sorted         -2
#define MUIV_NList_Insert_Bottom         -3

#define MUIV_NList_Remove_First           0
#define MUIV_NList_Remove_Active         -1
#define MUIV_NList_Remove_Last           -2
#define MUIV_NList_Remove_Selected       -3

#define MUIV_NList_Select_Off             0
#define MUIV_NList_Select_On              1
#define MUIV_NList_Select_Toggle          2
#define MUIV_NList_Select_Ask             3

#define MUIV_NList_GetEntry_Active       -1

#define MUIV_NList_Select_Active         -1
#define MUIV_NList_Select_All            -2

#define MUIV_NList_Redraw_Active         -1
#define MUIV_NList_Redraw_All            -2

#define MUIV_NList_Move_Top               0
#define MUIV_NList_Move_Active           -1
#define MUIV_NList_Move_Bottom           -2
#define MUIV_NList_Move_Next             -3 /* only valid for second parameter (and not with Move_Selected) */
#define MUIV_NList_Move_Previous         -4 /* only valid for second parameter (and not with Move_Selected) */
#define MUIV_NList_Move_Selected         -5 /* only valid for first parameter */

#define MUIV_NList_Exchange_Top           0
#define MUIV_NList_Exchange_Active       -1
#define MUIV_NList_Exchange_Bottom       -2
#define MUIV_NList_Exchange_Next         -3 /* only valid for second parameter */
#define MUIV_NList_Exchange_Previous     -4 /* only valid for second parameter */

#define MUIV_NList_Jump_Top               0
#define MUIV_NList_Jump_Active           -1
#define MUIV_NList_Jump_Bottom           -2
#define MUIV_NList_Jump_Up               -4
#define MUIV_NList_Jump_Down             -3

#define MUIV_NList_NextSelected_Start    -1
#define MUIV_NList_NextSelected_End      -1

#define MUIV_NList_DragType_None          0
#define MUIV_NList_DragType_Immediate     1
#define MUIV_NList_DragType_Default       2
#define MUIV_NList_DragType_Qualifier     3
#define MUIV_NList_DragType_Borders       4

#define MUIV_NList_CopyToClip_Active     -1
#define MUIV_NList_CopyToClip_Selected   -2
#define MUIV_NList_CopyToClip_All        -3
#define MUIV_NList_CopyToClip_Entries    -4
#define MUIV_NList_CopyToClip_Entry      -5
#define MUIV_NList_CopyToClip_Strings    -6
#define MUIV_NList_CopyToClip_String     -7


/* Struct */

struct MUI_NList_TestPos_Result
{
  LONG  entry;   /* number of entry, -1 if mouse not over valid entry */
  WORD  column;  /* numer of column, -1 if no valid column */
  UWORD flags;   /* not in the list, see below */
  WORD  xoffset; /* x offset in column */
  WORD  yoffset; /* y offset of mouse click from center of line */
  WORD  char_number;  /* the number of the clicked char in column, -1 if no valid */
  WORD  char_xoffset; /* x offset of mouse clicked from left of char if positive */
};                    /* and left of next char if negative. If there is no char there */
                      /* negative if from left of first char else from right of last one */

#define MUI_NLPR_ABOVE  (1<<0)
#define MUI_NLPR_BELOW  (1<<1)
#define MUI_NLPR_LEFT   (1<<2)
#define MUI_NLPR_RIGHT  (1<<3)
#define MUI_NLPR_BAR    (1<<4)  /* if between two columns you'll get the left
                                   column number of both, and that flag */


struct BitMapImage
{
  ULONG    control;   /* should be = to MUIM_NList_CreateImage for a valid BitMapImage struct */
  WORD     width;
  WORD     height;
  WORD    *obtainpens;
  PLANEPTR mask;
  struct BitMap imgbmp;
};


/* Methods */

#define MUIM_NList_Clear          0x9d510070 /* GM */
#define MUIM_NList_CreateImage    0x9d510071 /* GM */
#define MUIM_NList_DeleteImage    0x9d510072 /* GM */
#define MUIM_NList_Exchange       0x9d510073 /* GM */
#define MUIM_NList_GetEntry       0x9d510074 /* GM */
#define MUIM_NList_Insert         0x9d510075 /* GM */
#define MUIM_NList_InsertSingle   0x9d510076 /* GM */
#define MUIM_NList_Jump           0x9d510077 /* GM */
#define MUIM_NList_Move           0x9d510078 /* GM */
#define MUIM_NList_NextSelected   0x9d510079 /* GM */
#define MUIM_NList_Redraw         0x9d51007a /* GM */
#define MUIM_NList_Remove         0x9d51007b /* GM */
#define MUIM_NList_Select         0x9d51007c /* GM */
#define MUIM_NList_Sort           0x9d51007d /* GM */
#define MUIM_NList_TestPos        0x9d51007e /* GM */
#define MUIM_NList_CopyToClip     0x9d51007f /* GM */
#define MUIM_NList_UseImage       0x9d510080 /* GM */
struct  MUIP_NList_Clear          { ULONG MethodID; };
struct  MUIP_NList_CreateImage    { ULONG MethodID; Object *obj; ULONG flags; };
struct  MUIP_NList_DeleteImage    { ULONG MethodID; APTR listimg; };
struct  MUIP_NList_Exchange       { ULONG MethodID; LONG pos1; LONG pos2; };
struct  MUIP_NList_GetEntry       { ULONG MethodID; LONG pos; APTR *entry; };
struct  MUIP_NList_Insert         { ULONG MethodID; APTR *entries; LONG count; LONG pos; };
struct  MUIP_NList_InsertSingle   { ULONG MethodID; APTR entry; LONG pos; };
struct  MUIP_NList_Jump           { ULONG MethodID; LONG pos; };
struct  MUIP_NList_Move           { ULONG MethodID; LONG from; LONG to; };
struct  MUIP_NList_NextSelected   { ULONG MethodID; LONG *pos; };
struct  MUIP_NList_Redraw         { ULONG MethodID; LONG pos; };
struct  MUIP_NList_Remove         { ULONG MethodID; LONG pos; };
struct  MUIP_NList_Select         { ULONG MethodID; LONG pos; LONG seltype; LONG *state; };
struct  MUIP_NList_Sort           { ULONG MethodID; };
struct  MUIP_NList_TestPos        { ULONG MethodID; LONG x; LONG y; struct MUI_NList_TestPos_Result *res; };
struct  MUIP_NList_CopyToClip     { ULONG MethodID; LONG pos; ULONG clipnum; APTR *entries; struct Hook *hook; };
struct  MUIP_NList_UseImage       { ULONG MethodID; Object *obj; LONG imgnum; };


#endif /* MUI_NList_MCC_H */
