@database "label_ic" @master "AMIDEV:NDK/Autodocs/label_ic.doc" @Node Main "label_ic.doc" @toc "Autodocs/AG/INDEX/Main" @{" --datasheet--() " Link "--datasheet--()"} @{" LABEL_GetClass() " Link "LABEL_GetClass()"} @EndNode @Node "--datasheet--()" "label_ic/--datasheet--" @{b} NAME@{ub} label_ic -- @{"Image" Link "INCLUDE:intuition/intuition.h/Main" 710} class for creating identification labels @{b} SUPERCLASS@{ub} imageclass @{b} REQUIRES@{ub} None. @{b} DESCRIPTION@{ub} Label is an image class suitable for creating identification labels, such as those that might appear next to or inside a gadget, or as some kind of title in a window. A label consists of text and graphics mixed in a variety of ways. @{b} METHODS@{ub} @{"OM_NEW" Link "tabs_gc/OM_NEW"} -- Create the label image. Passed to superclass, then @{"OM_SET" Link "tabs_gc/OM_SET"}. @{"OM_GET" Link "tabs_gc/OM_GET"} -- Get object attributes. Passed to superclass first. @{"OM_SET" Link "tabs_gc/OM_SET"} -- Set object attributes. Passed to superclass first. OM_UPDATE -- Set object notification attributes. Passed to superclass first. IM_DRAW -- Renders the images. Overrides the superclass. All other methods are passed to the superclass, including OM_DISPOSE. @{b} ATTRIBUTES@{ub} IA_Font (struct @{"TextAttr" Link "INCLUDE:graphics/text.h/Main" 63} *) Font to use for any label text. Only affects text passed AFTER this tag is given. Applicability is (OM_NEW) IA_FGPen (LONG) Foreground pen for any label text. Only affects text passed AFTER this tag is given. Defaults to pen 1. Applicability is (OM_NEW) IA_BGPen (LONG) Background pen for any label text. Only affects text passed AFTER this tag is given. Defaults to pen 0. Applicability is (OM_NEW) IA_Mode (UBYTE) @{"Draw" Link "graphics/Draw()"} mode for rendering text. Only affects text passed AFTER this tag is given. Defaults to JAM1. Applicability is (OM_NEW) LABEL_DrawInfo (struct @{"DrawInfo" Link "INCLUDE:intuition/screens.h/Main" 66} *) Contains important pen information. This is used to get default font information. Defaults to @{"NULL" Link "rexxsupport/NULL"}. Applicability is (OM_NEW, OM_GET) LABEL_Text (STRPTR) A text string to render. A '\n' in the string will cause the text position to move to a new line. The first underscore ('_') in the string will be used to underline the following character in the string. Any number of text strings and images can be provided in a label, mixed at will. Applicability is (OM_NEW) LABEL_SoftStyle (UBYTE) Soft style for any label text. Only affects text passed AFTER this tag is given. Defaults to FS_NORMAL. Applicability is (OM_NEW) LABEL_Image (struct @{"Image" Link "INCLUDE:intuition/intuition.h/Main" 710} *) An image to render. Any number of text strings and images can be provided in a label, mixed at will. Applicability is (OM_NEW) LABEL_DisposeImage (BOOL) Indicates that you want the @{"NEXT" Link "rexxsupport/NEXT"} image passed via LABEL_Image to be disposed automatically when the label instance is disposed. This implies that the next image passed MUST be a BOOPSI image (since static images cannot be disposed). This will only affect the next image passed, therefore you must specify this tag for every image you wish to have disposed of automatically. Defaults to FALSE. Applicability is (OM_NEW) LABEL_VerticalSpacing (UWORD) Vertical spacing between text lines. Only affects text and images passed after this tag is given. Defaults to 0. Applicability is (OM_NEW) LABEL_Mapping (UWORD *) Pen mapping array, affects the @{"NEXT" Link "rexxsupport/NEXT"} image passed via LABEL_Image ONLY. You should pass a mapping for non-BOOPSI images only, it is expected that BOOPSI images would be correctly pen-mapped. The mapping array must have at least as many elements as the image has bit planes (i.e. 1 << Image.Depth). For element i in the array you put in the new pen that you want pen i in your image to be mapped to. For a typical 4-colour image, you might use the following mapping: @{"UWORD" Link "INCLUDE:exec/types.h/Main" 116} mapping[4]; struct @{"DrawInfo" Link "INCLUDE:intuition/screens.h/Main" 66} *drinfo; \* Beforehand we'll have obtained the screen's @{"DrawInfo" Link "INCLUDE:intuition/screens.h/Main" 66}. *\ mapping[0] = drinfo->dri_Pens[BACKGROUNDPEN]; mapping[1] = drinfo->dri_Pens[SHADOWPEN]; mapping[2] = drinfo->dri_Pens[SHINEPEN]; mapping[3] = drinfo->dri_Pens[FILLPEN]; Applicability is (OM_NEW) LABEL_Justification (UWORD) Justification for entire label. This can be either LJ_LEFT (the default), LJ_CENTRE or LJ_RIGHT. Applicability is (OM_NEW, OM_GET) LABEL_Key (UWORD) For getting the key that was underscored in text passed with LABEL_Text. Applicability is (OM_GET) @{b} SEE ALSO@{ub} @{"intuition.library/GetScreenDrawInfo()" Link "intuition/GetScreenDrawInfo()"} @EndNode @Node "LABEL_GetClass()" "label_ic/LABEL_GetClass" @{b} NAME@{ub} LABEL_GetClass -- Gets the pointer to the label image class. @{b} SYNOPSIS@{ub} label_class = LABEL_GetClass(); D0 Class * LABEL_GetClass(VOID); @{b} FUNCTION@{ub} Obtains the pointer to the label image class for use with @{"NewObject()" Link "intuition/NewObject()"}. This function always returns a valid pointer so you do not need to check it. The reason is that if the library opens fine, then the pointer returned is already setup. (Of course this implies that if opening the library fails, you shouldn't be calling this.) Note that this function does not create the class, that is done when the class library is opened. @{b} INPUTS@{ub} Nothing. @{b} RESULT@{ub} label_class - Pointer to the label image class. @{b} SEE ALSO@{ub} @EndNode