bineditor(n) 1.0 "Binary Editor Widget"

NAME

bineditor - binary editor widget for Tk

TABLE OF CONTENTS

    TABLE OF CONTENTS
    SYNOPSIS
    DESCRIPTION
    COMMAND
    WIDGET OPTION
    WIDGET COMMAND
    VIRTUAL EVENT
    EXAMPLE
    LICENSE
    KEYWORDS
    COPYRIGHT

SYNOPSIS

package require Tcl 8.4
package require Tk 8.4
package require Bineditor

bineditor::bineditor pathName ?option value ...?
pathName cget option
pathName clear
pathName configure ?option value ...?
pathName get ?offset1? ?offset2?
pathName insert offset data
pathName movecursor offset
pathName offset mark
pathName overwrite offset data
pathName see offset
pathName selection get
pathName selection set offset1 offset2
pathName set data
pathName yview ?args?

DESCRIPTION

This program is binary editor widget.

COMMAND

bineditor::bineditor pathName ?option value ...?
Creates and configures a bineditor widget and return the name. see WIDGET OPTION.

WIDGET OPTION

-background
Background color.

-bg
Alias of -background

-cursorbg
Cursor background color.

-cursorfg
Cursor foreground color.

-encoding
Encoding of Ascii edit field.

-fg
Alias of -foreground

-foreground
Foreground color.

-headerbg
Header foreground color.

-headerfg
Header background color.

-height
Line number of data.

-insertmode
Cursor insert mode. insert or overwrite

-selectbg
Selection range background color.

-selectfg
Selection range foreground color.

WIDGET COMMAND

pathName cget option
Return the current value of the configuration option given by option. see WIDGET OPTION.

pathName clear
Clear all.

pathName configure ?option value ...?
Query or modify the configuration options of the widget. see WIDGET OPTION.

pathName get ?offset1? ?offset2?
If offset1 and offset2 were omitted, return all bytearray data. If offset2 was omitted, return a byte data at offset1.

pathName insert offset data
Insert data at the positon of offset. data must be bytearray.

pathName movecursor offset
Move cursor to offset.

pathName offset mark
Return the offset of mark. mark is one of the cursor, last, sel.first or sel.last.

pathName overwrite offset data
Overwrite by data at the positon of offset. data must be bytearray.

pathName see offset
If offset position is hidden, show it.

pathName selection get
Return a list of selection range. the elements are offset of binary.

pathName selection set offset1 offset2
Set a selection range. offset1 and offset2 are offset of binary.

pathName set data
Set binary data. data must be bytearray.

pathName yview ?args?
This command is used to query and change the vertical position.

VIRTUAL EVENT

<<Cursor>> virtual event is generated after widget cursor was moved.

EXAMPLE

 
pacakge require Tk
package require Bineditor

scrollbar .y -command ".bin yview"
bineditor::bineditor .bin -height 15 -yscrollcommand ".y set"

pack .y -fill y -side right
pack .bin -fill both -expand yes

LICENSE

BSD-Style

KEYWORDS

binary

COPYRIGHT

Copyright © OHTSUKA Yoshio <ohtsuka.yoshio@gmail.com>