Example

Pseudo-declarative code in C++

     

UColor col = UColor::black;
UFont  fnt = UFont::italic;

UBox& b1 = uhbox
   ( "This is " 
     + uima("colors.gif")
     + UColor::red + UFont::bold + " multi-color text"
     + col + fnt + " that contains a "
     + ...
   );

UBox& b2 = ubutton
   ( "Try!"
     + ubutton( UColor::red   + " ") 
     + ubutton( UColor::blue  + " ")
     + ubutton( UColor::green + " ")
     + ubutton( USymbol::down + umenu(...))
   );

b1.add(b2);      // classical "OO" API