gnocl::drawingArea

    A widget widget is used for creating custom user interface elements.

    Synopsis

    gnocl::drawingArea [-option value...]

    Screenshot


    Options

    -data string
    User defined data which can be retrieved via the cget subcommand.
    -icon percent-string (default: "")

    Image to be shown, can be either a file (prefix "%/") or a stock item (prefix "%#").
    -name string
    Name of the widget, can be used to set options in an rc file.
    -tooltip string (default: "")

    Message that appear next to this widget when the mouse pointer is held over it for a short amount of time.
    -on<signalName> string (default: "")
    Tcl script which is executed if <signal description> Before evaluation the following percent strings are substituted:

    %w    widget name
    %k    keycode
    %K   keycode as symbol
    %a    character
    %s    state of buttons and modifiers (bitmask)
    %g
       glade/builder name
    %e    event type, ie. "key_release_event"

    -onShowHelp string (default: "")
    Tcl command which is executed in the global scope if the "show-help" signal is received, which is normally the case if the user presses F1 or Ctrl-F1. Before evaluation the following percent strings are substituted:

    %w   widget name
    %h   help type: either "whatsThis" or "tooltip"
    -sensitive boolean (default: 1)
    Whether or not the item is sensitive to user input.
    -visible boolean (default: 1)
    Whether or not the item is visible.

    Description

    The gnocl::drawingArea widget is used for creating custom user interface elements. Essentially a blank widget it can be drawn to. After creating a drawing area, it will be necessary to create connections to:

    • Mouse and button press signals.

    • The "realize" signal to take any necessary actions when the widget is instantiated on a particular display.

    • The "configure_event" signal to take any necessary actions when the widget changes size.

    • The "expose_event" signal to handle redrawing the contents of the widget.

    NOTE:

    Reference to the Gtk+ documentation will describe this object as a Gtk+ Display widget. As this item relies upon resource not contained within the core Gtl+ intallation and may not be a cross-plaform feature, it this item is contained with the GnoclGnome package.

    Commands

    id cget option

    Returns the value for the specified option. The option may have any of hte values accepted by configure.

    id class

    Returns the class of the widget, i.e. statusIcon.

    id configure [-option value...]

    Configures the widget. Option may have any of the values accepted on creation of the widget.

    id notifiy [-option value...]

    Display a notification popup with message above the statusIcon.

    Options

    -appName string (default: "")

    <description to be added>

    -summary string (default: "")

    The main notifcation message presented in enboldened capitals.
    id delete
    Deletes the widget and the associated tcl command.

    Example

    # statusIcon.tcl
    #
    #!/bin/sh
    # the next line restarts using tclsh \
    exec tclsh "$0" "$@"

    package require Gnocl

    gnocl::mainLoop
    Comments

    Sections