File: frameclass.doc Description: Frameclass documentation. Copyright: (C) Copyright 1994-1995 Jaba Development. (C) Copyright 1994-1995 Jan van den Baard. All Rights Reserved. ------------------------------------------------------------------------------ TABLE OF CONTENTS frameclass/--background-- frameclass/Methods frameclass/Attributes frameclass/--background-- frameclass/--background-- NAME Class: frameclass Superclass: IMAGECLASS Include File: FUNCTION To provide a general framing image. It has a set of built-in framing and background types and the possibility to add hooks for custom frames and backgrounds. frameclass/Methods frameclass/Methods NEW METHODS None. CHANGED METHODS None. frameclass/Attributes frameclass/Attributes NAME FRM_Type - ( ULONG ) FUNCTION Set or get the type of the used framing. You can select any of the following types: FRTYPE_CUSTOM -- This is a custom framing type which is automatically set when you supply a framing hook. FRTYPE_BUTTON -- Standard button gadget frame. FRTYPE_RIDGE -- Standard string gadget frame. FRTYPE_DROPBOX -- Standard icon-dropbox frame. FRTYPE_NEXT -- Standard NeXT frame which basically is an inverted (recessed) string gadget frame. FRTYPE_RADIOBUTTON -- Standard MX gadget frame. FRTYPE_XEN_BUTTON -- XEN style button frame. Default is FRTYPE_BUTTON. Applicability is (ISG). SEE ALSO FRM_CustomHook NAME FRM_CustomHook, FRM_BackFillHook -- ( struct Hook * ) FUNCTION Set or get custom framing and/or backfilling hooks. These hooks are called as follows: rc = hookFunc( hook, object, message ); D0 A0 A2 A1 The message packet can be a pointer to any of the following structures: struct FrameDrawMsg { ULONG fdm_MethodID; /* FRM_RENDER */ struct RastPort *fdm_RPort; struct DrawInfo *fdm_DrawInfo; struct Rectangle *fdm_Bounds; UWORD fdm_State; }; fdm_RPort -- This points to the RastPort in which the frame/background must be rendered. fdm_DrawInfo -- This points to a DrawInfo structure as defined in fdm_Bounds -- This points to a Rectangle structure in which the bounds of the frame/background are stored. fdm_State -- This holds the state in which you should render the frame or background. Please refer to for more information about rendering styles. The FrameDrawMsg is sent to both the custom and backfill hooks when they must render. struct ThicknessMsg { ULONG tm_MethodID; /* FRM_THICKNESS */ struct { UBYTE *Horizontal; UBYTE *Vertical; } tm_Thickness; BOOL tm_Thin; }; tm_Thickness -- In this field you must store the thickness of the frame lines. The thickness requested is the width in pixels of the left OR right border (Horizontal) and the height in pixels of the top OR bottom border (Vertical). tm_Thin -- This field is added in V38 of the library. Do not attempt to read it with lower versions of the library! When set to TRUE you must give the thickness of the frame when it is in thin (FRM_ThinFrame) mode. The ThicknessMsg is only sent to the custom frame hook. The hook routines must return any of the following return codes: FRC_OK -- OK. Message understood and executed. FRC_UNKNOWN -- Message not understood. The class will default in this case. Defaults are NULL. Applicability is (ISG) SEE ALSO , NAME FRM_Title -- ( STRPTR ) FUNCTION Set or get the frame title. Each frame can have a title in it's top-border. With this attribute you set that title. Default is NULL. Applicability is (ISG). SEE ALSO FRM_TextAttr NAME FRM_TextAttr -- ( struct TextAttr * ) FUNCTION Set or get the font that is used to render the frame title. Please note that this font is opened width OpenFont() and must be available in memory. SEE ALSO FRM_Title NAME FRM_Flags -- ( ULONG ) FUNCTION To initialize any of the following flags: FRF_EDGES_ONLY -- When this flag is set only the frame border are rendered. The background isn't touched. FRF_RECESSED -- Normally the frame is raised. With this flag set the frame is recessed by default. FRF_CENTER_TITLE -- Normally the frame title is rendered with the text baseline on the top border of the frame. When this flag is set the title is cenetered on the top border of the frame. FRF_HIGHLIGHT_TITLE -- Normally the frame title is rendered with the TEXTPEN. When this flag is set the title is rendered using the HIGHLIGHTTEXTPEN. FRF_THIN_FRAME -- This flag, when set, will halve the size of the vertical borders of the frame. This looks a lot better on screens width a 1:1 aspect ratio. Default is 0. Applicability is (ISG). SEE ALSO , FRM_Title, FRM_EdgesOnly, FRM_Recessed, FRM_CenterTitle, FRM_HighlightTitle, FRM_ThinFrame NAME FRM_FrameWidth -- ( UBYTE ) FUNCTION Get the width in pixels of the left or right frame border. Applicability is (G). SEE ALSO FRM_FrameHeight NAME FRM_FrameHeight -- ( UBYTE ) FUNCTION Get the height in pixels of the top or bottom frame border. Applicability is (G). SEE ALSO FRM_FrameWidth NAME FRM_BackFill -- ( ULONG ) FUNCTION Set or get the built-in background type to use. You can select any of the following types: STANDARD_FILL -- Normal fill as you would expect from the selected frame type. SHINE_RASTER -- A raster with the SHINEPEN and BACKGROUNDPEN. SHADOW_RASTER -- A raster with the SHADOWPEN and BACKGROUNDPEN. SHINE_SHADOW_RASTER -- A raster with the SHINEPEN and SHADOWPEN. FILL_RASTER -- A raster with the FILLPEN and BACKGROUNDPEN. SHINE_FILL_RASTER -- A rster with the SHINEPEN and FILLPEN. SHADOW_FILL_RASTER -- A raster with the SHADOWPEN and FILLPEN. SHINE_BLOCK -- A SHINEPEN fill. SHADOWBLOCK -- A SHADOWPEN fill. Please note that setting any of the above backfill types except for STANDARD_FILL will override the FRM_BackFillHook. Default is STANDARD_FILL. Applicability is (ISG). SEE ALSO , FRM_BackFillHook NAME FRM_EdgesOnly -- ( BOOL ) FUNCTION Set or clear the FRF_EDGES_ONLY flags. Default is FALSE. Applicability is (ISG). SEE ALSO FRM_Flags NAME FRM_Recessed -- ( BOOL ) FUNCTION Set or clear the FRF_RECESSED flag. Default is FALSE. Applicability is (ISG). SEE ALSO FRM_Flags NAME FRM_CenterTitle - ( BOOL ) FUNCTION Set or clear the FRF_CENTER_TITLE flag. Default is FALSE. Applicability is (ISG). SEE ALSO FRM_Flags NAME FRM_HighlightTitle -- ( BOOL ) FUNCTION Set or clear the FRF_HIGHLIGHT_TITLE flag. Default is FALSE. Applicability is (ISG). SEE ALSO FRM_Flags NAME FRM_ThinFrame -- ( BOOL ) FUNCTION Set or clear the FRF_THIN_FRAME flag. Default is FALSE. Applicability is (ISG). SEE ALSO FRM_Flags NAME FRM_BackPen, FRM_BackDriPen, FRM_SelectedBackPen, FRM_SelectedBackDriPen -- ( UWORD ) ** V39 ** FUNCTION To specify the background colors of a frame. The FRM_xxPen attributes must be used to specify the pen number of the used color. The FRM_xxxDriPen attributes must be used to specify the DrawInfo pen number to use. You can specify two colors. The background color of the frame in a normal unselected state and the background color of the frame in selected state. Specifying ~0 (-1) for the pens will deactivate the backfill color and the class will fall back to the default coloring sceme. Defaults are ~0. Applicability is (ISG).