#ifndef SPEEDBAR_MCC_H
#define SPEEDBAR_MCC_H

/***********************************************************************
**
** SpeedBar.mcc
** Copyright 1999-2002 by Simone Tellini
**
** $VER: SpeedBar_mcc.h 12.3 (6.2.2002)
** Updated by Alfonso Ranieri
**
***********************************************************************/

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

/***********************************************************************/

#define MUIC_SpeedBar       "SpeedBar.mcc"
#define SpeedBarObject      MUI_NewObject(MUIC_SpeedBar

/***********************************************************************/

#define SBTAGBASE 0xF76B00A0

/***********************************************************************/
/*
** Methods
*/

#define MUIM_SpeedBar_AddButton         (SBTAGBASE+1)
#define MUIM_SpeedBar_AddButtonObject   (SBTAGBASE+2)
#define MUIM_SpeedBar_AddSpacer         (SBTAGBASE+3)
#define MUIM_SpeedBar_Clear             (SBTAGBASE+4)
#define MUIM_SpeedBar_Rebuild           (SBTAGBASE+5)
#define MUIM_SpeedBar_AddNotify         (SBTAGBASE+6)   /*  PRIVATE  */
#define MUIM_SpeedBar_GetObject         (SBTAGBASE+7)
#define MUIM_SpeedBar_DoOnButton        (SBTAGBASE+8)

/***********************************************************************/
/*
** Attributes
*/

#define MUIA_SpeedBar_Borderless        (SBTAGBASE+1)   /*  BOOL                [IS..]     */
#define MUIA_SpeedBar_Images            (SBTAGBASE+2)   /*  struct MyBrush **   [I.G.]     */
#define MUIA_SpeedBar_SpacerIndex       (SBTAGBASE+3)   /*  UWORD               [I.G.]     */
#define MUIA_SpeedBar_RaisingFrame      (SBTAGBASE+4)   /*  BOOL                [IS..]     */
#define MUIA_SpeedBar_Buttons           (SBTAGBASE+5)   /*  struct SBButtons *  [I...]     */
#define MUIA_SpeedBar_ViewMode          (SBTAGBASE+6)   /*  UWORD               [ISG.]     */
#define MUIA_SpeedBar_SameWidth         (SBTAGBASE+7)   /*  BOOL                [I...]     */
#define MUIA_SpeedBar_Spread            (SBTAGBASE+8)   /*  BOOL                [I...]     */
#define MUIA_SpeedBar_StripUnderscore   (SBTAGBASE+9)   /*  BOOL                [I...]     */
#define MUIA_SpeedBar_SmallImages       (SBTAGBASE+10)  /*  BOOL                [IS..]     */
#define MUIA_SpeedBar_Sunny             (SBTAGBASE+11)  /*  BOOL                [IS..]     */
#define MUIA_SpeedBar_SameHeight        (SBTAGBASE+12)  /*  BOOL                [I...]     */
#define MUIA_SpeedBar_EnableUnderscore  (SBTAGBASE+13)  /*  BOOL                [I...] V12 */
#define MUIA_SpeedBar_Pics              (SBTAGBASE+14)  /*  STRTR *             [I...] V12 */
#define MUIA_SpeedBar_PicsDrawer        (SBTAGBASE+15)  /*  STRTR               [I...] V12 */
#define MUIA_SpeedBar_TextOnly          (SBTAGBASE+16)  /*  BOOL                [..G.] V12 */
#define MUIA_SpeedBar_BarSpacer         (SBTAGBASE+17)  /*  BOOL                [ISGN] V12 */
#define MUIA_SpeedBar_UseMouseMove      (SBTAGBASE+18)  /*  BOOL                [I...] V12 */
#define MUIA_SpeedBar_Strip             (SBTAGBASE+19)  /*  STRPTR              [I...] V12 */
#define MUIA_SpeedBar_StripBrush        (SBTAGBASE+20)  /*  STRPTR              [I...] V12 */
#define MUIA_SpeedBar_StripButtons      (SBTAGBASE+21)  /*  UWORD               [I...] V12 */

/***********************************************************************/
/*
** Values
*/

#define MUIV_SpeedBar_Spacer                ((ULONG)-1)  /* Add a spacer                      */
#define MUIV_SpeedBar_End                   ((ULONG)-2)  /* Ends a MUIS_SpeedBar_Button array */

#define MUIV_SpeedBar_ButtonFlag_Immediate  (1<<0)
#define MUIV_SpeedBar_ButtonFlag_Disabled   (1<<1)
#define MUIV_SpeedBar_ButtonFlag_Selected   (1<<2)
#define MUIV_SpeedBar_ButtonFlag_Toggle     (1<<3)

#define MUIV_SpeedBar_ViewMode_TextGfx      0
#define MUIV_SpeedBar_ViewMode_Gfx          1
#define MUIV_SpeedBar_ViewMode_Text         2

/***********************************************************************/
/*
** Structures
*/

/*
** MUIA_SpeedBar_Buttons is an array of
** this structure
*/
struct MUIS_SpeedBar_Button
{
        ULONG           Img;        /* image index                                          */
        STRPTR          Text;       /* button label                                         */
        STRPTR          Help;       /* button help                                          */
        UWORD           Flags;
        struct IClass   *Class;     /* easy way of getting a toolbar of subclassed buttons  */
        Object          *Object;    /* filled after init                                    */
};

/*
** MUIA_SpeedBar_Images is an array of pointers
** to this structure
**/
struct MyBrush
{
    UWORD           Width;
    UWORD           Height;
    struct BitMap   *BitMap;
    ULONG           *Colors;
};

struct MUIP_SpeedBar_AddButton { ULONG MethodID; struct MUIS_SpeedBar_Button *Button; };
struct MUIP_SpeedBar_AddButtonObject { ULONG MethodID; Object *Button; };
struct MUIP_SpeedBar_AddNotify { ULONG MethodID; Object *Dest; struct MUIP_Notify *Msg; };
struct MUIP_SpeedBar_GetObject { ULONG MethodID; ULONG Object; };
struct MUIP_SpeedBar_DoOnButton { ULONG MethodID; ULONG Button; ULONG Method; /* ...args... */ };

/***********************************************************************/

#endif /* SPEEDBAR_MCC_H */
