private AutomatedIMElement CreateAutomatedElement(IMGUIInstruction imguiInstruction, int index)
        {
            AutomatedIMElement element = new AutomatedIMElement(this, index);

            element.enabled = imguiInstruction.enabled;

            switch (imguiInstruction.type)
            {
            case InstructionType.kStyleDraw:
            {
                var drawInstruction = m_DrawInstructions[imguiInstruction.typeInstructionIndex];
                element.rect       = drawInstruction.rect;
                element.style      = drawInstruction.usedGUIStyle;
                element.guiContent = drawInstruction.usedGUIContent;
                break;
            }

            case InstructionType.kLayoutBeginGroup:
            {
                var layoutInstruction = m_LayoutList[imguiInstruction.typeInstructionIndex];
                element.rect  = layoutInstruction.unclippedRect;
                element.style = layoutInstruction.style;
                break;
            }
            }

            return(element);
        }
 internal IMGUIInstructionProxy(IMGUIInstruction imguiInstruction)
 {
     m_IMGUIInstruction = imguiInstruction;
 }