home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 3 / AACD03.BIN / AACD / Programming / MUI / MCC_HexEdit / Developer / Autodocs / MCC_HexEdit.doc next >
Encoding:
Text File  |  1998-05-04  |  14.2 KB  |  619 lines

  1. TABLE OF CONTENTS
  2.  
  3. HexEdit/--background--
  4. HexEdit/MUIA_HexEdit_ActiveField
  5. HexEdit/MUIA_HexEdit_AddressChars
  6. HexEdit/MUIA_HexEdit_BaseAddressOffset
  7. HexEdit/MUIA_HexEdit_BytesPerColumn
  8. HexEdit/MUIA_HexEdit_BytesPerLine
  9. HexEdit/MUIA_HexEdit_ByteValue
  10. HexEdit/MUIA_HexEdit_ColumnsPerLine
  11. HexEdit/MUIA_HexEdit_CursorAddress
  12. HexEdit/MUIA_HexEdit_CursorNibble
  13. HexEdit/MUIA_HexEdit_CursorVisible
  14. HexEdit/MUIA_HexEdit_EditMode
  15. HexEdit/MUIA_HexEdit_First
  16. HexEdit/MUIA_HexEdit_FirstLine
  17. HexEdit/MUIA_HexEdit_FullRefresh
  18. HexEdit/MUIA_HexEdit_HighBound
  19. HexEdit/MUIA_HexEdit_LowBound
  20. HexEdit/MUIA_HexEdit_MoveCursor
  21. HexEdit/MUIA_HexEdit_NibbleValue
  22. HexEdit/MUIA_HexEdit_PropObject
  23. HexEdit/MUIA_HexEdit_SelectMode
  24. HexEdit/MUIA_HexEdit_VisibleLines
  25. HexEdit/MUIM_HexEdit_CreateDisplayAddress
  26. HexEdit/MUIM_HexEdit_FilterChar
  27. HexEdit/MUIM_HexEdit_ReadMemoryByte
  28. HexEdit/MUIM_HexEdit_Redraw
  29. HexEdit/MUIM_HexEdit_WriteMemoryByte
  30. HexEdit/--background--
  31.  
  32.    NAME
  33.     HexEdit -- ... (V14)
  34.  
  35.    FUNCTION
  36.     This class provides you with an easy way to present hexadecimal
  37.     dump of a memory region to the user.  Additionally, memory
  38.     contents are visible in ASCII representation.  Editing in both
  39.     modes is possible.  HexEdit class is very flexible, with many
  40.     settable parameters and some critical methods (like byte reading
  41.     and writing) waiting to be overloaded.
  42.  
  43. HexEdit/MUIA_HexEdit_ActiveField
  44.  
  45.    NAME
  46.     MUIA_HexEdit_ActiveField, LONG [ISG] -- ... (V14)
  47.  
  48.    SPECIAL INPUTS
  49.     MUIV_HexEdit_ActiveField_HexDump
  50.     MUIV_HexEdit_ActiveField_Chars
  51.  
  52.    FUNCTION
  53.     With MUIA_HexEdit_ActiveField you can decide over which field of
  54.     the object (hexdump or character) active cursor should be
  55.     positioned.
  56.  
  57.    NOTES
  58.  
  59.    BUGS
  60.     No known bugs.
  61.  
  62.    SEE ALSO
  63. HexEdit/MUIA_HexEdit_AddressChars
  64.  
  65.    NAME
  66.     MUIA_HexEdit_AddressChars, LONG [I.G] -- ... (V14)
  67.  
  68.    SPECIAL INPUTS
  69.     MUIV_AddressChars_Auto
  70.  
  71.    FUNCTION
  72.     This attribute lets you define how many characters will be devoted
  73.     to representing addresses displayed by HexEdit.  For example, if
  74.     you specify a value of 4, all addresses will be displayed as 16
  75.     bit.  Default is 8, i.e.  32 bit.
  76.  
  77.     Address calculation's precision is not dependant on this
  78.     attribute, it's for display purposes only.  Internally all
  79.     addresses are treated as LONGs.
  80.  
  81.    NOTES
  82.     This value ranges from 1 to 8, but please see
  83.     MUIM_HexEdit_CreateDisplayAddress().
  84.  
  85.    BUGS
  86.     No known bugs.
  87.  
  88.    SEE ALSO
  89.     MUIM_HexEdit_CreateDisplayAddress()
  90. HexEdit/MUIA_HexEdit_BaseAddressOffset
  91.  
  92.    NAME
  93.     MUIA_HexEdit_BaseAddressOffset, LONG [ISG] -- ... (V14)
  94.  
  95.    FUNCTION
  96.     The value of this attribute is added to the current address every
  97.     time when it is about to be displayed.  For example, if you have
  98.     your data at 0x04000000 and you want the addresses to be shown as
  99.     starting from 0, set this attribute to -0x04000000.
  100.  
  101.    NOTES
  102.  
  103.    BUGS
  104.     No known bugs.
  105.  
  106.    SEE ALSO
  107. HexEdit/MUIA_HexEdit_BytesPerColumn
  108.  
  109.    NAME
  110.     MUIA_HexEdit_BytesPerColumn, LONG [I.G] -- ... (V14)
  111.  
  112.    FUNCTION
  113.     With MUIA_HexEdit_BytesPerColumn you can define how many bytes
  114.     should constitute one column.  For example, default value of 4
  115.     groups memory dump in a following way:
  116.  
  117.     01234567 01234567 01234567 01234567 
  118.  
  119.     By changing it to 3, you would get:
  120.  
  121.     012345 670123 456701 234567
  122.  
  123.    NOTES
  124.  
  125.    BUGS
  126.     No known bugs.
  127.  
  128.    SEE ALSO
  129. HexEdit/MUIA_HexEdit_BytesPerLine
  130.  
  131.    NAME
  132.     MUIA_HexEdit_BytesPerLine, LONG [..G] -- ... (V14)
  133.  
  134.    FUNCTION
  135.     With this attribute you can learn how many bytes are displayed in a
  136.     single line of HexEdit object.
  137.  
  138.    BUGS
  139.     No known bugs.
  140.  
  141.    SEE ALSO
  142. HexEdit/MUIA_HexEdit_ByteValue
  143.  
  144.    NAME
  145.     MUIA_HexEdit_ByteValue, LONG [.SG] -- ... (V14)
  146.  
  147.    FUNCTION
  148.     This attribute lets you read and modify the value of byte under
  149.     the cursor.
  150.  
  151.    NOTES
  152.  
  153.    BUGS
  154.     No known bugs.
  155.  
  156.    SEE ALSO
  157.     MUIA_HexEdit_NibbleValue()
  158. HexEdit/MUIA_HexEdit_ColumnsPerLine
  159.  
  160.    NAME
  161.     MUIA_HexEdit_ColumnsPerLine, LONG [I.G] -- ... (V14)
  162.  
  163.    FUNCTION
  164.     By querying this attribute you can learn how many columns are
  165.     currently displayed in one line of HexEdit object.  By default,
  166.     the number of columns varies with the size of the object.  If,
  167.     however MUIA_HexEdit_ColumnsPerLine is set at the creation time,
  168.     the object will always use a value then specified.
  169.  
  170.    BUGS
  171.     No known bugs.
  172.  
  173.    SEE ALSO
  174. HexEdit/MUIA_HexEdit_CursorAddress
  175.  
  176.    NAME
  177.     MUIA_HexEdit_CursorAddress, LONG [.SG] -- ... (V14)
  178.  
  179.    FUNCTION
  180.     Reading this attribute will return the cursor's current address.
  181.  
  182.     Setting it will move the cursor to a new location, possibly
  183.     scrolling and/or redrawing the display.
  184.  
  185.    NOTES
  186.     Address, as usual, is specified as byte offset from
  187.     MUIA_HexEdit_LowBound()
  188.  
  189.    BUGS
  190.     No known bugs.
  191.  
  192.    SEE ALSO
  193.     MUIA_HexEdit_LowBound(), MUIA_HexEdit_HighBound(),
  194.     MUIA_HexEdit_CursorNibble()
  195. HexEdit/MUIA_HexEdit_CursorNibble
  196.  
  197.    NAME
  198.     MUIA_HexEdit_CursorNibble, LONG [ISG] -- ... (V14)
  199.  
  200.    FUNCTION
  201.     With this attribute you can set or get the nibble over which the
  202.     cursor is currently positioned.
  203.  
  204.    RESULTS
  205.     0 for upper nibble, 1 for lower nibble.
  206.  
  207.    NOTES
  208.  
  209.    BUGS
  210.     No known bugs.
  211.  
  212.    SEE ALSO
  213.     MUIA_HexEdit_CursorAddress()
  214. HexEdit/MUIA_HexEdit_CursorVisible
  215.  
  216.    NAME
  217.     MUIA_HexEdit_CursorVisible, BOOL [ISG] -- ... (V14)
  218.  
  219.    FUNCTION
  220.     With this attribute you can set and get the state of cursor's
  221.     visibility.
  222.  
  223.    NOTES
  224.     Please do not attempt to switch off the cursor's while in the edit
  225.     mode, as it may confuse the user.
  226.  
  227.    BUGS
  228.     No known bugs.
  229.  
  230.    SEE ALSO
  231. HexEdit/MUIA_HexEdit_EditMode
  232.  
  233.    NAME
  234.     MUIA_HexEdit_EditMode, BOOL [ISG] -- ... (V14)
  235.  
  236.    FUNCTION
  237.     This attribute determines if HexEdit object will let the user edit
  238.     a memory space that is under its control.  If it is set to TRUE,
  239.     user can input 0-9/a-f digits while in the hexdump part of the
  240.     display and alphanumerics while in the character part.
  241.  
  242.    NOTES
  243.  
  244.    BUGS
  245.     No known bugs.
  246.  
  247.    SEE ALSO
  248.     MUIA_HexEdit_CursorVisible(), MUIM_HexEdit_WriteMemoryByte(),
  249.     MUIM_HexEdit_FilterChar()
  250. HexEdit/MUIA_HexEdit_First
  251.  
  252.    NAME
  253.     MUIA_HexEdit_First, LONG [ISG] -- ... (V14)
  254.  
  255.    FUNCTION
  256.     MUIA_HexEdit_First specifies offset (counting from
  257.     MUIA_HexEdit_LowBound()) of the first byte to be displayed at the
  258.     top of HexEdit object.  This attribute is always rounded down to a
  259.     multiply of MUIA_HexEdit_BytesPerLine().
  260.  
  261.    NOTES
  262.     In certain cases this attribute does not change, despite set()ting
  263.     a value different from the current - for example when there are
  264.     not enough data lines below to fill the entire HexEdit object.  If
  265.     you want to highlight certain position, please rather use
  266.     MUIA_HexEdit_CursorAddress().
  267.  
  268.    BUGS
  269.     No known bugs.
  270.  
  271.    SEE ALSO
  272.     MUIA_HexEdit_CursorAddress()
  273. HexEdit/MUIA_HexEdit_FirstLine
  274.  
  275.    NAME
  276.     MUIA_HexEdit_FirstLine, LONG [.S.] -- ... (V14)
  277.  
  278.    SPECIAL INPUTS
  279.     MUIV_HexEdit_FirstLine_Up
  280.     MUIV_HexEdit_FirstLine_Down
  281.     MUIV_HexEdit_FirstLine_PageUp
  282.     MUIV_HexEdit_FirstLine_PageDown
  283.     MUIV_HexEdit_FirstLine_Top
  284.     MUIV_HexEdit_FirstLine_Bottom
  285.  
  286.    FUNCTION
  287.     Changing this attribute lets you move around your memory space.
  288.  
  289.    NOTES
  290.     Only values listed above are allowed as input.
  291.  
  292.    BUGS
  293.     No known bugs.
  294.  
  295.    SEE ALSO
  296. HexEdit/MUIA_HexEdit_FullRefresh
  297.  
  298.    NAME
  299.     MUIA_HexEdit_FullRefresh, BOOL [.S.] -- ... (V14)
  300.  
  301.    FUNCTION
  302.     Setting this attribute to TRUE will force redraw of the entire
  303.     object area next time MUIA_HexEdit_First() is set.  Normally, only
  304.     parts that are new on display would be drawn.
  305.  
  306.    NOTES
  307.     This attribute may be helpful with some more exotic subclasses of
  308.     HexEdit.  Usually, you won't need to touch it, though.
  309.  
  310.    BUGS
  311.     No known bugs.
  312.  
  313.    SEE ALSO
  314.     MUIA_HexEdit_First()
  315. HexEdit/MUIA_HexEdit_HighBound
  316.  
  317.    NAME
  318.     MUIA_HexEdit_HighBound, LONG [I.G] -- ... (V14)
  319.  
  320.    FUNCTION
  321.     With MUIA_HexEdit_HighBound you can define where in Amiga memory
  322.     space ends the area you want HexEdit to operate on.
  323.  
  324.    NOTES
  325.     This attribute MUST be specified, even if you overload
  326.     MUIM_HexEdit_ReadMemoryByte() or MUIM_HexEdit_WriteMemoryByte()!
  327.  
  328.    BUGS
  329.     No known bugs.
  330.  
  331.    SEE ALSO
  332.     MUIA_HexEdit_LowBound(), MUIM_HexEdit_ReadMemoryByte(),
  333.     MUIM_HexEdit_WriteMemoryByte()
  334. HexEdit/MUIA_HexEdit_LowBound
  335.  
  336.    NAME
  337.     MUIA_HexEdit_LowBound, LONG [I.G] -- ... (V14)
  338.  
  339.    FUNCTION
  340.     With MUIA_HexEdit_LowBound you can define where in Amiga memory
  341.     space begins the area you want HexEdit to operate on.
  342.  
  343.    NOTES
  344.     This attribute MUST be specified, even if you overload
  345.     MUIM_HexEdit_ReadMemoryByte() or MUIM_HexEdit_WriteMemoryByte()!
  346.  
  347.    BUGS
  348.     No known bugs.
  349.  
  350.    SEE ALSO
  351.     MUIA_HexEdit_HighBound(), MUIM_HexEdit_ReadMemoryByte(),
  352.     MUIM_HexEdit_WriteMemoryByte()
  353. HexEdit/MUIA_HexEdit_MoveCursor
  354.  
  355.    NAME
  356.     MUIA_HexEdit_MoveCursor, LONG [.S.] -- ... (V14)
  357.  
  358.    SPECIAL INPUTS
  359.     MUIV_HexEdit_MoveCursor_Up
  360.     MUIV_HexEdit_MoveCursor_Down
  361.     MUIV_HexEdit_MoveCursor_Left
  362.     MUIV_HexEdit_MoveCursor_Right
  363.     MUIV_HexEdit_MoveCursor_PageUp
  364.     MUIV_HexEdit_MoveCursor_PageDown
  365.     MUIV_HexEdit_MoveCursor_Top
  366.     MUIV_HexEdit_MoveCursor_Bottom
  367.     MUIV_HexEdit_MoveCursor_WordLeft
  368.     MUIV_HexEdit_MoveCursor_WordRight
  369.     MUIV_HexEdit_MoveCursor_LineStart
  370.     MUIV_HexEdit_MoveCursor_LineEnd
  371.  
  372.    FUNCTION
  373.     With MUIA_HexEdit_MoveCursor you can control cursor movements
  374.     exactly as if you were using the keyboard.  Of course, they do not
  375.     make much sense if the cursor is actually turned off.
  376.  
  377.    NOTES
  378.     Only values listed above are allowed as input.
  379.  
  380.    BUGS
  381.     No known bugs.
  382.  
  383.    SEE ALSO
  384.     MUIA_HexEdit_CursorVisible()
  385. HexEdit/MUIA_HexEdit_NibbleValue
  386.  
  387.    NAME
  388.     MUIA_HexEdit_NibbleValue, LONG [.SG] -- ... (V14)
  389.  
  390.    FUNCTION
  391.     This attribute lets you read and modify the value of nibble under
  392.     the cursor. The value is always passed in a lower four bits.
  393.  
  394.    NOTES
  395.  
  396.    BUGS
  397.     No known bugs.
  398.  
  399.    SEE ALSO
  400.     MUIA_HexEdit_ByteValue()
  401. HexEdit/MUIA_HexEdit_PropObject
  402.  
  403.    NAME
  404.     MUIA_HexEdit_PropObject, LONG [.SG] -- ... (V14)
  405.  
  406.    FUNCTION
  407.     With MUIA_HexEdit_PropObject you can easily connect proportional
  408.     gadget with the HexEdit object.  Simply pass a pointer to prop
  409.     object as the value of this attribute and you're done.  HexEdit
  410.     will handle all house-keeping for you. How convinient! ;)
  411.  
  412.    NOTES
  413.  
  414.    BUGS
  415.     No known bugs.
  416.  
  417.    SEE ALSO
  418. HexEdit/MUIA_HexEdit_SelectMode
  419.  
  420.    NAME
  421.     MUIA_HexEdit_SelectMode, LONG [I.G] -- ... (V14)
  422.  
  423.    SPECIAL INPUTS
  424.     MUIV_HexEdit_SelectMode_Nibble
  425.     MUIV_HexEdit_SelectMode_Byte
  426.  
  427.    FUNCTION
  428.     This attribute defines if the cursor moving over hexadecimal data
  429.     should span entire bytes or just single nibbles.
  430.  
  431.    NOTES
  432.  
  433.    BUGS
  434.     No known bugs.
  435.  
  436.    SEE ALSO
  437. HexEdit/MUIA_HexEdit_VisibleLines
  438.  
  439.    NAME
  440.     MUIA_HexEdit_VisibleLines, LONG [..G] -- ... (V14)
  441.  
  442.    FUNCTION
  443.     With this attribute you can learn how many text lines are
  444.     currently visible in the HexEdit object.  It may be useful for
  445.     notifications.
  446.  
  447.    BUGS
  448.     No known bugs.
  449.  
  450.    SEE ALSO
  451. HexEdit/MUIM_HexEdit_CreateDisplayAddress
  452.  
  453.    NAME
  454.     MUIM_HexEdit_CreateDisplayAddress (V14)
  455.  
  456.    SYNOPSIS
  457.     DoMethod(obj, MUIM_HexEdit_CreateDisplayAddress, UBYTE **cp, ULONG address);
  458.  
  459.    FUNCTION
  460.     HexEdit class calls this method to generate ASCII representation
  461.     of current address.  If you want to create some fancy-looking
  462.     addresses, you can overload this method in your subclass.
  463.  
  464.    NOTES
  465.     If you're overloading this method, you HAVE TO set
  466.     MUIA_HexEdit_AddressChars() to length of the largest output of
  467.     your address creator, so that HexEdit knows how much space
  468.     allocate for it.
  469.  
  470.    EXAMPLE
  471.     This is HexEdit's implementation of
  472.     MUIM_HexEdit_CreateDisplayAddress method:
  473.  
  474.     ULONG __asm _CreateDisplayAddress(REG(A0) struct IClass *cl, REG(A2) Object *obj, REG(A1) struct MUIP_HexEdit_CreateDisplayAddress *msg)
  475.     {
  476.         struct Data *d = INST_DATA(cl,obj);
  477.         ULONG address;
  478.         UBYTE i;
  479.         UBYTE *hextable = "0123456789ABCDEF";
  480.  
  481.         address = (d->base_address + msg->address) << (HE_MAX_ADDRESS_LEN - d->address_chars * 4);
  482.  
  483.         for(i = 0; i < d->address_chars; i++)
  484.         {
  485.             *(*msg->cp)++ = hextable[address >> (HE_MAX_ADDRESS_LEN - 4)];
  486.             address <<= 4;
  487.         }
  488.  
  489.         return(TRUE);
  490.     }
  491.  
  492.    BUGS
  493.     No known bugs.
  494.  
  495.    SEE ALSO
  496.     MUIA_HexEdit_AddressChars()
  497. HexEdit/MUIM_HexEdit_FilterChar
  498.  
  499.    NAME
  500.     MUIM_HexEdit_FilterChar (V14)
  501.  
  502.    SYNOPSIS
  503.     DoMethod(obj, MUIM_HexEdit_FilterChar, ULONG value, UBYTE *buffer);
  504.  
  505.    FUNCTION
  506.     HexEdit class calls this method to generate ASCII representation
  507.     of character it is currently processing.  You can overload it to
  508.     e.g. show only characters you want and replace others with dots.
  509.  
  510.    EXAMPLE
  511.     This is example implementation of MUIM_HexEdit_FilterChar:
  512.  
  513.     ULONG __asm _FilterChar(REG(A0) struct IClass *cl, REG(A2) Object *obj, REG(A1) struct MUIP_HexEdit_FilterChar *msg)
  514.     {
  515.         if(isascii(msg->value))
  516.             *msg->buffer = msg->value;
  517.         else
  518.             *msg->buffer = '.';
  519.  
  520.         return(TRUE);
  521.     }
  522.  
  523.  
  524.    NOTES
  525.  
  526.    BUGS
  527.     No known bugs.
  528.  
  529.    SEE ALSO
  530. HexEdit/MUIM_HexEdit_ReadMemoryByte
  531.  
  532.    NAME
  533.     MUIM_HexEdit_ReadMemoryByte (V14)
  534.  
  535.    SYNOPSIS
  536.     DoMethod(obj, MUIM_HexEdit_ReadMemoryByte, UBYTE *value, ULONG address);
  537.  
  538.    FUNCTION
  539.     HexEdit class calls this method to read a byte from memory.  You
  540.     can overload it in your subclass, so that operation on areas which
  541.     are not present in Amiga's memory space is possible.
  542.  
  543.    NOTES
  544.     Address, as usual, is specified as byte offset from
  545.     MUIA_HexEdit_LowBound()
  546.  
  547.    EXAMPLE
  548.     This is HexEdit's implementation of MUIM_HexEdit_ReadMemoryByte
  549.     method:
  550.  
  551.     ULONG __asm _ReadMemoryByte(REG(A0) struct IClass *cl, REG(A2) Object *obj, REG(A1) struct MUIP_HexEdit_ReadMemoryByte *msg)
  552.     {
  553.         struct Data *d = INST_DATA(cl,obj);
  554.  
  555.         *msg->value = *(UBYTE *)(d->bound_low + msg->address);
  556.  
  557.         return(TRUE);
  558.     }
  559.  
  560.  
  561.    BUGS
  562.     No known bugs.
  563.  
  564.    SEE ALSO
  565.     MUIM_HexEdit_WriteMemoryByte()
  566. HexEdit/MUIM_HexEdit_Redraw
  567.  
  568.    NAME
  569.     MUIM_HexEdit_Redraw (V14)
  570.  
  571.    SYNOPSIS
  572.     DoMethod(obj, MUIM_HexEdit_Redraw);
  573.  
  574.    FUNCTION
  575.     Redraws the entire object's contents.
  576.  
  577.    NOTES
  578.  
  579.    BUGS
  580.     No known bugs.
  581.  
  582.    SEE ALSO
  583. HexEdit/MUIM_HexEdit_WriteMemoryByte
  584.  
  585.    NAME
  586.     MUIM_HexEdit_WriteMemoryByte (V14)
  587.  
  588.    SYNOPSIS
  589.     DoMethod(obj, MUIM_HexEdit_ReadMemoryByte, ULONG value, ULONG address);
  590.  
  591.    FUNCTION
  592.     HexEdit class calls this method to write a byte to memory.  You
  593.     can overload it in your subclass, so that operation on areas which
  594.     are not present in Amiga's memory space is possible.
  595.  
  596.    NOTES
  597.     Address, as usual, is specified as byte offset from
  598.     MUIA_HexEdit_LowBound()
  599.  
  600.    EXAMPLE
  601.     This is HexEdit's implementation of MUIM_HexEdit_WriteMemoryByte
  602.     method:
  603.  
  604.     ULONG __asm _WriteMemoryByte(REG(A0) struct IClass *cl, REG(A2) Object *obj, REG(A1) struct MUIP_HexEdit_WriteMemoryByte *msg)
  605.     {
  606.         struct Data *d = INST_DATA(cl,obj);
  607.  
  608.         *(UBYTE *)(d->bound_low + msg->address) = msg->value;
  609.  
  610.         return(TRUE);
  611.     }
  612.  
  613.  
  614.    BUGS
  615.     No known bugs.
  616.  
  617.    SEE ALSO
  618.     MUIM_HexEdit_ReadMemoryByte()
  619.