OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [libgui/] [README] - Diff between revs 578 and 1765

Only display areas with differences | Details | Blame | View Log

Rev 578 Rev 1765
libgui - Handy GUI code
libgui - Handy GUI code
This module has various pieces of code that are useful for a GUI.  For
This module has various pieces of code that are useful for a GUI.  For
the most part, they are Tcl/Tk-related.
the most part, they are Tcl/Tk-related.
Open issues:
Open issues:
- bitmaps and canvas code are duplicated in S-N; should look into
- bitmaps and canvas code are duplicated in S-N; should look into
  sharing
  sharing
- tkTreeTable taken from S-N but modified; should use the same
- tkTreeTable taken from S-N but modified; should use the same
  version in both places.  Better yet, replace this widget with
  version in both places.  Better yet, replace this widget with
  one that works better
  one that works better
Here's a brief runthrough:
Here's a brief runthrough:
library/
library/
  Directory of Tcl code
  Directory of Tcl code
  balloon.tcl
  balloon.tcl
    Tcl code to implement balloon help (aka tooltips)
    Tcl code to implement balloon help (aka tooltips)
    Primary interface is the "balloon" command.  See last function in
    Primary interface is the "balloon" command.  See last function in
    file for details on usage
    file for details on usage
  bindings.tcl
  bindings.tcl
    Provides bind_widget_after_class proc; rearranges bindtags in
    Provides bind_widget_after_class proc; rearranges bindtags in
    a frequently-useful way.
    a frequently-useful way.
  canvas.tcl
  canvas.tcl
    Tcl procs relating to canvas widgets
    Tcl procs relating to canvas widgets
    set_scroll_region canvas
    set_scroll_region canvas
      Set the scroll region on CANVAS to include all items in the
      Set the scroll region on CANVAS to include all items in the
      canvas.  Most easily used when bound to  on the
      canvas.  Most easily used when bound to  on the
      canvas.
      canvas.
  def.tcl
  def.tcl
      Defining words.
      Defining words.
      defarray name ?value?
      defarray name ?value?
        Define a global array named NAME.  VALUE, if present, is the
        Define a global array named NAME.  VALUE, if present, is the
        initial value.  VALUE is in the format expected by "array
        initial value.  VALUE is in the format expected by "array
        set".
        set".
      defvar name ?value?
      defvar name ?value?
        Define a new global variable named NAME.
        Define a new global variable named NAME.
  gensym.tcl
  gensym.tcl
      Provides the proc "gensym", which generates new symbol names.
      Provides the proc "gensym", which generates new symbol names.
  gettext.tcl
  gettext.tcl
      Defines the stub proc "gettext", used for looking up text in a
      Defines the stub proc "gettext", used for looking up text in a
      localization database.
      localization database.
  hooks.tcl
  hooks.tcl
      Provides procs for handling hooks (lists of functions that
      Provides procs for handling hooks (lists of functions that
      should be run when something happens).
      should be run when something happens).
  lframe.tcl
  lframe.tcl
      Provides the Labelledframe widget -- a frame with a groove and
      Provides the Labelledframe widget -- a frame with a groove and
      a label.
      a label.
  list.tcl
  list.tcl
      Defines useful list procs.  Some of these are Tcl versions of C
      Defines useful list procs.  Some of these are Tcl versions of C
      functions in TclX.
      functions in TclX.
      lvarpush listvar element ?index?
      lvarpush listvar element ?index?
        Insert ELEMENT into list stored in LISTVAR (a variable).
        Insert ELEMENT into list stored in LISTVAR (a variable).
        Element is inserted at INDEXth position.  INDEX defaults to
        Element is inserted at INDEXth position.  INDEX defaults to
        0.
        0.
      lvarpop listvar ?index?
      lvarpop listvar ?index?
        Remove INDEXth element from list stored in LISTVAR (a
        Remove INDEXth element from list stored in LISTVAR (a
        variable).  Returns the removed element.  INDEX defaults to
        variable).  Returns the removed element.  INDEX defaults to
        0.
        0.
      lassign list args
      lassign list args
        Assign successive elements from LIST to variables named in
        Assign successive elements from LIST to variables named in
        ARGS.  If LIST is longer than ARGS, assign a list of remaining
        ARGS.  If LIST is longer than ARGS, assign a list of remaining
        elements to last variable.
        elements to last variable.
      lrmdups list args
      lrmdups list args
        Remove duplicates and sort list.  ARGS, if specified, are
        Remove duplicates and sort list.  ARGS, if specified, are
        arguments to lsort
        arguments to lsort
      lremove list element
      lremove list element
        Return list created by removing the first item `ELEMENT'
        Return list created by removing the first item `ELEMENT'
  mono.tcl
  mono.tcl
    Procs for handling monochrome displays or colorblind users
    Procs for handling monochrome displays or colorblind users
  prefs.tcl
  prefs.tcl
    Application preference code.  This will probably vanish at some
    Application preference code.  This will probably vanish at some
    point, once we figure out how we really want to do this.  I just
    point, once we figure out how we really want to do this.  I just
    had this code lying around, and it was useful to me, so I included
    had this code lying around, and it was useful to me, so I included
    it.
    it.
    Defines a single interface, "preference", which has several
    Defines a single interface, "preference", which has several
    subcommands:
    subcommands:
        preference define name default docstring ?handler?
        preference define name default docstring ?handler?
          Define a new preference.  HANDLER, if specified, is a proc
          Define a new preference.  HANDLER, if specified, is a proc
          to run whenever the preference's value changes.
          to run whenever the preference's value changes.
        preference get name
        preference get name
          Return value of preference.
          Return value of preference.
        preference documentation name
        preference documentation name
          Return doc string of preference
          Return doc string of preference
        preference varname name
        preference varname name
          Return name of variable representing named preference.  This
          Return name of variable representing named preference.  This
          can be used eg as the -variable of a radiobutton.
          can be used eg as the -variable of a radiobutton.
        preference set name value
        preference set name value
          Set preference.
          Set preference.
        preference get_commands
        preference get_commands
          Return text of commands which, when evalled, will restore
          Return text of commands which, when evalled, will restore
          the current state of all defined preferences.
          the current state of all defined preferences.
  sendpr.tcl
  sendpr.tcl
    The sendpr widget; a GUI for send-pr.
    The sendpr widget; a GUI for send-pr.
  topbind.tcl
  topbind.tcl
    Code for bindings on toplevels.
    Code for bindings on toplevels.
    bind_for_toplevel_only toplevel sequence script
    bind_for_toplevel_only toplevel sequence script
      Put a binding on window TOPLEVEL for event SEQUENCE.  When the
      Put a binding on window TOPLEVEL for event SEQUENCE.  When the
      event is seen, SCRIPT will run.  This proc adds a new bindtag
      event is seen, SCRIPT will run.  This proc adds a new bindtag
      to the toplevel to avoid the problems associated with putting
      to the toplevel to avoid the problems associated with putting
      bindings directly on toplevels.
      bindings directly on toplevels.
  ulset.tcl
  ulset.tcl
    Attempt to make setting the -underline option easier.  This is
    Attempt to make setting the -underline option easier.  This is
    particular good when using gettext.  Unfortunately the interface
    particular good when using gettext.  Unfortunately the interface
    is hard to use; it should be changed.
    is hard to use; it should be changed.
    extract_label_info option label
    extract_label_info option label
      Extract underline and label info from descriptor string LABEL.
      Extract underline and label info from descriptor string LABEL.
      Any underline in LABEL is extracted, and the next character's
      Any underline in LABEL is extracted, and the next character's
      index is used as the -underline value.  There must be only one
      index is used as the -underline value.  There must be only one
      underline in LABEL.  This proc returns a list of the form:
      underline in LABEL.  This proc returns a list of the form:
         OPTION NEWLABEL -underline INDEX
         OPTION NEWLABEL -underline INDEX
      Eg:  extract_label_info -text _File
      Eg:  extract_label_info -text _File
        -> {-text File -underline 0}
        -> {-text File -underline 0}
src/
src/
  Directory of C code.  This is all put into libide.a.
  Directory of C code.  This is all put into libide.a.
  paths.c
  paths.c
    Useful startup code that all applications should run.
    Useful startup code that all applications should run.
    int ide_initialize (Tcl_Interp *interp, char *appname);
    int ide_initialize (Tcl_Interp *interp, char *appname);
    This function:
    This function:
    - Sets the global Tcl variable ide_application_name to APPNAME.
    - Sets the global Tcl variable ide_application_name to APPNAME.
    - Searches the filesystem for the libide Tcl code, and sets
    - Searches the filesystem for the libide Tcl code, and sets
      up the auto_path appropriately.  The IDE_LIBRARY environment
      up the auto_path appropriately.  The IDE_LIBRARY environment
      variable can override the searching.
      variable can override the searching.
    - Sets up the auto_path to include the application's Tcl library
    - Sets up the auto_path to include the application's Tcl library
      as well (if possible).  Applications should install their Tcl
      as well (if possible).  Applications should install their Tcl
      code in $(datadir)/APPNAME/
      code in $(datadir)/APPNAME/
    - Runs the application's startup file - $(datadir)/APPNAME/APPNAME.tcl
    - Runs the application's startup file - $(datadir)/APPNAME/APPNAME.tcl
    - Sets these entries in the global array Paths:
    - Sets these entries in the global array Paths:
        Paths(bitmapdir)  Location of libide bitmaps
        Paths(bitmapdir)  Location of libide bitmaps
        Paths(appdir)     Location of application's scripts
        Paths(appdir)     Location of application's scripts
    This function returns TCL_OK on success, and something else on
    This function returns TCL_OK on success, and something else on
    error.
    error.
  subcommand.c
  subcommand.c
    Makes it easy to write commands which are split into a number of
    Makes it easy to write commands which are split into a number of
    subcommands (eg, like the Tcl "file" command).
    subcommands (eg, like the Tcl "file" command).
    int create_command_with_subcommands (Tcl_interp *interp, char *name,
    int create_command_with_subcommands (Tcl_interp *interp, char *name,
                                         struct subcommand_table *table)
                                         struct subcommand_table *table)
    Create a new Tcl command name NAME.  TABLE describes the
    Create a new Tcl command name NAME.  TABLE describes the
    subcommands; see subcommand.h for details.  Returns TCL_OK on
    subcommands; see subcommand.h for details.  Returns TCL_OK on
    success, TCL_ERROR on failure.
    success, TCL_ERROR on failure.
  tkCanvEdge.c, tkCanvLayout.c, tkCanvLayout.h, tkCanvas.c, tkCanvas.h
  tkCanvEdge.c, tkCanvLayout.c, tkCanvLayout.h, tkCanvas.c, tkCanvas.h
    Patched versions (ugh) of the corresponding Tk files, and some new
    Patched versions (ugh) of the corresponding Tk files, and some new
    files.  These files implement graph layout for canvases.
    files.  These files implement graph layout for canvases.
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.