Public feed #890241

Anonymous

public text v1 · immutable
Raw Edit
·published 2008-02-03 16:08 UTC
rendered paste body
alias Media {
  dialog -ma Media Media_table
}

dialog Media_table {
  title "DCX Video Player"
  size -1 -1 817 659
}

on *:dialog:Media:*:*: {
  if ($devent == init) {
    dcx Mark $dname Media_cb
    xdialog -b $dname +mntyz


    ;// Call initilisation alias
    Media_init_dcx
  }
}

alias -l Media_init_dcx {
  ;// Initialising control: Stop (Button 4)
  xdialog -c $dname 4 button 409 550 200 100 tabstop
  xdid -t $dname 4 Stop

  ;// Initialising control: Open (Button 3)
  xdialog -c $dname 3 button 607 550 200 100 tabstop
  xdid -t $dname 3 Open

  ;// Initialising control: Play (Button 1)
  xdialog -c $dname 1 button 12 550 200 100 tabstop
  xdid -t $dname 1 Play

  ;// Initialising control: (directshow 6)
  xdialog -c $dname 6 directshow 54 28 700 450 tabstop

  ;// Initialising control: Pause (Button 2)
  xdialog -c $dname 2 button 211 551 200 100 tabstop
  xdid -t $dname 2 Pause

  ;// Initialising control: %d %% (Progressbar 5)
  xdialog -c $dname 5 pbar 147 480 500 20 smooth
  xdid -r $dname 5 0 100
  xdid -v $dname 5 0
  xdid -i $dname 5 % $+ d % $+ %
  xdialog -c $dname 7 edit 100 503 600 20 autohs autovs tabstop
  xdid -a $dname 7
}

;// Callback alias for Media
alias Media_cb {
  if ($2 != mouse) {
    echo $color(info) -s */ Media_cb: $1-
    if ($2 == sclick) && ($3 == 3) set %play $(,$msfile(*)) $msfile(1)
    if ((($2 == sclick) && ($3 == 1)) && (%play)) xdid -a $1 6 +p %play
  }
}

;// quick-access menu item
menu status,channel {
  Media : Media
}

on *:dialog:Media:*:*: {
  if ($devent == sclick) {
    $xdid $dname 3 //noop $msfile(*)
  }
}