home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 18 / amigaformatcd18.iso / mui / mui_developer / autodocs / mui_application.doc < prev    next >
Text File  |  1997-03-10  |  47KB  |  1,525 lines

  1. TABLE OF CONTENTS
  2.  
  3. Application.mui/Application.mui
  4. Application.mui/MUIA_Application_Active
  5. Application.mui/MUIA_Application_Author
  6. Application.mui/MUIA_Application_Base
  7. Application.mui/MUIA_Application_Broker
  8. Application.mui/MUIA_Application_BrokerHook
  9. Application.mui/MUIA_Application_BrokerPort
  10. Application.mui/MUIA_Application_BrokerPri
  11. Application.mui/MUIA_Application_Commands
  12. Application.mui/MUIA_Application_Copyright
  13. Application.mui/MUIA_Application_Description
  14. Application.mui/MUIA_Application_DiskObject
  15. Application.mui/MUIA_Application_DoubleStart
  16. Application.mui/MUIA_Application_DropObject
  17. Application.mui/MUIA_Application_ForceQuit
  18. Application.mui/MUIA_Application_HelpFile
  19. Application.mui/MUIA_Application_Iconified
  20. Application.mui/MUIA_Application_Menu
  21. Application.mui/MUIA_Application_MenuAction
  22. Application.mui/MUIA_Application_MenuHelp
  23. Application.mui/MUIA_Application_Menustrip
  24. Application.mui/MUIA_Application_RexxHook
  25. Application.mui/MUIA_Application_RexxMsg
  26. Application.mui/MUIA_Application_RexxString
  27. Application.mui/MUIA_Application_SingleTask
  28. Application.mui/MUIA_Application_Sleep
  29. Application.mui/MUIA_Application_Title
  30. Application.mui/MUIA_Application_UseCommodities
  31. Application.mui/MUIA_Application_UseRexx
  32. Application.mui/MUIA_Application_Version
  33. Application.mui/MUIA_Application_Window
  34. Application.mui/MUIA_Application_WindowList
  35. Application.mui/MUIM_Application_AboutMUI
  36. Application.mui/MUIM_Application_AddInputHandler
  37. Application.mui/MUIM_Application_CheckRefresh
  38. Application.mui/MUIM_Application_GetMenuCheck
  39. Application.mui/MUIM_Application_GetMenuState
  40. Application.mui/MUIM_Application_Input
  41. Application.mui/MUIM_Application_InputBuffered
  42. Application.mui/MUIM_Application_Load
  43. Application.mui/MUIM_Application_NewInput
  44. Application.mui/MUIM_Application_OpenConfigWindow
  45. Application.mui/MUIM_Application_PushMethod
  46. Application.mui/MUIM_Application_RemInputHandler
  47. Application.mui/MUIM_Application_ReturnID
  48. Application.mui/MUIM_Application_Save
  49. Application.mui/MUIM_Application_SetConfigItem
  50. Application.mui/MUIM_Application_SetMenuCheck
  51. Application.mui/MUIM_Application_SetMenuState
  52. Application.mui/MUIM_Application_ShowHelp
  53. Application.mui/Application.mui
  54.  
  55.     Application class is the master class for all
  56.     MUI applications. It serves as a kind of anchor
  57.     for all input, either coming from the user or
  58.     somewhere from the system, e.g. commodities
  59.     or ARexx messages.
  60.  
  61.     An application can have any number of sub windows,
  62.     these windows are the children of the application.
  63. Application.mui/MUIA_Application_Active
  64.  
  65.     NAME
  66.     MUIA_Application_Active -- (V4 ) [ISG], BOOL
  67.  
  68.     FUNCTION
  69.     This attribute reflects the state that the user adjusted
  70.     with commodities Exchange. MUI itself doesn't pay any
  71.     attention to it, this is up to you.
  72.  
  73.     SEE ALSO
  74.     MUIA_Application_Broker
  75. Application.mui/MUIA_Application_Author
  76.  
  77.     NAME
  78.     MUIA_Application_Author -- (V4 ) [I.G], STRPTR
  79.  
  80.     FUNCTION
  81.     Name of the applications author.
  82.  
  83.     EXAMPLE
  84.     see MUIA_Application_Title
  85.  
  86.     SEE ALSO
  87.     MUIA_Application_Title, MUIA_Application_Copyright,
  88.     MUIA_Application_Version, MUIA_Application_Description,
  89.     MUIA_Application_Base
  90. Application.mui/MUIA_Application_Base
  91.  
  92.     NAME
  93.     MUIA_Application_Base -- (V4 ) [I.G], STRPTR
  94.  
  95.     FUNCTION
  96.     The basename for an application. This name is used
  97.     for the builtin ARexx port and for some internal
  98.     file management.
  99.  
  100.     A basename must neither contain spaces nor any
  101.     special characters such as ":/()#?*...".
  102.  
  103.     When your program is a single task application
  104.     (i.e. MUIA_Application_SingleTask is TRUE), the
  105.     base name will be used without further modification.
  106.  
  107.     Otherwise, it gets a ".1", ".2", etc. appended,
  108.     depending on how many applications are already
  109.     running. If you need to know the name of your
  110.     ARexx port, you can query the base name attribute
  111.     after the application is created.
  112.  
  113.     EXAMPLE
  114.     see MUIA_Application_Title
  115.  
  116.     SEE ALSO
  117.     MUIA_Application_Title, MUIA_Application_Version,
  118.     MUIA_Application_Author, MUIA_Application_Copyright,
  119.     MUIA_Application_Description
  120. Application.mui/MUIA_Application_Broker
  121.  
  122.     NAME
  123.     MUIA_Application_Broker -- (V4 ) [..G], Broker *
  124.  
  125.     FUNCTION
  126.     If you need to attach some additional commodities objects
  127.     to your application (e.g. because you need lots of hotkeys),
  128.     you can obtain a pointer to the applications Broker structure
  129.     and add some commodities objects.
  130.  
  131.     MUI will free the complete broker when the application is
  132.     disposed, no need for you to free your objects yourself.
  133.  
  134.     To receive input from your objects, you will also need to
  135.     install a MUIA_Application_BrokerHook.
  136.  
  137.     NOTES
  138.     You must be prepared to receive a NULL pointer. In this
  139.     case, the commodities interface is not available, maybe
  140.     because the user installed a light version of MUI.
  141.  
  142.     SEE ALSO
  143.     MUIA_Application_BrokerHook
  144. Application.mui/MUIA_Application_BrokerHook
  145.  
  146.     NAME
  147.     MUIA_Application_BrokerHook -- (V4 ) [ISG], struct Hook *
  148.  
  149.     FUNCTION
  150.     You specify a pointer to hook structure. The function
  151.     will be called whenever a commodities message arrives
  152.     (between MUI's GetMsg() and ReplyMsg()).
  153.  
  154.     You receive a pointer to the application object
  155.     as object in a2 and a pointer to commodities
  156.     CxMsg message in a1.
  157.  
  158.     NOTES
  159.     The commodities interface isn't available in the
  160.     memory saving "light" version of MUI. Your hook
  161.     will never be called in this case.
  162.  
  163.     SEE ALSO
  164.     MUIA_Application_Broker
  165. Application.mui/MUIA_Application_BrokerPort
  166.  
  167.     NAME
  168.     MUIA_Application_BrokerPort -- (V6 ) [..G], struct MsgPort *
  169.  
  170.     FUNCTION
  171.     Get a pointer to the applications commodities message port.
  172.     If you want to add own Hotkeys to your application, you
  173.     need a message port. Instead of creating your own, you
  174.     should better use this one.
  175.  
  176.     NOTES
  177.     You must be prepared to receive a NULL pointer. In this
  178.     case, the commodities interface is not available, maybe
  179.     because the user installed a light version of MUI.
  180.  
  181.     SEE ALSO
  182.     MUIA_Application_BrokerHook
  183. Application.mui/MUIA_Application_BrokerPri
  184.  
  185.     NAME
  186.     MUIA_Application_BrokerPri -- (V6 ) [I.G], LONG
  187.  
  188.     FUNCTION
  189.     Adjust the priority of an applications broker.
  190.  
  191.     SEE ALSO
  192.     MUIA_Application_BrokerHook
  193. Application.mui/MUIA_Application_Commands
  194.  
  195.     NAME
  196.     MUIA_Application_Commands -- (V4 ) [ISG], struct MUI_Command *
  197.  
  198.     FUNCTION
  199.     This attribute allows an application to include 
  200.     its own set of ARexx commands. You specify a
  201.     pointer to an array of MUI_Command structures,
  202.     which look like this:
  203.  
  204.     struct MUI_Command
  205.     {
  206.        char        *mc_Name;
  207.        char        *mc_Template;
  208.        LONG         mc_Parameters;
  209.        struct Hook *mc_Hook;
  210.        LONG         mc_Reserved[5];
  211.     };
  212.  
  213.     mc_Name       contains the name of your command.
  214.                   Commands are not case sensitive.
  215.  
  216.     mc_Template   is an argument template that follows
  217.                   the same rules as dos.library/ReadArgs().
  218.                   It may be NULL, in which case your command
  219.                   doesn't need any parameters.
  220.  
  221.     mc_Parameters is the number of parameters specified
  222.                   in the template array.
  223.  
  224.     mc_Hook       is a pointer to the callback hook defining
  225.                   the function to be called.
  226.  
  227.     You may specify any number of MUI_Command structures,
  228.     but you must terminate your array with a NULL field.
  229.  
  230.     When a command shows up an applications ARexx port,
  231.     MUI parses the arguments according to the given
  232.     template and calls the hook with the application
  233.     object as hook object in a2 and a pointer to
  234.     an array of longwords containing the parameters
  235.     in a1.
  236.  
  237.     The result code of your hook will be replied to
  238.     ARexx as rc.
  239.  
  240.     If you have some simple ARexx commands that just
  241.     emulate some user action (e.g. clicking a button),
  242.     you can use the magic cookie MC_TEMPLATE_ID for 
  243.     mc_Template and a return id value for mc_Parameters. 
  244.     In this case, MUI will do no argument parsing and 
  245.     instead simply return the specified id value on the 
  246.     next call to MUIM_Application_Input.
  247.  
  248.     For more sophisticated possibilities in ARexx
  249.     callback hooks, please refer to
  250.     MUIA_Application_RexxMsg and MUIA_Application_RexxString.
  251.  
  252.     EXAMPLE
  253.     static struct MUI_Command commands[] =
  254.     {
  255.        { "rescan", MC_TEMPLATE_ID, ID_RESCAN, NULL     },
  256.        { "select", "PATTERN/A"   , 1        , &selhook },
  257.        { NULL    , NULL          , NULL     , NULL     }
  258.     };
  259.  
  260.     SEE ALSO
  261.     MUIA_Application_RexxMsg, MUIA_Application_RexxString
  262. Application.mui/MUIA_Application_Copyright
  263.  
  264.     NAME
  265.     MUIA_Application_Copyright -- (V4 ) [I.G], STRPTR
  266.  
  267.     FUNCTION
  268.     A copyright string, containing the year and the
  269.     company.
  270.  
  271.     EXAMPLE
  272.     see MUIA_Application_Title
  273.  
  274.     SEE ALSO
  275.     MUIA_Application_Title, MUIA_Application_Version,
  276.     MUIA_Application_Author, MUIA_Application_Description,
  277.     MUIA_Application_Base
  278. Application.mui/MUIA_Application_Description
  279.  
  280.     NAME
  281.     MUIA_Application_Description -- (V4 ) [I.G], STRPTR
  282.  
  283.     FUNCTION
  284.     Short description, about 40 characters.
  285.     Shown e.g. in commodities exchange.
  286.  
  287.     EXAMPLE
  288.     see MUIA_Application_Title
  289.  
  290.     SEE ALSO
  291.     MUIA_Application_Title, MUIA_Application_Version,
  292.     MUIA_Application_Author, MUIA_Application_Copyright,
  293.     MUIA_Application_Base
  294. Application.mui/MUIA_Application_DiskObject
  295.  
  296.     NAME
  297.     MUIA_Application_DiskObject -- (V4 ) [ISG], struct DiskObject *
  298.  
  299.     FUNCTION
  300.     Pointer to a struct DiskObject, e.g. obtained
  301.     from GetDiskObject(). If present, MUI will use
  302.     this object for the AppIcon when your application
  303.     gets iconified.
  304.  
  305.     Otherwise MUI will try to locate "env:sys/dev_mui.info"
  306.     and, if not present, fall back to a default icon.
  307.  
  308.     EXAMPLE
  309.     ...
  310.     MUIA_Application_DiskObject,
  311.        dobj = GetDiskObject("PROGDIR:MyApp"),
  312.     ...
  313.  
  314.     /* note that you have to free dobj yourself! */
  315.  
  316.    SEE ALSO
  317.     MUIA_Application_Iconified
  318. Application.mui/MUIA_Application_DoubleStart
  319.  
  320.     NAME
  321.     MUIA_Application_DoubleStart -- (V4 ) [..G], BOOL
  322.  
  323.     FUNCTION
  324.     This attribute is set automatically when the user
  325.     tries to start a MUIA_Application_SingleTask application
  326.     twice. You can react on this and take appropriate actions,
  327.     e.g. pop up a requester or quit yourself.
  328.  
  329.     SEE ALSO
  330.     MUIA_Application_SingleTask
  331. Application.mui/MUIA_Application_DropObject
  332.  
  333.     NAME
  334.     MUIA_Application_DropObject -- (V5 ) [IS.], Object *
  335.  
  336.     FUNCTION
  337.     If your application is iconified and the user drops
  338.     icons onto the AppIcon, the object specified here will 
  339.     receive the AppMessage.
  340.  
  341.     SEE ALSO
  342.     MUIA_Window_AppWindow, MUIM_CallHook
  343. Application.mui/MUIA_Application_ForceQuit
  344.  
  345.     NAME
  346.     MUIA_Application_ForceQuit -- (V8 ) [..G], BOOL
  347.  
  348.     FUNCTION
  349.     When your input loop receives a MUIV_Application_ReturnID_Quit,
  350.     you should query this attribute. In case its TRUE, your program
  351.     should exit quietly without popping up any safety requesters or 
  352.     other stuff.
  353.  
  354.     MUI will e.g. set this if the user issued a "QUIT FORCE" ARexx
  355.     command to your application.
  356. Application.mui/MUIA_Application_HelpFile
  357.  
  358.     NAME
  359.     MUIA_Application_HelpFile -- (V8 ) [ISG], STRPTR
  360.  
  361.     FUNCTION
  362.     This attribute allows defining an AmigaGuide style file
  363.     to be displayed when the user requests online help.
  364.  
  365.     When the HELP button is pressed and the application
  366.     defines a MUIA_Application_HelpFile, MUI tries to obtain
  367.     MUIA_HelpNode from the current object (the one under
  368.     the mouse pointer). If MUIA_HelpNode is not defined,
  369.     MUI continues asking the parent object for this
  370.     attribute (usually a group, but remember: the parent
  371.     of a windows root object is the window itself, the
  372.     parent of a window is the application).
  373.  
  374.     When a non NULL MUIA_HelpNode is found, the same procedure
  375.     is applied to MUIA_HelpLine. Then MUI puts the application
  376.     to sleep and displays the file at the position specified 
  377.     with MUIA_HelpNode and/or MUIA_HelpLine.
  378.  
  379.     This behaviour allows you to define one 
  380.     MUIA_Application_HelpFile for your application object 
  381.     and different help nodes and lines for your applications 
  382.     windows and/or gadgets.
  383.  
  384.     EXAMPLE
  385.  
  386.     ApplicationObject,
  387.        ...
  388.        MUIA_Application_HelpFile, "progdir:myapp.guide",
  389.        ...,
  390.        SubWindow, WindowObject,
  391.           MUIA_Window_Title, "Prefs Window",
  392.           ...,
  393.           MUIA_HelpNode, "prefs-section",
  394.           ...,
  395.           End,
  396.  
  397.        SubWindow, WindowObject,
  398.           MUIA_Window_Title, "Play Window",
  399.           ...
  400.           MUIA_HelpNode, "play-section",
  401.           ...
  402.           WindowContents, VGroup,
  403.              ...,
  404.              Child, StringObject,
  405.                 MUIA_HelpNode, "play-string",
  406.                 ...,
  407.                 End,
  408.              End,
  409.           End,
  410.        End;
  411.  
  412.     In this case, the user will get the prefs-section chapter
  413.     of "myapp.guide" when he requests help in the Prefs window,
  414.     the play-string chapter when he requests help over the
  415.     string gadget in the Play window or the play-section
  416.     chapter somewhere else in the Play window.
  417.  
  418.     NOTES
  419.     Since muimaster.library V8, this attribute replaces the old
  420.     and obsolete MUIA_HelpFile attribute. MUI no longer supports
  421.     the possibility to specify different help files for different
  422.     parts of your application. This step was necessary due to
  423.     some other internal changes and enhancements.
  424.  
  425.     SEE ALSO
  426.     MUIA_HelpNode, MUIA_HelpLine
  427. Application.mui/MUIA_Application_Iconified
  428.  
  429.     NAME
  430.     MUIA_Application_Iconified -- (V4 ) [.SG], BOOL
  431.  
  432.     FUNCTION
  433.     Setting this attribute to TRUE causes the application
  434.     to become iconified. Every open window will be closed
  435.     and a (configurable) AppIcon will appear on the workbench.
  436.  
  437.     Same thing happens when the user hits the iconify gadget
  438.     in the window border or uses commodities Exchange to
  439.     hide your applications interface.
  440.  
  441.     There is no way for you to prevent your application from
  442.     being iconified. However, you can react on the iconification
  443.     by listening to the MUIA_Application_Iconified attribute
  444.     with notification. This allows you to free some resources
  445.     you don't need in iconified state.
  446.  
  447.     When an application is iconified and you try to open a
  448.     window, the window won't open immediately. Instead MUI
  449.     remembers this action and opens the window once the
  450.     application is uniconified again.
  451.  
  452.     EXAMPLE
  453.  
  454.     /* inform the main input loop of iconification events */
  455.  
  456.     #define ID_HIDE 42
  457.     #define ID_SHOW 24
  458.  
  459.     DoMethod(app,MUIM_Notify,
  460.        MUIA_Application_Iconified, TRUE,
  461.        app, 2, MUIM_Application_ReturnID, ID_HIDE);
  462.  
  463.     DoMethod(app,MUIM_Notify,
  464.        MUIA_Application_Iconified, FALSE,
  465.        app, 2, MUIM_Application_ReturnID, ID_SHOW);
  466.  
  467.     SEE ALSO
  468.     MUIA_Application_DiskObject
  469. Application.mui/MUIA_Application_Menu
  470.  
  471.     NAME
  472.     MUIA_Application_Menu -- (V4 ) [I.G], struct NewMenu * (OBSOLETE)
  473.  
  474.     FUNCTION
  475.     Obsolete, use MUIA_Application_Menustrip instead.
  476.  
  477.     SEE ALSO
  478.     MUIA_Application_Menustrip
  479. Application.mui/MUIA_Application_MenuAction
  480.  
  481.     NAME
  482.     MUIA_Application_MenuAction -- (V4 ) [..G], ULONG
  483.  
  484.     FUNCTION
  485.     Whenever a menu item is selected, this attribute will be
  486.     set to the corresponding UserData field of the gadtools
  487.     NewMenu structure. This allows reacting on menu items
  488.     via broadcasting.
  489.  
  490.     SEE ALSO
  491.     MUIA_Application_Menu, MUIA_Application_MenuAction
  492. Application.mui/MUIA_Application_MenuHelp
  493.  
  494.     NAME
  495.     MUIA_Application_MenuHelp -- (V4 ) [..G], ULONG
  496.  
  497.     FUNCTION
  498.     Whenever a menu item is selected with the help key, this
  499.     attribute will be set to the corresponding UserData field
  500.     of the gadtools NewMenu structure. Together with
  501.     MUIM_Application_ShowHelp this allows creation of
  502.     menu help texts.
  503.  
  504.     SEE ALSO
  505.     MUIA_Application_Menu, MUIA_Application_ShowHelp
  506. Application.mui/MUIA_Application_Menustrip
  507.  
  508.     NAME
  509.     MUIA_Application_Menustrip -- (V8 ) [I..], Object *
  510.  
  511.     FUNCTION
  512.     Specify a menu strip object for the application. The object
  513.     is treated as a child of the application and will be disposed
  514.     when the application is disposed.
  515.  
  516.     Menustrip objects defined for the application are used
  517.     as menu for every window of the application, as long as
  518.     the window doesn't define its private menu.
  519.  
  520.     MUIA_Application_Menustrip replaces the old and obsolete
  521.     MUIA_Application_Menu tag.
  522.  
  523.     Usually, you will create the menu object with MUI's builtin
  524.     object library from a gadtools NewMenu structure, but its
  525.     also OK to define the menu tree "by hand" using the
  526.     Family class.
  527. Application.mui/MUIA_Application_RexxHook
  528.  
  529.     NAME
  530.     MUIA_Application_RexxHook -- (V7 ) [ISG], struct Hook *
  531.  
  532.     FUNCTION
  533.     When specified, MUI calls this hook whenever a rexx message 
  534.     arrives and MUI can't map it to a builtin or a programmer
  535.     specified command. The hook will be called with a pointer 
  536.     to itself in A0, a pointer to the application object in A2 
  537.     and a pointer to a struct RexxMsg in A1.
  538.  
  539.     The return code from the hook is used as result code
  540.     when replying the message, the secondary result can
  541.     be set with MUIA_Application_RexxString.
  542.  
  543.     SEE ALSO
  544.     MUIA_Application_Commands
  545. Application.mui/MUIA_Application_RexxMsg
  546.  
  547.     NAME
  548.     MUIA_Application_RexxMsg -- (V4 ) [..G], struct RxMsg *
  549.  
  550.     FUNCTION
  551.     Within an ARexx callback hook, you can obtain
  552.     a pointer to the RexxMsg that came with the
  553.     command. This allows you to use some ARexx
  554.     support functions coming with amiga.lib
  555.  
  556.     SEE ALSO
  557.     MUIA_Application_Commands, MUIA_Application_RexxString
  558. Application.mui/MUIA_Application_RexxString
  559.  
  560.     NAME
  561.     MUIA_Application_RexxString -- (V4 ) [.S.], STRPTR
  562.  
  563.     FUNCTION
  564.     ARexx allows returning a string as result of a
  565.     function call. This attribute allows setting the
  566.     result string within an ARexx callback hook.
  567.  
  568.     The string is temporarily copied.
  569.  
  570.     SEE ALSO
  571.     MUIA_Application_Commands, MUIA_Application_RexxMsg
  572. Application.mui/MUIA_Application_SingleTask
  573.  
  574.     NAME
  575.     MUIA_Application_SingleTask -- (V4 ) [I..], BOOL
  576.  
  577.     FUNCTION
  578.     Boolean value to indicate whether or not your application
  579.     is a single task program. When set to TRUE, MUI will
  580.     refuse to create more than one application object.
  581.  
  582.     In this case, the already running application gets its
  583.     MUIA_Application_DoubleStart attribute set to TRUE. You 
  584.     can listen to this and take appropriate actions, e.g. 
  585.     pop up a requester.
  586.  
  587.     Examples for single task applications are the system
  588.     preferences program. It doesn't make sense for them
  589.     to run more than once.
  590.  
  591.     SEE ALSO
  592.     MUIA_Application_DoubleStart
  593. Application.mui/MUIA_Application_Sleep
  594.  
  595.     NAME
  596.     MUIA_Application_Sleep -- (V4 ) [.S.], BOOL
  597.  
  598.     FUNCTION
  599.     This attribute can be used to put a whole application
  600.     to sleep. All open windows get disabled and a busy
  601.     pointer appears.
  602.  
  603.     This attribute contains a nesting count, if you tell
  604.     your application to sleep twice, you will have to tell 
  605.     it to wake up twice too.
  606.  
  607.     If you need to do some time consuming actions, you
  608.     always should set this attribute to inform the user
  609.     that you are currently unable to handle input.
  610.  
  611.     A sleeping application's windows cannot be resized.
  612.  
  613.     EXAMPLES
  614.     set(app,MUIA_Application_Sleep,TRUE ); // go to bed
  615.     calc_fractals();
  616.     set(app,MUIA_Application_Sleep,FALSE); // wake up
  617.  
  618.     SEE ALSO
  619.     MUIA_Window_Sleep, MUIM_Application_InputBuffered
  620. Application.mui/MUIA_Application_Title
  621.  
  622.     NAME
  623.     MUIA_Application_Title -- (V4 ) [I.G], STRPTR
  624.  
  625.     FUNCTION
  626.     This tag defines the title of an application.
  627.     The title is e.g. shown in Commodities Exchange
  628.     or in the MUI preferences program.
  629.  
  630.     An application title shall not contain any version
  631.     information, just the pure title. Also, special
  632.     characters such as ":/()#?*..." are not allowed.
  633.  
  634.     You should use a quiet long and unique name for
  635.     your applications. Naming it "Viewer" or "Browser"
  636.     is not a wise choice.
  637.  
  638.     The length of the name must not exceed 30 characters!
  639.  
  640.     EXAMPLE
  641.     ApplicationObject,
  642.        MUIA_Application_Title      , "WbMan",
  643.        MUIA_Application_Version    , "$VER: WbMan 0.24 (19.7.93)",
  644.        MUIA_Application_Copyright  , "© 1993 by Klaus Melchior",
  645.        MUIA_Application_Author     , "Klaus Melchior",
  646.        MUIA_Application_Description, "Manages the WBStartup.",
  647.        MUIA_Application_Base       , "WBMAN",
  648.        ...
  649.  
  650.     SEE ALSO
  651.     MUIA_Application_Version, MUIA_Application_Copyright,
  652.     MUIA_Application_Author, MUIA_Application_Description,
  653.     MUIA_Application_Base
  654. Application.mui/MUIA_Application_UseCommodities
  655.  
  656.     NAME
  657.     MUIA_Application_UseCommodities -- (V10) [I..], BOOL
  658.  
  659.     FUNCTION
  660.     When set to FALSE, the application will run without a 
  661.     commodities interface. Think very well before using this
  662.     tag!
  663.  
  664.     SEE ALSO
  665.         MUIA_Application_UseRexx
  666. Application.mui/MUIA_Application_UseRexx
  667.  
  668.     NAME
  669.     MUIA_Application_UseRexx -- (V10) [I..], BOOL
  670.  
  671.     FUNCTION
  672.     When set to FALSE, the application will run without an
  673.     ARexx interface. Think very well before using this
  674.     tag!
  675.  
  676.     SEE ALSO
  677.         MUIA_Application_UseCommodities
  678. Application.mui/MUIA_Application_Version
  679.  
  680.     NAME
  681.     MUIA_Application_Version -- (V4 ) [I.G], STRPTR
  682.  
  683.     FUNCTION
  684.     Define a version string for an application.
  685.     This string shall follow standard version string
  686.     convetions but must *not* contain a leading "\0".
  687.  
  688.     EXAMPLE
  689.     see MUIA_Application_Title
  690.  
  691.     SEE ALSO
  692.     MUIA_Application_Title, MUIA_Application_Copyright,
  693.     MUIA_Application_Author, MUIA_Application_Description,
  694.     MUIA_Application_Base
  695. Application.mui/MUIA_Application_Window
  696.  
  697.     NAME
  698.     MUIA_Application_Window -- (V4 ) [I..], Object *
  699.  
  700.     FUNCTION
  701.     A pointer to a MUI object of Window class. An
  702.     application may have any number of sub windows,
  703.     each of them being a child of the application.
  704.  
  705.     When the application receives some kind of user
  706.     input through its IDCMP, it diverts the message
  707.     down to its children, as long as they are opened.
  708.  
  709.     Things like iconification or preferences changes
  710.     cause the application object to temporarily close
  711.     every open window (and reopen it later). Your
  712.     main program normally doesn't need to deal with
  713.     these things.
  714.  
  715.     As with the children of group class, it's common
  716.     to use a call to MUI_NewObject() as value for
  717.     this attribute. No error checking needs to be
  718.     done, the application object handles every
  719.     failure automatically.
  720.  
  721.     When you dispose your application, its sub windows
  722.     will also get deleted. Thus, the only thing to do
  723.     to remove your application is a
  724.  
  725.     MUI_DisposeObject(ApplicationObject);
  726.  
  727.     Every window, every gadget, every memory will be
  728.     freed by this single call.
  729.  
  730.     EXAMPLE
  731.     Please refer to one of the example programs.
  732.  
  733.     SEE ALSO
  734. Application.mui/MUIA_Application_WindowList
  735.  
  736.     NAME
  737.     MUIA_Application_WindowList -- (V13) [..G], struct List *
  738.  
  739.     FUNCTION
  740.     This attribute returns a pointer to the exec list structure
  741.     which contains the children (i.e. windows) of an application.
  742.     Parse this with intuition.library/NextObject()!
  743. Application.mui/MUIM_Application_AboutMUI
  744.  
  745.     NAME
  746.     MUIM_Application_AboutMUI (V14)
  747.  
  748.     SYNOPSIS
  749.     DoMethod(obj,MUIM_Application_AboutMUI,Object *refwindow);
  750.  
  751.     FUNCTION
  752.     Show the MUI about window. Please include that in all your 
  753.     applications and link with a menu item called "About MUI...".
  754.  
  755.     INPUTS
  756.     - refwindow: pointer to a window object as reference. If !=NULL,
  757.     the MUI about window is centered according to this window. Note
  758.     that this points to a MUI window object, not to a struct window.
  759.  
  760.     EXAMPLE
  761.     DoMethod((Object *)DoMethod(strip,MUIM_FindUData,MEN_ABOUT),
  762.        MUIM_Notify,MUIA_Menuitem_Trigger,MUIV_EveryTime,
  763.        MUIV_Notify_Application,2,MUIM_Application_AboutMUI,mywinobj);
  764. Application.mui/MUIM_Application_AddInputHandler
  765.  
  766.     NAME
  767.     MUIM_Application_AddInputHandler (V11)
  768.  
  769.     SYNOPSIS
  770.     DoMethod(obj,MUIM_Application_AddInputHandler,struct MUI_InputHandlerNode *ihnode);
  771.  
  772.     FUNCTION
  773.     Up to MUI 2.3, it was not easy to build custom classes which
  774.     should react on signals of private message ports. For example,
  775.     a clock class would want to be notified every second to update
  776.     its display. Old versions of MUI forced you to Wait() for
  777.     a timer signal in the main loop and notify the custom class.
  778.  
  779.     Since MUI 3, the existance of so called "input handlers"
  780.     (don't mix up with input.device input handler) eliminates
  781.     the need of dealing with the main loop in these cases.
  782.     A class can create message ports and react on their
  783.     signals on its own without interferring the main program.
  784.  
  785.     For a clock class, this would mean that you simply create
  786.     the object into any MUI window and it starts updating
  787.     itself every second automatically. A game class could open
  788.     the gameport.device and react on joystick messages, an
  789.     html class could talk to network ports all on its own.
  790.  
  791.     All this helps to further encapsulate your program into
  792.     subclasses and make it a lot more easy to maintain. Let
  793.     me repeat the main loop of an ideal MUI application here:
  794.  
  795.     ULONG sigs = 0;
  796.  
  797.     while (DoMethod(app,MUIM_Application_NewInput,&sigs)
  798.            != MUIV_Application_ReturnID_Quit)
  799.     {
  800.         if (sigs)
  801.         {
  802.             sigs = Wait(sigs | SIGBREAKF_CTRL_C);
  803.             if (sigs & SIGBREAKF_CTRL_C) break;
  804.         }
  805.     }
  806.  
  807.     To be able to react on signals, you must fill out a
  808.     MUI_InputHandlerNode structure (probably located in
  809.     your classes instance data) and call
  810.     MUIM_Application_AddInputHandler with the structure
  811.     as parameter. From now on, your class will receive
  812.     the specified method whenever one of the given signals
  813.     arrives.
  814.  
  815.     Since we're talking about a method of application
  816.     class here, it's clear that you cannot call it until
  817.     you know about your application object. Good places
  818.     for MUIM_Application_AddInputHandler/RemInputHandler
  819.     are probably the MUIM_Setup/MUIM_Cleanup methods
  820.     of your class.
  821.  
  822.     INPUTS
  823.     ihnode - Pointer to an initialized MUI_InputHandlerNode
  824.              structure:
  825.              ihn_Object  - fill in a pointer to your object.
  826.              ihn_Signals - signals you wish to be notified on.
  827.                            You can set more than one bit here.
  828.              ihn_Flags   - always set to 0 for now.
  829.              ihn_Method  - method that you want to receive
  830.                            when one of ihn_Signals is set.
  831.  
  832.     RESULT
  833.     MUIM_Application_AddInputHandler cannot fail, the result
  834.     value of the method is currently undefined.
  835.  
  836.     NOTES
  837.     You must match each AddInputHandler with exatly
  838.     one RemInputHandler method. Do not add a
  839.     MUI_InputHandlerNode which is currently in use.
  840.  
  841.     IMPORTANT: Your trigger method might also be
  842.     called when none of your signals arrived. You *must*
  843.     make sure that you check your conditions in
  844.     the trigger method (if (GetMsg(port) ... or
  845.     if (CheckIO(req)) ...). Also, please make these
  846.     checks quick and return FALSE as fast as possible
  847.     when none of your conditions was met. Return TRUE
  848.     if you have "used" the trigger method.
  849.  
  850.     TIMER
  851.     Since muimaster.library V13, MUIs application class
  852.     implements a builtin timer. By using this one instead
  853.     of creating your own IO requests, you avoid the problem
  854.     of having each instance of your object allocating a
  855.     signal bit.
  856.  
  857.     To make use of this timer, use the above described procedure
  858.     of initializing and adding your MUI_InputHandlerNode structure, 
  859.     but set the MUIIHNF_TIMER in ihn_Flags. Furthermore, specify
  860.     the number of milliseconds after which you want to receive your
  861.     method in ihn_Millis. Note that ihn_Millis is in fact part of a
  862.     union placed at the same memory location as ihn_Signals, do not
  863.     use ihn_Signals when MUIIHNF_TIMER is set.
  864.  
  865.     Besides from MUIIHNF_TIMER and ihn_Millis instead of ihn_Signals,
  866.     using the timer is similiar to other input handlers. Removing
  867.     with MUIM_Application_RemInputHandler is not different at all.
  868.  
  869.     EXAMPLE
  870.     OM_NEW:
  871.        data->port = CreateMsgPort();
  872.        data->req = CreateIORequest(data->port,sizeof(struct timer));
  873.        OpenDevice(TIMERNAME,UNIT_VBLANK,(struct IORequest *)data->req,0);
  874.        data->ihnode.ihn_Object  = obj;
  875.        data->ihnode.ihn_Signals = IO_SIGMASK(data->req);
  876.        data->ihnode.ihn_Flags   = 0;
  877.        data->ihnode.ihn_Method  = MY_TRIGGER_METHOD;
  878.  
  879.     OM_DISPOSE:
  880.        CloseDevice((struct IORequest *)data->req);
  881.        DeleteIORequest(data->req);
  882.        DeleteMsgPort(data->port);
  883.  
  884.     MUIM_Setup:
  885.        data->req->tr_node.io_Command = TR_ADDREQUEST;
  886.        data->req->tr_time.tv_secs    = 1;
  887.        data->req->tr_time.tv_micro   = 0;
  888.        SendIO((struct IORequest *)data->req);
  889.        DoMethod(_app(obj),MUIM_Application_AddInputHandler,&data->ihnode);
  890.  
  891.     MUIM_Cleanup:
  892.        DoMethod(_app(obj),MUIM_Application_RemInputHandler,&data->ihnode);
  893.        if (!CheckIO(data->req)) AbortIO(data->req);
  894.        WaitIO(data->req);
  895.  
  896.     MY_TRIGGER_METHOD:
  897.        if (CheckIO(data->req))
  898.        {
  899.           WaitIO(data->req);
  900.  
  901.           /* update display or do anything else here ... */
  902.  
  903.           /* send a new timer event */
  904.           data->req->tr_node.io_Command = TR_ADDREQUEST;
  905.           data->req->tr_time.tv_secs    = 1;
  906.           data->req->tr_time.tv_micro   = 0;
  907.           SendIO((struct IORequest *)data->req);
  908.  
  909.           return(TRUE);
  910.        }
  911.        return(FALSE);
  912.  
  913.     SEE ALSO
  914.     MUIM_Application_RemInputHandler, MUIM_Application_Input
  915. Application.mui/MUIM_Application_CheckRefresh
  916.  
  917.     NAME
  918.     MUIM_Application_CheckRefresh (V11)
  919.  
  920.     SYNOPSIS
  921.     DoMethod(obj,MUIM_Application_CheckRefresh);
  922.  
  923.     FUNCTION
  924.     This method checks all currently open windows if they
  925.     need refreshing and refreshes them if necessary.
  926.  
  927.     You won't need to call this method if you are within
  928.     your traditional MUI main loop. However, if you e.g.
  929.     spawn some kind of synchronous requester (AslRequest),
  930.     MUI cannot react on IDCMP_REFRESHWINDOW messages.
  931.  
  932.     The result is that the user may see a damaged MUI window
  933.     if he moves around a file requester and MUI is configured
  934.     for simple refresh.
  935.  
  936.     MUIA_Application_CheckRefresh is the solution for this
  937.     problem. Just open your requesters with
  938.  
  939.     ASLFR_UserData    , ApplicationObject,
  940.     ASLFR_IntuiMsgFunc, &IntuiMsgHook,
  941.  
  942.     and let IntuiMsgHook point to something like this:
  943.  
  944.     SAVEDS ASM VOID IntuiMsgFunc(
  945.        _a1 struct IntuiMessage *imsg,
  946.        _a2 struct FileRequester *req)
  947.     {
  948.        if (imsg->Class==IDCMP_REFRESHWINDOW)
  949.           DoMethod(req->fr_UserData,MUIM_Application_CheckRefresh);
  950.     }
  951.  
  952.     RESULT
  953.     Windows with damage will be refreshed. This may result in
  954.     MUI calling MUIM_Draw of some of your custom classes.
  955.     The result value of this method is undefined.
  956.  
  957.     SEE ALSO
  958.     MUIM_Application_InputBuffered
  959. Application.mui/MUIM_Application_GetMenuCheck
  960.  
  961.     NAME
  962.     MUIM_Application_GetMenuCheck (V4 ) (OBSOLETE)
  963.  
  964.     SYNOPSIS
  965.     DoMethod(obj,MUIM_Application_GetMenuCheck,ULONG MenuID);
  966.  
  967.     FUNCTION
  968.     Ask whether a checkmark menu item has its checkmark
  969.     set or cleared.
  970.     The application will ask its sub windows for a
  971.     menu item with the given id and return the state of
  972.     the first item it finds.
  973.  
  974.     INPUTS
  975.     MenuID - the value you wrote into the
  976.                  UserData field of struct NewMenu.
  977.  
  978.     SEE ALSO
  979.     MUIM_Application_SetMenuCheck, MUIA_Application_Menu
  980. Application.mui/MUIM_Application_GetMenuState
  981.  
  982.     NAME
  983.     MUIM_Application_GetMenuState (V4 ) (OBSOLETE)
  984.  
  985.     SYNOPSIS
  986.     DoMethod(obj,MUIM_Application_GetMenuState,ULONG MenuID);
  987.  
  988.     FUNCTION
  989.     Ask whether a menu item is enabled or disabled.
  990.     The application will ask its sub windows for a
  991.     menu item with the given id and return the state of
  992.     the first item it finds.
  993.  
  994.     INPUTS
  995.     MenuID - the value you wrote into the
  996.                  UserData field of struct NewMenu.
  997.  
  998.     SEE ALSO
  999.     MUIM_Application_SetMenuState, MUIA_Application_Menu
  1000. Application.mui/MUIM_Application_Input
  1001.  
  1002.     NAME
  1003.     MUIM_Application_Input (V4 ) (OBSOLETE)
  1004.  
  1005.     SYNOPSIS
  1006.     DoMethod(obj,MUIM_Application_Input,LONGBITS *signal);
  1007.  
  1008.     FUNCTION
  1009.     The MUI system itself does not wait for any user input.
  1010.     It just tells your application which signal bits it
  1011.     has allocated, then it's up to you to call MUIs input
  1012.     handle function when one of these signals gets set.
  1013.  
  1014.     In a simple MUI application you would just Wait()
  1015.     for these signals and call MUI when one is received.
  1016.     However, you can perfectly allocate some signal bits
  1017.     yourself and include them in your Wait() command.
  1018.     You needn't even Wait(), your application could
  1019.     maybe calculate some fractal graphics or copy
  1020.     disks, the only important thing is that you call
  1021.     MUI's input method when one of the MUI allocated
  1022.     signals arrives.
  1023.  
  1024.     The usual way of communication with your user
  1025.     interface is via return ids. Every action happening
  1026.     to the GUI can create return ids, e.g. pressing a
  1027.     button or trying to close a window. MUI buffers these
  1028.     ids and uses them as result codes for the input method.
  1029.     Thats where you can get it from and take the appropriate
  1030.     actions.
  1031.  
  1032.     Now lets have a look on a usual input loop of a
  1033.     MUI application. Imagine you have an Play and a
  1034.     Cancel button and have previously told them
  1035.     to return ID_PLAY and ID_CANCEL when pressed.
  1036.     (see MUIM_Notify and MUIM_Application_ReturnID
  1037.     on information about these topics). Your input
  1038.     loop would look like this:
  1039.  
  1040.  
  1041.     while (running)
  1042.     {
  1043.        ULONG signals;
  1044.  
  1045.        switch (DoMethod(app,MUIM_Application_Input,&signals))
  1046.        {
  1047.           case ID_PLAY:
  1048.              PlaySound();
  1049.              break;
  1050.  
  1051.           case ID_CANCEL:
  1052.           case MUIV_Application_ReturnID_Quit:
  1053.              running = FALSE;
  1054.              break;
  1055.        }
  1056.  
  1057.        if (running && signals) Wait(signals);
  1058.     }
  1059.  
  1060.  
  1061.     So what is happening here?
  1062.  
  1063.     First, you have to call the MUIM_Application_Input method.
  1064.     You supply the address of a ULONG as parameter, thats
  1065.     where MUI fills in the signals it needs. Note that you can
  1066.     call the input method at any time, regardless of signal
  1067.     setting. MUI will simply return when there is nothing
  1068.     to do.
  1069.  
  1070.     In case the user pressed the Play or the Cancel button,
  1071.     MUIM_Application_Input will return ID_PLAY or ID_CANCEL.
  1072.     Otherwise you will receive a 0, that's why you cannot
  1073.     use 0 as one of your id values.
  1074.  
  1075.     There is one predefined id called
  1076.     MUIV_Application_ReturnID_Quit. This will be sent to you
  1077.     when someone tried to quit your application from outside,
  1078.     e.g. via commodities exchange or the ARexx "quit" command.
  1079.     It is required that your application handles this id,
  1080.     just treat as if the user clicked on a "Quit" button or
  1081.     selected a "Quit" menu item.
  1082.  
  1083.     After handling the return value, you have to examine
  1084.     if MUI wants you to wait for any signals. If this
  1085.     is the case (signals != 0), just wait for it. If
  1086.     MUI puts a 0 into signals it wants to tell you to
  1087.     immediately call the input method again, maybe some
  1088.     other return ids have received and need to be handled.
  1089.     You *must* check this because Wait()ing on a zero
  1090.     signal mask is not a good idea!
  1091.  
  1092.     Note: It is very important that you call the input method
  1093.     whenever a signal arrives. MUI needs this to correctly
  1094.     refresh its windows, handle resizing and iconification
  1095.     operations and commodities and ARexx messages. If you
  1096.     don't, you will annoy your user!
  1097.  
  1098.     If your program needs to be in a state where you are
  1099.     for some reasons unable to call the input method for
  1100.     a considerable amount of time (maybe half a second or
  1101.     more), you should put your application to sleep. See
  1102.     MUIA_Application_Sleep on how to do this.
  1103.  
  1104.     SEE ALSO
  1105.     MUIA_Application_Sleep, MUIM_Application_InputBuffered,
  1106.     MUIM_Application_NewInput
  1107. Application.mui/MUIM_Application_InputBuffered
  1108.  
  1109.     NAME
  1110.     MUIM_Application_InputBuffered (V4 )
  1111.  
  1112.     SYNOPSIS
  1113.     DoMethod(obj,MUIM_Application_InputBuffered);
  1114.  
  1115.     FUNCTION
  1116.     Imagine your application does some time consuming
  1117.     operation, e.g. copying a disk, and you are for
  1118.     some reasons unable to react on return ids during
  1119.     this period. One solution would be to simply
  1120.     put your application to sleep, it will get a
  1121.     busy pointer and the user knows whats going on.
  1122.  
  1123.     However, this will make it impossible for the user
  1124.     to resize your applications windows or iconify it,
  1125.     he will have to wait until you are done with your
  1126.     operation.
  1127.  
  1128.     MUIM_Application_InputBuffered offers a solution
  1129.     for this problem. Using this method, you needn't
  1130.     set to sleep your application. Just call it on a
  1131.     regular basis and MUI will be able to handle
  1132.     all actions concerning the GUI. You do not need
  1133.     to pay attention on return values, they remain
  1134.     on an internal stack until your next call to
  1135.     the non buffered input method.
  1136.  
  1137.     EXAMPLE
  1138.     for (track=0; track<80; track++)
  1139.     {
  1140.        read_track();
  1141.        DoMethod(app,MUIM_Application_InputBuffered);
  1142.        write_track();
  1143.        DoMethod(app,MUIM_Application_InputBuffered);
  1144.     }
  1145.  
  1146.     SEE ALSO
  1147.     MUIM_Application_Input, MUIA_Application_Sleep
  1148. Application.mui/MUIM_Application_Load
  1149.  
  1150.     NAME
  1151.     MUIM_Application_Load (V4 )
  1152.  
  1153.     SYNOPSIS
  1154.     DoMethod(obj,MUIM_Application_Load,STRPTR name);
  1155.  
  1156.     FUNCTION
  1157.     MUIM_Application_Save, MUIM_Application_Load and
  1158.     MUIA_ObjectID offer an easy way of saving and loading
  1159.     a programs configuration.
  1160.  
  1161.     Each gadget with a non NULL MUIA_ObjectID will get
  1162.     its contents saved during MUIM_Application_Save and
  1163.     restored during MUIM_Application_Load. This makes
  1164.     it very easy to design a configuration window
  1165.     with "Save", "Use" and "Cancel" buttons to allow
  1166.     the user storing the settings. When the application
  1167.     starts, you would just have to call MUIM_Application_Load
  1168.     and the stored settings will be read and installed.
  1169.  
  1170.     Not all classes are able to import and export their
  1171.     contents. Currently, you may define a MUIA_ObjectID for
  1172.  
  1173.     String class   - MUIA_String_Contents is ex/imported.
  1174.     Radio class    - MUIA_Radio_Active is ex/imported.
  1175.     Cycle class    - MUIA_Cycle_Active is ex/imported.
  1176.     List class     - MUIA_List_Active is /ex/imported.
  1177.     Text class     - MUIA_Text_Contents is ex/imported.
  1178.     Numeric class  - MUIA_Numeric_Value is ex/imported.
  1179.     Area class     - MUIA_Selected is ex/imported
  1180.                      (e.g. for Checkmark gadgets)
  1181.    Menuitem class - MUIA_Menuitem_Checked is ex/imported (V9).
  1182.     Group class    - MUIA_Group_ActivePage is ex/imported (V8).
  1183.  
  1184.     INPUTS
  1185.     name - Name of the file you wish to load the settings from.
  1186.            Usually you won't need to think of a real name but
  1187.            instead use one of the magic cookies
  1188.            MUIV_Application_Load_ENV or
  1189.            MUIV_Application_Load_ENVARC.
  1190.  
  1191.     EXAMPLE
  1192.     see the sample program "Settings.c"
  1193.  
  1194.     SEE ALSO
  1195.     MUIM_Application_Save, notify.mui/MUIA_ObjectID, 
  1196.     MUIM_Export, MUIM_Import
  1197. Application.mui/MUIM_Application_NewInput
  1198.  
  1199.     NAME
  1200.     MUIM_Application_NewInput (V11)
  1201.  
  1202.     SYNOPSIS
  1203.     DoMethod(obj,MUIM_Application_NewInput,LONGBITS *signal);
  1204.  
  1205.     FUNCTION
  1206.     This is an enhanced replacement for MUIM_Application_Input.
  1207.     It depends on receiving the return value from your Wait()
  1208.     or 0 as input to be able to perform the necessary actions
  1209.     more efficient.
  1210.  
  1211.     MUIM_Application_NewInput is generally preferrable over
  1212.     MUIM_Application_Input.
  1213.  
  1214.     EXAMPLE
  1215.     /*
  1216.     ** This is the ideal input loop for an object oriented MUI
  1217.     ** application. Everything is encapsulated in classes, no
  1218.     ** return ids need to be used, we just check if the program
  1219.     ** shall terminate.
  1220.     ** Note that MUIM_Application_NewInput expects sigs to
  1221.     ** contain the result from Wait() (or 0). This makes the
  1222.     ** input loop significantly faster.
  1223.     */
  1224.  
  1225.     {
  1226.        ULONG sigs = 0;
  1227.  
  1228.        while (DoMethod(app,MUIM_Application_NewInput,&sigs)
  1229.               !=MUIV_Application_ReturnID_Quit)
  1230.        {
  1231.           if (sigs)
  1232.           {
  1233.              sigs = Wait(sigs | SIGBREAKF_CTRL_C);
  1234.              if (sigs & SIGBREAKF_CTRL_C) break;
  1235.           }
  1236.        }
  1237.     }
  1238.  
  1239.     SEE ALSO
  1240.     MUIM_Application_Input
  1241.  
  1242. Application.mui/MUIM_Application_OpenConfigWindow
  1243.  
  1244.     NAME
  1245.     MUIM_Application_OpenConfigWindow (V11)
  1246.  
  1247.     SYNOPSIS
  1248.     DoMethod(obj,MUIM_Application_OpenConfigWindow,ULONG flags);
  1249.  
  1250.     FUNCTION
  1251.     Since MUI 3, applications can open their own MUI configuration
  1252.     window to allow users to adjust the local preferences without
  1253.     the need of an external program. Programmers are supposed to
  1254.     include a "Settings/MUI..." menu item which simply calls
  1255.     MUIM_Application_OpenConfigWindow. MUI will then automatically
  1256.     show the preferences window without blocking the rest of the
  1257.     program.
  1258.  
  1259.     Currently no flags are defined; pass 0 for the time being.
  1260. Application.mui/MUIM_Application_PushMethod
  1261.  
  1262.     NAME
  1263.     MUIM_Application_PushMethod (V4 )
  1264.  
  1265.     SYNOPSIS
  1266.     DoMethod(obj,MUIM_Application_PushMethod,Object *dest, LONG count, /* ... */);
  1267.  
  1268.     FUNCTION
  1269.     Usually, you may not talk to the MUI system from two
  1270.     tasks at the same time. MUIM_Application_PushMethod
  1271.     provides some kind of solution for this problem.
  1272.  
  1273.     This (and only this) method may be called from a
  1274.     second task. It takes another method as parameter
  1275.     and puts in onto a private stack of the application
  1276.     object. The next time MUIM_Application_Input
  1277.     is called, the pushed method will be executed
  1278.     in the context of the current task.
  1279.  
  1280.     INPUTS
  1281.     dest  - object on which to perform the pushed method.
  1282.         count - number of following arguments.
  1283.     ...   - the destination method.
  1284.  
  1285.     RESULT
  1286.     TRUE if successful, FALSE otherwise.
  1287.  
  1288.     EXAMPLE
  1289.     /* set a status line from a sub task */
  1290.     DoMethod(app,MUIM_Application_PushMethod,
  1291.        txstatus,3,MUIM_Set,MUIA_Text_Contents,"reading...");
  1292.  
  1293.     NOTE
  1294.     MUIM_Application_PushMethod has a limit of 7 arguments!
  1295.  
  1296.     SEE ALSO
  1297.     MUIM_Application_Input
  1298. Application.mui/MUIM_Application_RemInputHandler
  1299.  
  1300.     NAME
  1301.     MUIM_Application_RemInputHandler (V11)
  1302.  
  1303.     SYNOPSIS
  1304.     DoMethod(obj,MUIM_Application_RemInputHandler,struct MUI_InputHandlerNode *ihnode);
  1305.  
  1306.     FUNCTION
  1307.     Remove an input handler.
  1308.     MUI will no longer call your trigger method after you have
  1309.     removed the MUI_InputHandlerNode. You can add/remove
  1310.     input handler nodes any time as long as you know
  1311.     about your application object.
  1312.  
  1313.     RESULT
  1314.     MUIM_Application_RemInputHandler cannot fail, the result
  1315.     value of the method is currently undefined.
  1316.  
  1317.     INPUTS
  1318.     ihnode - input handler node structure you passed to
  1319.              MUIM_Application_AddInputHandler previously.
  1320.  
  1321.     SEE ALSO
  1322.     MUIM_Application_AddInputHandler, MUIM_Application_Input
  1323. Application.mui/MUIM_Application_ReturnID
  1324.  
  1325.     NAME
  1326.     MUIM_Application_ReturnID (V4 )
  1327.  
  1328.     SYNOPSIS
  1329.     DoMethod(obj,MUIM_Application_ReturnID,ULONG retid);
  1330.  
  1331.     FUNCTION
  1332.     Tell MUI to return the given id with the next call to 
  1333.     MUIM_Application_Input.
  1334.  
  1335.     Together with the MUI's notification mechanism, this
  1336.     method connects your user interface and your program.
  1337.     If you e.g. want to be informed if the user presses
  1338.     a "Play" button, you would have define an id for
  1339.     this action and set up a notification event with
  1340.     MUIM_Notify.
  1341.  
  1342.     You can use any long word as return id, except
  1343.     from -255 up to 0. These values are reserved for
  1344.     MUI's internal use and for special return values
  1345.     like MUIV_Application_ReturnID_Quit.
  1346.  
  1347.     Note that MUI will put all incoming return ids
  1348.     onto a private fifo stack and feed this stack
  1349.     to its input methods result code later.
  1350.  
  1351.     NOTE
  1352.     The usage of ReturnIDs is no good MUI programming style.
  1353.     You should build your application with sub classes and
  1354.     hooks instead! See the PublicScreenManager source code
  1355.     for an example of good MUI programming!
  1356.  
  1357.     EXAMPLE
  1358.  
  1359.     /* inform me if a button is pressed (actually released, */
  1360.     /* since this is the way amiga buttons are handled)     */
  1361.  
  1362.     #define ID_PLAYBUTTON 42
  1363.  
  1364.     ...
  1365.  
  1366.     DoMethod(buttonobj, MUIM_Notify,
  1367.        MUIA_Pressed, FALSE,
  1368.        appobj, 2, MUIM_Application_ReturnID, ID_PLAYBUTTON);
  1369.  
  1370.     ...
  1371.  
  1372.     while (running)
  1373.     {
  1374.        switch (DoMethod(appobj,MUIM_Application_Input,&sigs))
  1375.        {
  1376.           case ID_PLAYBUTTON:
  1377.              printf("Ok, lets play a game...");
  1378.              break;
  1379.        }
  1380.     }
  1381.  
  1382.     SEE ALSO
  1383.     MUIM_Application_Input, MUIM_Notify
  1384. Application.mui/MUIM_Application_Save
  1385.  
  1386.     NAME
  1387.     MUIM_Application_Save (V4 )
  1388.  
  1389.     SYNOPSIS
  1390.     DoMethod(obj,MUIM_Application_Save,STRPTR name);
  1391.  
  1392.     FUNCTION
  1393.     MUIM_Application_Save, MUIM_Application_Load and
  1394.     MUIA_ObjectID offer an easy way of saving and loading
  1395.     a programs configuration.
  1396.  
  1397.     Each gadget with a non NULL MUIA_ObjectID will get
  1398.     its contents saved during MUIM_Application_Save and
  1399.     restored during MUIM_Application_Load. This makes
  1400.     it very easy to design a configuration window
  1401.     with "Save", "Use" and "Cancel" buttons to allow
  1402.     the user storing the settings. When the application
  1403.     starts, you would just have to call MUIM_Application_Load
  1404.     and the stored settings will be read and installed.
  1405.  
  1406.     Not all classes are able to import and export their
  1407.     contents. Currently, you may define a MUIA_ObjectID for
  1408.  
  1409.     String class   - MUIA_String_Contents is ex/imported.
  1410.     Radio class    - MUIA_Radio_Active is ex/imported.
  1411.     Cycle class    - MUIA_Cycle_Active is ex/imported.
  1412.     List class     - MUIA_List_Active is /ex/imported.
  1413.     Text class     - MUIA_Text_Contents is ex/imported.
  1414.     Numeric class  - MUIA_Numeric_Value is ex/imported.
  1415.     Area class     - MUIA_Selected is ex/imported
  1416.                      (e.g. for Checkmark gadgets)
  1417.    Menuitem class - MUIA_Menuitem_Checked is ex/imported (V9).
  1418.     Group class    - MUIA_Group_ActivePage is ex/imported (V8).
  1419.  
  1420.     INPUTS
  1421.     name - Name of the file you wish to save the settings to.
  1422.            Usually you won't need to think of a real name but
  1423.            instead use one of the magic cookies
  1424.            MUIV_Application_Save_ENV or
  1425.            MUIV_Application_Save_ENVARC.
  1426.            This will save your application's settings somewhere
  1427.            in env:mui/ or envarc:mui/, you needn't worry about
  1428.            it.
  1429.  
  1430.     EXAMPLE
  1431.     see the sample program "Settings.c"
  1432.  
  1433.     SEE ALSO
  1434.     MUIM_Application_Load, Notify.mui/MUIA_ObjectID
  1435.     MUIM_Export, MUIM_Import
  1436. Application.mui/MUIM_Application_SetConfigItem
  1437.  
  1438.     NAME
  1439.     MUIM_Application_SetConfigItem (V11)
  1440.  
  1441.     SYNOPSIS
  1442.     DoMethod(obj,MUIM_Application_SetConfigItem,ULONG item, APTR data);
  1443.  
  1444.     FUNCTION
  1445.     Private method, only for PSI.
  1446. Application.mui/MUIM_Application_SetMenuCheck
  1447.  
  1448.     NAME
  1449.     MUIM_Application_SetMenuCheck (V4 ) (OBSOLETE)
  1450.  
  1451.     SYNOPSIS
  1452.     DoMethod(obj,MUIM_Application_SetMenuCheck,ULONG MenuID, LONG stat);
  1453.  
  1454.     FUNCTION
  1455.     Set or clear the checkmark of a menu item.
  1456.     The application will ask its sub windows for menu items
  1457.     with the given id and set/clear all found
  1458.     entries.
  1459.  
  1460.     INPUTS
  1461.     MenuID - the value you wrote into the
  1462.                  UserData field of struct NewMenu.
  1463.  
  1464.     set    - TRUE to set checkmark, FALSE to clear
  1465.  
  1466.     SEE ALSO
  1467.     MUIM_Application_GetMenuCheck, MUIA_Application_Menu,
  1468. Application.mui/MUIM_Application_SetMenuState
  1469.  
  1470.     NAME
  1471.     MUIM_Application_SetMenuState (V4 ) (OBSOLETE)
  1472.  
  1473.     SYNOPSIS
  1474.     DoMethod(obj,MUIM_Application_SetMenuState,ULONG MenuID, LONG stat);
  1475.  
  1476.     FUNCTION
  1477.     Enable or disable a menu item.
  1478.     The application will ask its sub windows for menu items
  1479.     with the given id and enable/disable all found
  1480.     entries.
  1481.  
  1482.     INPUTS
  1483.     MenuID - the value you wrote into the
  1484.                  UserData field of struct NewMenu.
  1485.  
  1486.     set    - TRUE to enable item, FALSE to disable.
  1487.  
  1488.     SEE ALSO
  1489.     MUIM_Application_GetMenuState, MUIA_Application_Menu,
  1490. Application.mui/MUIM_Application_ShowHelp
  1491.  
  1492.     NAME
  1493.     MUIM_Application_ShowHelp (V4 )
  1494.  
  1495.     SYNOPSIS
  1496.     DoMethod(obj,MUIM_Application_ShowHelp,Object *window, char *name, char *node, LONG line);
  1497.  
  1498.     FUNCTION
  1499.     Show an AmigaGuide help file. The application will be
  1500.     put to sleep until the file is displayed.
  1501.  
  1502.     Usually, you don't need to call this method directly.
  1503.     MUI comes with a sophisticated online help system,
  1504.     you just need to supply your gadgets with help nodes
  1505.     and everything will be handled automatically.
  1506.  
  1507.     INPUTS
  1508.     window - (Object *) - Help will appear on this windows screen. May 
  1509.                           be NULL, help will appear on default public
  1510.                           screen then. May also be (Object *)0xffffffff,
  1511.                           MUI will use the first open child window of
  1512.                           application as reference for the screen
  1513.                           (since muimaster.library V18).
  1514.  
  1515.     name   - (char *)   - name of the help file. If set to NULL, MUI
  1516.                           will use contents of MUIA_Application_HelpFile
  1517.                           instead (since muimaster.library V18).
  1518.  
  1519.     node   - (char *)   - name of a node in this help file.
  1520.  
  1521.     line   - (LONG)     - line number.
  1522.  
  1523.     SEE ALSO
  1524.     MUIA_HelpFile, MUIA_HelpNode, MUIA_HelpLine
  1525.