Mod /
Tab Interface
Search:  


Table Of Contents (show)

  1. 1. Tabular Interface

1.  Tabular Interface

## Interface auto-generated by ::Mod
## The above on line 1 enables auto-regeneration of this file.

## Commands for module
namespace eval ::Tk::Tabular {

    Mod export 

    # Make given cell(s) active and visible.
    extern activate         {w cell1 {cell2 {}} args} {. . . . {opts -istitle -see}}

    # Return bounding box of cell
    extern bbox             {w cell {leading False}}

    # Get a config option.
    extern cget             {w opt}

    # Erase the contents of table.
    extern clear            w

    # Modify config options.
    extern conf             {w args}

    # Get char indices for cell at idx.
    extern coords           {w cell}

    # Activate cell and begin editing.
    extern edit             {w {cell active.first} {op start}}  {. tkwin . {choice start done donenext escape get}}

    # Search for string in body and activate cell.
    extern find             {w string args} {. . . {topts -back . -case . -col . -noact . -type {Choice exact glob regexp} -word .}}

    # Get text string for cell given by index.
    extern get              {w cell args} {. . . {topts -tree . -type {choice text image window} -skip .}}

    # Change internal config.
    extern icfg             {w args}

    # Return index spec in COL,ROW form.
    extern index            {w cell {intitle False}}  {. tkwin . Bool}

    # Widget creation.
    extern new              {w args} {. . {topts -bd . -cols . -colwidth int -fillcmd {cmd w ww row numcols} -height int -icfg . -opencmd . -relief . -rows . -showtitle . -style . -tagcmd {cmd w ww i1 i2 col row node} -tree . -variable . -width int -xscrollcommand . -yscrollcommand . --check . --dynamic . --editcmd {cmd w ww type} --fields . --fields . --showkey . --sortable . --sortby . --sortdown . --speed . --syncvar . --time . --updatecmd {cmd w col row value num}}}

    # Get or set cells readonly state of cell.
    extern readonly         {w {cell {}} {ro { }}}

    # Schedule redraw of cells in visible viewport.
    extern redraw           {w args} {. . {opts -flush}}

    # Arrange for the given cell to be made visible.
    extern see              {w cell {redraw 1}}

    # Invoke sub-command on component (body or title).
    extern sub              {w {target {}} {cmd {}} args}  {. tkwin {Choice body title}}

    # Set or change text, image or window in cell.
    extern update           {w cell value args} {. . . . {topts -check . -delete . -end . -iopts . -raw . -skip . -tags . -type {Choice text image window} -update . -withtag .}}

    # Manage x viewport.
    extern xview            {w args}

    # Manage y viewport.
    extern yview            {w args}

    ## Sub-commands for "col"
    namespace eval col {

        Mod export 

        # Get or set column alignments eg: l, r, c n, n.X.
        extern align            {w {col {}} {align { }} {titles False}}

        # Delete one or more columns.
        extern delete           {w {col end} args} {. . . {topts -count {int -min 1 -max 20} -titles .}}

        # Return list text values for a col.
        extern get              {w col {start 1} {end end}}

        # Set or get columns hidden state.
        extern hide             {w {col {}} {hide {}} args} {. . . . {opts -count}}

        # Translate column name to an it's index number.
        extern index            {w col {istitle 0}}

        # Insert 1 or more columns.
        extern insert           {w args} {. . {opts -at -count -default -titles -values}}

        # Set or get cols readonly state.
        extern readonly         {w {col {}} {ro {}}}

        # Sort by given column.
        extern sort             {w col}

        # Set or query tags for given column.
        extern tag              {w col {tags { }}}

        # Set minimum width for a column.
        extern width            {w {col {}} {width { }}}

        Mod cmds ::Tk::Tabular::col Tabular.tcl {align delete get hide index insert readonly sort tag width}
    }

    ## Sub-commands for "row"
    namespace eval row {

        Mod export 

        # Set or get per row columns alignments.
        extern align            {w row {aligns { }}}

        # Force loading of deferred data now.
        extern autofill         {w {force False}}

        # delete 1 or more rows.
        extern delete           {w {row end} args} {. . . {opts -count -update}}

        # Return list text values for all or part of row.
        extern get              {w row {start 0} {end end}}

        # Set row hidden state or get list of all hidden rows.
        extern hide             {w {row {}} {hide {}} args} {. . . . {opts -count}}

        # Translate row name to an row index number.
        extern index            {w row}

        # Insert row of values.
        extern insert           {w args} {. . {opts -at -parent -count -default -update -values}}

        # Add markup (tags) to line.
        extern markup           {w line1 {line2 {}}}

        # Return the #NNN node id for the given row.
        extern node             {w row {row2 {}}}

        # Return list of text indexes for cell end chars in row.
        extern offsets          {w row {embeds 0}}

        # Set or get rows readonly state.
        extern readonly         {w {row {}} {ro {}}}

        # Update entire text data values for row.
        extern update           {w row list args} {. . . . {opts -update}}

        Mod cmds ::Tk::Tabular::row Tabular.tcl {align autofill delete get hide index insert markup node offsets readonly update}
    }

    ## Sub-commands for "tag"
    namespace eval tag {

        Mod export 

        # Add tag to cells.
        extern add              {w tag cell1 {cell2 {}} args}

        # Configure tag for body; same as [sub body tag conf].
        extern conf             {w tag args}

        # Return next range of cells with tag.
        extern nextrange        {w tag cell1 {cell2 {}}}

        # Return previous range of cells with tag.
        extern prevrange        {w tag cell1 {cell2 {}}}

        # Return list of cells with tag.
        extern ranges           {w tag args} {. . . {opts -values -title}}

        # Remove tag from cells.
        extern remove           {w tag cell1 {cell2 {}} args}

        # Return value or name of option(s) set at cell.
        extern value            {w cell {option {}} args} {. . . . {opts -name -title}}

        Mod cmds ::Tk::Tabular::tag Tabular.tcl {add conf nextrange prevrange ranges remove value}
    }

    ## Sub-commands for "tree"
    namespace eval tree {

        Mod export 

        # Return list of children for cell.
        extern children         {w {cell {}} args} {. . . {opts -nodes -count}}

        # Close trees if open.
        extern close            {w cell1 {cell2 {}} args}

        # Update raw inserted text with tree tags, image, etc..
        extern init             {w {start 1.0} {end end}}

        # Return isopen status for row.
        extern isopen           {w cell}

        # Return 1 if cell has a subtree.
        extern istree           {w cell}

        # Return nest level of tree (ie. leading spaces/4).
        extern level            {w cell}

        # Open trees if closed.
        extern open             {w cell1 {cell2 {}} args}
        extern parent           {w cell}

        # Return the tree path-list down to given cell.
        extern path             {w cell args} {. . . {opts -inds -nodes}}

        # Toggle open/close of subtree  cell.
        extern toggle           {w cell args} {. . . {opts -activate}}

        Mod cmds ::Tk::Tabular::tree Tabular.tcl {children close init isopen istree level open parent path toggle}
    }

    Mod cmds ::Tk::Tabular Tabular.tcl {activate bbox cget clear conf coords edit find get icfg index new readonly redraw see sub update xview yview}
}


© 2008 Peter MacDonald

Page last modified on September 01, 2008, at 11:27 AM