// Switch to Mata interpreter/compiler mata: // Drops class object if it already exists // mata drop iframe() // Definition of HTML Tag iframe Mata Class // Defines an inline frame// Information retrieved from http://www.w3schools.com/tags/tag_iframe.asp class iframe extends htmlglobal { // Define private member variables private: // Static/final variables static string scalar opens, opene, close // String scalar attributes string scalar htmlalign, htmlframeborder, htmlheight, htmllongdesc, htmlmarginheight, htmlmarginwidth, htmlname, htmlsandbox, htmlscrolling, htmlsrc, htmlsrcdoc, htmlwidth // Make class args non-static to prevent assignment of class args to all instances of class string scalar classargs // Define public members/methods public: // Class constructor method void new() // Setter methods class iframe scalar setClassArgs(), setAlign(), setFrameborder(), setHeight(), setLongdesc(), setMarginheight(), setMarginwidth(), setName(), setSandbox(), setScrolling(), setSrc(), setSrcdoc(), setWidth() // Getter methods string scalar getOpens(), getOpene(), getClose(), print(), getClassArgs(), getAlign(), getFrameborder(), getHeight(), getLongdesc(), getMarginheight(), getMarginwidth(), getName(), getSandbox(), getScrolling(), getSrc(), getSrcdoc(), getWidth() } // End of class declaration // Class constructor method declaration void iframe::new() { // Defines the start of the opening tag for the class this.opens = " according to surrounding elements class iframe scalar iframe::setAlign(| string scalar methodarg) { // Validate argument if (methodarg == "left" | methodarg == "right" | methodarg == "top" | methodarg == "middle" | methodarg == "bottom") { // Set the attribute value this.htmlalign = `" align=""' + methodarg + `"""' } // End IF Block for validated argument value // Return a copy of the object return(this) } // End of Method align declaration for class iframe // Not supported in HTML5.Specifies whether or not to display a border around an