add menu support on non-desktop platform.
Merge pull request #37 from zrong/refactoring

add menu support on non-desktop platform.