/* one-line text window, used as titles of child windows. */!!

inherit(TextWindow, #TitleWindow, nil, 2, nil)!!

now(class(TitleWindow))!!

now(TitleWindow)!!

/* Put right-justified title into workText. */
Def drawTitleRight(self, title)
{
  if not(workText)
    initWorkText(self);
  endif;
  workText[0] := right(title, xMax, " ");
  invalidate(self);
}!!

/* Put title into workText. */
Def drawTitle(self, title)
{
  if not(workText)
    initWorkText(self);
  endif;
  workText[0] := title;
  invalidate(self);
}!!

/* Initialize the workText. */
Def initWorkText(self)
{ add(workText := new(TextCollection, 1), "");
}!!