• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ AddSubMenu函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中AddSubMenu函数的典型用法代码示例。如果您正苦于以下问题:C++ AddSubMenu函数的具体用法?C++ AddSubMenu怎么用?C++ AddSubMenu使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了AddSubMenu函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: switch

		eOSState starter::show_menu()
		{
			m_display = m_nextDisplay;
			m_nextDisplay = display::none;
			job& pending = manager::get_pending();

			switch (m_display)
			{
			case display::recordings:
				return AddSubMenu(new menu::recordings);

			case display::job:
                if(menu::recordings::startedFromRecordigs)
                {
                    return AddSubMenu(new menu::recordings);
                }
                else
                {
				    return AddSubMenu(new menu::job_editor);
                }

			case display::options:
				return AddSubMenu(new job_options_editor( pending ) );

			case display::status:
				return AddSubMenu(new menu::status);

			default:
				return osBack;
			}
		}
开发者ID:suborb,项目名称:reelvdr,代码行数:31,代码来源:menubase.c


示例2: Get

eOSState cMenuSetupTimers::ProcessKey(eKeys Key)
{
    eOSState state = cMenuSetupSubMenu::ProcessKey(Key);

    const char* ItemText = Get(Current())->Text();
    int iOnDefRecDir = 0;
    int iOnDefTimerCheck = 0;
    if (!HasSubMenu())
    {
	if (strstr(ItemText, tr("Default recording dir")) == ItemText)
	    iOnDefRecDir = 1;
	else if (strstr(ItemText, tr("Default timer check method")) == ItemText)
	    iOnDefTimerCheck = 1;
    }
    SetHelpKeys();

    if (state == osUnknown) {
	switch (Key) {
	  case kBlue:
	      if (!HasSubMenu())
	      {
		  if (iOnDefRecDir == 1)
		      state = AddSubMenu(new cMenuDirSelect(data->defrecdir));
		  if (iOnDefTimerCheck == 1)
		      state = AddSubMenu(new cMenuDefTimerCheckMethod());
	      }
	      break;
	    case kOk:
		return osBack;
	    default: break;
	}
    }

    return state;
}
开发者ID:suborb,项目名称:reelvdr,代码行数:35,代码来源:epgsearchsetup.c


示例3: switch

eOSState cMenuSetupSc::ProcessKey(eKeys Key)
{
  eOSState state = cOsdMenu::ProcessKey(Key);
  switch(state) {
    case osUser4:
      if(Feature.SmartCard()) {
        cScInfoItem *ii=dynamic_cast<cScInfoItem *>(Get(Current()));
        if(ii) return(AddSubMenu(new cMenuInfoCard(ii->Ident())));
        }
      state=osContinue;
      break;

    case osUser7:
      state=osContinue;
      if(Interface->Confirm(tr("Really flush ECM cache?"))) {
        state=osEnd;
        }
      break;

    case osUser8:
      return AddSubMenu(new cMenuInfoSc);

    case osUser6:
      return AddSubMenu(new cMenuLogSys);

    case osUser5:
      return AddSubMenu(new cMenuSysOpts);

    case osUser9:
      state=osContinue;
      if(!cGlobal::Active(true)) {
        if(Interface->Confirm(tr("Really reload files?"))) {
          Store();
          cSoftCAM::Load(cfgdir);
          state=osEnd;
          }
        }
      else 
        Skins.Message(mtError,tr("Active! Can't reload files now"));
      break;

    case osContinue:
      if(NORMALKEY(Key)==kUp || NORMALKEY(Key)==kDown) {
        cOsdItem *item=Get(Current());
        if(item) item->ProcessKey(kNone);
        }
      break;

    case osUnknown:
      if(Key==kOk) { Store(); state=osBack; }
      break;

    default:
      break;
    }
  return state;
}
开发者ID:mrfloppy82,项目名称:descrambler,代码行数:57,代码来源:sc.c


示例4: Get

eOSState cMenuFavouritesFunction::ProcessKey(eKeys Key)
{
    eOSState state = cOsdMenu::ProcessKey(Key);

    const char* text = Get(Current())?Get(Current())->Text():NULL;
    if (state == osUnknown) {
        switch(Key) {
        case kOk:
            state = osContinue;
            if (text) {
                printf("Got text : '%s'\n", text);

                if (strstr(text, tr("Delete channel"))) {
                    printf("Deleting channel\n");
                    if (Interface->Confirm(tr("Delete channel from favourites?"), 3)) {
                        if (DelFavChannel(channel)) {
                            Skins.Message(mtInfo, tr("Channel deleted"));
                            state = osRefreshPage;
                        } else
                            Skins.Message(mtError, tr("Deletion of channel failed"));
                    } else
                        Skins.Message(mtInfo, tr("Delete cancelled"));

                } else if (strstr(text, tr("Delete folder"))) {
                    if (Interface->Confirm(tr("Delete folder and all its channels?"), 3)) {
                        // delete all channels in folder including folder
                        if (DelFavFolder(channel)) {
                            Skins.Message(mtInfo, tr("Folder and its contents deleted"));
                            state = osRefreshPage;
                        } else
                            Skins.Message(mtError, tr("Deletion of folder failed"));
                    } else
                        Skins.Message(mtInfo, tr("Delete cancelled"));

                } else if (strstr(text, tr("Rename folder")))
                    return AddSubMenu(new cMenuRenameFavFolder(channel));
                else if (strstr(text, tr("Move folder")))
                    return AddSubMenu(new cMenuMoveFavFolder(channel));
                else if (strstr(text, tr("Move channel")))
                    return AddSubMenu(new cMenuMoveChannelInFavBouquet(channel));
                else if (strstr(text, tr("CI-slot assignment for folder")))
                    return AddSubMenu(new cOsdMenuCISlot(channel->Name(), true));
                else if (strstr(text, tr("CI-slot assignment for channel")))
                    return AddSubMenu(new cOsdMenuCISlot(channel->Name(), true, channel));
            }

            break;

        default:
            break;
        } // switch
    } //if

    return state;
}
开发者ID:suborb,项目名称:reelvdr,代码行数:55,代码来源:favourites.c


示例5: switch

eOSState cAlbumList::ProcessKey(eKeys Key) {
        eOSState state = cOsdMenu::ProcessKey(Key);
        if (state != osUnknown ) 
                return state;

        cPlayList *List;
        cPlayListItem *Item;
        switch (Key) {
                case kOk:
                        MENUDEB("Current %d GetItem %p\n",Current(),playList->GetItem(Current()));
                        Item=playList->GetItem(Current());
                        List=dynamic_cast<cPlayList*>(Item);
                        MENUDEB("Item %p\n",Item);

                        if (List) {
                                cAlbumList *Menu=new cAlbumList(List);
                                return AddSubMenu(Menu);
                        }  else {
                                // skip to current track
                                playList->SetCurrIdx(
                                                playList->GetIndexByItem(Item));
                                state = PLAY_CURR_FILE;
                        };
                        break;
                case kBack:
                        state= osBack;
                        break;
                case kBlue:
                        state= osEnd;
                        break;
                case kRed:
                        return AddSubMenu(new cPlOptionsMenu(playList));
                        break;
                case kYellow:
                        MENUDEB("Del current %d: %s\n",
                                        Current(),
                                        playList->GetItem(Current())->GetName() );
                        playList->RemoveItem(
                                        playList->GetItem(Current()));
                        MENUDEB("Remove finished\n");
                        Del(Current());
                        Display();
                        state=osContinue;
                        break;

                default:    
                        break;
        }

        return state;
}
开发者ID:BackupTheBerlios,项目名称:softdevice,代码行数:51,代码来源:PlayListMenu.c


示例6: Set

eOSState cMenuSetupSearchtimers::ProcessKey(eKeys Key)
{
    int iTemp_useSearchTimers = data->useSearchTimers;
    int iTemp_checkEPGHours = data->checkEPGHours;

    int iOnSearchTemplates = 0;
    int iOnBlacklists = 0;
    int iOnChannelGroups = 0;

    eOSState state = cMenuSetupSubMenu::ProcessKey(Key);

    if (iTemp_useSearchTimers != data->useSearchTimers ||
	iTemp_checkEPGHours != data->checkEPGHours)
    {
	Set();
	Display();
    }

    const char* ItemText = Get(Current())->Text();
    if (!HasSubMenu())
    {
	if (strstr(ItemText, tr("Search templates")) == ItemText)
	    iOnSearchTemplates = 1;
	else if (strstr(ItemText, tr("Blacklists")) == ItemText)
	    iOnBlacklists = 1;
	if (strstr(ItemText, tr("Channel groups")) == ItemText)
	    iOnChannelGroups = 1;
    }
    SetHelpKeys();

    if (state == osUnknown) {
	switch (Key) {
	    case kBlue:
		if (!HasSubMenu())
		{
		    if (iOnSearchTemplates == 1)
			state = AddSubMenu(new cMenuEPGSearchTemplate(NULL, NULL, false));
		    else if (iOnBlacklists == 1)
			state = AddSubMenu(new cMenuBlacklists);
		    else if (iOnChannelGroups == 1)
			state = AddSubMenu(new cMenuChannelGroups);
		}
		break;
	    case kOk:
		return osBack;
	    default: break;
	}
    }
    return state;
}
开发者ID:jowi24,项目名称:vdr-epgsearch,代码行数:50,代码来源:epgsearchsetup.c


示例7: GetTab

// --- cMenuSearchMain ---------------------------------------------------------
cMenuSearchMain::cMenuSearchMain(void)
:cOsdMenu("", GetTab(1), GetTab(2), GetTab(3), GetTab(4), GetTab(5))
{
#if VDRVERSNUM >= 10728
  SetMenuCategory(mcSchedule);
#endif
  helpKeys = -1;
  otherChannel = 0;
  toggleKeys = 0;
  shiftTime = 0;
  InWhatsOnMenu = false;
  InFavoritesMenu = false;
  cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
  schedules = cSchedules::Schedules(schedulesLock);
  if (channel) {
    cMenuWhatsOnSearch::SetCurrentChannel(channel->Number());
    if (EPGSearchConfig.StartMenu == 0 || forceMenu != 0)
      PrepareSchedule(channel);
    SetHelpKeys();
    cMenuWhatsOnSearch::currentShowMode = showNow;
    //    timeb tnow;
    //ftime(&tnow);
    //isyslog("duration epgs sched:  %d", tnow.millitm - gl_time.millitm + ((tnow.millitm - gl_time.millitm<0)?1000:0));

  }
  if ((EPGSearchConfig.StartMenu == 1 || forceMenu == 1) && forceMenu != 2)
    {
      InWhatsOnMenu = true;
      AddSubMenu(new cMenuWhatsOnSearch(schedules, cDevice::CurrentChannel()));
    }
  if (forceMenu == 3)
      ShowSummary();
}
开发者ID:jowi24,项目名称:vdr-epgsearch,代码行数:34,代码来源:menu_main.c


示例8: switch

eOSState cMenuAnnounceList::ProcessKey(eKeys Key)
{
    eOSState state = cMenuSearchResultsForList::ProcessKey(Key);
    if (state == osUnknown)
    {
        switch (Key) {
        case kBlue:
        {
            cMenuSearchResultsItem *item = (cMenuSearchResultsItem *)Get(Current());
            if (item)
            {
                if (!HasSubMenu())
                    return AddSubMenu(new cMenuAnnounceDetails(item->event, item->search));
                else if (!showsDetails)
                    return Switch();
                else
                    return osContinue;
            }
        }
        break;
        default:
            break;
        }
    }
    return state;
}
开发者ID:flensrocker,项目名称:vdr-plugin-epgsearch,代码行数:26,代码来源:menu_announcelist.c


示例9: debug1

eOSState cSatipPluginSetup::ShowInfo(void)
{
  debug1("%s", __PRETTY_FUNCTION__);
  if (HasSubMenu() || Count() == 0)
     return osContinue;

  return AddSubMenu(new cSatipMenuInfo());
}
开发者ID:rofafor,项目名称:vdr-plugin-satip,代码行数:8,代码来源:setup.c


示例10: GetCurrent

eOSState cMenuBrowseFiles::Info(void)
{
  if (GetCurrent() && !GetCurrent()->IsDir()) {
    cString filename = cString::sprintf("%s/%s", *m_CurrentDir, GetCurrent()->Name());
    return AddSubMenu(new cMetainfoMenu(filename));
  }
  return osContinue;
}
开发者ID:flensrocker,项目名称:vdr-plugin-xineliboutput,代码行数:8,代码来源:menu.c


示例11: AddSubMenu

BOOL CMyMenuBar::RestoreOriginalstate () {
  if (!CMFCMenuBar::RestoreOriginalState()) {
    return FALSE;
  }

  AddSubMenu ();
  return TRUE;
}
开发者ID:jhlee8804,项目名称:MFC-Feature-Pack,代码行数:8,代码来源:MyMenuBar.cpp


示例12: AddSubMenu

eOSState cMenuEpgTimers::Edit(void)
{
  if (HasSubMenu() || Count() == 0)
     return osContinue;

  cMenuSwitchTimerItem *item = dynamic_cast<cMenuSwitchTimerItem*> (Get(Current()));
  if (item && item->switchTimer)
      return AddSubMenu(new cMenuMyEditTimer(item->switchTimer, false));

  cTimer *timer = CurrentTimer();

  if (!timer) return osContinue; // nothing to edit here

  isyslog("editing timer %s", *timer->ToDescr());
  return AddSubMenu(new cMenuMyEditTimer(timer, false, NULL));

}
开发者ID:suborb,项目名称:reelvdr,代码行数:17,代码来源:menu_epgtimers.c


示例13: CurrentTimer

eOSState cMenuEpgTimers::Info(void)
{
  if (HasSubMenu() || Count() == 0)
     return osContinue;
  cTimer *ti = CurrentTimer();
  if (ti && ti->Event())
     return AddSubMenu(new cMenuEvent(ti->Event()));
  return osContinue;
}
开发者ID:suborb,项目名称:reelvdr,代码行数:9,代码来源:menu_epgtimers.c


示例14: ProcessInstallationStatus

eOSState cSkindesignerSkinSetup::ProcessKey(eKeys Key) {
    eOSState state = ProcessInstallationStatus();
    if (state == osEnd)
        return osEnd;
    state = cOsdMenu::ProcessKey(Key);
    if (state == osUnknown) {
        switch (Key) {
            case kOk: {
                cOsdItem *current = Get(Current());
                cSkinSetupSubMenu *subMenuItem = dynamic_cast<cSkinSetupSubMenu*>(current);
                if (subMenuItem) {
                    state = AddSubMenu(new cSkindesignerSkinSetup(skin, subMenuItem->GetName(), subMenuItem->GetDisplayText()));
                    break;
                } else {
                    return osBack;
                }
            }
            case kRed: {
                string versionNeeded = "";
                bool versionOk = config.CheckVersion(skin, versionNeeded);
                if (!versionOk) {
                    cString error = cString::sprintf("%s %s %s %s %s", 
                                                     tr("Skin Designer"),
                                                     tr("version"), 
                                                     versionNeeded.c_str(),
                                                     tr("or higher"),
                                                     tr("needed"));
                    Skins.Message(mtError, *error);
                    break;
                }
                bool gitAvailable = StartUpdate(skin);
                if (gitAvailable) {
                    Skins.Message(mtStatus, *cString::sprintf("%s ...", tr("Updating Skin from Git")));
                } else {
                    Skins.Message(mtStatus, tr("No Git Repsoitory available"));
                }
                break;
            }
            // KEY YELLOW
            case kYellow: {
                if (config.SkinActive(skin)) {
                    Skins.Message(mtError, tr("Skin is running and can't be deleted"));
                } else if (Interface->Confirm(*cString::sprintf("%s?", tr("Really delete skin")))) {
                    config.DeleteSkin(skin);
                    Skins.Message(mtStatus, tr("Skin deleted"));
                    cCondWait::SleepMs(1000);
                    return osEnd;
                }
                state = osContinue;
                break;
            }
            default:
                break;
        }
    }
    return state;
}
开发者ID:flensrocker,项目名称:vdr-plugin-skindesigner,代码行数:57,代码来源:setup.c


示例15: CurrentSwitchTimer

eOSState cMenuSwitchTimers::Summary(void)
{
    if (HasSubMenu() || Count() == 0)
	return osContinue;
    cSwitchTimer *curSwitchTimer = CurrentSwitchTimer();
    if (curSwitchTimer && !isempty(curSwitchTimer->event->Description()))
	return AddSubMenu(new cMenuText(tr("Summary"), curSwitchTimer->event->Description()));
    return osContinue;
}
开发者ID:suborb,项目名称:reelvdr,代码行数:9,代码来源:menu_switchtimers.c


示例16: AddPopupMenu

 HMENU AddPopupMenu(const RF_Draw::TrayIcon& Settings)
 {
     HMENU result = 0;
     if(Settings.Menu.Items.Count() > 0)
     {
         result = AddSubMenu(Settings.Menu);
     }
     return result;
 }
开发者ID:wangscript,项目名称:RadonFramework,代码行数:9,代码来源:SystemTrayServiceWindows.cpp


示例17: GetBouquet

eOSState cMenuBouquetsList::NewBouquet()
{
    cChannel *channel;
    if (HasSubMenu())
        return osContinue;
    channel = GetBouquet(Current());
    newChannel_ = channel;
    return AddSubMenu(new cMenuEditBouquet(channel, true, newChannel_));
}
开发者ID:suborb,项目名称:reelvdr,代码行数:9,代码来源:MenuBouquetsList.c


示例18: CreatePopupMenu

HMENU SWS_TrackListWnd::OnContextMenu(int x, int y, bool* wantDefaultItems)
{
	HMENU contextMenu = CreatePopupMenu();

	AddToMenu(contextMenu, __LOCALIZE("Snapshot current track visibility","tracklistmenu"), SWSGetCommandID(NewVisSnapshot));
	Snapshot* s;
	int i = 0;
	while((s = GetSnapshotPtr(i++)) != NULL)
	{
		if (s->m_iMask == VIS_MASK)
		{
			char cMenu[50];
			int iCmd = SWSGetCommandID(GetSnapshot, s->m_iSlot);
			if (!iCmd)
				iCmd = LOADSNAP_MSG + s->m_iSlot;
			_snprintf(cMenu, 50, __LOCALIZE_VERFMT("Recall snapshot %s","tracklistmenu"), s->m_cName);
			AddToMenu(contextMenu, cMenu, iCmd);
		}
	}

	AddToMenu(contextMenu, __LOCALIZE("Show all tracks","tracklistmenu"), SWSGetCommandID(ShowAll));
	AddToMenu(contextMenu, __LOCALIZE("Show SWS Snapshots","tracklistmenu"), SWSGetCommandID(OpenSnapshotsDialog));

	SWS_ListItem* item = m_pLists.Get(0)->GetHitItem(x, y, NULL);
	if (item)
	{
		m_trLastTouched = (MediaTrack*)item;
		AddToMenu(contextMenu, SWS_SEPARATOR, 0);
		AddToMenu(contextMenu, __LOCALIZE("Rename","tracklistmenu"), RENAME_MSG);
		AddToMenu(contextMenu, SWS_SEPARATOR, 0);
		AddToMenu(contextMenu, __LOCALIZE("Show only in MCP","tracklistmenu"), SWSGetCommandID(ShowInMCPOnly));
		AddToMenu(contextMenu, __LOCALIZE("Show only in TCP","tracklistmenu"), SWSGetCommandID(ShowInTCPOnly));
		AddToMenu(contextMenu, __LOCALIZE("Show in both MCP and TCP","tracklistmenu"), SWSGetCommandID(ShowInMCPandTCP));
		AddToMenu(contextMenu, __LOCALIZE("Hide in both MCP and TCP","tracklistmenu"), SWSGetCommandID(HideTracks));
		AddToMenu(contextMenu, SWS_SEPARATOR, 0);
		AddToMenu(contextMenu, __LOCALIZE("Invert selection","tracklistmenu"), SWSGetCommandID(TogTrackSel));
		AddToMenu(contextMenu, __LOCALIZE("Hide unselected","tracklistmenu"), SWSGetCommandID(HideUnSel));

		HMENU fxSubMenu;
		if(AddFXSubMenu(&fxSubMenu, m_trLastTouched))
		{
			AddToMenu(contextMenu, SWS_SEPARATOR, 0);
			AddSubMenu(contextMenu, fxSubMenu, __LOCALIZE("FX","tracklistmenu"));
		}

		// Check current state
		switch(GetTrackVis(m_trLastTouched))
		{
			case 0: CheckMenuItem(contextMenu, SWSGetCommandID(HideTracks),      MF_BYCOMMAND | MF_CHECKED); break;
			case 1: CheckMenuItem(contextMenu, SWSGetCommandID(ShowInMCPOnly),   MF_BYCOMMAND | MF_CHECKED); break;
			case 2: CheckMenuItem(contextMenu, SWSGetCommandID(ShowInTCPOnly),   MF_BYCOMMAND | MF_CHECKED); break;
			case 3: CheckMenuItem(contextMenu, SWSGetCommandID(ShowInMCPandTCP), MF_BYCOMMAND | MF_CHECKED); break;
		}
	}

	return contextMenu;
}
开发者ID:AusRedNeck,项目名称:sws,代码行数:57,代码来源:Tracklist.cpp


示例19: switch

eOSState cPlugOsdMenu::ProcessKey(eKeys key)
{
  eOSState state = cOsdMenu::ProcessKey(key);
  if (state == osUnknown) {
     switch (key) {
       case kOk: {
         int element = Current();
         if (element % 2)
            state = AddSubMenu(new cPlugDetailOsdMenu(element));
         else
            state = AddSubMenu(new cPlugOsdMenu(level + 1, element + 1, true));
         break;
         }
       default:
         break;
       }
     }
  return state;
}
开发者ID:flensrocker,项目名称:libvdrskinservice,代码行数:19,代码来源:osdmenu.c


示例20: AddSubMenu

eOSState cMenuSearchMain::ShowSummary()
{
   if (Count())
   {
      cMenuMyScheduleItem *mi = (cMenuMyScheduleItem *)Get(Current());
      if (mi && mi->event)
         return AddSubMenu(new cMenuEventSearch(mi->event, eventObjects, SurfModeTime));
   }
   return osContinue;
}
开发者ID:jowi24,项目名称:vdr-epgsearch,代码行数:10,代码来源:menu_main.c



注:本文中的AddSubMenu函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ AddSymbol函数代码示例发布时间:2022-05-30
下一篇:
C++ AddString函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap