Author: Peter G. Baum (peter@dr-baum.net)
Keywords: gnocl, Tcl, gtk, gnome

# gnocl

Document Version: 0.0.10

## Introduction

gnocl is a gtk / gnome extension for the programming language Tcl. It provides easy to use commands to build quickly gnome compliant user interfaces including the gnome canvas widget and drag and drop support.

gnocl is loosely modeled after the great, easy to use Tk package. It is not a direct language binding for gtk like e.g. tcl-gtk.

License: | BSD type (Same as Tcl)
Homepage: | http://www.dr-baum.net/gnocl/
Contact: | Peter G. Baum (peter@dr-baum.net)

## General

gnocl uses the namespace '`gnocl`'. That means, that one can either do a '`namespace import gnocl::*`' or use every command or variable with the prefix '`gnocl::`'.

All commands have the form

       cmd required-arguments optional-arguments

where `required-arguments` are space separated words and optional-arguments have the form '`-option optionValue ...`'.
Example:

       gnocl::app "Application name" -title "App title" -content $cont

All optional arguments have sensible default values. Only the absolutely necessary options are required.

### Global variables

appId | default is gnocl
appVersion | default is current gnocl version

To take effect both variables have to be set before loading the gnocl library. Changing them afterwards has no effect.
Example:

    namespace eval gnocl {
       variable appId gnoclEntryTest
       variable appVersion 1.0.5
    }
    load ../src/gnocl.so
    # main code

### Widgets and commands

There exists for every widget a command to create it. After a assigning it to a container widget like e.g. app, box, or table, which indicates where this widget should show up it is displayed on the screen.

Every widget command returns a widget identifier which is also registered as new command. This command can be used to make some operations on the widget. All widgets have at least commands to configure, hide, and destroy the widget. The identifier may be also used as argument for bind or some container command.

A complete list of all commands for creating widgets and others can be found here

## Further readings

For more information about the widgets please look at these places:

- Documentation of gtk
- Documentation of gnome
- Documentation of Tcl

Copyright © 2001 - 2002 P. G. Baum