4 /***************************************************************************
6 TheBar.mcc - Next Generation Toolbar MUI Custom Class
7 Copyright (C) 2003-2005 Alfonso Ranieri
8 Copyright (C) 2005-2007 by TheBar.mcc Open Source Team
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Lesser General Public
12 License as published by the Free Software Foundation; either
13 version 2.1 of the License, or (at your option) any later version.
15 This library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 TheBar class Support Site: http://www.sf.net/projects/thebar
22 $Id: private.h 134 2007-12-03 23:12:52Z damato $
24 ***************************************************************************/
26 #include <mui/TheBar_mcc.h>
28 #include "TheBar_mcp.h"
30 #include <mui/muiundoc.h>
32 /***************************************************************************/
34 extern ULONG lib_flags
;
36 extern struct MUI_CustomClass
*lib_thisClass
;
37 extern struct MUI_CustomClass
*lib_spacerClass
;
38 extern struct MUI_CustomClass
*lib_dragBarClass
;
47 /***************************************************************************/
55 #define STATICSORTSIZE 31
60 struct MinList buttons
;
62 struct Screen
*screen
;
65 struct MUIS_TheBar_Brush
**brushes
;
66 struct MUIS_TheBar_Brush
**sbrushes
;
67 struct MUIS_TheBar_Brush
**dbrushes
;
68 struct MUIS_TheBar_Strip strip
;
71 struct MUIS_TheBar_Brush image
;
73 struct pen gpens
[256];
75 struct MUIS_TheBar_Brush simage
;
76 struct pen spens
[256];
77 struct pen sgpens
[256];
79 struct MUIS_TheBar_Brush dimage
;
80 struct pen dpens
[256];
81 struct pen dgpens
[256];
109 ULONG leftBarFrameSpacing
;
110 ULONG rightBarFrameSpacing
;
111 ULONG topBarFrameSpacing
;
112 ULONG bottomBarFrameSpacing
;
113 ULONG barSpacerSpacing
;
114 ULONG horizInnerSpacing
;
115 ULONG topInnerSpacing
;
116 ULONG bottomInnerSpacing
;
117 ULONG horizTextGfxSpacing
;
118 ULONG vertTextGfxSpacing
;
119 LONG barFrameShinePen
;
120 LONG barFrameShadowPen
;
123 ULONG sort
[STATICSORTSIZE
+1];
127 ULONG stripHorizSpace
;
128 ULONG stripVertSpace
;
130 struct MUI_DragImage
*dm
;
131 struct MUIS_TheBar_DragImage di
;
133 struct BitMap
*gradbm
;
134 struct MUIS_TheBar_Gradient grad
;
136 struct MUIS_TheBar_Appearance ap
;
147 #if defined(__MORPHOS__) || defined(__amigaos4__)
157 struct MUI_EventHandlerNode eh
;
164 FLG_Borderless
= 1<<1,
168 FLG_EnableKeys
= 1<<5,
172 FLG_FreeBrushes
= 1<<9,
173 FLG_FreeStrip
= 1<<10,
174 FLG_Background
= 1<<11,
175 FLG_IsInVirtgroup
= 1<<12,
179 FLG_FreeHoriz
= 1<<16,
180 FLG_FreeVert
= 1<<17,
181 FLG_BarSpacer
= 1<<18,
183 FLG_CyberMap
= 1<<21,
184 FLG_CyberDeep
= 1<<22,
185 FLG_RebuildbitMaps
= 1<<23,
191 FLG2_Gradient
= 1<<0,
192 FLG2_IgnoreAppearance
= 1<<1,
193 FLG2_ForceWindowActivity
= 1<<2,
194 FLG2_EventHandler
= 1<<3,
200 UFLG_UserHorizSpacing
= 1<<0,
201 UFLG_UserVertSpacing
= 1<<1,
202 UFLG_UserBarSpacerSpacing
= 1<<2,
203 UFLG_UserHorizInnerSpacing
= 1<<3,
204 UFLG_UserTopInnerSpacing
= 1<<4,
205 UFLG_UserBottomInnerSpacing
= 1<<5,
206 UFLG_UserLeftBarFrameSpacing
= 1<<6,
207 UFLG_UserRightBarFrameSpacing
= 1<<7,
208 UFLG_UserTopBarFrameSpacing
= 1<<8,
209 UFLG_UserBottomBarFrameSpacing
= 1<<9,
210 UFLG_UserHorizTextGfxSpacing
= 1<<10,
211 UFLG_UserVertTextGfxSpacing
= 1<<11,
212 UFLG_UserPrecision
= 1<<12,
213 UFLG_UserScale
= 1<<13,
214 UFLG_UserDisMode
= 1<<14,
215 UFLG_UserSpecialSelect
= 1<<15,
216 UFLG_SpecialSelect
= 1<<16,
217 UFLG_UserTextOverUseShine
= 1<<17,
218 UFLG_TextOverUseShine
= 1<<18,
219 UFLG_UserIgnoreSelImages
= 1<<19,
220 UFLG_IgnoreSelImages
= 1<<20,
221 UFLG_UserIgnoreDisImages
= 1<<21,
222 UFLG_IgnoreDisImages
= 1<<22,
228 UFLG2_UserDontMove
= 1<<0,
229 UFLG2_DontMove
= 1<<1,
230 UFLG2_UserNtRaiseActive
= 1<<2,
231 UFLG2_NtRaiseActive
= 1<<3,
232 UFLG2_UserSpacersSize
= 1<<4,
233 UFLG2_UserFrame
= 1<<5,
236 /***********************************************************************/
247 struct IClass
*class;
249 struct MinList notifyListClone
;
257 struct MinNode node
; // to link it in the notifies list of a button
258 struct MUIP_Notify msg
; // the cached MUI Notify message
264 BFLG_Immediate
= 1<<1,
266 BFLG_Disabled
= 1<<3,
267 BFLG_Selected
= 1<<4,
271 BFLG_TableHide
= 1<<23,
274 /***********************************************************************/
277 void build(struct InstData
*data
);
278 void freeBitMaps(struct InstData
*data
);
280 /***********************************************************************/
284 /***********************************************************************/
286 // some general macros
287 #define RAWIDTH(w) ((((UWORD)(w))+15)>>3 & 0xFFFE)
288 #define BOOLSAME(a,b) (((a) ? TRUE : FALSE)==((b) ? TRUE : FALSE))
289 #define getconfigitem(cl,obj,item,ptr) DoSuperMethod(cl,obj,MUIM_GetConfigItem,item,(ULONG)ptr)
291 #if !defined(IsMinListEmpty)
292 #define IsMinListEmpty(x) (((x)->mlh_TailPred) == (struct MinNode *)(x))
295 #endif /* _PRIVATE_H */