/** * Make everything */ function rebuildContent() { $callBack = $this->_callBack; $collectionName = $this->_collectionName; $thingsToApplyCollectionTo = $this->_thingsToApplyCollectionTo; //get the theme eval('$theme = ' . $callBack . "();"); if (!is_object($theme)) { return; } $color = GUIComponentUtility::makeColorArrays(12, 5); $marginArray = GUIComponentUtility::makeMarginAndPaddingArray(); $borderSizes = GUIComponentUtility::makeBorderSizeArrays(); $borderStyles = GUIComponentUtility::makeBorderStyleArrays(); $collectionSelector1 = "*." . $collectionName; //first style collection if (!$theme->getStyleCollection($collectionSelector1)) { $styleCollection1 = new StyleCollection($collectionSelector1, $collectionName, "BackGround properties", "How would you like your background to look?" . $collectionName); foreach ($thingsToApplyCollectionTo as $arr) { $theme->addStyleForComponentType($styleCollection1, $arr['type'], $arr['index']); } } //first style collection GUI elements $comp = new WGUISelectList($callBack, $collectionSelector1, new BackgroundColorSP("#FFFFFF"), "ColorSC", $color['options'], $color['styles']); $this->addComponent('bgColor', $comp); $prop = new BorderSP('0px', "solid", "#000000"); $comp = new WGUISelectList($callBack, $collectionSelector1, $prop, "LengthSC", $borderSizes['options'], $borderSizes['styles']); $this->addComponent('borderSize', $comp); $comp = new WGUISelectList($callBack, $collectionSelector1, $prop, "BorderStyleSC", $borderStyles['options'], $borderStyles['styles']); $this->addComponent('borderStyle', $comp); $comp = new WGUISelectList($callBack, $collectionSelector1, $prop, "ColorSC", $color['options'], $color['styles']); $this->addComponent('borderColor', $comp); $comp = new WGUISelectList($callBack, $collectionSelector1, new MarginTopSP("0px"), "LengthSC", $marginArray, false); $this->addComponent('m_top', $comp); $comp = new WGUISelectList($callBack, $collectionSelector1, new MarginBottomSP("0px"), "LengthSC", $marginArray, false); $this->addComponent('m_bottom', $comp); $comp = new WGUISelectList($callBack, $collectionSelector1, new MarginLeftSP("0px"), "LengthSC", $marginArray, false); $this->addComponent('m_left', $comp); $comp = new WGUISelectList($callBack, $collectionSelector1, new MarginRightSP("0px"), "LengthSC", $marginArray, false); $this->addComponent('m_right', $comp); }