/** * 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); }
/** * Make everything */ function rebuildContent() { $callBack = $this->_callBack; $collectionName = $this->_collectionName; $thingsToApplyCollectionTo = $this->_thingsToApplyCollectionTo; //get the theme eval('$theme = ' . $callBack . "();"); if (!is_object($theme)) { return; } $align = GUIComponentUtility::makeAlignArray(); $textSpacing = GUIComponentUtility::makeSpacingArray(); $lineSpacing = GUIComponentUtility::makeLineSpacingArray(); $marginArray = GUIComponentUtility::makeMarginAndPaddingArray(); $collectionSelector1 = "*." . $collectionName; //first style collection if (!$theme->getStyleCollection($collectionSelector1)) { $styleCollection1 = new StyleCollection($collectionSelector1, $collectionName, "Text Properties", "How would you like your text 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 TextAlignSP("left"), "TextAlignSC", $align, "text-align"); $this->addComponent('align', $comp); $comp = new WGUISelectList($callBack, $collectionSelector1, new LetterSpacingSP("normal"), "TextSpacingSC", $textSpacing, "letter-spacing"); $this->addComponent('letterSpace', $comp); $comp = new WGUISelectList($callBack, $collectionSelector1, new WordSpacingSP("normal"), "TextSpacingSC", $textSpacing, false); $this->addComponent('wordSpace', $comp); $comp = new WGUISelectList($callBack, $collectionSelector1, new LineHeightSP("normal"), "LineHeightSC", $lineSpacing, false); $this->addComponent('lineSpace', $comp); $comp = new WGUISelectList($callBack, $collectionSelector1, new PaddingTopSP("0px"), "LengthSC", $marginArray, false); $this->addComponent('p_top', $comp); $comp = new WGUISelectList($callBack, $collectionSelector1, new PaddingBottomSP("0px"), "LengthSC", $marginArray, false); $this->addComponent('p_bottom', $comp); $comp = new WGUISelectList($callBack, $collectionSelector1, new PaddingLeftSP("0px"), "LengthSC", $marginArray, false); $this->addComponent('p_left', $comp); $comp = new WGUISelectList($callBack, $collectionSelector1, new PaddingRightSP("0px"), "LengthSC", $marginArray, false); $this->addComponent('p_right', $comp); }