Back in 515f450432 I attempted to optimize this, but I didn't do it right. Since I didn't
define a move ctor for canvas, that std::move call was useless and the copy ctor was being called
anyway. Though, that change wasn't a total waste. It still reduced the number of canvases created
from (I think) 3 to 2, since the code was no longer going default-construction
and copy-assignment from the state struct.
These new changes completely remove the canvas object from the state struct. Nothing particularity
special was being done there, only a call to canvas::set_cfg. Instead, the canvas config is saved
in the state objects and then styled_widget initializes the canvas itself. This does mean there's
config copying going on here, sadly, but it's unavoidable given the current design.
This also removes the definition_load_configuration function from styled_widget. Its contents were
moved to the ctor. This ensures only the exact number of canvas objects needed are created. No
copying from the state objects, no reallocations. This also means we can delete the copy ctor (see
below).
A move ctor was added to canvas (though it admittedly isn't needed now since no canvas moving
occurs), and the copy ctor deleted.
Turns out I mistook @celticminstrel's opinion that we should use include guards over pragma (737916e).
Since all major compilers support `#pragma once`, there's no reason not to use it.
For future mergability reasons, this excludes src/spirit_po and src/xBRZ. It also excludes src/boost-patched.
Note that like in 8bf345c, using emplace_back with config_of doesn't actually allow for in-place construction,
but does allow for use of the move ctor, which is more efficient.
It was causing problems being enabled for all labels (ie, some labels being shrunken when it wasn't desirable),
and it didn't make much sense for all widgets anyway.
This adds a new can_shrink key to widgets that allows the 'no label' codepath of styled_widget::request_reduce_width to be called.
In this case, it allows labels to shrink without forcing window scrollbars.
Do note that for some reason using the default_bold label definition with this change made an underline
appear. I changed the style checks to use == instead of & (bitwise AND) and that fixed the problem. If
that's wrong, someone feel free to fix that.