#ifndef SPEEDBAR_MCC_H
#define SPEEDBAR_MCC_H

/***********************************************************************
**
** SpeedBar.mcc
** Copyright 1999-2002 by Ranieri/Tellini
**
** $VER: SpeedBar_mcc.h 14.4 (3.6.2002)
**
***********************************************************************/

#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)

/***********************************************************************/
/*
** Methods structures
*/

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... */ };

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

#define MUIA_SpeedBar_Borderless        (SBTAGBASE+1)   /*  BOOL                [ISGN]     */
#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                [ISGN]     */
#define MUIA_SpeedBar_Buttons           (SBTAGBASE+5)   /*  struct SBButtons *  [I...]     */
#define MUIA_SpeedBar_ViewMode          (SBTAGBASE+6)   /*  UWORD               [ISGN]     */
#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                [ISGN]     */
#define MUIA_SpeedBar_Sunny             (SBTAGBASE+11)  /*  BOOL                [ISGN]     */
#define MUIA_SpeedBar_SameHeight        (SBTAGBASE+12)  /*  BOOL                [I...]     */
#define MUIA_SpeedBar_EnableUnderscore  (SBTAGBASE+13)  /*  BOOL                [IS..] 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_Strip             (SBTAGBASE+19)  /*  STRPTR              [I...] V12 */
#define MUIA_SpeedBar_StripBrush        (SBTAGBASE+20)  /*  STRPTR              [I...] V12 */
#define MUIA_SpeedBar_StripButtons      (SBTAGBASE+21)  /*  UWORD               [I...] V12 */
#define MUIA_SpeedBar_LabelPosition     (SBTAGBASE+22)  /*  UWORD               [ISGN] V12 */

/***********************************************************************/
/*
** Attributes values
*/

enum
{
    MUIV_SpeedBar_ViewMode_TextGfx,
    MUIV_SpeedBar_ViewMode_Gfx,
    MUIV_SpeedBar_ViewMode_Text,
};

enum
{
    MUIV_SpeedBar_LabelPosition_Bottom,
    MUIV_SpeedBar_LabelPosition_Top,
    MUIV_SpeedBar_LabelPosition_Right,
    MUIV_SpeedBar_LabelPosition_Left,
};

/***********************************************************************/
/*
** 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;      /* See below                                            */
    struct IClass   *Class;     /* Easy way of getting a toolbar of subclassed buttons  */
    Object          *Object;    /* Filled after init                                    */
};

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

/* Flags */
enum
{
    MUIV_SpeedBar_ButtonFlag_Immediate = 1<<0,
    MUIV_SpeedBar_ButtonFlag_Disabled  = 1<<1,
    MUIV_SpeedBar_ButtonFlag_Selected  = 1<<2,
    MUIV_SpeedBar_ButtonFlag_Toggle    = 1<<3,
};

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

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

#endif /* SPEEDBAR_MCC_H */
