Just a few enhancements to the module core, the most useful perhap being the -onScroll signal handler for the eventBox widget.
2018-10
gnocl::eventBox
o added -onScroll, extra subsitution string %c returns child widget id.
gnocl::text
o insert command with -tags option now works again whilst when markup tags enabled
o insert command now returns updated insert position (end of text)
o get command, specifying a single pos will now return single character.
o new command, clearSelection
gnoc::scrolledWindow
o cget -child now works.
gnocl::label
o get command will now return markup string dependent on widget configuration.
o added command, reLabel.
gnocl::separator
o added -colour/-color
gnocl::stockItem
o now recognizes %~ percent string for VFS
gnocl::application
o Problems with adding new items to menus now fixed.
gnocl::menuBar
o new command, nItems. Returns the total number of items in the menubar.
Saturday, November 10, 2018
Thursday, October 11, 2018
Applyings tags to gnocl widgets.
There are two ways in which widgets can be identified by a script: the wid returned on the creation of an object, and the use of the -name option. In both instances the interpretor will make an association betweem the two parameters and treat them as commands.
Now, consider what can be done if its necessary to hold meta information about a widget. At first one might think of using the -data option, which is fine up to a point. But, if the script needs access to a parameter of some sort that is passed to a callback handler then the obviouse choice is the use of the -data option. Doing so would allow that data to be accessed using the %p substitution parameter.
The glib apl allows us to assign various named string values to any g object. This could be anything, a desciption of the widget, some criteria which may result in the selective packing of widgets into a container. Perhaps even a tagged list.
The following code snippet shows how such data can be assigned, retrieved and manipulated.
set wid(1) [gnocl::widget-class]
# create associated data field "tags" and initalize it to some value
gnocl::data $wid(1) set tags $myTag1
# append the contents of the "tags" data string
gnocl::data $wid(1) set tags [list [gnocl::data $wid(1) get tags] $myTag2]
Now, consider what can be done if its necessary to hold meta information about a widget. At first one might think of using the -data option, which is fine up to a point. But, if the script needs access to a parameter of some sort that is passed to a callback handler then the obviouse choice is the use of the -data option. Doing so would allow that data to be accessed using the %p substitution parameter.
The glib apl allows us to assign various named string values to any g object. This could be anything, a desciption of the widget, some criteria which may result in the selective packing of widgets into a container. Perhaps even a tagged list.
The following code snippet shows how such data can be assigned, retrieved and manipulated.
set wid(1) [gnocl::widget-class]
# create associated data field "tags" and initalize it to some value
gnocl::data $wid(1) set tags $myTag1
# append the contents of the "tags" data string
gnocl::data $wid(1) set tags [list [gnocl::data $wid(1) get tags] $myTag2]
Sunday, September 30, 2018
Recent Changes
Some recent and practical enhancements to three widgets.
2018-09:
gnocl::notebook
o -keepChild option added to the remove/removePage commands.
Setting this switch will prevent the destruction of the child widget.
o Remove/RemovePage now returns wid if of removed page's child.
o -onSwitchPage options modified: %D returns child data, %t renamed to %l, and %t returns toplevel
gnocl::text
o set command now detects and handles markup strings
gnocl::richTextToolBar
o new option -topLevel.
Setting markup will default to widgets contained within the
toplevel window which contains the richTextToolbar.
This option which specify an alternative toplevel.
Setting a value to non-toplevel widget id will restore the
default setting.
As usual most recent sources available from Sourceforge.
2018-09:
gnocl::notebook
o -keepChild option added to the remove/removePage commands.
Setting this switch will prevent the destruction of the child widget.
o Remove/RemovePage now returns wid if of removed page's child.
o -onSwitchPage options modified: %D returns child data, %t renamed to %l, and %t returns toplevel
gnocl::text
o set command now detects and handles markup strings
gnocl::richTextToolBar
o new option -topLevel.
Setting markup will default to widgets contained within the
toplevel window which contains the richTextToolbar.
This option which specify an alternative toplevel.
Setting a value to non-toplevel widget id will restore the
default setting.
As usual most recent sources available from Sourceforge.
Saturday, September 01, 2018
September Update
Just a few tweaks made over the past month.
2018-08:
gnocl::comboBox
o get and set commands now work correctly.
o class now returns comboBox and not comboEntry.
gnocl::list/gnocl::tree
o -onSelection, new substitution string %l, last selection.
o new command, lastSelection
gnocl::table
o added -onDestroy, -tooltip
o cget -tooltip now works
gnocl::eventBox
o added %c (child) and %p (parent) to -onEnter/-onLeave substitution strings
gnocl::image
o new command, redraw. Used when image contents is a pixbuf and changes need to be redisplayed.
gnocl::pixbuf
o new command, delete. Remove pixbuf object from hashtable and free associated memory.
2018-08:
gnocl::comboBox
o get and set commands now work correctly.
o class now returns comboBox and not comboEntry.
gnocl::list/gnocl::tree
o -onSelection, new substitution string %l, last selection.
o new command, lastSelection
gnocl::table
o added -onDestroy, -tooltip
o cget -tooltip now works
gnocl::eventBox
o added %c (child) and %p (parent) to -onEnter/-onLeave substitution strings
gnocl::image
o new command, redraw. Used when image contents is a pixbuf and changes need to be redisplayed.
gnocl::pixbuf
o new command, delete. Remove pixbuf object from hashtable and free associated memory.
Thursday, August 02, 2018
August Update
Recent enhcancements to the core widget set and commands.
2018-07
gnocl::image
o new command, 'save' will save modified image.
gnocl::licence
o extended range of available licences to include Creative Commons
o new command, 'types' will return accronyms of supported licence types.
gnocl::labelText
o problems using -variable option now resolved.
o cget -data now works properly
o %d subsitution in -onChanged now implemented
o default wrapMode set to word, widget size 300 x 200 pixels
gnocl::exec
o now works properly, defaults to synchronous fork, use & as in Tcl to use an asynch fork.
gnocl::text
o recent bug in rollover functionality now fixed.
2018-07
gnocl::image
o new command, 'save' will save modified image.
gnocl::licence
o extended range of available licences to include Creative Commons
o new command, 'types' will return accronyms of supported licence types.
gnocl::labelText
o problems using -variable option now resolved.
o cget -data now works properly
o %d subsitution in -onChanged now implemented
o default wrapMode set to word, widget size 300 x 200 pixels
gnocl::exec
o now works properly, defaults to synchronous fork, use & as in Tcl to use an asynch fork.
gnocl::text
o recent bug in rollover functionality now fixed.
Thursday, July 12, 2018
July Update
Enhanced the supported functionality of a number of objects during June. These aren't so much bindgings to underlyting Gtk API calls, but offerings of additional, practical controls.
gnocl::entry
o added %T subsititution string (toplevel) for -onActivate and -onIconPress
gnocl::aboutDialog
o -wrapLicence default set to 1
o new options: -child, and -information.
Where: -child enables a custome widget to be embedded in the
dialog area, and -informations adds a further control button
and the creation of an information popup.
gnocl::infoBar
o new option -text
gnocl::comboBox
o new options -onActivate, -onButtonPress, -onButtonRelease, -onKeyPress
o new commands getSelection, grabFocus, activate
o entry strings will be automatcially prepended to pulldown menu and duplicates removed
o combobox entry widget automatically registered during creation.
As always, the latest dvelopement sources are available from SourceForge.
gnocl::entry
o added %T subsititution string (toplevel) for -onActivate and -onIconPress
gnocl::aboutDialog
o -wrapLicence default set to 1
o new options: -child, and -information.
Where: -child enables a custome widget to be embedded in the
dialog area, and -informations adds a further control button
and the creation of an information popup.
gnocl::infoBar
o new option -text
gnocl::comboBox
o new options -onActivate, -onButtonPress, -onButtonRelease, -onKeyPress
o new commands getSelection, grabFocus, activate
o entry strings will be automatcially prepended to pulldown menu and duplicates removed
o combobox entry widget automatically registered during creation.
As always, the latest dvelopement sources are available from SourceForge.
Monday, June 04, 2018
June Update
The combo entry is undergoing some enhancements at the moment to enable closer match of options and commands with entry. More to follow next, month.
2018-05:
gnocl::scrolledWindow
o when adding non-scrollable child widgets, created viewport has no shadow by default.
gnocl::comboEntry
o new options -primaryIcon and -secondaryIcon
2018-05:
gnocl::scrolledWindow
o when adding non-scrollable child widgets, created viewport has no shadow by default.
gnocl::comboEntry
o new options -primaryIcon and -secondaryIcon
Friday, May 04, 2018
May Update
Only a few enhancements to report for April. At the moment using the gnocl::text -swap and -balanceQuotes options needs some care when implemented. As both of these options work in response to a Gtk key-release signal, using these in conjunction with -onKeyPress may produce some unexpected results. For reason for this is that the Gtk internals allow for multiple bindings to various events which these are prioritized based upon their position within a processing stack. To ensure complete control over the ordering, it is advised to set these options using the widget configure subcommand.
2018-04:
gnocl::text
o cget -swap, -balanceQuotes and -margins now work correctly
gnocl::winfo
o new subcommand "children".
gnocl::application
o option -version default set to 0.1
2018-04:
gnocl::text
o cget -swap, -balanceQuotes and -margins now work correctly
gnocl::winfo
o new subcommand "children".
gnocl::application
o option -version default set to 0.1
Tuesday, April 10, 2018
April Update
Some minor enhancements to the core modules. The most significant is a fix the gnocl::list row checking. Previously, if a row was creates with columns less than the total for the list model, then individual cell renderers would not have been created. The fix will check the proposed row length matches that which is expected.
2018-03:
gnocl::tree, gnocl::list
o new option -sensitive
gnocl::list
o enhanced error checking of item list lengths when adding
a new row a new row list MUST contain the exact number
of entries.
gnocl::dialog
o fixed problem with -data option.
gnocl::text
o search command no longer requires -tags option to be set,
returns a list of row col values defining start/end
positions of search string
2018-03:
gnocl::tree, gnocl::list
o new option -sensitive
gnocl::list
o enhanced error checking of item list lengths when adding
a new row a new row list MUST contain the exact number
of entries.
gnocl::dialog
o fixed problem with -data option.
gnocl::text
o search command no longer requires -tags option to be set,
returns a list of row col values defining start/end
positions of search string
Friday, March 09, 2018
March Update
I've spent much of my coding time over the past few weeks on other projects so Gnocl didn't receive too much attention. However, there is something to report as of today.
2018-03:
gnocl::text
o search command no longer requires -tags option to be set,
returns a list of row col values defining start/end
postions of search string
2018-02:
gnocl::fileChooserDialog
o -currentFolder option now works properly.
2018-03:
gnocl::text
o search command no longer requires -tags option to be set,
returns a list of row col values defining start/end
postions of search string
2018-02:
gnocl::fileChooserDialog
o -currentFolder option now works properly.
Friday, February 02, 2018
January Update
From first glance at the clip from the latest news it might appear that little has on the Gnocl coding front. Not really, a long-standing issue with the toolbar was fixed along with some extra new options, keywords and commands for the text widget. The latest downloads of course, still available from Sourceforge.
2018-01:
gnocl::toolbar
o problem with setting -styles now fixed
gnocl::text
o new option -margins.
Convenience function to set margins and paragraph spacings in pixels.
Give list as left, right, above, below.
o new sub-commands: gotoNextWord, gotoPreviousWord
o gotoWordStart, gotoWordEnd, gotoNextWord, and gotoPreviousWord all return new cursor position.
these take optional "row col" argument otherwise works from current cursor position.
2018-01:
gnocl::toolbar
o problem with setting -styles now fixed
gnocl::text
o new option -margins.
Convenience function to set margins and paragraph spacings in pixels.
Give list as left, right, above, below.
o new sub-commands: gotoNextWord, gotoPreviousWord
o gotoWordStart, gotoWordEnd, gotoNextWord, and gotoPreviousWord all return new cursor position.
these take optional "row col" argument otherwise works from current cursor position.
Subscribe to:
Comments (Atom)
-
Given this module some attention today. Added some of the more package wide options to the module and created customised handler for settin...
-
Spent some time today creating some simple howto-tutorials on creating standalone Tcl/Gnocl applications using freewrap. The process is almo...
-
Linux distros have heaps of pre-installed icons ready for use. I recently needed to create a toolbar menu which needed to access a set of un...