本文整理汇总了C++中SetHelp函数的典型用法代码示例。如果您正苦于以下问题:C++ SetHelp函数的具体用法?C++ SetHelp怎么用?C++ SetHelp使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SetHelp函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetHelp
void cSkindesignerSkinSetup::Set(void) {
cSkinSetupMenu *setupMenu = config.GetSkinSetupMenu(skin, menu);
if (!setupMenu) {
return;
}
cSkinRepo *repo = config.GetSkinRepo(skin);
if (repo) {
if (repo->Type() == rtGit)
SetHelp(tr("Update"), NULL, tr("Delete Skin"), NULL);
else
SetHelp(NULL, NULL, tr("Delete Skin"), NULL);
}
setupMenu->InitParameterIterator();
cSkinSetupParameter *param = NULL;
while (param = setupMenu->GetNextParameter(false)) {
if (param->type == sptInt) {
Add(new cMenuEditIntItem(param->displayText.c_str(), ¶m->value, param->min, param->max));
} else if (param->type == sptBool) {
Add(new cMenuEditBoolItem(param->displayText.c_str(), ¶m->value));
}
}
setupMenu->InitSubmenuIterator();
cSkinSetupMenu *subMenu = NULL;
while (subMenu = setupMenu->GetNextSubMenu(false)) {
Add(new cSkinSetupSubMenu(subMenu->GetName(), subMenu->GetDisplayText()));
}
}
示例2: SetHelp
void cMenuSearchResultsForBlacklist::SetHelpKeys(bool Force)
{
cMenuSearchResultsItem *item = (cMenuSearchResultsItem *)Get(Current());
int NewHelpKeys = 0;
if (item) {
if (item->Selectable() && item->timerMatch == tmFull)
NewHelpKeys = 2;
else
NewHelpKeys = 1;
}
bool hasTimer = (NewHelpKeys == 2);
if (NewHelpKeys != helpKeys || Force)
{
ModeBlueSR nextModeBlue = (ModeBlueSR)(((int)modeBlue+1)%3);
if (nextModeBlue == showTimerPreview)
nextModeBlue = (ModeBlueSR)(((int)nextModeBlue+1)%3);
if (toggleKeys==0)
SetHelp((EPGSearchConfig.redkeymode==0?(hasTimer?trVDR("Button$Timer"):trVDR("Button$Record")):tr("Button$Commands")), m_bSort? tr("Button$by channel"):tr("Button$by time"), modeYellow==showTitleEpisode?tr("Button$Episode"):tr("Button$Title"), NULL);
else
SetHelp((EPGSearchConfig.redkeymode==1?(hasTimer?trVDR("Button$Timer"):trVDR("Button$Record")):tr("Button$Commands")), m_bSort? tr("Button$by channel"):tr("Button$by time"), modeYellow==showTitleEpisode?tr("Button$Episode"):tr("Button$Title"), NULL);
helpKeys = NewHelpKeys;
}
}
示例3: SetHelp
void cMenuSearchMain::SetHelpKeys(bool Force)
{
cMenuMyScheduleItem *item = (cMenuMyScheduleItem *)Get(Current());
int NewHelpKeys = 0;
if (item) {
if (item->Selectable() && item->timerMatch == tmFull)
NewHelpKeys = 2;
else
NewHelpKeys = 1;
}
bool hasTimer = (NewHelpKeys == 2);
if (NewHelpKeys != helpKeys || Force)
{
if (toggleKeys==0)
SetHelp((EPGSearchConfig.redkeymode==0?(hasTimer?trVDR("Button$Timer"):trVDR("Button$Record")):tr("Button$Commands")), trVDR("Button$Now"), trVDR("Button$Next"), EPGSearchConfig.bluekeymode==0?trVDR("Button$Switch"):tr("Button$Search"));
else
{
const char* szGreenToggled = CHANNELNAME(Channels.GetByNumber(currentChannel-1,-1));
const char* szYellowToggled = CHANNELNAME(Channels.GetByNumber(currentChannel+1,1));
SetHelp((EPGSearchConfig.redkeymode==1?(hasTimer?trVDR("Button$Timer"):trVDR("Button$Record")):tr("Button$Commands")), (EPGSearchConfig.toggleGreenYellow==0?trVDR("Button$Now"):szGreenToggled), (EPGSearchConfig.toggleGreenYellow==0?trVDR("Button$Next"):szYellowToggled), EPGSearchConfig.bluekeymode==1?trVDR("Button$Switch"):tr("Button$Search"));
}
helpKeys = NewHelpKeys;
}
}
示例4: CurrentTimer
void cMenuEpgTimers::SetHelpKeys(void)
{
int NewHelpKeys = 0;
cTimer *timer = CurrentTimer();
bool isCurrItemSwitchTimer = false;
if (timer) {
if (timer->Event())
NewHelpKeys = 2;
else
NewHelpKeys = 1;
} else {
cMenuSwitchTimerItem *item = dynamic_cast<cMenuSwitchTimerItem*>(Get(Current()));
if (item) {
NewHelpKeys = 1;
isCurrItemSwitchTimer = true;
}
}
if (NewHelpKeys != helpKeys) {
helpKeys = NewHelpKeys;
bool on = (timer && timer->HasFlags(tfActive)
|| isCurrItemSwitchTimer) ? true : false;
static eKeys ikeys[] = { kInfo, kNone };
/// Löschen | Neu | Ein/Aus | (frei) | Info
if(on)
{
SetHelp(
helpKeys > 0 ? tr("Button$Delete") : NULL,
tr("Button$New"),
(!isCurrItemSwitchTimer && helpKeys > 0) ? tr("Button$Off") : NULL,
NULL //helpKeys == 2 ? tr("Button$Info") : NULL,
#if REELVDR && APIVERSNUM >= 10718
, helpKeys == 2 ? ikeys : NULL
#endif
);
}
else
{
SetHelp(
helpKeys > 0 ? tr("Button$Delete") : NULL,
tr("Button$New"),
helpKeys > 0 ? tr("Button$On") : NULL,
NULL //helpKeys == 2 ? tr("Button$Info") : NULL,
#if REELVDR && APIVERSNUM >= 10718
, helpKeys == 2 ? ikeys : NULL
#endif
);
}
}
}
示例5: Get
void cMenuSetupSearchtimers::SetHelpKeys()
{
const char* ItemText = Get(Current())->Text();
if (!HasSubMenu())
{
if (strstr(ItemText, tr("Channel groups")) == ItemText)
SetHelp(NULL, NULL, tr("Button$Help"), tr("Button$Setup"));
else if (strstr(ItemText, tr("Search templates")) == ItemText)
SetHelp(NULL, NULL, tr("Button$Help"), tr("Button$Setup"));
else if (strstr(ItemText, tr("Blacklists")) == ItemText)
SetHelp(NULL, NULL, tr("Button$Help"), tr("Button$Setup"));
else
SetHelp(NULL, NULL, tr("Button$Help"), NULL);
}
}
示例6: MYDEBUG
void cCMDMove::Build(char *dir)
{
MYDEBUG("Verzeichnis: Move: Erstelle Verzeichnisliste: %s", dir);
if(!dir)
dir = CurrentDir();
Clear();
cDirHandling *DirHand = new cDirHandling(this, this);
SetCurrent(Get(DirHand->Build(dir, true)));
delete(DirHand);
if(Count())
{
cMainMenuItem *item = (cMainMenuItem*)First();
while(item)
{
if(!strcasecmp(item->FileName(), File))
{
Del(item->Index());
break;
}
item = (cMainMenuItem*)Next(item);
}
}
Display();
SetHelp();
}
示例7: Current
void cMenuDirSelect::Load()
{
int current = Current();
char* oldSelection = NULL; // save old selection for reselection
if (current>-1)
oldSelection = strdup(Get(current)->Text());
Clear();
CreateDirSet();
std::set<string>::iterator it;
for (it = directorySet.begin(); it != directorySet.end(); ++it)
AddDistinct((*it).c_str());
Sort();
for(int i=0; i<Count(); i++)
{
const char* text = Get(i)->Text();
if (oldSelection && strchr(text, '%') == NULL && strstr(text, oldSelection) == text) // skip entries with variables
{
SetCurrent(Get(i));
break;
}
}
if (oldSelection) free(oldSelection);
if (yellow)
{
free(yellow);
yellow = NULL;
}
msprintf(&yellow, "%s %d", tr("Button$Level"), (CurLevel==MaxLevel?1:CurLevel+1));
SetHelp(NULL, NULL, MaxLevel==1?NULL:yellow, tr("Button$Select"));
Display();
}
示例8: create
static void create() {
verb::create();
SetVerb("reload");
SetRules("OBJ", "STR OBJ", "STR here", "here", "every STR");
SetErrorMessage("reload what?");
SetHelp("Syntax: reload [every] <OBJ>\n\n"
"This command loads into memory the file of the object "
"you specify, and replaces the current copy with a new "
"copy. If you change something about a sword you are "
"holding, for example, \"reload sword\" will update the "
"changes and you will be holding a sword with the updates.\n"
" When used with the -r flag it recursively loads all the objects "
"inherited by the target object. If any of those objects "
"or the target object's file fail to load, the object "
"is not updated.\n"
" If you \"reload every npc\", then any loaded object that "
"inherits LIB_NPC gets reloaded. Other valid lib objects "
"that can be used this way are: room, sentient, armor, item.\n"
"Please note that if there are too many items to reload, "
"the command will fail with \"Too long evaluation\" errors.\n"
" Books, due to their processing-intensive load time, "
"are excluded from the \"every\" keyword.\n"
"Please note that reloading a door also reloads the "
"door's adjoining rooms.\n"
"\nSee also: copy, create, delete, modify, initfix, add");
}
示例9: GetCurrent
void cMenuBrowseFiles::SetHelpButtons(void)
{
bool isDir = !GetCurrent() || GetCurrent()->IsDir();
bool isFile = !isDir;
bool bDel = isFile && xc.media_enable_delete;
if (isDir && !strcmp("..", GetCurrent()->Name())) {
help[0] = help[1] = help[2] = help[3] = NULL;
} else if (m_Mode == ShowMusic) {
help[0] = isDir ? trVDR("Button$Play") : NULL;
help[1] = tr ("Button$Queue");
help[2] = bDel ? trVDR("Button$Delete") : NULL;
help[3] = isFile ? trVDR("Button$Info") : NULL;
} else if (m_Mode == ShowImages) {
help[0] = isDir ? trVDR("Button$Play") : NULL;
help[1] = NULL;
help[2] = bDel ? trVDR("Button$Delete") : NULL;
help[3] = isFile ? trVDR("Button$Info") : NULL;
} else {
bool isDvd = GetCurrent() && (GetCurrent()->IsDvd() || GetCurrent()->IsBluRay());
bool hasResume = GetCurrent() && GetCurrent()->HasResume();
help[0] = isDir && isDvd ? trVDR("Button$Open") : NULL;
help[1] = hasResume ? trVDR("Button$Rewind") : NULL;
help[2] = bDel ? trVDR("Button$Delete") : NULL;
help[3] = isFile ? trVDR("Button$Info") : NULL;
}
SetHelp(help[0], help[1], help[2], help[3]);
}
示例10: RootDown12_set
void RootDown12_set(void* ctx, int v)
{
int val = PitchHandler_getNoteDiff(phctx);
if(val-12 >=1 )val-=12;
NoteDiff_set(NULL,val*1.0/126);
SetHelp("Center Down Octave");
}
示例11: RootUp_set
void RootUp_set(void* ctx, int v)
{
int val = PitchHandler_getNoteDiff(phctx);
if(val <=126 )val++;
NoteDiff_set(NULL,val*1.0/126);
SetHelp("Center Up Semitone");
}
示例12: RootDown_set
void RootDown_set(void* ctx, int v)
{
int val = PitchHandler_getNoteDiff(phctx);
if(val >=1 )val--;
NoteDiff_set(NULL,val*1.0/126);
SetHelp("Center Down Semitone");
}
示例13: Scale_set
void Scale_set(void* ctx,int val)
{
SetHelp("Scale Shape - Advanced");
scaleControl->rect->isActive = val;
scaleToggleButton->rect->isActive = val;
scaleCommitButton->rect->isActive = val;
}
示例14: Intonation_set
void Intonation_set(void* ctx, float val)
{
SetHelp("Scale Shape set");
int ival = (int)(7.99*val);
ScaleControl_setCurrentScale(ival);
intonationSlider->val = val;
}
示例15: Page_jump_set
void Page_jump_set(void* ctx,int val,int jump)
{
SetHelp("http://rfieldin.appspot.com");
//The two buttons are always in sync
currentPage = (currentPage + PAGEMAX + jump) % PAGEMAX;
Page_set(ctx, currentPage);
}