<commit_before><!-- GNU LGPL v2.1+: http://www.gnu.org/licenses/lgpl.html -->

<docs>
  # VC-PLAYCONTROLS
  A container holding the play and seek controls for a Bse.song.
  ## Props:
  *project*
  : Injected *Bse.Project*, using `vc-projectshell.project`.
</docs>

<style lang="scss">
  @import 'styles.scss';
  .vc-playcontrols { }
</style>

<template>

  <vc-button-bar
      class="vc-playcontrols" >
    <vc-icon-button hotkey="L"     icon="fa-fast-backward" @click="pcall ('...Last')"></vc-icon-button>
    <vc-icon-button hotkey="B"     icon="fa-backward"      @click="pcall ('...Backwards')"></vc-icon-button>
    <vc-icon-button hotkey="Space" icon="fa-stop"          @click="pcall ('stop')"></vc-icon-button>
    <vc-icon-button hotkey="P"     icon="fa-play"          @click="pcall ('play')"></vc-icon-button>
    <vc-icon-button hotkey="R"     icon="fa-circle"        @click="pcall ('...Record')"></vc-icon-button>
    <vc-icon-button hotkey="F"     icon="fa-forward"       @click="pcall ('...Forwards')"></vc-icon-button>
    <vc-icon-button hotkey="N"     icon="fa-fast-forward"  @click="pcall ('...Next')"></vc-icon-button>
  </vc-button-bar>

</template>

<script>
module.exports = {
  name: 'vc-playcontrols',
  inject: [ 'vc-projectshell' ],
  computed: {
    project: function () { return this['vc-projectshell'].project; },
  },
  methods:  {
    pcall (method, e) {
      let project = this.project, m = project[method], message;
      if (m !== undefined) {
	let result = m.call (project);
	if (result == undefined)
	  result = 'ok';
	message = method + ': ' + result;
      }
      else
	message = method + ': unimplemented';
      Shell.status (message);
    },
  },
};
</script>
<commit_msg>EBEAST: vc/playcontrols.vue: use vc-icon<commit_after><!-- GNU LGPL v2.1+: http://www.gnu.org/licenses/lgpl.html -->

<docs>
  # VC-PLAYCONTROLS
  A container holding the play and seek controls for a Bse.song.
  ## Props:
  *project*
  : Injected *Bse.Project*, using `vc-projectshell.project`.
</docs>

<style lang="scss">
  @import 'styles.scss';
  .vc-playcontrols {
    .vc-button	{ padding: 5px; }
    .vc-icon	{ fill: $vc-button-foreground; }
  }
</style>

<template>

  <vc-button-bar
      class="vc-playcontrols" >
    <vc-button hotkey="L"     @click="pcall ('...Last')"      ><vc-icon fw lg fa="fast-backward" /></vc-button>
    <vc-button hotkey="B"     @click="pcall ('...Backwards')" ><vc-icon fw lg fa="backward"      /></vc-button>
    <vc-button hotkey="Space" @click="pcall ('stop')"         ><vc-icon fw lg fa="stop"          /></vc-button>
    <vc-button hotkey="P"     @click="pcall ('play')"         ><vc-icon fw lg fa="play"          /></vc-button>
    <vc-button hotkey="R"     @click="pcall ('...Record')"    ><vc-icon fw lg fa="circle"        /></vc-button>
    <vc-button hotkey="F"     @click="pcall ('...Forwards')"  ><vc-icon fw lg fa="forward"       /></vc-button>
    <vc-button hotkey="N"     @click="pcall ('...Next')"      ><vc-icon fw lg fa="fast-forward"  /></vc-button>
  </vc-button-bar>

</template>

<script>
module.exports = {
  name: 'vc-playcontrols',
  inject: [ 'vc-projectshell' ],
  computed: {
    project: function () { return this['vc-projectshell'].project; },
  },
  methods:  {
    pcall (method, e) {
      let project = this.project, m = project[method], message;
      if (m !== undefined) {
	let result = m.call (project);
	if (result == undefined)
	  result = 'ok';
	message = method + ': ' + result;
      }
      else
	message = method + ': unimplemented';
      Shell.status (message);
    },
  },
};
</script>

{'fraction_non_alphanumeric': 0.20769445218845833, 'fraction_numerical': 0.0013939224979091162, 'mean_word_length': 2.792811839323467, 'pattern_counts': {'":': 0, '<': 60, '<?xml version=': 0, '>': 60, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6407079', 'n_tokens_mistral': 1322, 'n_tokens_neox': 1297, 'n_words': 265}