2 Copyright © 1995-2005, The AROS Development Team. All rights reserved.
6 #ifndef AROSLISTVIEW_INTERN_H
7 #define AROSLISTVIEW_INTERN_H
12 # include <exec/types.h>
14 #ifndef EXEC_LIBRARIES_H
15 # include <exec/libraries.h>
17 #ifndef UTILITY_HOOKS_H
18 # include <utility/hooks.h>
21 # include <dos/bptr.h>
23 #ifndef GRAPHICS_RASTPORT_H
24 # include <graphics/rastport.h>
26 #ifndef INTUITION_CLASSES_H
27 # include <intuition/classes.h>
29 #ifndef INTUITION_CGHOOKS_H
30 # include <intuition/cghooks.h>
32 #ifndef INTUITION_GADGETCLASS_H
33 # include <intuition/gadgetclass.h>
36 #define TURN_OFF_DEBUG
40 struct Hook
*lvd_DisplayHook
;
41 struct Hook
*lvd_RenderHook
;
44 struct ColumnAttrs
*lvd_ColAttrs
;
45 struct TextFont
*lvd_Font
;
46 LONG lvd_First
; /* The nuber of the first item showed in list */
47 UWORD lvd_EntryHeight
;
51 UWORD lvd_DamageOffset
;
55 UBYTE lvd_VertSpacing
;
58 /* Number of columns that the displayhook returns items for */
60 /* Number of colomns to view. Depends on AROSA_List_Format */
61 UBYTE lvd_ViewedColumns
;
66 /* To prevent 'echo' OM_UPDATEs (double redraws) */
67 UBYTE lvd_NotifyCount
;
69 /* For testting for doubleclicks */
71 ULONG lvd_StartMicros
;
77 /* The minwitdh of one or more colums is as large as the biggest entry */
78 #define LVFLG_SPECIALCOLWIDTH (1 << 0)
80 #define LVFLG_READONLY (1 << 1)
81 #define LVFLG_MULTISELECT (1 << 2)
82 #define LVFLG_DOUBLECLICK (1 << 3)
86 #define LVD(x) ((struct LVData *)x)
89 #define UB(x) ((UBYTE *)x)
92 #define EG(o) ((struct ExtGadget *)o)
95 #define MIN(a,b) ((a < b) ? a : b)
97 #define ReCalcEntryHeight(data) \
98 data->lvd_EntryHeight = data->lvd_Font->tf_YSize \
99 + data->lvd_VertSpacing;
102 #define NumVisible(ibox, eh) \
103 (((ibox)->Height - LV_BORDERWIDTH_Y * 2) / eh)
109 #define LV_BORDERWIDTH_X 2
110 #define LV_BORDERWIDTH_Y 2
112 #define LV_DEFAULTHORSPACING 2
113 #define LV_DEFAULTVERTSPACING 1
117 UBYTE ca_Pen
; /* Background pen for the entry */
121 WORD ca_MinWidth
; /* A value of -1 makes minwidth as small as the largest text */
123 /* computed before each render */
129 /* Index into the array filled by displayhook for getting text for this column */
134 #define CA_ALIGN_MASK (3)
136 #define CA_ALIGN_LEFT 0
137 #define CA_ALIGN_RIGHT 1
138 #define CA_ALIGN_CENTRE 2
140 #define CAFLG_BAR (1 << 3)
141 #define CAFLG_SPECIALCOLWIDTH (1 << 4)
145 BOOL
ParseFormatString(STRPTR
, struct LVData
*);
147 VOID
RenderEntries(Class
*, Object
*, struct gpRender
*, LONG
, UWORD
, BOOL
);
149 VOID
GetGadgetIBox(Object
*, struct GadgetInfo
*, struct IBox
*);
150 VOID
DrawListBorder(struct RastPort
*, UWORD
*, struct IBox
*, BOOL
);
151 VOID
ComputeColumnWidths(UWORD
, struct LVData
*);
152 VOID
ComputeColLeftRight(UWORD
, struct LVData
*);
153 UWORD
ShownEntries(struct LVData
*, struct IBox
*);
154 VOID
NotifyAttrs(Class
*, Object
*, struct opSet
*, struct TagItem
*);
156 #endif /* AROSLISTVIEW_INTERN_H */