1 #ifndef GADGETS_LISTBROWSER_H 2 #define GADGETS_LISTBROWSER_H 3 4 /* 5 listbrowser.gadget definitions (V45) 6 7 Copyright © 2002 The MorphOS Development Team, All Rights Reserved. 8 */ 9 10 #ifndef REACTION_REACTION_H 11 # include <reaction/reaction.h> 12 #endif 13 14 #ifndef INTUITION_GADGETCLASS_H 15 # include <intuition/gadgetclass.h> 16 #endif 17 18 #pragma pack(2) 19 20 21 #define LBM_ADDNODE (0x580001L) 22 23 struct lbAddNode 24 { 25 ULONG MethodID; 26 struct GadgetInfo *lba_GInfo; 27 struct Node *lba_Node; 28 struct TagItem *lba_NodeAttrs; 29 }; 30 31 32 #define LBM_REMNODE (0x580002L) 33 34 struct lbRemNode 35 { 36 ULONG MethodID; 37 struct GadgetInfo *lbr_GInfo; 38 struct Node *lbr_Node; 39 }; 40 41 42 #define LBM_EDITNODE (0x580003L) 43 44 struct lbEditNode 45 { 46 ULONG MethodID; 47 struct GadgetInfo *lbe_GInfo; 48 struct Node *lbe_Node; 49 struct TagItem *lbe_NodeAttrs; 50 }; 51 52 53 #define LBM_SORT (0x580004L) 54 55 struct lbSort 56 { 57 ULONG MethodID; 58 struct GadgetInfo *lbs_GInfo; 59 ULONG lbs_Column; 60 ULONG lbs_Reverse; 61 struct Hook *lbs_CompareHook; 62 }; 63 64 65 #define LBM_SHOWCHILDREN (0x580005L) 66 67 struct lbShowChildren 68 { 69 ULONG MethodID; 70 struct GadgetInfo *lbsc_GInfo; 71 struct Node *lbsc_Node; 72 WORD lbsc_Depth; 73 }; 74 75 76 #define LBM_HIDECHILDREN (0x580006L) 77 78 struct lbHideChildren 79 { 80 ULONG MethodID; 81 struct GadgetInfo *lbhc_GInfo; 82 struct Node *lbhc_Node; 83 WORD lbhc_Depth; 84 }; 85 86 87 /* listbrowser.gadget node attributes */ 88 89 #define LBNA_Dummy (TAG_USER + 0x5003500) 90 #define LBNA_Selected (LBNA_Dummy + 1) 91 #define LBNA_Flags (LBNA_Dummy + 2) 92 #define LBNA_UserData (LBNA_Dummy + 3) 93 #define LBNA_Column (LBNA_Dummy + 4) 94 #define LBNCA_Text (LBNA_Dummy + 5) 95 #define LBNCA_Integer (LBNA_Dummy + 6) 96 #define LBNCA_FGPen (LBNA_Dummy + 7) 97 #define LBNCA_BGPen (LBNA_Dummy + 8) 98 #define LBNCA_Image (LBNA_Dummy + 9) 99 #define LBNCA_SelImage (LBNA_Dummy + 10) 100 #define LBNCA_HorizJustify (LBNA_Dummy + 11) 101 #define LBNCA_Justification (LBNCA_HorizJustify) 102 #define LBNA_Generation (LBNA_Dummy + 12) 103 #define LBNCA_Editable (LBNA_Dummy + 13) 104 #define LBNCA_MaxChars (LBNA_Dummy + 14) 105 #define LBNCA_CopyText (LBNA_Dummy + 15) 106 #define LBNA_CheckBox (LBNA_Dummy + 16) 107 #define LBNA_Checked (LBNA_Dummy + 17) 108 #define LBNA_NodeSize (LBNA_Dummy + 18) 109 #define LBNCA_EditTags (LBNA_Dummy + 19) 110 #define LBNCA_RenderHook (LBNA_Dummy + 20) 111 #define LBNCA_HookHeight (LBNA_Dummy + 22) 112 #define LBNA_MemPool (LBNA_Dummy + 23) 113 #define LBNA_NumColumns (LBNA_Dummy + 24) 114 #define LBNA_Priority (LBNA_Dummy + 25) 115 #define LBNCA_CopyInteger (LBNA_Dummy + 26) 116 #define LBNCA_WordWrap (LBNA_Dummy + 27) 117 #define LBNCA_VertJustify (LBNA_Dummy + 28) 118 119 120 /* LBNA_Flags flags */ 121 122 #define LBFLG_READONLY 1 123 #define LBFLG_CUSTOMPENS 2 124 #define LBFLG_HASCHILDREN 4 125 #define LBFLG_SHOWCHILDREN 8 126 #define LBFLG_HIDDEN 16 127 128 129 /* LBNA_HorizJustify modes */ 130 131 #define LCJ_LEFT 0 132 #define LCJ_CENTER 1 133 #define LCJ_RIGHT 2 134 135 /* Language fix */ 136 137 #define LCJ_CENTRE LCJ_CENTER 138 139 140 /* LBNA_VertJustify modes */ 141 142 #define LRJ_BOTTOM 0 143 #define LRJ_CENTER 1 144 #define LRJ_TOP 2 145 146 /* Language fix */ 147 148 #define LRJ_CENTRE LRJ_CENTER 149 150 151 /* LBNCA_RenderHook definitions */ 152 153 #define LB_DRAW 0x202L 154 155 #define LBCB_OK 0 156 #define LBCB_UNKNOWN 1 157 158 #define LBR_NORMAL 0 159 #define LBR_SELECTED 1 160 161 162 struct LBDrawMsg 163 { 164 ULONG lbdm_MethodID; 165 struct RastPort *lbdm_RastPort; 166 struct DrawInfo *lbdm_DrawInfo; 167 struct Rectangle lbdm_Bounds; 168 ULONG lbdm_State; 169 }; 170 171 172 struct LBSortMsg 173 { 174 ULONG lbsm_TypeA; 175 union 176 { 177 LONG Integer; 178 STRPTR Text; 179 } lbsm_DataA; 180 APTR lbsm_UserDataA; 181 182 ULONG lbsm_TypeB; 183 union 184 { 185 LONG Integer; 186 STRPTR Text; 187 } lbsm_DataB; 188 APTR lbsm_UserDataB; 189 }; 190 191 192 struct ColumnInfo 193 { 194 WORD ci_Width; 195 STRPTR ci_Title; 196 ULONG ci_Flags; 197 }; 198 199 200 /* ColumnInfo flags */ 201 202 #define CIF_WEIGHTED 0 203 #define CIF_FIXED 1 204 #define CIF_DRAGGABLE 2 205 #define CIF_NOSEPARATORS 4 206 #define CIF_SORTABLE 8 207 208 209 /* xxxLBColumnInfo() attributes */ 210 211 #define LBCIA_MemPool (LBNA_Dummy + 50) 212 #define LBCIA_Column (LBNA_Dummy + 51) 213 #define LBCIA_Title (LBNA_Dummy + 52) 214 #define LBCIA_Weight (LBNA_Dummy + 53) 215 #define LBCIA_Width (LBNA_Dummy + 54) 216 #define LBCIA_Flags (LBNA_Dummy + 55) 217 218 219 /* Attributes defined by listbrowser.gadget */ 220 221 #define LISTBROWSER_Dummy (REACTION_Dummy + 0x0003000) 222 #define LISTBROWSER_Top (LISTBROWSER_Dummy + 1) 223 #define LISTBROWSER_Reserved1 (LISTBROWSER_Dummy + 2) 224 #define LISTBROWSER_Labels (LISTBROWSER_Dummy + 3) 225 #define LISTBROWSER_Selected (LISTBROWSER_Dummy + 4) 226 #define LISTBROWSER_SelectedNode (LISTBROWSER_Dummy + 5) 227 #define LISTBROWSER_MultiSelect (LISTBROWSER_Dummy + 6) 228 #define LISTBROWSER_VertSeparators (LISTBROWSER_Dummy + 7) 229 #define LISTBROWSER_Separators (LISTBROWSER_VertSeparators) 230 #define LISTBROWSER_ColumnInfo (LISTBROWSER_Dummy + 8) 231 #define LISTBROWSER_MakeVisible (LISTBROWSER_Dummy + 9) 232 #define LISTBROWSER_VirtualWidth (LISTBROWSER_Dummy + 10) 233 #define LISTBROWSER_Borderless (LISTBROWSER_Dummy + 11) 234 #define LISTBROWSER_VerticalProp (LISTBROWSER_Dummy + 12) 235 #define LISTBROWSER_HorizontalProp (LISTBROWSER_Dummy + 13) 236 #define LISTBROWSER_Left (LISTBROWSER_Dummy + 14) 237 #define LISTBROWSER_Reserved2 (LISTBROWSER_Dummy + 15) 238 #define LISTBROWSER_AutoFit (LISTBROWSER_Dummy + 16) 239 #define LISTBROWSER_ColumnTitles (LISTBROWSER_Dummy + 17) 240 #define LISTBROWSER_ShowSelected (LISTBROWSER_Dummy + 18) 241 #define LISTBROWSER_VPropTotal (LISTBROWSER_Dummy + 19) 242 #define LISTBROWSER_VPropTop (LISTBROWSER_Dummy + 20) 243 #define LISTBROWSER_VPropVisible (LISTBROWSER_Dummy + 21) 244 #define LISTBROWSER_HPropTotal (LISTBROWSER_Dummy + 22) 245 #define LISTBROWSER_HPropTop (LISTBROWSER_Dummy + 23) 246 #define LISTBROWSER_HPropVisible (LISTBROWSER_Dummy + 24) 247 #define LISTBROWSER_MouseX (LISTBROWSER_Dummy + 25) 248 #define LISTBROWSER_MouseY (LISTBROWSER_Dummy + 26) 249 #define LISTBROWSER_Hierarchical (LISTBROWSER_Dummy + 27) 250 #define LISTBROWSER_ShowImage (LISTBROWSER_Dummy + 28) 251 #define LISTBROWSER_HideImage (LISTBROWSER_Dummy + 29) 252 #define LISTBROWSER_LeafImage (LISTBROWSER_Dummy + 30) 253 #define LISTBROWSER_ScrollRaster (LISTBROWSER_Dummy + 31) 254 #define LISTBROWSER_Spacing (LISTBROWSER_Dummy + 32) 255 #define LISTBROWSER_Editable (LISTBROWSER_Dummy + 33) 256 #define LISTBROWSER_EditNode (LISTBROWSER_Dummy + 35) 257 #define LISTBROWSER_EditColumn (LISTBROWSER_Dummy + 36) 258 #define LISTBROWSER_EditTags (LISTBROWSER_Dummy + 39) 259 #define LISTBROWSER_Position (LISTBROWSER_Dummy + 34) 260 #define LISTBROWSER_RelEvent (LISTBROWSER_Dummy + 37) 261 #define LISTBROWSER_NumSelected (LISTBROWSER_Dummy + 38) 262 #define LISTBROWSER_RelColumn (LISTBROWSER_Dummy + 40) 263 #define LISTBROWSER_HorizSeparators (LISTBROWSER_Dummy + 41) 264 #define LISTBROWSER_CheckImage (LISTBROWSER_Dummy + 42) 265 #define LISTBROWSER_UncheckedImage (LISTBROWSER_Dummy + 43) 266 #define LISTBROWSER_TotalNodes (LISTBROWSER_Dummy + 44) 267 #define LISTBROWSER_MinNodeSize (LISTBROWSER_Dummy + 45) 268 #define LISTBROWSER_TitleClickable (LISTBROWSER_Dummy + 46) 269 #define LISTBROWSER_MinVisible (LISTBROWSER_Dummy + 47) 270 #define LISTBROWSER_Reserved6 (LISTBROWSER_Dummy + 48) 271 #define LISTBROWSER_Reserved7 (LISTBROWSER_Dummy + 49) 272 #define LISTBROWSER_PersistSelect (LISTBROWSER_Dummy + 50) 273 #define LISTBROWSER_CursorSelect (LISTBROWSER_Dummy + 51) 274 #define LISTBROWSER_CursorNode (LISTBROWSER_Dummy + 52) 275 #define LISTBROWSER_FastRender (LISTBROWSER_Dummy + 53) 276 #define LISTBROWSER_TotalVisibleNodes (LISTBROWSER_Dummy + 54) 277 #define LISTBROWSER_WrapText (LISTBROWSER_Dummy + 55) 278 279 280 /* LISTBROWSER_Position values */ 281 282 #define LBP_LINEUP 1 283 #define LBP_LINEDOWN 2 284 #define LBP_PAGEUP 3 285 #define LBP_PAGEDOWN 4 286 #define LBP_TOP 5 287 #define LBP_BOTTOM 6 288 #define LBP_SHIFTLEFT 10 289 #define LBP_SHIFTRIGHT 11 290 #define LBP_LEFTEDGE 12 291 #define LBP_RIGHTEDGE 13 292 293 294 /* LISTBROWSER_RelEvent values */ 295 296 #define LBRE_NORMAL 1 297 #define LBRE_HIDECHILDREN 2 298 #define LBRE_SHOWCHILDREN 4 299 #define LBRE_EDIT 8 300 #define LBRE_DOUBLECLICK 16 301 #define LBRE_CHECKED 32 302 #define LBRE_UNCHECKED 64 303 #define LBRE_TITLECLICK 128 304 #define LBRE_COLUMNADJUST 256 305 306 307 #pragma pack() 308 309 #endif /* GADGETS_LISTBROWSER_H */