alias shell {
  return icons/8.ico
}

alias xpopdll {
  if ($isid) return $dll(dll\xpopup.dll,$1,$2-)
  else dll " $+ dll\xpopup.dll" $1 $2-
}

alias uxpop dll -u xpopup.dll

alias xpop {

  if ( $isid ) {
    return $xpopdll( _xpop, $1 $prop $2- )
  }
  else {
    xpopdll xpop $2 $1 $3-
  }
}

alias xpopup {

  if ( $isid ) {
    return $xpopdll( _xpopup, $1 $prop $2- )
  }
  else {
    xpopdll xpopup $2 $1 $3-
  }
}

alias mpopup {
  xpopdll mpopup $1 $2
}

ON *:SIGNAL:Xpopup-*: { 
  echo -s $signal : $1-
}

alias xtest { 

  if ( $xpopup(mymenu).ismenu == $false ) {

    xpopup -c mymenu normal
    xpopup -x mymenu +dp

    xpopup -b mymenu $scriptdiricons/menu.bmp

    xpopup -i mymenu 0 $shell

    xpop -a mymenu 0 $chr(9) + 1 1 Menu Item 2 $chr(9) blah
    xpop -a mymenu 0 $chr(9) + 0 0 -
    xpop -a mymenu 0 $chr(9) +s 2 1 Menu Item 2

    xpop -a mymenu 3 0 $chr(9) + 10 1 $eval($me,0)
    xpop -a mymenu 3 0 $chr(9) + 0 0 -
    xpop -a mymenu 3 0 $chr(9) +c 11 0 Menu Item 2 2

    xpop -a mymenu 0 $chr(9) +c 3 0 Menu Item 3
    xpop -a mymenu 0 $chr(9) +cg 4 0 Menu Item 4
    xpop -a mymenu 0 $chr(9) +g 5 1 Menu Item 5
    xpop -a mymenu 0 $chr(9) +c 6 1 Menu Item 6
    xpop -a mymenu 0 $chr(9) +cg 7 1 Menu Item 7
  }

  xpopup -s mymenu +mcv 500 500
}




alias mtest {
  xpopup -i mirc 0 $shell
  mpopup mirc 1
  xpopup -t mirc normal
  xpopup -b mirc icons/menu.bmp
  xpopup -s mirc normal
  xpopup -m mirc icon/menu.bmp
}

alias mtest2 {
  xpopup -i mircbar 0 $shell
  mpopup mircbar 1
  xpopup -t mircbar normal
  xpopup -b mircbar icons/menu.bmp
  xpopup -s mirc normal
  xpopup -m mirc icons/menu.bmp
}
on *:start:{
  .mtest
  .mtest2  
}
