void ExposeTitle(Cairo.Context c)
{
// The primary title background
c.SetSourceRGBA(0, 0, 0, 0.3);
c.Rectangle(0, m_titleOffset, this.Allocation.Width, m_titleHeight);
c.Fill();
// The title shadow (lip)
c.SetSourceRGBA(0, 0, 0, 0.1);
c.Rectangle(0, m_titleOffset + m_titleHeight, this.Allocation.Width, m_titleLip);
c.Fill();
// Paint the title text
using (var p = Pango.CairoHelper.CreateLayout(c))
{
int w = 0, h = 0, pad = 0;
p.SetText(m_Title);
p.GetPixelSize(out w, out h);
pad = (m_titleHeight - h) / 2;
c.MoveTo(pad, m_titleOffset + pad);
c.SetSourceRGB(1.0, 1.0, 1.0);
Pango.CairoHelper.ShowLayout(c, p);
}
}