TMut's message view component

About

A message view displays a message the user wants to read. This includes the headers of the message, the message itself, supported mime parts and attachments. In case of a forwarded message it could also mean showing those inline too (depending on what you want to support, or the level of recursion you want to support). You could also simply show a forwarded message as an attachment that only gets shown in a new message view instance when the user clicks or taps on it.

Design

TMut's message view component is a composition of a TnyHeaderView and a TnyMsgView implementation. Because TMut's view for this has to be compact on the screen, the header view had to be wrapped into a GtkExpander? and the entire message view into a GtkScrolledWindow?.

The way this is done is by creating a new type called TMutHeaderView. This type implements TnyHeaderView and decorates the TnyGtkHeaderView. This header view is then created by the overwritten TnyGtkMsgView virtual tny_gtk_msg_view_create_header_view method.

The tny_gtk_msg_view_create_header_view itself is overwritten by a type called TMutTnyGtkMsgView that inherits TnyGtkMsgView. TMutMsgView is a fresh GtkVBox based implementation of TnyMsgView that decorates TMutTnyGtkMsgView by wrapping it with the required GtkScrolledWindow?.

I am really not a bot I am really not a bot I am really not a bot

Implementation