Skip to main content

Posts

Showing posts from January, 2021

Hybrid Menubar and Toolbar Tabber

The customary method of organizing application menubars and toolbars is in a vertical sequence. To save space, sometimes multiple tool sets can be embedded into a single bar. This is fine but what usually results is a duplication if the functionality offered in a pull-down menu and some toolbar button. This can cause a lot of clutter, not only on screen, but in the coding where the duplication is a occurring. For a user the on-screen clutter can be obtrusive as it begins to eat away at the screen space used by an application in both the horizontal and vertical dimensions. Too many on screen toolbars reduces the size of user work zones and tool many items per bar can result in windows whose resizing becomes constrained.   Multiple toolbars can be toggled on or off, but then a menu item, nested somewhere in menu in the toolbar needs to be created, the result more clutter. Complex GUI elements are not only demanding in terms of coding, but offputting to any new user who has grown...

{{{} {}}} What!

This level of nested braces may appear to be something from a programming quiz but, actually, this is meaningful when adding new, empty rows to a gnocl::list widget. Suppose an instance of a list widget is created with 2 columns containing plain text. set lv(s) [gnocl::list \      -types [list string string] \      -titles {Keys Mapping}] Appending new rows to the table is achieved using the widget subcommand add.   $lv(s) add ...   So, adding an empty row can be achieved using $lv(s) add {{{} {}}} The widget code expects a list of rows, with each member of this list itself being a list whose items correspond to the column entries. Sounds kind of confusing and complicated. Well, it is. Especially when empty rows are being added. Lets work our way our way through it, from the inside out. The list has two columns, and lets take the following as our staring point. We will write these items to the cells to be appended. col-1 col-2 A list of two items....

Autocorrection, string swapping and balancing quotations in gnocl::text widgets.

Although the basic GtkTextView is a lightweight plain vanilla text editing widget, it can be spiced up to do more interesting things, operations that would normally be expected in a word processing application. It is possible to embed such larger editors into a Gtk window, and the legacy binding to the Abiwidget is an example of that. Using such objects comes with the caveat that the widget is effectively an app within an app, rather than a component. The gnocl::text object has three options, -balanceQuotes, -swap and -corrections which pushes the uses of the widget towards creative writing rather than just editing a simple text file.  All three options work in connection with the widget's 'key-release-event' signal to analyse the text buffer contents adjacent to the insert cursor. Setting the -balanceQuotes option to 1 will result in the any " or ' becoming modified to single or double open quotes dependent upon leading or trailing characters. It also enables the ...

January 2021 Update

From the coding point of view December was a very busy month. Lots of updates in terms of fixes and the introduction of extra functionality. See the notes below. Another useful change was the ability to download stable versions of gnocl directly from the main website. What, however, will the new year bring? I've already begun the process of integrating support for the canvas into main core, it makes sense, especially if the creation of graphics is needed. Once done, I'll take a look at integrating some the functionality from the other legacy modules. With that done, perhaps its time for a version increment, perhaps to 1.0 at long last! 'Why, hasn't it happened already?' one might ask. In short, all the additional work needed to update the online documentation and creating a comprehensive demonstration application. This is largely done now, especially with the internal help functionality added to the core. Just to show that the gnocl::canvas is now up and running, he...