Initialise and load themer components
491293
protected function loadThemer()
    {
        $app = app();

        $this->styles     = $app->make(Styles::class);
        $this->scripts    = $app->make(Scripts::class);

        if (method_exists($this, 'share')) {
            $this->share([
                 'styles'  => $this->styles,
                 'scripts' => $this->scripts,
                 'images'  => $app->make(Images::class),
             ]);
        }
    }
100930
function(themeName, extOptions) {
        var options = presetOptions[themeName];

        if (!options) {
            options = presetOptions[themeNameConst.DEFAULT];
        }
        options = $.extend(true, {}, options, extOptions);
        setDocumentStyle(options);
    }
769394
protected function bootComponents(): void
    {
        $path = realpath(__DIR__.'/../');

        $this->addConfigComponent('orchestra/html', 'orchestra/html', "{$path}/config");
        $this->addViewComponent('orchestra/html', 'orchestra/html', "{$path}/resources/views");

        if (! $this->hasPackageRepository()) {
            $this->bootUsingLaravel($path);
        }
    }
213972
public function setup_on_after_setup_theme() {

		$this->_the_content_priority = absint( apply_filters( 'hogan/the_content_priority', 10 ) );

		// Append Flexible Content modules to the_content.
		add_filter( 'the_content', [ $this, 'append_modules_content' ], $this->_the_content_priority, 1 );

		// Index modules as post content in SearchWP.
		if ( true === apply_filters( 'hogan/searchwp/index_modules_as_post_content', true ) ) {
			add_filter( 'searchwp_pre_set_post', [ $this, 'populate_post_content_for_indexing' ] );
		}

		add_filter( 'acf/fields/wysiwyg/toolbars', [ $this, 'append_hogan_wysiwyg_toolbar' ] );
		add_filter( 'tiny_mce_before_init', [ $this, 'override_tinymce_settings' ] );

		if ( true === apply_filters( 'hogan/flexible_content_layouts_collapsed_by_default', false ) && is_admin() ) {
			add_action( 'acf/input/admin_footer', [ $this, 'append_footer_script_for_collapsed_flexible_content_layouts' ] );
		};

		add_filter( 'acf/fields/flexible_content/layout_title', [ $this, 'extend_layout_titles' ], 10, 3 );

	}
430060
def include_theme_files(self, fragment):
        
        theme = self.get_theme()
        if not theme or 'package' not in theme:
            return

        theme_package, theme_files = theme.get('package', None), theme.get('locations', [])
        resource_loader = ResourceLoader(theme_package)
        for theme_file in theme_files:
            fragment.add_css(resource_loader.load_unicode(theme_file))
324317
public static void loadAsync(final ThemeBundle bundle, final ThemeAsyncCallback callback) {
        GWT.runAsync(new RunAsyncCallback() {
            @Override
            public void onSuccess() {
                if(bundle != null) {
                    if(elements == null) {
                        elements = new ArrayList<>();
                    } else {
                        unload();
                    }

                    // More resources might be loaded in the future.
                    elements.add(StyleInjector.injectStylesheet(bundle.style().getText()));
                    elements.add(StyleInjector.injectStylesheet(bundle.overrides().getText()));
                }

                if(callback != null) {
                    callback.onSuccess(elements.size());
                }
            }
            @Override
            public void onFailure(Throwable reason) {
                if(callback != null) {
                    callback.onFailure(reason);
                }
            }
        });
    }
153658
def load_default_templates(self):
        """"""
        for importer, modname, is_pkg in pkgutil.iter_modules(templates.__path__):
            self.register_template('.'.join((templates.__name__, modname)))
264474
private void init() {

        int decorationWidth = getDecorationWidth();
        m_decorationBox.setWidth(decorationWidth + "px");
        m_primary.getElement().getStyle().setMarginLeft(decorationWidth, Style.Unit.PX);
    }
1260569
function init() {
        // Load our stylesheet
        ExtensionUtils.loadStyleSheet(module, "main.less");
        ExtensionUtils.addEmbeddedStyleSheet(Mustache.render(Localized, Strings));

        EditorManager.registerInlineEditProvider(inlineTimingFunctionEditorProvider);
    }
1107897
private static function init() {
		// Avoid double initialization
		if ( self::$initialized ) {
			trigger_error( 'Do not call WPametu::init twice!', E_USER_WARNING );

			return;
		}
		// Todo: i18n for plugin
		load_theme_textdomain( self::DOMAIN, dirname( __DIR__ ) . '/i18n' );
		// Check version
		if ( version_compare( phpversion(), self::PHP_VERSION, '<' ) ) {
			trigger_error( sprintf( __( 'PHP version should be %s and over. Your version is %s.', self::DOMAIN ), self::PHP_VERSION, phpversion() ), E_USER_WARNING );

			return;
		}
		// Fire AutoLoader
		AutoLoader::get_instance();
		self::$initialized = true;
	}
1326690
private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        lookAndFeelLabel = new javax.swing.JLabel();
        lookAndFeelComboBox = new javax.swing.JComboBox();
        // Look and Feel
        String landfCurrent = (String)properties.get(ScreenUtil.LOOK_AND_FEEL);
        if (landfCurrent == null)
        landfCurrent = ScreenUtil.DEFAULT;

        mapLAndF = new HashMap<String,String>();
        ScreenDialog.addLookAndFeelItem(mapLAndF, java.util.ResourceBundle.getBundle(DIALOG_BUNDLE).getString(ScreenUtil.DEFAULT), ScreenUtil.DEFAULT, landfCurrent, lookAndFeelComboBox);
        ScreenDialog.addLookAndFeelItem(mapLAndF, java.util.ResourceBundle.getBundle(DIALOG_BUNDLE).getString(ScreenUtil.SYSTEM), ScreenUtil.SYSTEM, landfCurrent, lookAndFeelComboBox);

        UIManager.LookAndFeelInfo[] rgLandFInfo = UIManager.getInstalledLookAndFeels();
        for (int i = 0; i < rgLandFInfo.length; i++)
        {
        	ScreenDialog.addLookAndFeelItem(mapLAndF, rgLandFInfo[i].getName(), rgLandFInfo[i].getClassName(), landfCurrent, lookAndFeelComboBox);
        }
        LookAndFeel[] rgLandF = UIManager.getAuxiliaryLookAndFeels();
        if (rgLandF != null)
        {
            for (int i = 0; i < rgLandF.length; i++)
            {
            	ScreenDialog.addLookAndFeelItem(mapLAndF, rgLandF[i].getName(), rgLandF[i].getClass().getName(), landfCurrent, lookAndFeelComboBox);
            }
        }

        themeLabel = new javax.swing.JLabel();
        themeComboBox = new javax.swing.JComboBox();
        String currentThemeName = (String)properties.get(ScreenUtil.THEME);
        if (currentThemeName == null)
        currentThemeName = ScreenUtil.DEFAULT;
        mapThemes = new HashMap<String,String>();

        ScreenDialog.addThemeItem(mapThemes, java.util.ResourceBundle.getBundle(DIALOG_BUNDLE).getString(ScreenUtil.DEFAULT), ScreenUtil.DEFAULT, null, currentThemeName, themeComboBox);
        ScreenDialog.addThemeItem(mapThemes, null, null, new BlueTheme(), currentThemeName, themeComboBox);
        ScreenDialog.addThemeItem(mapThemes, null, null, new GrayTheme(), currentThemeName, themeComboBox);
        ScreenDialog.addThemeItem(mapThemes, null, null, new RedTheme(), currentThemeName, themeComboBox);
        ScreenDialog.addThemeItem(mapThemes, null, null, new OceanTheme(), currentThemeName, themeComboBox);

        fontLabel = new javax.swing.JLabel();
        fontComboBox = new javax.swing.JComboBox();
        // Font
        String currentFontName = (String)properties.get(ScreenUtil.FONT_NAME);
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        fontComboBox.addItem(this.getDefaultText());
        fontComboBox.setSelectedIndex(0);
        if (toolkit != null)
        {
            String[] astrFont = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();    //toolkit.getFontList();
            for (int i = 0; i < astrFont.length; i++)
            {
                fontComboBox.addItem(astrFont[i]);
                if (astrFont[i].equals(currentFontName))
                fontComboBox.setSelectedItem(astrFont[i]);      // To select the correct object
            }
        }

        sizeLabel = new javax.swing.JLabel();
        sizeComboBox = new javax.swing.JComboBox();
        // Size
        String currentFontSize = (String)properties.get(ScreenUtil.FONT_SIZE);
        String rgSizes[] = {"6", "8", "10", "12", "14", "18", "22", "28"};
        sizeComboBox.addItem(getDefaultText());
        sizeComboBox.setSelectedIndex(0);
        for (int i = 0; i < rgSizes.length; i++)
        {
            sizeComboBox.addItem(rgSizes[i]);
            if (rgSizes[i].equals(currentFontSize))
            sizeComboBox.setSelectedItem(rgSizes[i]);   // To select the correct object
        }

        colorPanel = new javax.swing.JPanel();
        textColorButton = new javax.swing.JButton();
        controlColorButton = new javax.swing.JButton();
        backgroundButton = new javax.swing.JButton();
        samplePanel = new javax.swing.JPanel();
        sampleLabel = new javax.swing.JLabel();
        sampleTextField = new javax.swing.JTextField();
        buttonPanel = new javax.swing.JPanel();
        okButton = new javax.swing.JButton();
        cancelButton = new javax.swing.JButton();
        resetButton = new javax.swing.JButton();

        getContentPane().setLayout(new java.awt.GridBagLayout());

        setTitle(java.util.ResourceBundle.getBundle(DIALOG_BUNDLE).getString("title"));
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                closeDialog(evt);
            }
        });

        lookAndFeelLabel.setLabelFor(lookAndFeelComboBox);
        lookAndFeelLabel.setText(java.util.ResourceBundle.getBundle(DIALOG_BUNDLE).getString("landf"));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.weightx = 0.5;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        getContentPane().add(lookAndFeelLabel, gridBagConstraints);

        lookAndFeelComboBox.setEditable(true);
        lookAndFeelComboBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                updateLookAndFeel(evt);
            }
        });

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.weightx = 0.5;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        getContentPane().add(lookAndFeelComboBox, gridBagConstraints);

        themeLabel.setLabelFor(themeComboBox);
        themeLabel.setText("Theme:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        getContentPane().add(themeLabel, gridBagConstraints);
        themeLabel.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle(DIALOG_BUNDLE).getString("theme"));

        themeComboBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                themeComboBoxActionPerformed(evt);
            }
        });

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        getContentPane().add(themeComboBox, gridBagConstraints);

        fontLabel.setLabelFor(fontComboBox);
        fontLabel.setText("Font:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        getContentPane().add(fontLabel, gridBagConstraints);
        fontLabel.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle(DIALOG_BUNDLE).getString("font"));

        fontComboBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                fontComboBoxActionPerformed(evt);
            }
        });

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        getContentPane().add(fontComboBox, gridBagConstraints);

        sizeLabel.setLabelFor(sizeComboBox);
        sizeLabel.setText("Size:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        getContentPane().add(sizeLabel, gridBagConstraints);
        sizeLabel.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle(DIALOG_BUNDLE).getString("size"));

        sizeComboBox.setEditable(true);
        sizeComboBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                sizeComboBoxActionPerformed(evt);
            }
        });

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        getContentPane().add(sizeComboBox, gridBagConstraints);

        colorPanel.setLayout(new java.awt.GridBagLayout());

        textColorButton.setText(java.util.ResourceBundle.getBundle(DIALOG_BUNDLE).getString("textcolor"));
        textColorButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                textColorButtonActionPerformed(evt);
            }
        });

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        colorPanel.add(textColorButton, gridBagConstraints);

        controlColorButton.setText(java.util.ResourceBundle.getBundle(DIALOG_BUNDLE).getString("controlcolor"));
        controlColorButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                controlColorButtonActionPerformed(evt);
            }
        });

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        colorPanel.add(controlColorButton, gridBagConstraints);

        backgroundButton.setText(java.util.ResourceBundle.getBundle(DIALOG_BUNDLE).getString("backgroundcolor"));
        backgroundButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                backgroundButtonActionPerformed(evt);
            }
        });

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        colorPanel.add(backgroundButton, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
        getContentPane().add(colorPanel, gridBagConstraints);

        samplePanel.setLayout(new java.awt.GridBagLayout());

        samplePanel.setBorder(new javax.swing.border.TitledBorder(java.util.ResourceBundle.getBundle(DIALOG_BUNDLE).getString("sample")));
        sampleLabel.setText(java.util.ResourceBundle.getBundle(DIALOG_BUNDLE).getString("label"));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        samplePanel.add(sampleLabel, gridBagConstraints);

        sampleTextField.setColumns(10);
        sampleTextField.setText(java.util.ResourceBundle.getBundle(DIALOG_BUNDLE).getString("control"));
        sampleTextField.setMinimumSize(new java.awt.Dimension(50, 19));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
        samplePanel.add(sampleTextField, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
        gridBagConstraints.gridheight = java.awt.GridBagConstraints.RELATIVE;
        gridBagConstraints.weightx = 0.5;
        getContentPane().add(samplePanel, gridBagConstraints);

        buttonPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        okButton.setText(java.util.ResourceBundle.getBundle(DIALOG_BUNDLE).getString("ok"));
        okButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                okButtonActionPerformed(evt);
            }
        });

        buttonPanel.add(okButton);

        cancelButton.setText(java.util.ResourceBundle.getBundle(DIALOG_BUNDLE).getString("cancel"));
        cancelButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cancelButtonActionPerformed(evt);
            }
        });

        buttonPanel.add(cancelButton);

        resetButton.setText(java.util.ResourceBundle.getBundle(DIALOG_BUNDLE).getString("reset"));
        resetButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                resetButtonActionPerformed(evt);
            }
        });

        buttonPanel.add(resetButton);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTH;
        getContentPane().add(buttonPanel, gridBagConstraints);

        pack();
    }
320542
function initComponents (config) {
    // check if immutable-app-component module is loaded
    var hasImmutableAppComponent = defined(config.modules['immutable-app-component'])
    // get components directory
    var dirs = getDir(config, 'components')
    // load component definitions from each directory
    _.each(dirs, dir => initComponentsDir(config, dir))
    // if there are components but component module is not loaded throw error
    if (_.keys(config.components).length > 0 && !hasImmutableAppComponent) {
        throw new Error('immutable-app-component not loaded')
    }
    // create new component instances from definitions
    _.each(config.components, (component, name) => {
        config.components[name] = new ImmutableCoreComponent(component)
    })
}
87726
public function init()
    {
        // Check filepath
        if (empty($this->filepath)) {
            return;
        }

        // Get configurations
        $configs = include $this->filepath;

        // Check
        if (empty($configs)) {
            return;
        }

        // Iterate on configs
        foreach ($configs as $key => $props) {
            $props = !is_array($props) && !is_bool($props) ? [$props] : $props;

            if ('post_type' === $key) {
                // Add or Remove post type supports
                $this->addRemovePostTypeSupport($props);
            } else {
                // Add new theme supports
                $this->addRemoveThemeSupport($key, $props);
            }
        }
    }
803312
def _load_themes(self):
        """"""
        with utils.temporary_chdir(utils.get_file_directory()):
            self._append_theme_dir("themes")
            self.tk.eval("source themes/pkgIndex.tcl")
            theme_dir = "gif" if not self.png_support else "png"
            self._append_theme_dir(theme_dir)
            self.tk.eval("source {}/pkgIndex.tcl".format(theme_dir))
        self.tk.call("package", "require", "ttk::theme::scid")
662094
function main() {
    loadDependencies();
    setInitialData();
    domHelpers.initDomElements();

    setDataInInputField();
    setConfigInInputField();
    setChartSelectorType();
    setNewChart();
    setHandlers();
}
995455
public static void applyThemeClass(BaseUIComponent component, IThemeClass... themeClasses) {
        StringBuilder sb = new StringBuilder();

        for (IThemeClass themeClass : themeClasses) {
            String cls = themeClass == null ? null : themeClass.getThemeClass();

            if (cls != null) {
                sb.append(sb.length() > 0 ? " " : "").append(themeClass.getThemeClass());
            }
        }

        component.addClass(sb.toString());
    }
312095
public static function loadThemes()
    {
        $themesFolder = new Folder(ROOT . DS . 'themes');
        $themes = $themesFolder->read()[0];
        $loader = require ROOT . DS . 'vendor' . DS . 'autoload.php';
        foreach ($themes as $theme) {
            $loader->addPsr4('WasabiTheme\\' . $theme . '\\', [$themesFolder->path . DS . $theme . DS . 'src']);
            Plugin::load('WasabiTheme/' . $theme, [
                'path' => $themesFolder->path . DS . $theme . DS,
                'bootstrap' => true,
                'routes' => false
            ]);
        }
    }