#ifndef THEBAR_MCC_H #define THEBAR_MCC_H /* ** TheBar.mcc - Next Generation Toolbar MUI Custom Class ** Copyright (C) 2003-2008 Alfonso Ranieri ** ** TheBar is developed by TheBar.mcc Open Source Team ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ** Lesser General Public License for more details. ** ** TheBar class Support Site: http://www.sf.net/projects/thebar ** ** $Id$ ** $URL$ ** **/ #ifndef LIBRARIES_MUI_H #include #endif #if !defined(__AROS__) && defined(__PPC__) #if defined(__GNUC__) #pragma pack(2) #elif defined(__VBCC__) #pragma amiga-align #endif #endif /***********************************************************************/ #ifndef STACKED // STACKED ensures proper alignment on AROS 64 bit systems #define STACKED #endif /***********************************************************************/ #define MUIC_TheButton "TheButton.mcc" #define MUIC_TheBar "TheBar.mcc" #define MUIC_TheBarVirt "TheBarVirt.mcc" #if defined(__AROS__) && !defined(NO_INLINE_STDARG) #define TheButtonObject MUIOBJMACRO_START(MUIC_TheButton) #define TheBarObject MUIOBJMACRO_START(MUIC_TheBar) #define TheBarVirtObject MUIOBJMACRO_START(MUIC_TheBarVirt) #else #define TheButtonObject MUI_NewObject(MUIC_TheButton #define TheBarObject MUI_NewObject(MUIC_TheBar #define TheBarVirtObject MUI_NewObject(MUIC_TheBarVirt #endif #define THEBAR_VERSION 21 #define THEBARVIRT_VERSION 21 #define THEBUTTON_VERSION 21 /***********************************************************************/ #define TBUTTAGBASE 0xF76B01C8UL #define TBTAGBASE 0xF76B022CUL /***********************************************************************/ /* ** TheBar.mcc Methods */ #define MUIM_TheBar_Rebuild (TBTAGBASE+0) /* v11 PRIVATE */ #define MUIM_TheBar_DeActivate (TBTAGBASE+2) /* v11 PRIVATE */ #define MUIM_TheBar_AddButton (TBTAGBASE+3) /* v11 */ #define MUIM_TheBar_AddSpacer (TBTAGBASE+4) /* v11 PRIVATE */ #define MUIM_TheBar_GetObject (TBTAGBASE+5) /* v11 */ #define MUIM_TheBar_DoOnButton (TBTAGBASE+6) /* v11 */ #define MUIM_TheBar_SetAttr (TBTAGBASE+7) /* v11 */ #define MUIM_TheBar_GetAttr (TBTAGBASE+8) /* v11 */ #define MUIM_TheBar_Clear (TBTAGBASE+9) /* v11 */ #define MUIM_TheBar_Sort (TBTAGBASE+10) /* v11 */ #define MUIM_TheBar_Remove (TBTAGBASE+11) /* v11 */ #define MUIM_TheBar_GetDragImage (TBTAGBASE+12) /* v11 */ #define MUIM_TheBar_Notify (TBTAGBASE+13) /* v21 */ #define MUIM_TheBar_KillNotify (TBTAGBASE+14) /* v21 */ #define MUIM_TheBar_NoNotifySetAttr (TBTAGBASE+15) /* v21 */ /***********************************************************************/ /* ** TheBar.mcc Methods structures */ struct MUIP_TheBar_AddButton { STACKED ULONG MethodID; STACKED struct MUIS_TheBar_Button *button; }; struct MUIP_TheBar_AddSpacer { STACKED ULONG MethodID; STACKED ULONG ID; STACKED ULONG type; }; struct MUIP_TheBar_GetObject { STACKED ULONG MethodID; STACKED ULONG ID; }; struct MUIP_TheBar_DoOnButton { STACKED ULONG MethodID; STACKED ULONG ID; STACKED ULONG method; /* ...args... */ }; struct MUIP_TheBar_SetAttr { STACKED ULONG MethodID; STACKED ULONG ID; STACKED Tag attr; STACKED ULONG value; }; struct MUIP_TheBar_GetAttr { STACKED ULONG MethodID; STACKED ULONG ID; STACKED Tag attr; STACKED ULONG *storage; }; struct MUIP_TheBar_Sort { STACKED ULONG MethodID; STACKED LONG obj[1]; }; struct MUIP_TheBar_Remove { STACKED ULONG MethodID; STACKED ULONG ID; }; struct MUIP_TheBar_GetDragImage { STACKED ULONG MethodID; STACKED ULONG horiz; STACKED ULONG flags; }; struct MUIP_TheBar_Notify { STACKED ULONG MethodID; STACKED ULONG ID; STACKED Tag attr; STACKED ULONG value; STACKED Object *dest; STACKED ULONG followParams; /* ... */ }; struct MUIP_TheBar_KillNotify { STACKED ULONG MethodID; STACKED ULONG ID; STACKED Tag attr; STACKED Object *dest; }; struct MUIP_TheBar_NoNotifySetAttr { STACKED ULONG MethodID; STACKED ULONG ID; STACKED Tag attr; STACKED ULONG value; }; /* MUIM_TheBar_SetAttr, MUIM_TheBar_NoNotifySetAttr, MUIM_TheBar_GetAttr attributes */ #define MUIV_TheBar_Attr_Hide (TBTAGBASE+0) /* v11 */ #define MUIV_TheBar_Attr_Sleep (TBTAGBASE+1) /* v11 */ #define MUIV_TheBar_Attr_Disabled (TBTAGBASE+2) /* v11 */ #define MUIV_TheBar_Attr_Selected (TBTAGBASE+3) /* v11 */ /* ** Compatibility: the above are not "real" attributes, ** but just arguments of a method, so they must be MUIV_ */ #define MUIA_TheBar_Attr_Hide MUIV_TheBar_Attr_Hide #define MUIA_TheBar_Attr_Sleep MUIV_TheBar_Attr_Sleep #define MUIA_TheBar_Attr_Disabled MUIV_TheBar_Attr_Disabled #define MUIA_TheBar_Attr_Selected MUIV_TheBar_Attr_Selected /* MUIM_Notify special Qualifier value */ /* ** This was a bad idea. Don't use it! */ #define MUIV_TheBar_Qualifier (0x49893135) /* v21 */ /***********************************************************************/ /* ** TheBar.mcc Attributes */ #define MUIA_TheBar_MinVer (TBTAGBASE+10) /* v11 ULONG, [I...] */ #define MUIA_TheBar_Buttons (TBTAGBASE+11) /* v11 struct MUIS_TheBar_Button *, [I...] */ #define MUIA_TheBar_Images (TBTAGBASE+12) /* v11 struct MUIS_TheBar_Brush **, [I.G.] */ #define MUIA_TheBar_Pics (TBTAGBASE+13) /* v11 STRTR *, [I...] */ #define MUIA_TheBar_PicsDrawer (TBTAGBASE+14) /* v11 STRTR, [I...] */ #define MUIA_TheBar_ViewMode (TBTAGBASE+15) /* v11 UWORD, [ISGN] */ #define MUIA_TheBar_Borderless (TBTAGBASE+16) /* v11 BOOL, [ISGN] */ #define MUIA_TheBar_Raised (TBTAGBASE+17) /* v11 BOOL, [ISGN] */ #define MUIA_TheBar_Sunny (TBTAGBASE+18) /* v11 BOOL, [ISGN] */ #define MUIA_TheBar_Scaled (TBTAGBASE+19) /* v11 BOOL, [ISGN] */ #define MUIA_TheBar_SpacerIndex (TBTAGBASE+20) /* v11 ULONG, [I.G.] */ #define MUIA_TheBar_Strip (TBTAGBASE+21) /* v11 STRPTR, [I...] */ #define MUIA_TheBar_StripBrush (TBTAGBASE+22) /* v11 struct MUIS_TheBar_Brush *, [I...] */ #define MUIA_TheBar_EnableKeys (TBTAGBASE+23) /* v11 BOOL, [ISGN] */ #define MUIA_TheBar_TextOnly (TBTAGBASE+24) /* v11 BOOL, [..G.] */ #define MUIA_TheBar_LabelPos (TBTAGBASE+25) /* v11 ULONG, [ISGN] */ #define MUIA_TheBar_BarPos (TBTAGBASE+26) /* v11 ULONG, [ISGN] */ #define MUIA_TheBar_DragBar (TBTAGBASE+27) /* v11 BOOL, [ISGN] */ #define MUIA_TheBar_Frame (TBTAGBASE+28) /* v11 BOOL, [ISGN] */ #define MUIA_TheBar_Limbo (TBTAGBASE+29) /* v11 BOOL, [.S..] */ #define MUIA_TheBar_Active (TBTAGBASE+30) /* v11 ULONG, [ISGN] */ #define MUIA_TheBar_Columns (TBTAGBASE+31) /* v11 ULONG, [ISGN] */ #define MUIA_TheBar_Rows (TBTAGBASE+32) /* v11 ULONG, [ISGN] */ #define MUIA_TheBar_FreeHoriz (TBTAGBASE+33) /* v11 ULONG, [ISGN] */ #define MUIA_TheBar_FreeVert (TBTAGBASE+34) /* v11 ULONG, [ISGN] */ #define MUIA_TheBar_Free (TBTAGBASE+35) /* v11 ULONG, [ISGN] */ #define MUIA_TheBar_BarSpacer (TBTAGBASE+36) /* v11 ULONG, [ISGN] */ #define MUIA_TheBar_RemoveSpacers (TBTAGBASE+37) /* v11 ULONG, [ISGN] */ #define MUIA_TheBar_SelImages (TBTAGBASE+39) /* v12 struct MUIS_TheBar_Brush **, [I.G.] */ #define MUIA_TheBar_DisImages (TBTAGBASE+40) /* v12 struct MUIS_TheBar_Brush **, [I.G.] */ #define MUIA_TheBar_SelPics (TBTAGBASE+41) /* v12 STRTR *, [I...] */ #define MUIA_TheBar_DisPics (TBTAGBASE+42) /* v12 STRTR *, [I...] */ #define MUIA_TheBar_SelStrip (TBTAGBASE+43) /* v12 STRPTR, [I...] */ #define MUIA_TheBar_DisStrip (TBTAGBASE+44) /* v12 STRPTR, [I...] */ #define MUIA_TheBar_SelStripBrush (TBTAGBASE+45) /* v12 struct MUIS_TheBar_Brush *, [I...] */ #define MUIA_TheBar_DisStripBrush (TBTAGBASE+46) /* v12 struct MUIS_TheBar_Brush *, [I...] */ #define MUIA_TheBar_StripRows (TBTAGBASE+47) /* v12 ULONG, [I...] */ #define MUIA_TheBar_StripCols (TBTAGBASE+48) /* v12 ULONG, [I...] */ #define MUIA_TheBar_StripHSpace (TBTAGBASE+49) /* v12 ULONG, [I...] */ #define MUIA_TheBar_StripVSpace (TBTAGBASE+50) /* v12 ULONG, [I...] */ #define MUIA_TheBar_HorizSpacing (TBTAGBASE+51) /* v12 ULONG, [I...] */ #define MUIA_TheBar_VertSpacing (TBTAGBASE+52) /* v12 ULONG, [I...] */ #define MUIA_TheBar_BarSpacerSpacing (TBTAGBASE+53) /* v12 ULONG, [I...] */ #define MUIA_TheBar_HorizInnerSpacing (TBTAGBASE+54) /* v12 ULONG, [I...] */ #define MUIA_TheBar_TopInnerSpacing (TBTAGBASE+55) /* v12 ULONG, [I...] */ #define MUIA_TheBar_BottomInnerSpacing (TBTAGBASE+56) /* v12 ULONG, [I...] */ #define MUIA_TheBar_LeftBarFrameSpacing (TBTAGBASE+57) /* v12 ULONG, [I...] */ #define MUIA_TheBar_RightBarFrameSpacing (TBTAGBASE+58) /* v12 ULONG, [I...] */ #define MUIA_TheBar_TopBarFrameSpacing (TBTAGBASE+59) /* v12 ULONG, [I...] */ #define MUIA_TheBar_BottomBarFrameSpacing (TBTAGBASE+60) /* v12 ULONG, [I...] */ #define MUIA_TheBar_HorizTextGfxSpacing (TBTAGBASE+61) /* v12 ULONG, [I...] */ #define MUIA_TheBar_VertTextGfxSpacing (TBTAGBASE+62) /* v12 ULONG, [I...] */ #define MUIA_TheBar_Precision (TBTAGBASE+63) /* v12 ULONG, [I...] */ #define MUIA_TheBar_Scale (TBTAGBASE+65) /* v12 ULONG, [I...] */ #define MUIA_TheBar_DisMode (TBTAGBASE+66) /* v12 ULONG, [I...] */ #define MUIA_TheBar_SpecialSelect (TBTAGBASE+67) /* v12 BOOL, [I...] */ #define MUIA_TheBar_TextOverUseShine (TBTAGBASE+68) /* v12 BOOL, [I...] */ #define MUIA_TheBar_IgnoreSelImages (TBTAGBASE+69) /* v12 BOOL, [I...] */ #define MUIA_TheBar_IgnoreDisImages (TBTAGBASE+70) /* v12 BOOL, [I...] */ #define MUIA_TheBar_DontMove (TBTAGBASE+71) /* v15 BOOL, [I...] */ #define MUIA_TheBar_MouseOver (TBTAGBASE+72) /* v18 ULONG, [ISGN] */ #define MUIA_TheBar_NtRaiseActive (TBTAGBASE+73) /* v18 BOOL, [ISGN] */ #define MUIA_TheBar_SpacersSize (TBTAGBASE+74) /* v18 BOOL, [ISGN] */ #define MUIA_TheBar_Appearance (TBTAGBASE+75) /* v19 struct MUIS_TheBar_Appearance, [..G.] */ #define MUIA_TheBar_IgnoreAppearance (TBTAGBASE+76) /* v19 BOOL [ISGN] */ #define MUIA_TheBar_HoveredButton (TBTAGBASE+77) /* v26 LONG [..GN] */ /***********************************************************************/ /* ** TheBar.mcc Attributes values */ /* MUIA_TheBar_ViewMode */ enum { MUIV_TheBar_ViewMode_TextGfx, MUIV_TheBar_ViewMode_Gfx, MUIV_TheBar_ViewMode_Text, MUIV_TheBar_ViewMode_Last }; /* MUIA_TheBar_LabelPos */ enum { MUIV_TheBar_LabelPos_Bottom, MUIV_TheBar_LabelPos_Top, MUIV_TheBar_LabelPos_Right, MUIV_TheBar_LabelPos_Left, MUIV_TheBar_LabelPos_Last, }; /* MUIA_TheBar_BarPos */ enum { MUIV_TheBar_BarPos_Left, MUIV_TheBar_BarPos_Center, MUIV_TheBar_BarPos_Right, MUIV_TheBar_BarPos_Last, }; #define MUIV_TheBar_BarPos_Up MUIV_TheBar_BarPos_Left #define MUIV_TheBar_BarPos_Down MUIV_TheBar_BarPos_Right /* MUIA_TheBar_RemoveSpacers */ enum { MUIV_TheBar_RemoveSpacers_Bar = 1<<0, /* v11 */ MUIV_TheBar_RemoveSpacers_Button = 1<<1, /* v11 */ MUIV_TheBar_RemoveSpacers_Image = 1<<2, /* v11 */ MUIV_TheBar_RemoveSpacers_All = MUIV_TheBar_RemoveSpacers_Bar|\ MUIV_TheBar_RemoveSpacers_Button|\ MUIV_TheBar_RemoveSpacers_Image, }; /* MUIA_TheBar_Precision */ enum { MUIV_TheBar_Precision_GUI, MUIV_TheBar_Precision_Icon, MUIV_TheBar_Precision_Image, MUIV_TheBar_Precision_Exact, MUIV_TheBar_Precision_Last, }; /* MUIA_TheBar_DisMode */ enum { MUIV_TheBar_DisMode_Shape, MUIV_TheBar_DisMode_Grid, MUIV_TheBar_DisMode_FullGrid, MUIV_TheBar_DisMode_Sunny, MUIV_TheBar_DisMode_Blend, MUIV_TheBar_DisMode_BlendGrey, MUIV_TheBar_DisMode_Last, }; /* MUIA_TheBar_SpacersSize */ enum { MUIV_TheBar_SpacersSize_Quarter, MUIV_TheBar_SpacersSize_Half, MUIV_TheBar_SpacersSize_One, MUIV_TheBar_SpacersSize_None, MUIV_TheBar_SpacersSize_OnePoint, MUIV_TheBar_SpacersSize_TwoPoint, MUIV_TheBar_SpacersSize_Last, }; /* These are private for now */ #define MUIV_TheBar_SpacersSize_PointsFlag 0x40 #define MUIV_TheBar_SpacersSize_Points(x) (MUIV_TheBar_SpacersSize_PointsFlag | (((ULONG)x) & 0x3f)) #define MUIV_TheBar_SpacersSize_GetPoints(x) (((ULONG)x) & 0x3f) #define MUIV_TheBar_SpacersSize_IsValid(x) ((((ULONG)x) & MUIV_TheBar_SpacersSize_PointsFlag) ? ((((ULONG)x) & 0xffffffbf)<=0x3f) : (((ULONG)x)