Classes | GUI > Interfaces

HistoryGui : JITGui : Object

A gui for History objects


HistoryGui allows easy access to History as it happens: one can read recent lines, when they were written and by whom; one can search for text strings and by author names; and one can quickly grab lines of code for rewriting. Apart from documenting just in time programming sessions, all of this can be useful in live coding performances. See e.g. the system developed by powerbooks_unplugged, in the Quark called Republic.

The gui elements in detail:

button start/end
starts and ends History if gui.history is current.
button all/filt
turns filtering on/off.
popup all/...
selects which name key to search for (useful if networked)
allows for typing in a search string.
button top/keep
sets mode whether ListView stays on top line, or keeps sticking to the selected line.
shows either all lineShorts, or the filtered lineShorts; selecting them in ListView makes them come appear in post-doc window.

first example:

Class Methods


HistoryGui.docHeight = value

get and set the height of the text window opened by HistoryGui


HistoryGui.docTitle = value

get and set the title of the text window opened by HistoryGui

HistoryGui.new(object, numItems: 8, parent, bounds, makeSkip: true, options: [ ])

create a new HistoryGui



the history


the number of lines in the TextView above


a parent window or view in which to place new HistoryGui


bounds for new HistoryGui, constrained by its minSize.


flag whether to create a skipjack for the HistoryGui.


options to set for the HistoryGui (inherited from JITGui).

Inherited class methods

Instance Methods



top: the TextView for the selected line






the line of buttons, popup and TextView


the ListView for the history lines


reset all views


show the line at that index in History.lines in the TextView.



the external text window made by HistoryGui to show codelines on. This is still called doc because it used to be a Document in pre-Qt times.


find an open a re-usable text window, or make a new one


get or set the symbol for the doc strategy to use: \sameDoc tries to re-use a single text window, \newDoc always makes a new one (and keep track of old docs)


list of previous text windows (docs) opened


find the codeline at index in History, and post it on the textwindow


set the string of the current textwindow


create a new textwindow with currently selected line



.filtering = flag: true

flag whether filtering is on



convenience on/off methods


keys and string fragments to filter for. e.g. [ 'all', "+" ] gets lines from all sources that contain the string "+".


apply filtering to history lines


the indices of the current filtered lines


the current filtered short lines for gui display

method:.setKeyFilter set the key(s) to filter for, and perform filtering


set the string to filter for, and perform filtering


.stickMode = value

stickMode 0 means top, i.e. select top when new lines come in; stickMode 1 means keep, i.e. keep current line selected after new lines come in.

Inherited instance methods

Undocumented instance methods