docs: def record(viewWidget):
          """
          Records the state for the inputed view widget into data.
          
          :param      viewWidget | <XViewWidget>
          """
          profile = XViewProfile()
          
          xprofile = ElementTree.Element('profile')
          xprofile.set('locked', nativestring(viewWidget.isLocked()))
          XViewProfile.recordWidget(xprofile, viewWidget.widget())
          profile.setXmlElement(xprofile)
          
          return profile