    def register_frame(self, frame):
        """
        Register the Frame that owns this Widget.

        :param frame: The owning Frame.
        """
        self._frame = frame
        self.string_len = wcswidth if self._frame.canvas.unicode_aware else len
Register the Frame that owns this Widget.

:param frame: The owning Frame.
asciimatics/widgets/widget.py