// Sample mspec file // Text is the medium medium TextInterface1; // C++ code. %{ #include "AlignType.h" ProtDocNode* createTextNode(PooledString); void setTextNode(ProtDocNode*, ProtValue*); %} // Client defined types types { enum AlignType { "leftjustify" = LEFT, "rightjustify" = RIGHT, "centerjustify" = CENTERED, "blockjustify" = JUSTIFY }; } // The primitives of the medium primitives { Text (string) : creator(createTextNode, setTextNode); } // Dimensions of the medium dimensions { horizontal(width, horizpos, left, right, hmiddle); vertical(height, vertpos, top, bottom, vmiddle); } // attributes of the medium attributes { blankLines(0.0) : real; indent(0.0) : real; justify(LEFT) : AlignType; lineWidth(72.0) : real; fontSize(12) : real; fontFamily("times") : string; italic(false) : boolean; } // interface functions functions { uroman(real) : string calls upperRoman; rgb (real, real, real) : string calls rgbFN; getURL (node) : string calls getURLfromAnchor; }