Map view allows optional 'flags' to assist in qualitative analysis and coding. One common Tinderbox task is qualitative analysis of existing materials, such as letters, surveys, diaries, and personal papers. An important preliminary step in this work is coding—identifying occurrences of special interest for the study. For example, if we were analysing a collection of nineteenth-century diaries to study what people recorded about food and drink, we might want to code where the food was consumed. We might mark every passage that discussed eating at home with the code P1, eating at the residence of another family member with the code P2, eating at a pub with P3, and so forth. We might also note places where money is discussed: C1 might indicate that the writer paid for their meal, C2 that someone else explicitly paid for the writer's meal, and so forth.
Flags offer a convenient and flexible way to foreground selected codes in map view. Flags are defined via $Flags, a List-type attribute. When not empty, small "flags" are displayed above the note in map view. (N.B. flags do not appear in other views). Note that as $Flags is a List-type attribute, actions can add new flags with "+" or remove flags with "-". Adding a flag to a note that already possesses that flag has no effect.
$Flags is an intrinsic attribute; it is not inherited from prototypes and an alias may have different flags from its original note.
For simple coding tasks, using $Badge may be adequate. Flags provide a wider range of visual cues, and new flags can be improvised quickly when coding needs change.
Flags are described using a concise textual shorthand, and are illustrated in the screen-grab. (A visual flag editor is planned for the future.). Whilst it is generally easier to use named Tinderbox colours, hexadecimal values can be used to define flag colours as in the first example below. Possible design variations . Note the possibility of combining styles:
- Single solid colour. A red flag:
- Horizontal stripes. List the stripe colours separated by hyphens:
- Vertical stripes. List the stripe colours separated by the vertical bar character:
- Diagonal stripes. List the stripe colours separated by the '/' symbol:
- Chequered flag. List the two colours separated by the '$' symbol:
- Cross symbol. List the cross colour, a '+' sign and then background colours:
- Saltire symbol. List the cross colour, an asterisk '*' and then background colours:
- Diagonal line. The '%' sign adds a diagonal line:
- Chevron. The '>' symbol adds a chevron:
- Pall. The '}' character adds a pall:
- Pall and Chevron. The pall and chevron work together:
- Text caption. A period '.' adds a short textual annotation (1-3 characters) on top of any other colour/pattern:
BZ.yellow$light green. The characters
>*+.$%}are treated as literal characters if they are used the first three characters of flag code using the period marker, so
+.reddraws a plus sign on a red flag.
- Text colour. Though text is normally white, a colour may be specified:
black:C.lighter blue, or
- The text may be an emoji:
Progress bars in Flags
From v9.5.2, Flags permit several additional expressions, useful for showing progress bars.
- bar(value[,min,max]). Draws a horizontal progress bar, using the note's $Color and $AccentColor values. If the minimum and maximum values are not specified, they are assumed to be 0 and 100. More on the bar() pattern.
- vbar(value[,min,max]). Draws the a progress bar vertically, using the note's $Color and $AccentColor values. If the minimum and maximum values are not specified, they are assumed to be 0 and 100. More on the vbar() pattern.
- pie(value[,min,max])). Draws a pie chart, using the note's $Color and $AccentColor values. More on the pie() pattern.
When drawing flags using bar() or vbar(), Tinderbox draws the flag outline in $AccentColor. This should be helpful when $Color contrasts poorly with the view's background. From v9.6.0, Flags using the pie-chart progress indicator draw their outline in $Color, and so are easier to read.
Using Text in Flags
if using the text method above, avoid using colon, semi-colon and period. These get interpreted respectively as a dictionary key delimiter, a list delimiter and the flag style definition delimiter. So, if wanting to use '3.1' try '3-1' instead. Also, the default 'fill' colour is the same as the text so do defined a colour. So not
3-1.green. Don't forget text is limited to only 3 characters or fewer. If more are supplied, the result is the first two characters and an ellipsis characters. In the previous example, 3-1' is 3 characters, as the hyphen still counts as one.
Defining multiple flags for a note
As $Flags is a List-type attribute, if defining multiple flags for a note, use a semicolon between each flag's code. Thus, this code '
white}green>blue;yellow}red>blue-green' defines two discrete flags for a single note.
Multiple Flags and icon width
The default map icon will display up to 4 flags, or the first four listed flags if more. By dragging the note wider, all flags can be displayed (as illustrated).
Colours and Tinderbox Colour Schemes
As Tinderbox colour schemes files allow a named colour to be any value, it may be safer to use use colour values (e.g.
#00ff00) rather than named colours (e.g.
red) if you are not using the Tinderbox v7 standard scheme (as used to illustrate here) or consider switching between colour schemes. Another approach is to make new 'new' colours for use in flags. So, if your favourite colour scheme renders the colour named 'green' not as green, you could make a new colour 'fgreen' and set the desired (visual) value of green and then use 'fgreen' instead of 'green' when setting $Flags. The exact name of the colour doesn't matter as long as it is not the same as an existing named colour.
If adding such extra named colours, be aware that they only existing in the current TBX document. Applying a different colour scheme to the document should not affect such custom colours (unless the new scheme includes a same-named colour with a different defined colour value). Thus a good idea, after adding extra colours, is to save the documents current colours as a colour scheme file ensuring it is possible to re-assert the colours if something changes their value in the current document and have the possibility to apply the same scheme to other TBX documents.
Flags in Outline view too
From v9.5.2, in Outline view notes can display their first flag (only) instead of a colour swatch: see more detail.