Initialise style, load assets for given style
@param $style
@throws RunBBException
328837
public function setStyle($style)
    {
        $dir = ForumEnv::get('WEB_ROOT').'themes/'.$style.'/';
        if (!is_dir($dir)) {
            throw new RunBBException('The style '.$style.' doesn\'t exist');
        }

        if (is_file($dir . 'bootstrap.php')) {
            $vars = include_once $dir . 'bootstrap.php';
            // file exist but return nothing
            if (!is_array($vars)) {
                $vars = [];
            }
            foreach ($vars as $key => $assets) {
                if ($key === 'jsraw' || !in_array($key, ['js', 'jshead', 'css'])) {
                    continue;
                }
                foreach ($assets as $asset) {
                    $params = ($key === 'css') ? ['type' => 'text/css', 'rel' => 'stylesheet'] : (
                    ($key === 'js' || $key === 'jshead') ? ['type' => 'text/javascript'] : []
                    );
                    $this->addAsset($key, $asset, $params);
                }
            }
            $this->set('jsraw', isset($vars['jsraw']) ? $vars['jsraw'] : '');
        }

        if (isset($vars['themeTemplates']) && $vars['themeTemplates'] == true) {
            $templatesDir = ForumEnv::get('WEB_ROOT').'themes/'.$style.'/view';
        } else {
            $templatesDir = ForumEnv::get('FORUM_ROOT') . 'View/';
        }

        $this->set('style', (string) $style);

        $this->addTemplatesDirectory($templatesDir);
    }
947456
public function addStyle($property, $style = null)
    {
        if (is_array($property) && is_null($style)) {
            foreach ($property as $k => $v) {
                $this->addStyle($k, $v);
            }

            return $this;
        }
        $this->template->append('style', ';'.$property.':'.$style);

        return $this;
    }
723315
protected function init()
	{
		if (isset($this->theme) === false)
		{
			throw new \RuntimeException('Theme property does not exist.');
		}

		if (empty($this->theme) === false and is_string($this->theme))
		{
			$this->theme = \Theme::instance($this->theme);
		}

		// Sets active theme
		if (empty($this->theme_active) === false and is_string($this->theme_active))
		{
			$this->theme->active($this->theme_active);
		}

		// Initialize template
		$this->template_init();

		$this->theme->set_template($this->template);

		// Makes the theme instance available in all views
		$this->template->set_global('theme', $this->theme, false);
	}
530460
public function run()
    {
        // Setting up the styles
        echo '<style type="text/css">';
        echo '#bodydiv { font: 10px sans-serif;}';
        foreach ($this->styles as $class => $style) {
            echo '.', $class, ' { ';
            if ($style['font'] === 'dejavusans') {
                $style['font'] = $this->default_font;
            }
            echo 'font-family: ', $style['font'], '; ';
            echo 'font-size: ', $style['size'], 'pt; ';
            // Case-insensitive
            if (stripos($style['style'], 'B') !== false) {
                echo 'font-weight: bold; ';
            }
            if (stripos($style['style'], 'I') !== false) {
                echo 'font-style: italic; ';
            }
            if (stripos($style['style'], 'U') !== false) {
                echo 'text-decoration: underline; ';
            }
            if (stripos($style['style'], 'D') !== false) {
                echo 'text-decoration: line-through; ';
            }
            echo '}', PHP_EOL;
        }
        unset($class, $style);
        //-- header divider
        echo '</style>', PHP_EOL;
        echo '<div id="headermargin" style="position: relative; top: auto; height: ', $this->header_margin, 'pt; width: ', $this->noMarginWidth, 'pt;"></div>';
        echo '<div id="headerdiv" style="position: relative; top: auto; width: ', $this->noMarginWidth, 'pt;">';
        foreach ($this->headerElements as $element) {
            if ($element instanceof ReportBaseElement) {
                $element->render($this);
            } elseif ($element === 'footnotetexts') {
                $this->footnotes();
            } elseif ($element === 'addpage') {
                $this->addPage();
            }
        }
        //-- body
        echo '</div>';
        echo '<script>document.getElementById("headerdiv").style.height="', $this->top_margin - $this->header_margin - 6, 'pt";</script>';
        echo '<div id="bodydiv" style="position: relative; top: auto; width: ', $this->noMarginWidth, 'pt; height: 100%;">';
        $this->Y    = 0;
        $this->maxY = 0;
        $this->runPageHeader();
        foreach ($this->bodyElements as $element) {
            if ($element instanceof ReportBaseElement) {
                $element->render($this);
            } elseif ($element === 'footnotetexts') {
                $this->footnotes();
            } elseif ($element === 'addpage') {
                $this->addPage();
            }
        }
        //-- footer
        echo '</div>';
        echo '<script>document.getElementById("bodydiv").style.height="', $this->maxY, 'pt";</script>';
        echo '<div id="bottommargin" style="position: relative; top: auto; height: ', $this->bottom_margin - $this->footer_margin, 'pt;width:', $this->noMarginWidth, 'pt;"></div>';
        echo '<div id="footerdiv" style="position: relative; top: auto; width: ', $this->noMarginWidth, 'pt;height:auto;">';
        $this->Y    = 0;
        $this->X    = 0;
        $this->maxY = 0;
        foreach ($this->footerElements as $element) {
            if ($element instanceof ReportBaseElement) {
                $element->render($this);
            } elseif ($element === 'footnotetexts') {
                $this->footnotes();
            } elseif ($element === 'addpage') {
                $this->addPage();
            }
        }
        echo '</div>';
        echo '<script>document.getElementById("footerdiv").style.height="', $this->maxY, 'pt";</script>';
        echo '<div id="footermargin" style="position: relative; top: auto; height: ', $this->footer_margin, 'pt;width:', $this->noMarginWidth, 'pt;"></div>';
    }
38580
public function init($file)
	{
		try {
			
			$this->load($file);

		} catch (Exceptions\FileNotExists $e) {

			$this->create($file);
		}
	}
1223702
public function buildRow(
        array $row,
        $style = null,
        $rowIndex = 1
    ): void {
        if ($this->isNotInitialised()) {
            $this->initialise();
        }

        if ($style instanceof Style) {
            $this->writer->addRowWithStyle($row, $style);
        } else {
            $this->writer->addRow($row);
        }

        return;
    }
82559
public function init(?string $configuration = 'stylesheets'): void
    {
        $config = Core::i()->config->getConfiguration($configuration);
        foreach ($config as $script) {
            $this->append($script);
        }
    }
1130354
protected function loadInternalFonts(): void
    {
        $path = \dirname(__DIR__) . '/BuiltIn/Resources/art-fonts/';
        $group = self::INTERNAL_GROUP;

        foreach (self::$internalFonts as $font) {
            $this->fonts[$group][$font] = $path . $font . '%s.txt';
        }

        $this->groups[$group] = $path;
    }
125160
def SetFillStyle(self, style):
        
        self._fillstyle = FillStyle(style)
        if isinstance(self, ROOT.TAttFill):
            ROOT.TAttFill.SetFillStyle(self, self._fillstyle('root'))
347212
public function set_assets() {

		$this->assets['script'][ $this->type ] = $this->url . 'assets/js/' . $this->type . UIX_ASSET_DEBUG . '.js';
		$this->assets['style'][ $this->type ]  = $this->url . 'assets/css/' . $this->type . UIX_ASSET_DEBUG . '.css';

		parent::set_assets();

	}
616282
public function add(Style $style)
    {
        if (!$style->getTag()) {
            throw new LogicException('The tag of a style added to the style set must be set.');
        }

        $this->styles[$style->getTag()] = $style;
    }
1048258
public function registerStyle($style)
    {
        $registeredStyle = parent::registerStyle($style);
        $this->registerFill($registeredStyle);
        $this->registerBorder($registeredStyle);
        return $registeredStyle;
    }
1113246
public function setTemplateStyle($style = null)
    {
        if (null == $style) {
            $style = GEMS_PROJECT_NAME;
        }
        $this->setHtmlTemplateFile(APPLICATION_PATH . '/configs/email/' . $style . '.html');

        return $this;
    }
205228
public function addStyle($style)
    {
        if (!$this->html) {
            throw new Exception(['App does not know how to add style']);
        }
        $this->html->template->appendHTML('HEAD', $this->getTag('style', $style));
    }
1010089
public function delStyle($style) {
        if ( ! empty($style)) {
            if ( ! is_array($style)) {
                $style = [$style];
            }
            if ( ! isset($this->obsolete['style'])) {
                $this->obsolete['style'] = [];
            }
            $this->obsolete['style'] = array_merge($this->obsolete['style'], $style);
        }
    }
773037
public function set_top($style) {
        if ($style == 1) {
            $this->format['borders']['top']['style'] = PHPExcel_Style_Border::BORDER_THIN;
        } else if ($style == 2) {
            $this->format['borders']['top']['style'] = PHPExcel_Style_Border::BORDER_THICK;
        } else {
            $this->format['borders']['top']['style'] = PHPExcel_Style_Border::BORDER_NONE;
        }
    }
33942
protected function setStyle($style)
    {
        if (is_string($style) === false) {
            throw new \InvalidArgumentException(
                'The style label must be a string.'
            );
        }
        if (!in_array($style, $this->STYLES)) {
            throw new \InvalidArgumentException(
                'Invalid style.'
            );
        }

        $this->style = $style;

        return $this;
    }