Tuesday, February 28, 2017

February Code Developments

The following contains a summary of the modifications to the main module code.  All updates available from the SourceForge in the nightly build.


2017-02:
    gnocl::dial
        o added options -value, -variable, -digits
        o added commands get, set, cget
    -foreground and -background option can now take 2 values, namely state and color,
        where state is one of "normal", "active", "prelight", "selected" or "insensitive".
        If only the colour is specified, then the default state of "normal" is assumed.
        e.g. -background [list insensitive black]
    gnocl::text
        o fixed memory allocation problem with lorem sub-command.
    gnocl::eventBox
        o added -insensitiveColor option, allow objects to blend into background.



Gnocl Dial Widget Enhancements

The existing dial widget is a straight implementation from the Gtk tutorial docs. Whilst it was possible to create an instance using the gnocl::dial command it wasn't  much use. Apart from wiggling the mouse pointer around it didn't offer any way of setting or getting a value within a script, nor did it enable the user to set a variable trace. Added to this, the graphics were pretty grim as it relied upon gtk paint operations.

Over the weekend I took a look at what could be done with the existing code. After a bit of work it offers much more. The graphics are rendered in Cairo and so look good and the displayed value can be set and retrieved.

Not all the changes have been in the gnocl dial sources, some tweaking has taken place in the GtkDial.c source too. The next step is to provide some controls over the colouration of the widget, and setting the range limits much like those of the scale command.



Tuesday, February 07, 2017

Recent Changes - January 2017

The past month has seen focus placed upon tidying up some features working around GdkPixbuf support, work which I expect will continue well into February. The functionality examined seeks to address the creation of  graphics for use in applications documentation so that, for instance, in developing documentation for Gnocl itself, the interpreter will return lists of widget options and sub-commands along with screenshots of widget and windows in operation.

As can also seen from the change list below, a new file option '~' has been implemented. When Tcl scripts are 'wrapped' using FreeWrap or TclKit, Gtk api calls cannot directly access files within the VFS (which is transparent to Tcl itself). This functionality is achieved by first extracting files to the /tmp directory a location outside the VFS, from where they then can be accessed.

2017-01:
    gnocl::pixBuf
        o new commands paste, snapshot, windowshot.
        o get drawAble
        o bug fixed in composite
    gnocl::window
        o New command snapShot - take screenshot of the window for documentation purpose.
    New %-string type '~'. Denoting file existing within a TclVFS directory structure.

Friday, January 06, 2017

December 2016 Changes

A summary of the past months changes to the gnocl core module. These enhancements offer a extra means of fine-tuning the appearance of gnocl base applications.

  New commands:
        o gnocl::property, set and override application wide settings.
        o gnocl::data, set and get additional widget data associations.
    gnocl::checkButton
        o added -widthGroup
    gnocl::radioButton
        o added options -normalBackgroundColor and -prelightBackgroundColor
    New command gnocl::license, returns configurable BDS style licence for use with Gnocl or Gnocl derived projects.
    gnocl::window
        o beep sub-command functionality restored.
    New convenience widget: gnocl::labelWidget, much like gnocl::labelEntry and gnocl::labelText, useful for creating dialogs.
    Note, labelWidget can only contain one child, which is destroyed if replaced.


Please contact me directly if you want a of the current 64-bit build.

Now that the new year in underway the focus of attention has moved to addressing some of the challenges associated with wrapping gnocl into executables generated by TclKit and Freewrap. Quite stealthily, Tcl accesses VFS (virtual file systems) at a level below the standard Tcl file opts commands. So, whilst Tcl commands like 'open' can directly access wrapped files, Gtk cannot. Accessing files can be achived by first unpacking object and then loading, something which can be done in either pure Tcl or internally in C within the gnocl core which is now being implemented.

Other options to look out for in January include the ability to convert and load images stores in an ascii format.

Sunday, December 18, 2016

November Source Enhancements

The following enhancements were made to the gnocl core during November, expanding the ability to configure and extract settings from a number of key widgets.

2016-11:
    gnocl::list
        o added -textColor and -gridLines, available options: none, horizontal, vertical, or both.
        o added column options: -spacing, -sortIndicator, -expand, -fixedWidth, -sortId, -sortOrder
        o added cel options: -xAlign, -yAlign, -sensitive
    gnocl::tree / gnocl::list
        o added getRow subcommand, implemented cget -titles functionality.
        o new options -horizontalSeparator and -verticalSeparator
    gnocl::fontSelectionDialog
        o -title option now works correctly.
    gnocl::entry
        o added -textColor, -textColour
        o new command: activate. Convenience function to emit 'activate' event.
    gnocl::text
        o added -insensitiveBaseColor / -insensitiveBaseColor, override style default.
    gnocl::comboBox
        o added -heightGroup
    gnocl::checkButton
        o added -baseFont, -heightGroup options

    -onButton* events
        o new substitution item %o, the bottom-left corner of the widget on screen, accurate placement of popups etc.