src/third_party/specimenTools/lib/widgets/SimpleFileChooser.js
/**
     * Very basic interface to switch between all loaded fonts.
     * See FamilyChooser for a more advanced interface.
     */
Very basic interface to switch between all loaded fonts.
See FamilyChooser for a more advanced interface.
Very basic interface to switch between all loaded fonts . See FamilyChooser for a more advanced interface .
function SimpleFileChooser(container, pubSub) {
        this._container = container;
        this._pubSub = pubSub;
        this._switches = [];
        this._switchesContainer = this._container.ownerDocument.createElement('div');
        this._container.appendChild(this._switchesContainer);
        this._pubSub.subscribe('prepareFont', this._prepareLoadHook.bind(this));
        this._pubSub.subscribe('loadFont', this._onLoadFont.bind(this));
        this._pubSub.subscribe('activateFont', this._onActivateFont.bind(this));
    }
function SimpleFileChooser ( container , pubSub ) { this . _container = container ; this . _pubSub = pubSub ; this . _switches = [ ] ; this . _switchesContainer = this . _container . ownerDocument . createElement ( 'div' ) ; this . _container . appendChild ( this . _switchesContainer ) ; this . _pubSub . subscribe ( 'prepareFont' , this . _prepareLoadHook . bind ( this ) ) ; this . _pubSub . subscribe ( 'loadFont' , this . _onLoadFont . bind ( this ) ) ; this . _pubSub . subscribe ( 'activateFont' , this . _onActivateFont . bind ( this ) ) ; }
Very basic interface to switch between all loaded fonts.
Very basic interface to switch between all loaded fonts .