home *** CD-ROM | disk | FTP | other *** search
/ The Best of Mecomp Multimedia 2 / MECOMP-CD-II.iso / amiga / programmieren / gui / ieditor / docs / iex.doc < prev    next >
Encoding:
Text File  |  1997-06-17  |  17.5 KB  |  713 lines

  1. TABLE OF CONTENTS
  2.  
  3. expander.library/IEX_Add
  4. expander.library/IEX_Copy
  5. expander.library/IEX_Edit
  6. expander.library/IEX_Free
  7. expander.library/IEX_GetIDCMP
  8. expander.library/IEX_Load
  9. expander.library/IEX_Make
  10. expander.library/IEX_Mount
  11. expander.library/IEX_Refresh
  12. expander.library/IEX_Remove
  13. expander.library/IEX_Save
  14. expander.library/IEX_StartSrcGen
  15. expander.library/IEX_WriteChipData
  16. expander.library/IEX_WriteCloseDown
  17. expander.library/IEX_WriteCloseWnd
  18. expander.library/IEX_WriteData
  19. expander.library/IEX_WriteGlobals
  20. expander.library/IEX_WriteHeaders
  21. expander.library/IEX_WriteOpenWnd
  22. expander.library/IEX_WriteRender
  23. expander.library/IEX_WriteSetup
  24. expander.library/IEX_Add                             expander.library/IEX_Add
  25.  
  26.    NAME
  27.        IEX_Add  -  Add an object to the active window
  28.  
  29.    SYNOPSIS
  30.        success = IEX_Add( ID, IE_Data, x, y, width, heigth );
  31.                           D0    A0     D1 D2  D3      D4
  32.  
  33.        BOOL IEX_Add( UWORD, struct IE_Data *, WORD, WORD, UWORD, UWORD );
  34.  
  35.    FUNCTION
  36.        This function is called by IEditor when the user selects the
  37.        name of our object from the Add Gadget list.
  38.        If our object can be moved and resized, the user will be asked
  39.        to draw it (like gadtools gadgets) and then IE will call this
  40.        function with the coordinates and the size of the drawn box.
  41.  
  42.        If your object needs a label for the source, you must provide
  43.        it, in the case the user doesn't want to type it in.
  44.        E.g.
  45.                    sprintf( Obj->Label, "%sGad%03ld",
  46.                             IE->win_info->wi_Label,
  47.                             IE->win_info->wi_NewGadID );
  48.                    IE.win_info->wi_NewGadID += 1;
  49.  
  50.  
  51.        You must also update the IE->win_info->wi_NumObjects variable.
  52.  
  53.    INPUTS
  54.        ID          -   ID assigned by IE. You MUST put it in the o_Kind
  55.                        field.
  56.        IE_Data     -   information about IE
  57.        x, y        -   top left corner of the box drawn by the user
  58.        width, height - size of the box
  59.  
  60.    RESULT
  61.        success     -   TRUE for success, FALSE for failure
  62.  
  63.    NOTES
  64.  
  65.    BUGS
  66.  
  67.    SEE ALSO
  68.        IEditor/Expander.h, IEX_Remove()
  69.  
  70. expander.library/IEX_Copy                           expander.library/IEX_Copy
  71.  
  72.    NAME
  73.        IEX_Copy  -  Copy our objects
  74.  
  75.    SYNOPSIS
  76.        success = IEX_Copy( ID, IE_Data, offx, offy );
  77.                            D0     A0     D1    D2
  78.  
  79.        BOOL IEX_Copy( UWORD, struct IE_Data *, WORD, WORD );
  80.  
  81.    FUNCTION
  82.        IEditor calls this function when the user wants to copy
  83.        some objects it doesn't know.
  84.  
  85.    INPUTS
  86.        ID          -   your ID
  87.        IE_Data     -   information about IE
  88.        offx, offy  -   offset of the copy
  89.  
  90.    RESULT
  91.        success     -   TRUE if succeeded, FALSE if there was no
  92.                        enough memory
  93.  
  94.    NOTES
  95.  
  96.    BUGS
  97.  
  98.    SEE ALSO
  99.        IEditor/Expander.h
  100.  
  101. expander.library/IEX_Edit                           expander.library/IEX_Edit
  102.  
  103.    NAME
  104.        IEX_Edit  -  Edit our objects
  105.  
  106.    SYNOPSIS
  107.        edited = IEX_Edit( ID, IE_Data );
  108.                           D0     A0
  109.  
  110.        BOOL IEX_Edit( UWORD, struct IE_Data * );
  111.  
  112.    FUNCTION
  113.        IEditor calls this function when the user wants to edit
  114.        some objects it doesn't know.
  115.        You should then open your edit window on IEditor's screen
  116.        for all objects whose o_Kind field is equal to the ID passed
  117.        by IE  *AND*  that are selected (check the G_ATTIVO flag in
  118.        o_flags2).
  119.        If your expander doesn't support the edit function, it MUST
  120.        return FALSE.
  121.  
  122.    INPUTS
  123.        ID          -   your ID
  124.        IE_Data     -   information about IE
  125.  
  126.    RESULT
  127.        edited      -   TRUE if the user changed some object params,
  128.                        otherwise FALSE
  129.  
  130.    NOTES
  131.        You can find very comfortable to generate the GUI for your
  132.        expanders using the C_IE_Mod.generator.
  133.  
  134.    BUGS
  135.  
  136.    SEE ALSO
  137.        IEditor/Expander.h
  138.  
  139. expander.library/IEX_Free                           expander.library/IEX_Free
  140.  
  141.    NAME
  142.        IEX_Free  -  Free all the unused memory when the window is closed
  143.  
  144.    SYNOPSIS
  145.        IEX_Free( ID, IE_Data );
  146.                  D0     A0
  147.  
  148.        void IEX_Free( UWORD, struct IE_Data * );
  149.  
  150.    FUNCTION
  151.        IEditor calls this function after closing a window.
  152.        You must then release all the memory you can (e.g. when
  153.        IE closes a window, it FreeGadgets() its GList).
  154.  
  155.    INPUTS
  156.        ID          -   your ID
  157.        IE_Data     -   information about IE
  158.  
  159.    RESULT
  160.  
  161.    NOTES
  162.  
  163.    BUGS
  164.  
  165.    SEE ALSO
  166.        IEditor/Expander.h
  167.  
  168. expander.library/IEX_GetIDCMP                   expander.library/IEX_GetIDCMP
  169.  
  170.    NAME
  171.        IEX_GetIDCMP  -  Get the IDCMP you need
  172.  
  173.    SYNOPSIS
  174.        IDCMP = IEX_GetIDCMP( ID, IDCMP, IE_Data );
  175.                              D0    D1      A0
  176.  
  177.        ULONG IEX_GetIDCMP( UWORD, ULONG, struct IE_Data * );
  178.  
  179.    FUNCTION
  180.        When called, this function must check if some objects fo your
  181.        kind are present in IE->win_info: if so, you should perform a
  182.        OR operation between the IDCMP passed by IE and the ones your
  183.        objects need to be fully functional.
  184.  
  185.    INPUTS
  186.        ID          -   your ID
  187.        IDCMP       -   IDCMP of the window
  188.        IE_Data     -   information about IE
  189.  
  190.    RESULT
  191.        IDCMP       -   new window IDCMPs
  192.  
  193.    EXAMPLE
  194.        If your objects were Listviews, this is what your function should
  195.        look like:
  196.  
  197.        ULONG IEX_GetIDCMP( __D0 UWORD ID, __D1 ULONG idcmp,
  198.                            __A0 struct IE_Data *IE )
  199.        {
  200.            struct MyObj    *obj;
  201.  
  202.            for( obj = IE->win_info->wi_Gadgets.mlh_Head;
  203.                 obj->Node.ln_Succ; obj = obj->Node.ln_Succ ) {
  204.  
  205.                if( obj->Kind == ID )
  206.                    return( idcmp | LISTVIEWIDCMP );
  207.            }
  208.  
  209.            return( idcmp );
  210.        }
  211.  
  212.    NOTES
  213.        If your objects don't need any IDCMP, then you *must* return
  214.        the same IDCMP you received from IE.
  215.  
  216.    BUGS
  217.  
  218.    SEE ALSO
  219.        IEditor/Expander.h
  220.  
  221. expander.library/IEX_Load                           expander.library/IEX_Load
  222.  
  223.    NAME
  224.        IEX_Load  -  Load our objects from the file
  225.  
  226.    SYNOPSIS
  227.        success = IEX_Load( ID, IE_Data, File, Num );
  228.                            D0     A0     D1   D2
  229.  
  230.        BOOL IEX_Load( UWORD, struct IE_Data *, BPTR, UWORD );
  231.  
  232.    FUNCTION
  233.        IEditor calls this function to load some object from a file.
  234.  
  235.        We must then load <Num> objects and link them to the
  236.        win_info's list.
  237.  
  238.    INPUTS
  239.        ID          -   your ID
  240.        IE_Data     -   information about IE
  241.        File        -   BPTR of the file
  242.        Num         -   number of objects to load
  243.  
  244.    RESULT
  245.        success     -   TRUE for success, FALSE otherwise (= out of mem)
  246.  
  247.    NOTES
  248.  
  249.    BUGS
  250.  
  251.    SEE ALSO
  252.        IEditor/Expander.h, IEX_Save()
  253.  
  254. expander.library/IEX_Make                           expander.library/IEX_Make
  255.  
  256.    NAME
  257.        IEX_Make  -  Put our objects on the window
  258.  
  259.    SYNOPSIS
  260.        next_gadget = IEX_Make( ID, IE_Data, GList );
  261.                                D0     A0     A1
  262.  
  263.        struct Gadget *IEX_Make( UWORD, struct IE_Data *, struct Gadget * );
  264.  
  265.    FUNCTION
  266.        IEditor calls this function before opening a window or after
  267.        the user has selected 'Gadget/Tags...' and he has done some
  268.        change.
  269.  
  270.    INPUTS
  271.        ID          -   your ID
  272.        IE_Data     -   information about IE
  273.        GList       -   gadget list to which append yours.
  274.  
  275.    RESULT
  276.        next_gadget -   a pointer to the last gadget you've created
  277.                        or NULL for failure.
  278.  
  279.    NOTES
  280.        NOTE WELL: the window of your object could be closed when IE
  281.                   calls this function!!!
  282.  
  283.    BUGS
  284.  
  285.    SEE ALSO
  286.        IEditor/Expander.h, IEX_Refresh()
  287.  
  288. expander.library/IEX_Mount                         expander.library/IEX_Mount
  289.  
  290.    NAME
  291.        IEX_Mount  -  Provide expander informations
  292.  
  293.    SYNOPSIS
  294.        error = IEX_Mount( IE_Data );
  295.                             A0
  296.  
  297.        ULONG IEX_Mount( struct IE_Data * );
  298.  
  299.    FUNCTION
  300.        This function is called by IEditor before first usage of the
  301.        expander. The expander should fill its base with informations
  302.        about its abilities and open its source description file.
  303.  
  304.    INPUTS
  305.        IE_Data -   information about IE
  306.  
  307.    RESULT
  308.        error   -   IEX_OK or an error code
  309.  
  310.    NOTES
  311.  
  312.    BUGS
  313.  
  314.    SEE ALSO
  315.        IEditor/Expander.h
  316.  
  317. expander.library/IEX_Refresh                     expander.library/IEX_Refresh
  318.  
  319.    NAME
  320.        IEX_Refresh  -  Refresh your objects
  321.  
  322.    SYNOPSIS
  323.        IEX_Refresh( ID, IE_Data );
  324.                     D0     A0
  325.  
  326.        void IEX_Refresh( UWORD, struct IE_Data * );
  327.  
  328.    FUNCTION
  329.        IEditor calls this function when the window needs refreshing.
  330.        If your objects have some graphic element that can be corrupted,
  331.        you must redrawn it, or refresh them in some way.
  332.  
  333.    INPUTS
  334.        ID          -   your ID
  335.        IE_Data     -   information about IE
  336.  
  337.    RESULT
  338.  
  339.    NOTES
  340.  
  341.    BUGS
  342.  
  343.    SEE ALSO
  344.        IEditor/Expander.h, IEX_Make()
  345.  
  346. expander.library/IEX_Remove                       expander.library/IEX_Remove
  347.  
  348.    NAME
  349.        IEX_Remove  -  Remove our objects
  350.  
  351.    SYNOPSIS
  352.        IEX_Remove( ID, IE_Data );
  353.                    D0     A0
  354.  
  355.        void IEX_Remove( UWORD, struct IE_Data * );
  356.  
  357.    FUNCTION
  358.        IEditor calls this function when the user wants to delete
  359.        some objects it doesn't know.
  360.        You should then remove all the object whose o_Kind field
  361.        is equal to the ID passed by IE  *AND*  that are selected
  362.        (check the G_ATTIVO flag in o_flags2).
  363.  
  364.        This function is called alse when deleting a window or
  365.        freeing the GUI: of course, all objects will be selected.
  366.  
  367.    INPUTS
  368.        ID          -   your ID
  369.        IE_Data     -   information about IE
  370.  
  371.    RESULT
  372.  
  373.    NOTES
  374.        Don't forget to update the IE->win_info->wi_NumObjects variable!
  375.  
  376.    BUGS
  377.  
  378.    SEE ALSO
  379.        IEditor/Expander.h, IEX_Add()
  380.  
  381. expander.library/IEX_Save                           expander.library/IEX_Save
  382.  
  383.    NAME
  384.        IEX_Save  -  Save our objects in the file
  385.  
  386.    SYNOPSIS
  387.        IEX_Save( ID, IE_Data, File );
  388.                  D0     A0     D1
  389.  
  390.        void IEX_Save( UWORD, struct IE_Data *, BPTR );
  391.  
  392.    FUNCTION
  393.        IEditor calls this function only if we have some object
  394.        in the GUI. We must then save in the provided file all
  395.        the objects found in the win_info list that have the right ID .
  396.  
  397.        We must also check the G_ATTIVO flag, since this function is
  398.        called also when the user selects "Gadgets/Save..."
  399.  
  400.    INPUTS
  401.        ID          -   your ID
  402.        IE_Data     -   information about IE
  403.        File        -   BPTR of the file
  404.  
  405.    RESULT
  406.  
  407.    NOTES
  408.  
  409.    BUGS
  410.  
  411.    SEE ALSO
  412.        IEditor/Expander.h, IEX_Load()
  413.  
  414. expander.library/IEX_StartSrcGen             expander.library/IEX_StartSrcGen
  415.  
  416.    NAME
  417.        IEX_StartSrcgen  -  Are you ready to generate the source? ;-)
  418.  
  419.    SYNOPSIS
  420.        support_function = IEX_StartSrcGen( ID, IE_Data );
  421.                                            D0     A0
  422.  
  423.        STRPTR IEX_StartSrcGen( UWORD, struct IE_Data * );
  424.  
  425.    FUNCTION
  426.        IEditor calls this function just before generating the source.
  427.        The expander should then walk through the window list, setting
  428.        the right fields of the window info structures in order to
  429.        let IE know what it need to put in the source.
  430.  
  431.        Then, the expander must return a STRPTR to its support
  432.        function(s), if any. They will be written in the source by IE,
  433.        that will filter out any duplicate function.
  434.  
  435.    INPUTS
  436.        ID          -   your ID
  437.        IE_Data     -   information about IE
  438.  
  439.    RESULT
  440.        support_function -  STRPTR to a support function(s) or NULL
  441.  
  442.    NOTES
  443.  
  444.    BUGS
  445.  
  446.    SEE ALSO
  447.        IEditor/Expander.h
  448.  
  449. expander.library/IEX_WriteChipData         expander.library/IEX_WriteChipData
  450.  
  451.    NAME
  452.        IEX_WriteChipData  -  Write your chip data
  453.  
  454.    SYNOPSIS
  455.        IEX_WriteChipData( ID, GenFiles, IE_Data );
  456.                           D0     A0        A1
  457.  
  458.        void IEX_WriteChipData( UWORD, struct GenFiles *, struct IE_Data * );
  459.  
  460.    FUNCTION
  461.        Write your objects' chip data into the file.
  462.  
  463.    INPUTS
  464.        ID          -   your ID
  465.        GenFiles    -   file BPTRs
  466.        IE_Data     -   information about IE
  467.  
  468.    RESULT
  469.  
  470.    NOTES
  471.  
  472.    BUGS
  473.  
  474.    SEE ALSO
  475.        IEditor/Expander.h, IEditor/generatorlib.h
  476.  
  477. expander.library/IEX_WriteCloseDown       expander.library/IEX_WriteCloseDown
  478.  
  479.    NAME
  480.        IEX_WriteCloseDown
  481.  
  482.    SYNOPSIS
  483.        IEX_WriteCloseDown( ID, GenFiles, IE_Data );
  484.                            D0     A0        A1
  485.  
  486.        void IEX_WriteCloseDown( UWORD, struct GenFiles *, struct IE_Data * );
  487.  
  488.    FUNCTION
  489.        This function is invoked in the CloseDown routine, before
  490.        the screen unlocking or closing.
  491.  
  492.    INPUTS
  493.        ID          -   your ID
  494.        GenFiles    -   file BPTRs
  495.        IE_Data     -   information about IE
  496.  
  497.    RESULT
  498.  
  499.    NOTES
  500.  
  501.    BUGS
  502.  
  503.    SEE ALSO
  504.        IEditor/Expander.h, IEX_WriteSetup()
  505.  
  506. expander.library/IEX_WriteCloseWnd         expander.library/IEX_WriteCloseWnd
  507.  
  508.    NAME
  509.        IEX_WriteCloseWnd  -  Write your close wnd code
  510.  
  511.    SYNOPSIS
  512.        IEX_WriteCloseWnd( ID, GenFiles, IE_Data );
  513.                          D0     A0        A1
  514.  
  515.        void IEX_WriteCloseWnd( UWORD, struct GenFiles *, struct IE_Data * );
  516.  
  517.    FUNCTION
  518.        This function is called inside every Close<Wnd Label>Window routine,
  519.        just before closing the window. You can use it to write some code
  520.        needed by your objects that must be executed at that time.
  521.  
  522.    INPUTS
  523.        ID          -   your ID
  524.        GenFiles    -   file BPTRs
  525.        IE_Data     -   information about IE
  526.  
  527.    RESULT
  528.  
  529.    NOTES
  530.  
  531.    BUGS
  532.  
  533.    SEE ALSO
  534.        IEditor/Expander.h, IEditor/generatorlib.h
  535.  
  536. expander.library/IEX_WriteData                 expander.library/IEX_WriteData
  537.  
  538.    NAME
  539.        IEX_WriteData  -  Write your data
  540.  
  541.    SYNOPSIS
  542.        IEX_WriteData( ID, GenFiles, IE_Data );
  543.                       D0     A0        A1
  544.  
  545.        void IEX_WriteData( UWORD, struct GenFiles *, struct IE_Data * );
  546.  
  547.    FUNCTION
  548.        Write your objects' data into the file.
  549.  
  550.    INPUTS
  551.        ID          -   your ID
  552.        GenFiles    -   file BPTRs
  553.        IE_Data     -   information about IE
  554.  
  555.    RESULT
  556.  
  557.    NOTES
  558.  
  559.    BUGS
  560.  
  561.    SEE ALSO
  562.        IEditor/Expander.h, IEditor/generatorlib.h
  563.  
  564. expander.library/IEX_WriteGlobals           expander.library/IEX_WriteGlobals
  565.  
  566.    NAME
  567.        IEX_WriteGlobals  -  Write your global variables
  568.  
  569.    SYNOPSIS
  570.        IEX_WriteGlobals( ID, GenFiles, IE_Data );
  571.                          D0     A0        A1
  572.  
  573.        void IEX_WriteGlobals( UWORD, struct GenFiles *, struct IE_Data * );
  574.  
  575.    FUNCTION
  576.        Write your global variables into the GenFiles->XDef file.
  577.  
  578.    INPUTS
  579.        ID          -   your ID
  580.        GenFiles    -   file BPTRs
  581.        IE_Data     -   information about IE
  582.  
  583.    RESULT
  584.  
  585.    NOTES
  586.  
  587.    BUGS
  588.  
  589.    SEE ALSO
  590.        IEditor/Expander.h, IEditor/generatorlib.h
  591.  
  592. expander.library/IEX_WriteHeaders           expander.library/IEX_WriteHeaders
  593.  
  594.    NAME
  595.        IEX_WriteHeaders  -  Write your headers
  596.  
  597.    SYNOPSIS
  598.        IEX_WriteHeaders( ID, GenFiles, IE_Data );
  599.                          D0     A0        A1
  600.  
  601.        void IEX_WriteHeaders( UWORD, struct GenFiles *, struct IE_Data * );
  602.  
  603.    FUNCTION
  604.        Write your headers into the GenFiles->XDef file.
  605.  
  606.    INPUTS
  607.        ID          -   your ID
  608.        GenFiles    -   file BPTRs
  609.        IE_Data     -   information about IE
  610.  
  611.    RESULT
  612.  
  613.    NOTES
  614.  
  615.    BUGS
  616.  
  617.    SEE ALSO
  618.        IEditor/Expander.h, IEditor/generatorlib.h
  619.  
  620. expander.library/IEX_WriteOpenWnd           expander.library/IEX_WriteOpenWnd
  621.  
  622.    NAME
  623.        IEX_WriteOpenWnd  -  Write your open wnd code
  624.  
  625.    SYNOPSIS
  626.        IEX_WriteOpenWnd( ID, GenFiles, IE_Data );
  627.                          D0     A0        A1
  628.  
  629.        void IEX_WriteOpenWnd( UWORD, struct GenFiles *, struct IE_Data * );
  630.  
  631.    FUNCTION
  632.        This function is called inside every Open<Wnd Label>Window routine,
  633.        just before opening the window. You can use it to write some code
  634.        needed by your objects that must be executed at that time.
  635.  
  636.    INPUTS
  637.        ID          -   your ID
  638.        GenFiles    -   file BPTRs
  639.        IE_Data     -   information about IE
  640.  
  641.    RESULT
  642.  
  643.    NOTES
  644.  
  645.    BUGS
  646.  
  647.    SEE ALSO
  648.        IEditor/Expander.h, IEditor/generatorlib.h
  649.  
  650. expander.library/IEX_WriteRender             expander.library/IEX_WriteRender
  651.  
  652.    NAME
  653.        IEX_WriteRender  -  Write your render routine
  654.  
  655.    SYNOPSIS
  656.        IEX_WriteRender( ID, GenFiles, IE_Data );
  657.                         D0     A0        A1
  658.  
  659.        void IEX_WriteRender( UWORD, struct GenFiles *, struct IE_Data * );
  660.  
  661.    FUNCTION
  662.        This function is called by the generator in the <Wnd Label>Render
  663.        routine. If your object need some rendering instructions, then
  664.        you must write them into the source file.
  665.  
  666.    INPUTS
  667.        ID          -   your ID
  668.        GenFiles    -   file BPTRs
  669.        IE_Data     -   information about IE
  670.  
  671.    RESULT
  672.  
  673.    NOTES
  674.  
  675.    BUGS
  676.  
  677.    SEE ALSO
  678.        IEditor/Expander.h, IEditor/generatorlib.h
  679.  
  680. expander.library/IEX_WriteSetup               expander.library/IEX_WriteSetup
  681.  
  682.    NAME
  683.        IEX_WriteSetup  -  Write your setup routine
  684.  
  685.    SYNOPSIS
  686.        IEX_WriteSetup( ID, GenFiles, IE_Data );
  687.                        D0     A0        A1
  688.  
  689.        void IEX_WriteSetup( UWORD, struct GenFiles *, struct IE_Data * );
  690.  
  691.    FUNCTION
  692.        This function is invoked in the SetupScreen routine, after
  693.        the screen locking or opening and after the call to
  694.        GetVisualInfo().
  695.  
  696.        This can be useful if you need to alloc or do something
  697.        just once before any window is opened.
  698.  
  699.    INPUTS
  700.        ID          -   your ID
  701.        GenFiles    -   file BPTRs
  702.        IE_Data     -   information about IE
  703.  
  704.    RESULT
  705.  
  706.    NOTES
  707.  
  708.    BUGS
  709.  
  710.    SEE ALSO
  711.        IEditor/Expander.h, IEX_WriteCloseDown()
  712.  
  713.