当前位置: 首页>>代码示例>>C++>>正文


C++ AddSubMenu函数代码示例

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


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


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