home *** CD-ROM | disk | FTP | other *** search
/ DOpus Plus / DOpus Plus.iso / SDK / docs / layout.doc < prev    next >
Encoding:
Text File  |  1998-10-26  |  46.8 KB  |  1,413 lines

  1. dopus5.library/Layout Routines                 dopus5.library/Layout Routines
  2.  
  3. 1.  The dopus5.library provides font-sensitive layout routines to make it
  4. easy to create and use a user interface for your application or module. The
  5. layout code is not as straightforward, or indeed as powerful, as MUI or some
  6. of the other GUI engines available, and so you might want to consider using
  7. one of those instead of the DOpus routines.
  8.  
  9.     The normal procedure in creating an interface is :
  10.  
  11.     1. Define a list of "objects" (gadgets, text, etc)
  12.     2. Define a window
  13.     3. Call OpenConfigWindow() to open the window
  14.     4. Call AddObjectList() to add the objects
  15.     5. Call SetGadgetValue() to initialise gadgets
  16.     6. Message loop with GetWindowMsg()
  17.     7. Call GetGadgetValue() to get gadget final values
  18.     8. Call CloseConfigWindow() to close the window
  19.  
  20.  
  21. 2.  The list of objects is defined as an array of ObjectDef structures.
  22. You call AddObjectList() to add a list of objects to a window; indeed, you
  23. can make multiple calls to this function to add multiple lists. Each ObjectDef
  24. structure is defined as follows:
  25.  
  26.         od_Type
  27.  
  28.         This field indicates the type of object. Current values are :
  29.  
  30.             OD_GADGET       - a gadget
  31.             OD_TEXT         - a text string
  32.             OD_AREA         - a rectangular area
  33.             OD_IMAGE        - an image
  34.  
  35.         Two control values are also used:
  36.  
  37.             OD_SKIP         - skip this entry
  38.             OD_END          - ends an ObjectDef array
  39.  
  40.  
  41.         od_ObjectKind
  42.  
  43.         If od_Type is set to OD_GADGET, this field describes the type of
  44.         gadget. Valid types are:
  45.  
  46.             BUTTON_KIND         - standard push button
  47.             STRING_KIND         - a string gadget
  48.             INTEGER_KIND        - an integer gadget
  49.             HOTKEY_KIND         - a hotkey field
  50.             CHECKBOX_KIND       - a checkbox gadget
  51.             OPUS_LISTVIEW_KIND  - an Opus listview gadget
  52.             PALETTE_KIND        - a palette gadget (pen selection)
  53.             FILE_BUTTON_KIND    - a button that opens a file requester
  54.             DIR_BUTTON_KIND     - a button that opens a directory requester
  55.             FONT_BUTTON_KIND    - a button that opens a font requester
  56.                                   (only works under v38 ASL)
  57.             FRAME_KIND          - a frame (rectangular area)
  58.             FIELD_KIND          - a readonly string gadget
  59.             NUMBER_KIND         - a number display
  60.             TEXT_KIND           - a text display
  61.  
  62.         The above gadgets are all implemented by the dopus5.library. Many are
  63.         similar to their GadTools equivalents. Any GadTools gadget that is not
  64.         replaced by the above types is also available. Currently, these are:
  65.  
  66.             LISTVIEW_KIND       - standard GadTools listview
  67.             MX_KIND             - radio buttons gadget
  68.             CYCLE_KIND          - cycle gadget
  69.             SCROLLER_KIND       - scroller gadget
  70.             SLIDER_KIND         - slider gadget
  71.  
  72.         If od_Type is OD_AREA or OD_TEXT, the od_ObjectKind field is used to
  73.         specify the pen used for text rendering. This is not a literal pen
  74.         number but is a DrawInfo pen index (eg TEXTPEN).
  75.  
  76.  
  77.         od_CharDims
  78.  
  79.         This field structure is used to define the character position of the
  80.         object. All objects (and windows, for that matter) have two sets of
  81.         positioning information - character and fine. The character position
  82.         is used to specify the size and position in "font units" - this value
  83.         is scaled for the current font and so allows the display to be
  84.         font-sensitive. A "font unit" is the average width of the font for
  85.         a horizontal coordinate, and the height of the font for a vertical
  86.         coordinate. The "Left" and "Top" fields of the IBox structure control
  87.         the position of the object, and the "Width" and "Height" fields control
  88.         the size.
  89.  
  90.         There are some magic values for object positioning and sizing. The
  91.         positioning values are:
  92.  
  93.             POS_CENTER          - use this in the "Left" or "Top" field to have
  94.                                   the object positioned in the center of the
  95.                                   window.
  96.  
  97.             POS_RIGHT_JUSTIFY   - position relative to the right/bottom border
  98.  
  99.         POS_CENTER is an absolute value. POS_RIGHT_JUSTIFY is more of a flag,
  100.         used in conjunction with another value. For example, POS_RIGHT_JUSTIFY
  101.         by itself would position an object hard up against the right border.
  102.         POS_RIGHT_JUSTIFY-2 would position an object at a two 'font unit'
  103.         margin from the border.
  104.  
  105.         The magic values for sizes are:
  106.  
  107.             SIZE_MAXIMUM        - the object will be the maximum possible size
  108.                                   in this direction
  109.  
  110.             SIZE_MAX_LESS       - maximum possible size minus an amount
  111.  
  112.         For example, od_CharDims might be defined as:
  113.  
  114.             {POS_CENTER,POS_RIGHT_JUSTIFY-1,SIZE_MAX_LESS-4,2}
  115.  
  116.         This would create an object that was centered in the display, and as
  117.         wide as possible with a two space gap on either side. The object would
  118.         be one space from the bottom border, and be two spaces high.
  119.  
  120.  
  121.         od_FineDims
  122.  
  123.         This field structure is used to define the fine position and size of
  124.         the object. The fine position is given as an absolute pixel value, and
  125.         allows you to make adjustments for GUI components that do not scale
  126.         with the font (eg, borders are always 1 or 2 pixels high, irrespective
  127.         of the font size). You can also make fine adjustments through this
  128.         field when the od_CharDims field uses the POS_ and SIZE_ values.
  129.  
  130.  
  131.         od_GadgetText
  132.  
  133.         This is the locale string ID for the gadget label, or text or area
  134.         string. It must be a valid ID in the locale specified in the
  135.         NewConfigWindow structure. If the TEXTFLAG_TEXT_STRING flag is set
  136.         for this object, the od_GadgetText field is a pointer to an actual
  137.         text string.
  138.  
  139.  
  140.         od_Flags
  141.  
  142.         The object flags are heavily object dependent. For standard GadTools
  143.         gadgets, the standard GadTools flags apply. Some GadTools flags are
  144.         also applicable to Opus gadgets:
  145.  
  146.             PLACETEXT_LEFT
  147.             PLACETEXT_RIGHT
  148.             PLACETEXT_ABOVE (only works for some gadgets)
  149.             PLACETEXT_IN    (only works for some gadgets)
  150.  
  151.         General purpose Opus flags are:
  152.  
  153.             TEXTFLAG_TEXT_STRING - this flag is used with all the object
  154.             types, and indicates that the od_GadgetText field of the ObjectDef
  155.             structure points to a literal text string and not a locale ID.
  156.  
  157.             TEXTFLAG_NO_USCORE - if you specify this flag, an underscore
  158.             character in the string will be treated literally. Otherwise,
  159.             the underscore is used to specify a character to be underscored,
  160.             indicating a keyboard equivalent.
  161.  
  162.         Flags for BUTTON_KIND gadgets:
  163.  
  164.             BUTTONFLAG_OKAY_BUTTON - indicates that this button is an "ok"
  165.             button. The 'enter' key will automatically be used as a key
  166.             equivalent for this button. The label for this button is
  167.             automatically rendered in bold.
  168.  
  169.             BUTTONFLAG_CANCEL_BUTTON - indicates that this button is a
  170.             "cancel" button. The 'escape' key will automatically be used as a
  171.             key equivalent for this button.
  172.  
  173.             BUTTONFLAG_TOGGLE_SELECT - specifies that you want a toggle-select
  174.             button (one that can be turned on or off).
  175.  
  176.             BUTTONFLAG_THIN_BORDERS - specifies that you want 'thin' borders
  177.             for the button. Thin borders are one pixel wide on all sides,
  178.             whereas normal borders are two pixels wide on the left and right,
  179.             and one pixel wide at the top and bottom. This flag can also
  180.             be used with CHECKBOX_KIND, FRAME_KIND, NUMBER_KIND, TEXT_KIND,
  181.             PALETTE_KIND, FILE_BUTTON_KIND, DIR_BUTTON_KIND and
  182.             FONT_BUTTON_KIND gadgets.
  183.  
  184.         Flags for OPUS_LISTVIEW_KIND gadgets:
  185.  
  186.             LISTVIEWFLAG_CURSOR_KEYS - specifies that the cursor keys can
  187.             be used to scroll up and down in this listview.
  188.  
  189.         Flags for FILE_BUTTON_KIND gadgets:
  190.  
  191.             FILEBUTFLAG_SAVE - specifies that the file requester is to be
  192.             opened in save mode.
  193.  
  194.         Flags for OD_TEXT objects:
  195.  
  196.             TEXTFLAG_RIGHT_JUSTIFY - right justify the text
  197.             TEXTFLAG_CENTER        - center the text
  198.  
  199.         Flags for OD_AREA objects:
  200.  
  201.             AREAFLAG_RAISED - a raised rectangle
  202.             AREAFLAG_RECESSED - a recessed rectangle
  203.             AREAFLAG_THIN - draw rectangle with thin borders
  204.             AREAFLAG_ICON - draw an icon drop box
  205.             AREAFLAG_ERASE - erase the interior of the rectangle
  206.             AREAFLAG_LINE - draw a separator line
  207.             AREAFLAG_OPTIM - optimised refreshing when updating
  208.             AREAFLAG_TITLE - draw a group box with a title
  209.             AREAFLAG_NOFILL - don't fill interior
  210.  
  211.  
  212.         od_ID
  213.  
  214.         This is the ID of the object. If the object is a gadget, it will
  215.         also set the gadget ID.
  216.  
  217.  
  218.         od_TagList
  219.  
  220.         Object-specific taglist. For GadTools gadgets, all the standard
  221.         GadTools flags apply.
  222.  
  223.             GTCustom_LocaleLabels - (USHORT *)
  224.  
  225.             Used with : MX_KIND, CYCLE_KIND
  226.  
  227.             This tag points to an array of locale IDs. It allows you to
  228.             specify the text contents of the gadgets using locale. The array
  229.             must be terminated with a 0 value. You can use this instead of
  230.             the GTCY_Labels or GTMX_Labels tags.
  231.  
  232.  
  233.             GTCustom_Image - (struct Image *)
  234.  
  235.             Used with : BUTTON_KIND
  236.  
  237.             Points to an Image structure that defines an image to be displayed
  238.             within the button.
  239.  
  240.  
  241.             GTCustom_CallBack - (void __asm (*)(register __a1 struct TagItem *,
  242.                                                 register __a2 struct Window *))
  243.  
  244.             Used with : All types
  245.  
  246.             This tag allows you to specify the address of a callback function
  247.             that is called when the object is added to the window via
  248.             AddObjectList(). The callback function is passed both the window
  249.             pointer and a pointer to the tag. The function can modify both the
  250.             ti_Tag and ti_Data values of the tag, and when it returns the
  251.             Tag will be re-evaluated with the new contents.
  252.  
  253.  
  254.             GTCustom_LayoutRel - USHORT
  255.  
  256.             Used with : All types
  257.  
  258.             Lets you position objects relative to another. The ti_Data field
  259.             contains the ID of an object that *has previously been added*
  260.             (eg is before this one in the ObjectDef array). The new object
  261.             will be positioned relative to the specified object; from the
  262.             new object's point of view, coordinate 0,0 is the top-left
  263.             corner of the relative object. You can use POS_CENTER and the
  264.             other magic position values with this tag. For example, to
  265.             position an object in the center of another one, you would
  266.             use the GTCustom_LayoutRel tag, and set char_dims.Left and
  267.             char_dims.Top for the new object to POS_CENTER.
  268.  
  269.             If the window is resizeable, you must supply the GTCustom_CopyTags
  270.             tag as well.
  271.             
  272.  
  273.             GTCustom_LayoutPos - USHORT
  274.  
  275.             Used with : All types
  276.  
  277.             Lets you position objects based on the position of another object.
  278.             The ti_Data field contains the ID of an object that must have been
  279.             previously added. This tag is used in conjunction with the
  280.             following object flags:
  281.  
  282.                 POSFLAG_ADJUST_POS_X    - X-position is relative to X-position
  283.                                           of other object
  284.  
  285.                 POSFLAG_ADJUST_POS_Y    - Y-position is relative to Y-position
  286.                                           of other object
  287.  
  288.                 POSFLAG_ALIGN_X         - Align X-position with other object
  289.  
  290.                 POSFLAG_ALIGN_Y         - Align Y-position with other object
  291.  
  292.             If the window is resizeable, you must supply the GTCustom_CopyTags
  293.             tag when you supply this tag.
  294.  
  295.  
  296.             GTCustom_Control - USHORT
  297.  
  298.             Used with : CHECKBOX_KIND, FILE_BUTTON_KIND, DIR_BUTTON_KIND,
  299.                         FONT_BUTTON_KIND
  300.  
  301.             Specifies another gadget that this gadget controls. The ti_Data
  302.             field contains the ID of the other gadget. For CHECKBOX_KIND
  303.             gadgets, the other gadget will be disabled when the checkbox
  304.             is deselected, and enabled when it is selected. For the other
  305.             types of gadget, the other gadget MUST be a STRING_KIND, into
  306.             which will go the pathname that was selected by the file requester.
  307.  
  308.             For FONT_BUTTON_KIND gadgets, the font name is copied into the
  309.             STRING_KIND gadget specified with this tag, and the font size is
  310.             copied into an INTEGER_KIND gadget with the control ID + 1.
  311.  
  312.  
  313.             GTCustom_TextAttr - struct TextAttr *
  314.  
  315.             Used with : All gadgets
  316.  
  317.             Lets you specify the font that will be used for a specific gadget.
  318.  
  319.  
  320.             GTCustom_MinMax - ULONG
  321.  
  322.             Used with : SLIDER_KIND, INTEGER_KIND, SCROLLER_KIND
  323.  
  324.             Allows you to specify the minimum and maximum values of a gadget.
  325.             The ULONG contains the maximum value in the upper 16 bits and the
  326.             minimum value in the lower 16 bits. For SLIDER_KIND and
  327.             SCROLLER_KIND, you can also use the GadTools equivalent tags.
  328.  
  329.  
  330.             GTCustom_ThinBorders - BOOL
  331.  
  332.             Used with : BUTTON_KIND, CHECKBOX_KIND, FRAME_KIND, NUMBER_KIND,
  333.                         TEXT_KIND, PALETTE_KIND, FILE_BUTTON_KIND,
  334.                         DIR_BUTTON_KIND and FONT_BUTTON_KIND
  335.  
  336.             This tag can be used instead of the BUTTONFLAG_THIN_BORDERS flag.
  337.             This tag also allows you to control thin borders when accessing
  338.             the Opus BOOPSI gadgets directly.
  339.  
  340.  
  341.             GTCustom_Borderless - BOOL
  342.  
  343.             Used with : BUTTON_KIND, CHECKBOX_KIND, FRAME_KIND, NUMBER_KIND,
  344.                         TEXT_KIND, PALETTE_KIND, FILE_BUTTON_KIND,
  345.                         DIR_BUTTON_KIND and FONT_BUTTON_KIND
  346.  
  347.             If set to TRUE, this causes the gadget to be rendered without
  348.             a border.
  349.  
  350.  
  351.             GTCustom_LocaleKey - ULONG
  352.  
  353.             Used with : All gadgets
  354.  
  355.             This tag takes a locale ID, and uses the corresponding string to
  356.             set the key equivalent for this gadget. The string is searched
  357.             for the first underscore character, and the character immediately
  358.             after the underscore is used as the key equivalent.
  359.  
  360.  
  361.             GTCustom_NoSelectNext - BOOL
  362.  
  363.             Used with : STRING_KIND, INTEGER_KIND
  364.  
  365.             Ordinarily, pressing return in a string field causes the cursor
  366.             to move to the next field automatically. If you specify TRUE for
  367.             this tag, pressing return will simply deactivate the current field.
  368.  
  369.  
  370.             GTCustom_PathFilter - BOOL
  371.  
  372.             Used with : STRING_KIND
  373.  
  374.             If you specify TRUE for this tag, the string field will
  375.             automatically filter the / and : path characters out.
  376.  
  377.  
  378.             GTCustom_Secure - BOOL
  379.  
  380.             Used with : STRING_KIND
  381.  
  382.             If you specify TRUE for this tag, the string field will operate
  383.             in secure "password" mode.
  384.  
  385.  
  386.             GTCustom_History - Att_List *
  387.  
  388.             Used with : STRING_KIND, INTEGER_KIND
  389.  
  390.             Lets you specify a history list for the gadget. See the docs
  391.             for the EH_History tag under GetEditHook() for more information.
  392.  
  393.  
  394.             GTCustom_CopyTags - BOOL
  395.  
  396.             Used with : All types
  397.  
  398.             If you specify TRUE for this tag, the supplied tag list will be
  399.             copied when the object is created. You need to specify this tag
  400.             in conjunction with other tags, depending on the situation.
  401.  
  402.  
  403.             GTCustom_FontPens - ULONG *
  404.  
  405.             Used with : FONT_BUTTON_KIND
  406.  
  407.             The ti_Data field must point to a ULONG that will be used to
  408.             store the front pen, back pen and draw mode result from the
  409.             font requester. The data is stored with FgPen in the lowest
  410.             byte, BgPen in the second byte and DrawMode in the third
  411.             byte. The most significant byte is not used. You must supply
  412.             the GTCustom_CopyTags tag if you use this tag.
  413.  
  414.  
  415.             GTCustom_FontPenCount - short
  416.  
  417.             Used with : FONT_BUTTON_KIND (only under ASL v39.9)
  418.  
  419.             This allows you to specify the number of pens displayed in the
  420.             font requester. It is used in conjunction with the
  421.             GTCustom_FontPenTable tag, and the GTCustom_CopyTags tag must
  422.             also be supplied.
  423.  
  424.  
  425.             GTCustom_FontPenTable - UBYTE *
  426.  
  427.             Used with : FONT_BUTTON_KIND (only under ASL v39.9)
  428.  
  429.             This is used with GTCustom_FontPenCount. The ti_Data field points
  430.             to a UBYTE array of pen numbers to display in the font requester.
  431.             You must also specify the GTCustom_CopyTags tag.
  432.  
  433.  
  434.             GTCustom_Bold - BOOL
  435.  
  436.             Used with : BUTTON_KIND, CHECKBOX_KIND, FRAME_KIND, NUMBER_KIND,
  437.                         TEXT_KIND, PALETTE_KIND, FILE_BUTTON_KIND,
  438.                         DIR_BUTTON_KIND and FONT_BUTTON_KIND
  439.  
  440.             If set to TRUE, this tag causes the label for the button to be
  441.             rendered in bold. Use GTCustom_Style for greater control.
  442.  
  443.  
  444.             GTCustom_NoGhost - BOOL
  445.  
  446.             Used with : BUTTON_KIND, CHECKBOX_KIND, FRAME_KIND, NUMBER_KIND,
  447.                         TEXT_KIND, PALETTE_KIND, FILE_BUTTON_KIND,
  448.                         DIR_BUTTON_KIND and FONT_BUTTON_KIND
  449.  
  450.             If set to TRUE, when the button is disabled its image will not
  451.             be ghosted.
  452.  
  453.  
  454.             GTCustom_Style - ULONG
  455.  
  456.             Used with : BUTTON_KIND, CHECKBOX_KIND, FRAME_KIND, NUMBER_KIND,
  457.                         TEXT_KIND, PALETTE_KIND, FILE_BUTTON_KIND,
  458.                         DIR_BUTTON_KIND and FONT_BUTTON_KIND
  459.  
  460.             This tag allows you to control the text style used to render the
  461.             button label. Valid flags for the style are FSF_BOLD and
  462.             FSF_ITALIC.
  463.  
  464.  
  465.             GTCustom_FrameFlags - ULONG
  466.  
  467.             Used with : FRAME_KIND
  468.  
  469.             This tag lets you specify the type of frame rendered for the
  470.             frame gadget. Currently the only value valid is AREAFLAG_RECESSED,
  471.             to specify a recessed frame.
  472.  
  473.  
  474.             GTCustom_ChangeSigTask - struct Task *
  475.  
  476.             Used with : STRING_KIND, INTEGER_KIND
  477.  
  478.             This tag lets you specify a Task that is to be signalled whenever
  479.             the contents of the string gadget change.
  480.  
  481.  
  482.             GTCustom_ChangeSigBit - short
  483.  
  484.             Used with : STRING_KIND, INTEGER_KIND
  485.  
  486.             This tag lets you specify the bit that a task is signalled with
  487.             whenever the contents of the string gadget change.
  488.  
  489.  
  490.             GTCustom_Justify - short
  491.  
  492.             Used with : TEXT_KIND, NUMBER_KIND
  493.  
  494.             This tag lets you specify the justification of the text displayed
  495.             in the gadget. Valid values are JUSTIFY_CENTER (the default),
  496.             JUSTIFY_LEFT and JUSTIFY_RIGHT.
  497.  
  498.         In addition to these tags, OPUS_LISTVIEW_KIND gadgets (via the Opus
  499.         BOOPSI listview class) supports several additional tags. See the
  500.         section on the listview class for information on these.
  501.  
  502.  
  503.     The last member in an array of ObjectDef structures must have a od_Type
  504. of OD_END set.
  505.  
  506.  
  507. 3.  The layout routines can only add gadgets to a special sort of window; one
  508. that has been created with the OpenConfigWindow() call. Two structures are
  509. needed to open one of these windows. The first, a ConfigWindow structure,
  510. specifies the position and size of the new window. It has cw_CharDims and
  511. cw_FineDims fields, analagous to the fields in ObjectDef structures.
  512.  
  513.     The second is a NewConfigWindow structure. This is initialised as follows:
  514.  
  515.         nw_Parent
  516.  
  517.         This field points to the parent of the Window. The parent can be
  518.         either another window (the default) or a screen (if the
  519.         WINDOWF_SCREEN_PARENT flag is set).
  520.  
  521.  
  522.         nw_Dims
  523.  
  524.         This points to the ConfigWindow structure used to define the size
  525.         of the new window.
  526.  
  527.  
  528.         nw_Title
  529.  
  530.         This points to a title string for the new window.
  531.  
  532.  
  533.         nw_Locale
  534.  
  535.         This points to a valid DOpusLocale structure for the window. All
  536.         ObjectDefs that use a locale ID will obtain their strings via this
  537.         structure.
  538.  
  539.  
  540.         nw_Port
  541.  
  542.         Allows you to specify a message port to use; you should set this to
  543.         NULL.
  544.  
  545.  
  546.         nw_Flags
  547.  
  548.         Control flags. Valid values are:
  549.  
  550.             WINDOW_SCREEN_PARENT    - nw_Parent points to a Screen
  551.             WINDOW_NO_CLOSE         - no close gadget on the window
  552.             WINDOW_NO_BORDER        - borderless window
  553.             WINDOW_SIMPLE           - simplerefresh window
  554.             WINDOW_AUTO_REFRESH     - use with WINDOW_SIMPLE
  555.             WINDOW_AUTO_KEYS        - handle keypresses automatically
  556.             WINDOW_REQ_FILL         - backfill the window with stipple pattern
  557.             WINDOW_NO_ACTIVATE      - don't activate the window on open
  558.             WINDOW_VISITOR          - open as a visitor window
  559.             WINDOW_SIZE_RIGHT       - size gadget in right border
  560.             WINDOW_SIZE_BOTTOM      - size gadget in bottom border
  561.             WINDOW_ICONIFY          - iconify gadget in title bar
  562.  
  563.  
  564.         nw_Font
  565.  
  566.         Allows you to specify a font to use for the window. If NULL, the
  567.         current screen font will be used.
  568.  
  569. dopus5.library/AddObjectList                     dopus5.library/AddObjectList
  570.  
  571.     NAME
  572.         AddObjectList - add a list of objects to a window
  573.  
  574.     SYNOPSIS
  575.         AddObjectList(window, objects)
  576.                         A0       A1
  577.  
  578.         ObjectList *AddObjectList(struct Window *, ObjectDef *);
  579.  
  580.     FUNCTION
  581.         This function adds a list of objects to a window. The window must have
  582.         previously been opened with the OpenConfigWindow() call.
  583.  
  584.     INPUTS
  585.         window - window to add the objects to
  586.         objects - array of objects to add
  587.  
  588.     RESULT
  589.         Returns a pointer to the list of created objects, or NULL for failure.
  590.  
  591.     NOTES
  592.         You can add multiple object lists to a window with multiple calls to
  593.         AddObjectList(). These lists are chained together, and as long as
  594.         you pass the address of the FIRST object list to any functions that
  595.         search an object list, all chained lists will be searched
  596.         automatically.
  597.  
  598.     SEE ALSO
  599.         OpenConfigWindow(), SetGadgetValue()
  600.  
  601. dopus5.library/AddWindowMenus                   dopus5.library/AddWindowMenus
  602.  
  603.     NAME
  604.         AddWindowMenus - add menus to a window
  605.  
  606.     SYNOPSIS
  607.         AddWindowMenus(window, menus)
  608.                          A0     A1
  609.  
  610.         void AddWindowMenus(struct Window *, MenuData *);
  611.  
  612.     FUNCTION
  613.         This function makes it easy to add menus to a window opened via
  614.         OpenConfigWindow(). Even if you don't use the AddObjectList() routine
  615.         to add gadgets to the window, you can still use this call to add
  616.         menus.
  617.  
  618.         AddWindowMenus() takes an array of MenuData structures, and constructs
  619.         and initialises the Intuition Menu structures automatically. The
  620.         MenuData structures are initialised as follows:
  621.  
  622.             md_Type     - entry type; NM_TITLE, NM_ITEM or NM_SUB. The array
  623.                           must be terminated by an NM_END item.
  624.  
  625.             md_ID       - the ID value for the menu item.
  626.  
  627.             md_Name     - the name of the menu item. This can either be a
  628.                           locale ID, or, if the MENUFLAG_TEXT_STRING flag is
  629.                           set, a pointer to a real string.
  630.  
  631.             md_Flags    - control flags.
  632.  
  633.         The md_Flags field supports the standard Intuition and GadTools menu
  634.         flags as well as several custom flags:
  635.  
  636.             MENUFLAG_TEXT_STRING - md_Name is a real string
  637.             MENUFLAG_COMM_SEQ    - the menu will be given a command sequence
  638.                                    (Right-Amiga + a key)
  639.             MENUFLAG_AUTO_MUTEX  - automatic mutual exclusion
  640.  
  641.         If MENUFLAG_COMM_SEQ is specified, the key used for the command
  642.         sequence is normally the first character of the menu name. However,
  643.         you can specify a character to use instead of this, by setting the
  644.         MENUFLAG_USE_SEQ flag, and using the MENUFLAG_MAKE_SEQ() macro.
  645.         For example, to specify a command sequence of Right Amiga and A, you
  646.         would use :
  647.  
  648.             MENUFLAG_COMM_SEQ|MENUFLAG_USE_SEQ|MENUFLAG_MAKE_SEQ('A')
  649.  
  650.         The automatic mutual exclusion works on all items at the current
  651.         level that have the CHECKIT flag set.
  652.  
  653.     INPUTS
  654.         window - window to add menus to
  655.         menus - array of MenuData structures, terminated with NM_END
  656.  
  657.     RESULT
  658.         The menus are added to the window. You can check if this operation
  659.         failed (through lack of memory) by examining the window->MenuStrip
  660.         pointer; if NULL, the window has no menus.
  661.  
  662.     SEE ALSO
  663.         FindMenuItem(), FreeWindowMenus()
  664.  
  665. dopus5.library/BoundsCheckGadget             dopus5.library/BoundsCheckGadget
  666.  
  667.     NAME
  668.         BoundsCheckGadget - bounds check an integer gadget
  669.  
  670.     SYNOPSIS
  671.         BoundsCheckGadget(list, id, min, max)
  672.                            A0   D0   D1   D2
  673.  
  674.         long BoundsCheckGadget(ObjectList *, ULONG, long, long);
  675.  
  676.     FUNCTION
  677.         This routine tests the value of an integer gadget against the supplied
  678.         minimum and maximum, adjusts and refreshes it if it is invalid, and
  679.         returns the new value.
  680.  
  681.     INPUTS
  682.         list - ObjectList containing the gadget
  683.         id - gadget ID
  684.         min - minimum value
  685.         max - maximum value
  686.  
  687.     RESULT
  688.         Returns the new value of the gadget.
  689.  
  690. dopus5.library/BuildMenuStrip                   dopus5.library/BuildMenuStrip
  691.  
  692.     NAME
  693.         BuildMenuStrip - build a MenuStrip easily
  694.  
  695.     SYNOPSIS
  696.         BuildMenuStrip(menus, locale)
  697.                          A0     A1
  698.  
  699.         struct Menu *BuildMenuStrip(MenuData *, struct DOpusLocale *);
  700.  
  701.     FUNCTION
  702.         This routine takes the supplied MenuData array, and returns an
  703.         initialised menu strip. This menu strip can then be layed out
  704.         using the LayoutMenus() function in gadtools.library, and added
  705.         to any window.
  706.  
  707.     INPUTS
  708.         menus - array of MenuData structures
  709.         locale - locale to use for text strings
  710.  
  711.     RESULT
  712.         Returns a pointer to the head of the menu strip.
  713.  
  714.     NOTES
  715.         The menus returned by this function can be used on any window. If
  716.         your window was opened with OpenConfigWindow(), you should use the
  717.         AddWindowMenus() function instead of this one.
  718.  
  719.         The returned menu strip can be freed with a call to FreeMenus() in
  720.         gadtools.library.
  721.  
  722.         See the instructions for AddWindowMenus() for information about
  723.         initialising the MenuData structures.
  724.  
  725.     SEE ALSO
  726.         AddWindowMenus(), gadtools.library/LayoutMenusA(),
  727.         gadtools.library/FreeMenus()
  728.  
  729. dopus5.library/CheckObjectArea                 dopus5.library/CheckObjectArea
  730.  
  731.     NAME
  732.         CheckObjectArea - check if a point is within an object's area
  733.  
  734.     SYNOPSIS
  735.         CheckObjectArea(object, x, y)
  736.                           A0   D0 D1
  737.  
  738.         BOOL CheckObjectArea(GL_Object *, long, long);
  739.  
  740.     FUNCTION
  741.         This routine tests if the coordinate is within the "select" area of
  742.         the object.
  743.  
  744.     INPUTS
  745.         object - object to test
  746.         x - x coordinate
  747.         y - y coordinate
  748.  
  749.     RESULT
  750.         Returns TRUE if the point falls within the object.
  751.  
  752. dopus5.library/ClearWindowBusy                 dopus5.library/ClearWindowBusy
  753.  
  754.     NAME
  755.         ClearWindowBusy - make a window unbusy
  756.  
  757.     SYNOPSIS
  758.         ClearWindowBusy(window)
  759.                           A0
  760.  
  761.         void ClearWindowBusy(struct Window *);
  762.  
  763.     FUNCTION
  764.         This routine undoes the effect of a SetWindowBusy() call. The mouse
  765.         pointer of the window is returned to normal, and input is unblocked.
  766.  
  767.     INPUTS
  768.         window - the window in question
  769.  
  770.     SEE ALSO
  771.         SetWindowBusy()
  772.  
  773. dopus5.library/CloseConfigWindow             dopus5.library/CloseConfigWindow
  774.  
  775.     NAME
  776.         CloseConfigWindow - close a window
  777.  
  778.     SYNOPSIS
  779.         CloseConfigWindow(window)
  780.                             A0
  781.  
  782.         void CloseConfigWindow(struct Window *);
  783.  
  784.     FUNCTION
  785.         This function closes a window that was opened with a call to
  786.         OpenConfigWindow(). All memory associated with the window, including
  787.         object lists, menus and memory allocated from the window's memory
  788.         pool is freed by this call.
  789.  
  790.     INPUTS
  791.         window - window to close. MUST have been opened with OpenConfigWindow()
  792.  
  793.     RESULT
  794.         The window is closed.
  795.  
  796.     SEE ALSO
  797.         OpenConfigWindow()
  798.  
  799. dopus5.library/DisableObject                     dopus5.library/DisableObject
  800.  
  801.     NAME
  802.         DisableObject - disable/enable an object
  803.  
  804.     SYNOPSIS
  805.         DisableObject(list, id, state)
  806.                        A0   D0    D1
  807.  
  808.         void DisableObject(ObjectList *, ULONG, BOOL);
  809.  
  810.     FUNCTION
  811.         This routine disables or enables an object. Currently, only gadgets
  812.         support being disabled.
  813.  
  814.     INPUTS
  815.         list - ObjectList containing object
  816.         id - object ID
  817.         state - TRUE for disable, FALSE for enable
  818.  
  819.     RESULT
  820.         The object is disabled or enabled.
  821.  
  822. dopus5.library/DisplayObject                     dopus5.library/DisplayObject
  823.  
  824.     NAME
  825.         DisplayObject - redisplay an object
  826.  
  827.     SYNOPSIS
  828.         DisplayObject(window, object, fpen, bpen, text)
  829.                         A0      A1     D0    D1    A2
  830.  
  831.         void DisplayObject(struct Window *, GL_Object *, long, long, char *);
  832.  
  833.     FUNCTION
  834.         This routine lets you change and refresh an object. Currently, it is
  835.         only used for OD_TEXT and OD_AREA objects.
  836.  
  837.     INPUTS
  838.         window - window containing the object
  839.         object - object to display
  840.         fpen - new foreground pen, -1 for no change
  841.         bpen - new background pen, -1 for no change
  842.         text - new text
  843.  
  844.     RESULT
  845.         The display is refreshed immediately.
  846.  
  847. dopus5.library/EndRefreshConfigWindow   dopus5.library/EndRefreshConfigWindow
  848.  
  849.     NAME
  850.         EndRefreshConfigWindow - finish refreshing a config window
  851.  
  852.     SYNOPSIS
  853.         EndRefreshConfigWindow(window)
  854.                                  A0
  855.  
  856.         void EndRefreshConfigWindow(struct Window *);
  857.  
  858.     FUNCTION
  859.         This is analagous to calling GT_EndRefresh(window,TRUE) on the
  860.         window. It finishes and cleans up the refresh process begun with
  861.         StartRefreshConfigWindow().
  862.  
  863.     INPUTS
  864.         window - window to end refresh of
  865.  
  866.     NOTES
  867.         If you are using a smart refresh window, or have set the
  868.         WINDOW_AUTO_REFRESH flag, you will not need to call this function.
  869.  
  870.     SEE ALSO
  871.         StartRefreshConfigWindow(), gadtools.library/GT_EndRefresh()
  872.  
  873. dopus5.library/FindMenuItem                       dopus5.library/FindMenuItem
  874.  
  875.     NAME
  876.         FindMenuItem - find a menu item by ID
  877.  
  878.     SYNOPSIS
  879.         FindMenuItem(menu, id)
  880.                       A0   D0
  881.  
  882.         struct MenuItem *FindMenuItem(struct Menu *, USHORT);
  883.  
  884.     FUNCTION
  885.         Traverses the menu list from the supplied pointer, searching for
  886.         a menu with the given ID. This ID is extracted using the
  887.         GTMENUITEM_USERDATA() macro. If you constructed the menu item
  888.         with AddWindowMenus() or BuildMenuStrip(), the ID was supplied
  889.         in the md_ID field of the MenuData structure.
  890.  
  891.     INPUTS
  892.         menu - Menu to start search
  893.         id - ID to search for
  894.  
  895.     RESULT
  896.         Returns a pointer to the MenuItem or NULL if not found.
  897.  
  898.     SEE ALSO
  899.         AddWindowMenus(), BuildMenuStrip()
  900.  
  901. dopus5.library/FreeObjectList                   dopus5.library/FreeObjectList
  902.  
  903.     NAME
  904.         FreeObjectList - free a list of objects
  905.  
  906.     SYNOPSIS
  907.         FreeObjectList(list)
  908.                         A0
  909.  
  910.         void FreeObjectList(ObjectList *);
  911.  
  912.     FUNCTION
  913.         This routine frees the supplied list of objects. If there are any
  914.         gadgets in the list, they are automatically removed from the window
  915.         before being freed.
  916.  
  917.         Ordinarily you do not need to call this function; any existing objects
  918.         are freed automatically when you close the window with
  919.         CloseConfigWindow(). However, this function together with
  920.         AddObjectList() allows you to add and remove objects (gadgets) from
  921.         the window dynamically. This is something that is not possible under
  922.         GadTools.
  923.  
  924.     INPUTS
  925.         list - object list to free
  926.  
  927.     RESULT
  928.         The list is delinked and all its objects are freed. If you are freeing
  929.         just one list from a window, you will need to refresh the display
  930.         after you have freed the objects.
  931.  
  932.     SEE ALSO
  933.         AddObjectList(), CloseConfigWindow()
  934.  
  935. dopus5.library/FreeWindowMenus                 dopus5.library/FreeWindowMenus
  936.  
  937.     NAME
  938.         FreeWindowMenus - free menus from a window
  939.  
  940.     SYNOPSIS
  941.         FreeWindowMenus(window)
  942.                           A0
  943.  
  944.         void FreeWindowMenus(struct Window *);
  945.  
  946.     FUNCTION
  947.         Frees the menus that were attached with a call to AddWindowMenus().
  948.         Normally you do not need to call this function, as menus are
  949.         automatically freed when you close the window with CloseConfigWindow().
  950.  
  951.     INPUTS
  952.         window - window to free menus for
  953.  
  954.     RESULT
  955.         The menus are removed from the window and freed.
  956.  
  957.     SEE ALSO    
  958.         AddWindowMenus()
  959.  
  960. dopus5.library/GetGadgetValue                   dopus5.library/GetGadgetValue
  961.  
  962.     NAME
  963.         GetGadgetValue - get the value of a gadget
  964.  
  965.     SYNOPSIS
  966.         GetGadgetValue(list, id)
  967.                         A0   A1
  968.  
  969.         long GetGadgetValue(ObjectList *, USHORT);
  970.  
  971.     FUNCTION
  972.         This returns the current value of the gadget, specified by gadget ID.
  973.         The supplied list is searched for the gadget.
  974.  
  975.     INPUTS
  976.         list - ObjectList containing the gadget
  977.         id - gadget ID
  978.  
  979.     RESULT
  980.         Returns the current value of the gadget. The contents of the return
  981.         value are dependant on the type of gadget:
  982.  
  983.             BUTTON_KIND     - if the BUTTONFLAG_TOGGLE_SELECT flag was set,
  984.                               returns TRUE or FALSE to indicate the state of
  985.                               the gadget.
  986.  
  987.             MX_KIND
  988.             CYCLE_KIND
  989.             OPUS_LISTVIEW_KIND
  990.             LISTVIEW_KIND
  991.             SLIDER_KIND
  992.             SCROLLER_KIND
  993.             PALETTE_KIND    - returns the current selection or value
  994.  
  995.             CHECKBOX_KIND   - returns TRUE or FALSE to indicate the state
  996.                               of the gadget.
  997.  
  998.             INTEGER_KIND    - returns the integer value of the gadget
  999.  
  1000.             STRING_KIND     - returns a pointer to the string contents. This
  1001.                               pointer is READ ONLY!
  1002.  
  1003.     SEE ALSO
  1004.         SetGadgetValue()
  1005.  
  1006. dopus5.library/GetObject                             dopus5.library/GetObject
  1007.  
  1008.     NAME
  1009.         GetObject - get an object by ID from a list
  1010.  
  1011.     SYNOPSIS
  1012.         GetObject(list, id)
  1013.                    A0   D0
  1014.  
  1015.         GL_Object *GetObject(ObjectList *, ULONG);
  1016.  
  1017.     FUNCTION
  1018.         Searches the supplied object list (and any chained lists) for the
  1019.         object with the given ID value.
  1020.  
  1021.     INPUTS
  1022.         list - ObjectList to search
  1023.         id - ID to search for
  1024.  
  1025.     RESULT
  1026.         Returns a pointer to the object or NULL if not found.
  1027.  
  1028.     SEE ALSo
  1029.         AddObjectList()
  1030.  
  1031. dopus5.library/GetObjectRect                     dopus5.library/GetObjectRect
  1032.  
  1033.     NAME
  1034.         GetObjectRect - get an object's rectangle
  1035.  
  1036.     SYNOPSIS
  1037.         GetObjectRect(list, id, rect)
  1038.                        A0   D0   A1
  1039.  
  1040.         BOOL GetObjectRect(ObjectList *, ULONG, struct Rectangle *);
  1041.  
  1042.     FUNCTION
  1043.         Searches for the object, and if found, copies the coordinates of the    
  1044.         object's display rectangle into the supplied structure.
  1045.  
  1046.     INPUTS
  1047.         list - ObjectList containing the object
  1048.         id - ID of the object
  1049.         rect - Rectangle structure for result
  1050.  
  1051.     RESULT
  1052.         Returns FALSE if the object could not be found.
  1053.  
  1054. dopus5.library/GetWindowAppPort               dopus5.library/GetWindowAppPort
  1055.  
  1056.     NAME
  1057.         GetWindowAppPort - get a window's application port
  1058.  
  1059.     SYNOPSIS
  1060.         GetWindowAppPort(window)
  1061.                            A0
  1062.  
  1063.         struct MsgPort *GetWindowAppPort(struct Window *);
  1064.  
  1065.     FUNCTION
  1066.         If a window has registered itself with a call to SetWindowID(), this
  1067.         function will return the address of its application message port.
  1068.  
  1069.     INPUTS
  1070.         window - window in question
  1071.  
  1072.     RESULT
  1073.         Returns a pointer to the message port, or NULL if the window wasn't
  1074.         registered.
  1075.  
  1076.     SEE ALSO
  1077.         SetWindowID(), GetWindowID()
  1078.  
  1079. dopus5.library/GetWindowID                         dopus5.library/GetWindowID
  1080.  
  1081.     NAME
  1082.         GetWindowID - get a window's ID code
  1083.  
  1084.     SYNOPSIS
  1085.         GetWindowID(window)
  1086.                       A0
  1087.  
  1088.         ULONG GetWindowID(struct Window *);
  1089.  
  1090.     FUNCTION
  1091.         If a window has been registered with SetWindowID(), this function
  1092.         returns the ID code.
  1093.  
  1094.     INPUTS
  1095.         window - window in question
  1096.  
  1097.     RESULT
  1098.         Returns the ID code of the window if it is registered. Returns
  1099.         WINDOW_UNKNOWN if not registered. Returns WINDOW_UNDEFINED if the
  1100.         Window is registered, but does not have an ID or application port.
  1101.  
  1102.     SEE ALSO
  1103.         SetWindowID(), GetWindowAppPort()
  1104.  
  1105. dopus5.library/GetWindowMsg                       dopus5.library/GetWindowMsg
  1106.  
  1107.     NAME
  1108.         GetWindowMsg - get IntuiMessage for a window
  1109.  
  1110.     SYNOPSIS
  1111.         GetWindowMsg(port)
  1112.                       A0
  1113.  
  1114.         struct IntuiMessage *GetWindowMsg(struct MsgPort *);
  1115.  
  1116.     FUNCTION
  1117.         This routine is analagous to the GT_GetIMsg call under GadTools.
  1118.         It searches the supplied port for an IntuiMessage, performs
  1119.         pre-processing on the message and returns the result to you.
  1120.         It is highly recommended that you use this instead of a normal call
  1121.         to GetMsg() when using the layout routines. In particular, auto
  1122.         refreshing of simplerefresh windows, resizing, key equivalents and
  1123.         proper gadget processing will all be affected if you do not call
  1124.         this function.
  1125.  
  1126.     INPUTS
  1127.         port - port to search for messages (window->UserPort)
  1128.  
  1129.     RESULT
  1130.         Returns a pointer to the message, or NULL if there was none. You
  1131.         must call ReplyWindowMsg() to reply to messages from this function.
  1132.  
  1133.     SEE ALSO
  1134.         ReplyWindowMsg()
  1135.  
  1136. dopus5.library/LayoutResize                       dopus5.library/LayoutResize
  1137.  
  1138.     NAME
  1139.         LayoutResize - resize a window
  1140.  
  1141.     SYNOPSIS
  1142.         LayoutResize(window)
  1143.                        A0
  1144.  
  1145.         void LayoutResize(struct Window *);
  1146.  
  1147.     FUNCTION
  1148.         This routine is called to handle refreshing of a window when it is
  1149.         resized by the user. If you call GetWindowMsg() in your event loop,
  1150.         this is called automatically for you.
  1151.  
  1152.     INPUTS
  1153.         window - window that has been resized
  1154.  
  1155.     RESULT
  1156.         All objects in the window are resized (if they were defined with
  1157.         proportional or relative sizes) and refreshed.
  1158.  
  1159. dopus5.library/OpenConfigWindow               dopus5.library/OpenConfigWindow
  1160.  
  1161.     NAME
  1162.         OpenConfigWindow - open a window
  1163.  
  1164.     SYNOPSIS
  1165.         OpenConfigWindow(newwin)
  1166.                            A0
  1167.  
  1168.         struct Window *OpenConfigWindow(NewConfigWindow *);
  1169.  
  1170.     FUNCTION
  1171.         This routine opens the window defined by the suppled NewConfigWindow
  1172.         structure.
  1173.  
  1174.     INPUTS
  1175.         newwin - initialised NewConfigWindow structure
  1176.  
  1177.     RESULT
  1178.         Returns a pointer to the Window. This is a normal Intuition window
  1179.         in most respects, but its UserData field points to a structure of
  1180.         additional information. You MUST NOT modify the UserData field of
  1181.         such a window.
  1182.  
  1183.     SEE ALSO
  1184.         AddObjectList(), CloseConfigWindow()
  1185.  
  1186. dopus5.library/ReplyWindowMsg                   dopus5.library/ReplyWindowMsg
  1187.  
  1188.     NAME
  1189.         ReplyWindowMsg - reply to a message
  1190.  
  1191.     SYNOPSIS
  1192.         ReplyWindowMsg(msg)
  1193.                         A0
  1194.  
  1195.         void ReplyWindowMsg(struct IntuiMessage *);
  1196.  
  1197.     FUNCTION
  1198.         Call this function to reply to a message you received via
  1199.         GetWindowMsg().
  1200.  
  1201.     INPUTS
  1202.         msg - message to reply to
  1203.  
  1204.     SEE ALSO
  1205.         GetWindowMsg()
  1206.  
  1207. dopus5.library/SetConfigWindowLimits     dopus5.library/SetConfigWindowLimits
  1208.  
  1209.     NAME
  1210.         SetConfigWindowLimits - set size limits for a window
  1211.  
  1212.     SYNOPSIS
  1213.         SetConfigWindowLimits(window, min, max)
  1214.                                 A0     A1   A2
  1215.  
  1216.         void SetConfigWindowLimits(struct Window *, ConfigWindow *,
  1217.                                                     ConfigWindow *);
  1218.  
  1219.     FUNCTION
  1220.         Sets the sizing limits of the supplied window. The minimum and
  1221.         maximum dimensions are specified with two ConfigWindow structures.
  1222.  
  1223.     INPUTS
  1224.         window - window to set limits for
  1225.         min - minimum dimensions
  1226.         max - maximum dimensions
  1227.  
  1228.     SEE ALSO
  1229.         OpenConfigWindow()
  1230.  
  1231. dopus5.library/SetGadgetChoices               dopus5.library/SetGadgetChoices
  1232.  
  1233.     NAME
  1234.         SetGadgetChoices - set the "choices" for a gadget
  1235.  
  1236.     SYNOPSIS
  1237.         SetGadgetChoices(list, id, choices)
  1238.                           A0   D0     A1
  1239.  
  1240.         void SetGadgetChoices(ObjectList *, ULONG, APTR);
  1241.  
  1242.     FUNCTION
  1243.         This routine sets the choices for a gadget. It operates differently for
  1244.         different types of gadgets:
  1245.  
  1246.             SCROLLER_KIND
  1247.  
  1248.             Sets the maximum value of the gadget, and adjusts the current value
  1249.             if it exceeds this limit.
  1250.  
  1251.             SLIDER_KIND
  1252.  
  1253.             Sets the minimum (lower 16 bits)  and maximum (upper 16 bits)
  1254.             values of the gadget, and adjusts the current value if it exceeds
  1255.             either of these limits.
  1256.  
  1257.             LISTVIEW_KIND/OPUS_LISTVIEW_KIND
  1258.  
  1259.             Sets the list contents pointer. This is either a struct List * or
  1260.             an Att_List *. If you set the value to NULL, the current list
  1261.             will be detached from the gadget and the list will be cleared.
  1262.             If you set the value to -1, the list will be detached but the
  1263.             gadget display will not be cleared.
  1264.  
  1265.             CYCLE_KIND
  1266.  
  1267.             Sets the cycle gadget contents. This points to a char * array, or
  1268.             NULL if you want the gadget to be empty. The array must be
  1269.             null-terminated.
  1270.  
  1271.     INPUTS
  1272.         list - ObjectList containing the gadget
  1273.         id - gadget ID
  1274.         choices - new choices for the gadget
  1275.  
  1276.     RESULT
  1277.         The display is updated immediately, if appropriate.
  1278.     
  1279. dopus5.library/SetGadgetValue                   dopus5.library/SetGadgetValue
  1280.  
  1281.     NAME
  1282.         SetGadgetValue - set the value of a gadget
  1283.  
  1284.     SYNOPSIS
  1285.         SetGadgetValue(list, id, value)
  1286.                         A0   D0    D1
  1287.  
  1288.         void SetGadgetValue(ObjectList *, USHORT, ULONG);
  1289.  
  1290.     FUNCTION
  1291.         Sets the value of a gadget. See the instructions for GetGadgetValue()
  1292.         for a list of the gadgets a value can be set for. Note that in the
  1293.         case of a STRING_KIND gadget, the string that you supply is copied,
  1294.         and does not need to remain valid once you have set it.
  1295.  
  1296.     INPUTS
  1297.         list - ObjectList containing the gadget
  1298.         id - gadget ID
  1299.         value - new value for the gadget
  1300.  
  1301.     RESULT
  1302.         The display is updated immediately.
  1303.  
  1304.     SEE ALSO
  1305.         GetGadgetValue()
  1306.  
  1307. dopus5.library/SetWindowBusy                     dopus5.library/SetWindowBusy
  1308.  
  1309.     NAME
  1310.         SetWindowBusy - make a window busy
  1311.  
  1312.     SYNOPSIS
  1313.         SetWindowBusy(window)
  1314.                         A0
  1315.  
  1316.         void SetWindowBusy(struct Window *);
  1317.  
  1318.     FUNCTION
  1319.         Makes the supplied window busy. The mouse pointer is changed to the
  1320.         system busy pointer, and all gadget input to the window is blocked.
  1321.         You must call ClearWindowBusy() to reverse this state.
  1322.  
  1323.     INPUTS
  1324.         window - window to make busy
  1325.  
  1326.     RESULT
  1327.         The window goes busy.
  1328.  
  1329.     NOTES
  1330.         You can only call this routine on a window opened with
  1331.         OpenConfigWindow().
  1332.  
  1333.     SEE ALSo
  1334.         OpenConfigWindow(), ClearWindowBusy()
  1335.  
  1336. dopus5.library/SetWindowID                         dopus5.library/SetWindowID
  1337.  
  1338.     NAME
  1339.         SetWindowID - register a window's ID
  1340.  
  1341.     SYNOPSIS
  1342.         SetWindowID(window, idptr, id, port)
  1343.                       A0      A1   D0   A2
  1344.  
  1345.         void SetWindowID(struct Window *, WindowID *, ULONG, struct MsgPort *);
  1346.  
  1347.     FUNCTION
  1348.         This routine "registers" a window, giving it an ID value and
  1349.         associating a message port with it.
  1350.  
  1351.         This is invaluable in a drag and drop situation, when you want to
  1352.         determine whether a particular window supports a particular type of
  1353.         drop operation.
  1354.  
  1355.         The function takes a pointer to a WindowID structure, which is stored
  1356.         in the UserData field of the Window. You therefore lose the use of the
  1357.         UserData field, but you can easily recover it by embedding a WindowID
  1358.         structure in a larger structure.
  1359.  
  1360.         It also takes an ID value, and a pointer to a message port. These
  1361.         values are retrievable with the GetWindowID() and GetWindowAppPort()
  1362.         calls.
  1363.  
  1364.         All windows opened with OpenConfigWindow() have an ID associated
  1365.         with them automatically; by default, the ID is set to WINDOW_UNDEFINED.
  1366.         If you wish to change it, you can use the SET_WINDOW_ID() macro.
  1367.  
  1368.     INPUTS
  1369.         window - window to register
  1370.         idptr  - pointer to WindowID structure. This MUST remain valid for the
  1371.                  life of the window
  1372.         id     - ID value for the window. You should set the WINDOW_USER bit
  1373.                  of any IDs you define.
  1374.         port   - pointer to message port. This does not actually have to be
  1375.                  a message port; it can be any 32 bit value.
  1376.  
  1377.     RESULT
  1378.         The window association is made.
  1379.  
  1380.     SEE ALSO
  1381.         GetWindowID(), GetWindowAppPort()
  1382.  
  1383. dopus5.library/StartRefreshConfigWindowdopus5.library/StartRefreshConfigWindow
  1384.  
  1385.     NAME
  1386.         StartRefreshConfigWindow - begin refreshing a window
  1387.  
  1388.     SYNOPSIS
  1389.         StartRefreshConfigWindow(window, finish)
  1390.                                    A0      D0
  1391.  
  1392.         void StartRefreshConfigWindow(struct Window *, long);
  1393.  
  1394.     FUNCTION
  1395.         This routine begins refresh of a simplerefresh window that was
  1396.         opened with OpenConfigWindow(). If you specify the WINDOW_AUTO_REFRESH
  1397.         flag, you will never need to call this function.
  1398.  
  1399.     INPUTS
  1400.         window - window to begin refreshing
  1401.         finish - if set to TRUE, the refresh is ended by this function too. Use
  1402.                  this if you don't want to do any rendering of your own for
  1403.                  the refresh (but if that's the case, why not just use
  1404.                  WINDOW_AUTO_REFRESH?)
  1405.  
  1406.     RESULT
  1407.         Refreshing is started (and optionally finished). All the objects in 
  1408.         the window will be refreshed.
  1409.  
  1410.     SEE ALSO
  1411.         EndRefreshConfigWindow(), intuition.library/BeginRefresh()
  1412.  
  1413.