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

C++ AddLabel函数代码示例

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

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



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

示例1: AddLabel

void CLoadState::LoadShaders()
{
	Indent = 60;
	bool Failed = false;
	
	if (! (Context->Shaders.Glyph = SceneManager->GetShaderLibrary()->Load("Glyph")))
		AddLabel(L"Failed to load Glyph Shader - Glyphs will not draw.", Gwen::Color(255, 32, 32, 192)), Failed = true;
	if (! (Context->Shaders.DiffuseTexture = SceneManager->GetShaderLibrary()->Load("DiffuseTexture")))
		AddLabel(L"Failed to load Diffuse/Texture Shader - Backdrop will not draw.", Gwen::Color(255, 64, 64, 192)), Failed = true;
	if (! (Context->Shaders.Volume = SceneManager->GetShaderLibrary()->Load("Volume")))
		AddLabel(L"Failed to load Volume Shader - Volume will not draw.", Gwen::Color(255, 64, 64, 192)), Failed = true;
	if (! (Context->Shaders.Terrain = SceneManager->GetShaderLibrary()->Load("Terrain")))
		AddLabel(L"Failed to load Terrain Shader - Terrain will not draw.", Gwen::Color(255, 64, 64, 192)), Failed = true;
	if (! (Context->Shaders.Water = SceneManager->GetShaderLibrary()->Load("Water")))
		AddLabel(L"Failed to load Water Shader - Water will not draw.", Gwen::Color(255, 64, 64, 192)), Failed = true;
	if (! (Context->Shaders.Merge = SceneManager->GetShaderLibrary()->Load("Merge")))
		AddLabel(L"Failed to load Merge Shader - Water surface will not draw.", Gwen::Color(255, 64, 64, 192)), Failed = true;
	if (! (Context->Shaders.Refract = SceneManager->GetShaderLibrary()->Load("Refract")))
		AddLabel(L"Failed to load Refract Shader - Water surface  will not draw.", Gwen::Color(255, 64, 64, 192)), Failed = true;
	if (! (Context->Shaders.White = SceneManager->GetShaderLibrary()->Load("White")))
		AddLabel(L"Failed to load White Shader - Water surface  will not draw.", Gwen::Color(255, 64, 64, 192)), Failed = true;
	if (! (Context->Shaders.FXAA = SceneManager->GetShaderLibrary()->Load("FXAA", "QuadCopy", "FXAA")))
		AddLabel(L"Failed to load FXAA Shader - Anti-aliasing will be disabled.", Gwen::Color(255, 64, 64, 192)), Failed = true;

	if (! Failed)
		AddLabel(L"All shaders compiled successfully.", Gwen::Color(64, 255, 64, 192));
	else
		GetConfirmation = true;

	Indent = 0;
}
开发者ID:iondune,项目名称:Aqueous,代码行数:31,代码来源:CLoadState.cpp


示例2: AddLabel

bool CGUIFadeLabelControl::OnMessage(CGUIMessage& message)
{
  if ( message.GetControlId() == GetID() )
  {
    if (message.GetMessage() == GUI_MSG_LABEL_ADD)
    {
      AddLabel(message.GetLabel());
      return true;
    }
    if (message.GetMessage() == GUI_MSG_LABEL_RESET)
    {
      m_lastLabel = -1;
      m_infoLabels.clear();
      m_scrollInfo.Reset();
      return true;
    }
    if (message.GetMessage() == GUI_MSG_LABEL_SET)
    {
      m_lastLabel = -1;
      m_infoLabels.clear();
      m_scrollInfo.Reset();
      AddLabel(message.GetLabel());
      return true;
    }
  }
  return CGUIControl::OnMessage(message);
}
开发者ID:0xheart0,项目名称:xbmc,代码行数:27,代码来源:GUIFadeLabelControl.cpp


示例3: RemoveAllTasks

void CIBATaskPane::ShowUserInfo(CString strContent)
{
	if (m_nUserInfoTask == -1)
	{
		RemoveAllTasks(m_nUserInfoGroup);

		m_nUserInfoTask = AddLabel(m_nUserInfoGroup, strContent);

		AddSeparator(m_nUserInfoGroup);

		m_nUserInfoButton = AddTask(m_nUserInfoGroup, _T("上机记录>>"), -1, IDM_AGENT);

		AddSeparator(m_nUserInfoGroup);

		m_nUserInfoList = AddLabel(m_nUserInfoGroup, _T(""));
	}
	else
	{
		SetTaskName(m_nUserInfoGroup, m_nUserInfoTask, strContent);		
		SetTaskName(m_nUserInfoGroup, m_nUserInfoList, _T(""));
		
		SetTaskName(m_nUserInfoGroup, m_nUserInfoButton, _T("上机记录>>"));
		m_bShowUseList = FALSE;
	}

	RecalcLayout();
}
开发者ID:layerfsd,项目名称:PersonalIBA,代码行数:27,代码来源:TaskPane.cpp


示例4: AddLabelRange

static void AddLabelRange (unsigned Addr, attr_t Attr,
                           const char* Name, unsigned Count)
/* Add a label for a range. The first entry gets the label "Name" while the
 * others get "Name+offs".
 */
{
    /* Define the label */
    AddLabel (Addr, Attr, Name);

    /* Define dependent labels if necessary */
    if (Count > 1) {
        unsigned Offs;

        /* Setup the format string */
        const char* Format = UseHexOffs? "$%02X" : "%u";

        /* Allocate memory for the dependent label names */
        unsigned NameLen = strlen (Name);
        char*    DepName = xmalloc (NameLen + 7);       /* "+$ABCD" */
        char*    DepOffs = DepName + NameLen + 1;

        /* Copy the original name into the buffer */
        memcpy (DepName, Name, NameLen);
        DepName[NameLen] = '+';

        /* Define the labels */
        for (Offs = 1; Offs < Count; ++Offs) {
            sprintf (DepOffs, Format, Offs);
            AddLabel (Addr + Offs, Attr | atDepLabel, DepName);
        }

        /* Free the name buffer */
        xfree (DepName);
    }
}
开发者ID:AntiheroSoftware,项目名称:cc65,代码行数:35,代码来源:labels.c


示例5: AutoAreaN

void CEventSelect::Enter() {
	Winsys.ShowCursor(!param.ice_cursor);

	int framewidth = 500 * Winsys.scale;
	int frameheight = 50 * Winsys.scale;
	TArea area = AutoAreaN(30, 80, framewidth);
	int frametop1 = AutoYPosN(35);
	int frametop2 = AutoYPosN(50);

	ResetGUI();
	event = AddUpDown(area.right+8, frametop1, 0, (int)Events.EventList.size() - 1, 0);
	cup = AddUpDown(area.right + 8, frametop2, 0, (int)Events.EventList[0].cups.size() - 1, 0);

	unsigned int siz = FT.AutoSizeN(5);

	float len = FT.GetTextWidth(Trans.Text(9));
	textbuttons[0] = AddTextButton(Trans.Text(9), area.right-len-50, AutoYPosN(70), siz);
	textbuttons[1] = AddTextButton(Trans.Text(8), area.left+50, AutoYPosN(70), siz);
	SetFocus(textbuttons[0]);

	FT.AutoSizeN(3);
	selectEvent = AddLabel(Trans.Text(6), area.left, AutoYPosN(30), colWhite);
	selectCup = AddLabel(Trans.Text(7), area.left, AutoYPosN(45), colWhite);
	cupLocked = AddLabel(Trans.Text(10), CENTER, AutoYPosN(58), colLGrey);

	FT.AutoSizeN(4);
	selectedEvent = AddFramedText(area.left, frametop1, framewidth, frameheight, 3, colMBackgr, "", FT.GetSize(), true);
	selectedCup = AddFramedText(area.left, frametop2, framewidth, frameheight, 3, colMBackgr, "", FT.GetSize(), true);

	Events.MakeUnlockList(g_game.player->funlocked);
	Music.Play(param.menu_music, true);
}
开发者ID:jfrey-xx,项目名称:extremetuxracer,代码行数:32,代码来源:event_select.cpp


示例6: NextWord

bool Assembler::ParseLine(string& line, int linecount, Assembly& assembly, LabelVector& labels)
{
  string op;
  int i = NextWord(line, op);
  
  // skip commented and empty lines
  if(i == -1 || op == "//" || op == ";") return true;

  // this is a a very slow way of doing things, but then this code will only
  // be used during development and for debugging
  OpDesc *opcode;
  int codecount = sizeof(opcodes)/sizeof(OpDesc); 
  int j = 0;
  for(; j < codecount; j ++) {
    if(stricmp(opcodes[j].name, op.c_str()) == 0) {
      opcode = &opcodes[j];      
      break;
    }
  }

  // is this a label?
  if(j == codecount) {
    size_t k = op.length() - 1;
    if(op.find_first_of(":") == k) {
      string name = op.substr(0, k);
      labels.at(AddLabel(name, labels)).pos = assembly.curpos;
      return true;
    } else
      return false; 

  } else {

    assembly.WriteDword(opcode->code);

    string param;
    i = NextWord(line, param, i);

    if(IsJumpOp(opcode->code)) {
      // write the label index, we'll later replace this with the code position
      assembly.WriteDword(AddLabel(param, labels)); 
    } else {  
      if(i == -1) {
        assembly.WriteDword(0);
        if(opcode->paramcount > 0) return false; // if we need more params, bail
      } else
        assembly.WriteDword(StringToOperand(param, opcode));
    }
  }

  return true;
}
开发者ID:olegp,项目名称:tyro,代码行数:51,代码来源:Assembler.cpp


示例7: create_URL

GtkWidget * create_URL( void )
{
    GtkWidget * vbox1;
    GtkWidget * hbox1;
    GtkWidget * hbuttonbox1;
    GtkWidget * Ok;
    GtkWidget * Cancel;
    GtkAccelGroup * accel_group;

    accel_group=gtk_accel_group_new();

    URL=gtk_window_new( GTK_WINDOW_TOPLEVEL );
    gtk_widget_set_name( URL,"URL" );
    gtk_object_set_data( GTK_OBJECT( URL ),"URL",URL );
    gtk_widget_set_usize( URL,384,70 );
    GTK_WIDGET_SET_FLAGS( URL,GTK_CAN_DEFAULT );
    gtk_window_set_title( GTK_WINDOW( URL ),MSGTR_Network );
    gtk_window_set_position( GTK_WINDOW( URL ),GTK_WIN_POS_CENTER );
    gtk_window_set_policy( GTK_WINDOW( URL ),TRUE,TRUE,FALSE );
    gtk_window_set_wmclass( GTK_WINDOW( URL ),"Network","MPlayer" );

    gtk_widget_realize( URL );
    gtkAddIcon( URL );

    vbox1=AddVBox( AddDialogFrame( URL ),0 );
    hbox1=AddHBox( vbox1,1 );
    AddLabel( "URL: ",hbox1 );

    URLCombo=AddComboBox( hbox1 );
    /*
     gtk_combo_new();
     gtk_widget_set_name( URLCombo,"URLCombo" );
     gtk_widget_show( URLCombo );
     gtk_box_pack_start( GTK_BOX( hbox1 ),URLCombo,TRUE,TRUE,0 );
    */
    URLEntry=GTK_COMBO( URLCombo )->entry;
    gtk_widget_set_name( URLEntry,"URLEntry" );
    gtk_widget_show( URLEntry );

    AddHSeparator( vbox1 );

    hbuttonbox1=AddHButtonBox( vbox1 );
    gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox1 ),GTK_BUTTONBOX_END );
    gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox1 ),10 );

    Ok=AddButton( MSGTR_Ok,hbuttonbox1 );
    Cancel=AddButton( MSGTR_Cancel,hbuttonbox1 );

    gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE );
    gtk_widget_add_accelerator( Cancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );

    gtk_signal_connect( GTK_OBJECT( URL ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&URL );
    gtk_signal_connect( GTK_OBJECT( Ok ),"clicked",GTK_SIGNAL_FUNC( on_Button_pressed ),(void *)1 );
    gtk_signal_connect( GTK_OBJECT( Cancel ),"clicked",GTK_SIGNAL_FUNC( on_Button_pressed ),NULL );

    gtk_widget_grab_focus( URLEntry );
    gtk_window_add_accel_group( GTK_WINDOW( URL ),accel_group );

    return URL;
}
开发者ID:error454,项目名称:mplayer-webos,代码行数:60,代码来源:url.c


示例8: LoadTIMITLabels

/* LoadTIMITLabels: load a TIMIT transcription */
static void LoadTIMITLabels(MemHeap *x, Transcription *t, Source *src)
{
   LabList *ll;
   LabId labid;
   HTime start,end;
   float score;
   
   ll = CreateLabelList(x,0);  AddLabelList(ll,t);
   InitTrScan();
   GetTrSym(src,FALSE);
   while (trSym == TRNUM){    
      start = trNum*625;                 /* sample rate is 16KHz */
      GetTrSym(src,FALSE);
      if (trSym != TRNUM) 
         HError(6552,"LoadTIMITLabels: End Time expected in TIMIT Label File");
      end   = trNum*625;
      GetTrSym(src,FALSE);
      if (trSym != TRSTR) 
         HError(6552,"LoadTIMITLabels: Label Name expected in TIMIT Label File");
      labid = GetLabId(trStr,TRUE);
      score = 0.0;
      AddLabel(x,ll,labid,start,end,score);
      GetTrSym(src,FALSE);
      if (trSym == TREOL)
         GetTrSym(src,FALSE);
   }
}
开发者ID:nlphacker,项目名称:OpenSpeech,代码行数:28,代码来源:HLabel.c


示例9: AppendLabs

/* AppendLabs: append label file corresponding to src to trans,
   len is time length of this file; accumulate to find offset for
   concatenated files */
void AppendLabs(Transcription *t, HTime len)
{
   LabList *ll,*transll;
   LLink p,q;
   int maxAux;

   if(trace & T_SEGMENT)
      printf("Adding labels, len: %.0f off: %.0f\n",len,off);
   if(trans == NULL) 
      trans = CopyTranscription(&lStack, t);
   else
      for (ll = t->head,transll = trans->head; ll != NULL;
           ll = ll->next,transll = transll->next){
         if (transll == NULL)
            HError(1031,"AppendLabs: lablist has no target to append to");
         maxAux = ll->maxAuxLab;
         if (maxAux > transll->maxAuxLab){
            HError(-1031,"AppendLabs: truncating num aux labs from %d down to %d",
                   maxAux, transll->maxAuxLab);
            maxAux = transll->maxAuxLab;
         }
         for (p=ll->head->succ; p->succ!= NULL; p=p->succ){
            q = AddLabel(&lStack,transll,
                         p->labid,p->start + off,p->end + off,p->score);
            if (maxAux>0)
               AddAuxLab(q,maxAux,p->auxLab,p->auxScore);
         }
      }
   /* accumulate length of this file for total offset */
   off += len;
}
开发者ID:cfxccn,项目名称:HTKLib,代码行数:34,代码来源:Tool_HCopy.c


示例10: all

/**
**  Parse an animation frame
**
**  @param str  string formated as "animationType extraArgs"
*/
static CAnimation *ParseAnimationFrame(lua_State *l, const char *str)
{
	const std::string all(str);
	const size_t len = all.size();
	size_t end = all.find(' ');
	const std::string op1(all, 0, end);
	size_t begin = std::min(len, all.find_first_not_of(' ', end));
	const std::string extraArg(all, begin);

	CAnimation *anim = NULL;
	if (op1 == "frame") {
		anim = new CAnimation_Frame;
	} else if (op1 == "exact-frame") {
		anim = new CAnimation_ExactFrame;
	} else if (op1 == "wait") {
		anim = new CAnimation_Wait;
	} else if (op1 == "random-wait") {
		anim = new CAnimation_RandomWait;
	} else if (op1 == "sound") {
		anim = new CAnimation_Sound;
	} else if (op1 == "random-sound") {
		anim = new CAnimation_RandomSound;
	} else if (op1 == "attack") {
		anim = new CAnimation_Attack;
	} else if (op1 == "spawn-missile") {
		anim = new CAnimation_SpawnMissile;
	} else if (op1 == "spawn-unit") {
		anim = new CAnimation_SpawnUnit;
	} else if (op1 == "if-var") {
		anim = new CAnimation_IfVar;
	} else if (op1 == "set-var") {
		anim = new CAnimation_SetVar;
	} else if (op1 == "set-player-var") {
		anim = new CAnimation_SetPlayerVar;
	} else if (op1 == "die") {
		anim = new CAnimation_Die();
	} else if (op1 == "rotate") {
		anim = new CAnimation_Rotate;
	} else if (op1 == "random-rotate") {
		anim = new CAnimation_RandomRotate;
	} else if (op1 == "move") {
		anim = new CAnimation_Move;
	} else if (op1 == "unbreakable") {
		anim = new CAnimation_Unbreakable;
	} else if (op1 == "label") {
		anim = new CAnimation_Label;
		AddLabel(anim, extraArg);
	} else if (op1 == "goto") {
		anim = new CAnimation_Goto;
	} else if (op1 == "random-goto") {
		anim = new CAnimation_RandomGoto;
	} else if (op1 == "lua-callback") {
		anim = new CAnimation_LuaCallback;
	} else {
		LuaError(l, "Unknown animation: %s" _C_ op1.c_str());
	}
	anim->Init(extraArg.c_str(), l);
	return anim;
}
开发者ID:Clemenshemmerling,项目名称:Stratagus,代码行数:64,代码来源:animation.cpp


示例11: guard

bool SymbolMap::LoadNocashSym(const char *filename)
{
	lock_guard guard(lock_);
	FILE *f = File::OpenCFile(filename, "r");
	if (!f)
		return false;

	while (!feof(f)) {
		char line[256], value[256] = {0};
		char *p = fgets(line, 256, f);
		if (p == NULL)
			break;

		u32 address;
		if (sscanf(line, "%08X %s", &address, value) != 2)
			continue;
		if (address == 0 && strcmp(value, "0") == 0)
			continue;

		if (value[0] == '.') {
			// data directives
			char* s = strchr(value, ':');
			if (s != NULL) {
				*s = 0;

				u32 size = 0;
				if (sscanf(s + 1, "%04X", &size) != 1)
					continue;

				if (strcasecmp(value, ".byt") == 0) {
					AddData(address, size, DATATYPE_BYTE);
				} else if (strcasecmp(value, ".wrd") == 0) {
					AddData(address, size, DATATYPE_HALFWORD);
				} else if (strcasecmp(value, ".dbl") == 0) {
					AddData(address, size, DATATYPE_WORD);
				} else if (strcasecmp(value, ".asc") == 0) {
					AddData(address, size, DATATYPE_ASCII);
				}
			}
		} else {				// labels
			int size = 1;
			char* seperator = strchr(value,',');
			if (seperator != NULL) {
				*seperator = 0;
				sscanf(seperator+1,"%08X",&size);
			}

			if (size != 1) {
				AddFunction(value,address,size);
			} else {
				AddLabel(value,address);
			}
		}
	}

	fclose(f);
	return true;
}
开发者ID:CLYBOY,项目名称:ppsspp,代码行数:58,代码来源:SymbolMap.cpp


示例12: switch

void wxGISToolBar::AddCommand(wxGISCommand* pCmd)
{
	switch(pCmd->GetKind())
	{
	case enumGISCommandMenu:
		return;
	case enumGISCommandSeparator:
	case enumGISCommandCheck:
	case enumGISCommandRadio:
	case enumGISCommandNormal:
		{
		wxBitmap Bitmap = pCmd->GetBitmap();
		if(!Bitmap.IsOk())
			Bitmap = wxBitmap(tool_16_xpm);

		AddTool(pCmd->GetID(), wxStripMenuCodes(pCmd->GetCaption()), Bitmap, wxBitmap(), (wxItemKind)pCmd->GetKind(), pCmd->GetTooltip(), pCmd->GetMessage(), NULL);
		}
		break;
	case enumGISCommandDropDown:
		{
		wxBitmap Bitmap = pCmd->GetBitmap();
		if(!Bitmap.IsOk())
			Bitmap = wxBitmap(tool_16_xpm);

		AddTool(pCmd->GetID(), wxStripMenuCodes(pCmd->GetCaption()), Bitmap, wxBitmap(), (wxItemKind)enumGISCommandNormal, pCmd->GetTooltip(), pCmd->GetMessage(), NULL);
        SetToolDropDown(pCmd->GetID(), true);
		}
		break;
	case enumGISCommandControl:
		{
			IToolControl* pToolCtrl = dynamic_cast<IToolControl*>(pCmd);
			if(pToolCtrl)
			{
				IToolBarControl* pToolBarControl = pToolCtrl->GetControl();
				wxControl* pControl = dynamic_cast<wxControl*>(pToolBarControl);
				if(pControl)
				{
					if(pToolCtrl->HasToolLabel())
					{
						wxString sToolLabel = pToolCtrl->GetToolLabel();
						AddLabel(wxID_ANY, sToolLabel, sToolLabel.Len() * 5);
					}
					pControl->Reparent(this);
					AddControl(pControl);
					//add ctrl to remove map
					m_RemControlMap[m_CommandArray.size()] = pToolBarControl;
				}
				else return;
			}
			else return;
		}
		break;
	default: return;
	}
	wxGISCommandBar::AddCommand(pCmd);
	Realize();
}
开发者ID:Mileslee,项目名称:wxgis,代码行数:57,代码来源:commandbar.cpp


示例13: LoadSCRIBELabels

/* LoadSCRIBELabels: load a SCRIBE (SAM) label file - searches for
         first occurrence of a label symbol 
               LBA - acoustic label
               LBB - broad class label
               UTS - utterance 
         it loads this symbol and all subsequent labels of the
         same type.  All other SAM label types are ignored */
static void LoadSCRIBELabels(MemHeap *x, Transcription *t, Source *src)
{
   LabList *ll;
   LabId labid;
   HTime start,end;
   float score;
   ScribeLab ltype, lx;
   double sp;
   char buf[MAXSTRLEN];
   
   if (!GetConfFlt(cParm,numParm,"SOURCERATE",&sp))  
      sp = 500.0;   /* actual SCRIBE rate */
   ll = CreateLabelList(x,0);  AddLabelList(ll,t);
   InitTrScan();
   do {  /* search for first label */
      ltype = GetScribeLab(src);
      if (ltype == S_EOF)
         HError(6554,"LoadSCRIBELabels: Unexpected EOF");
   } while (ltype != S_LBB && ltype != S_LBA && ltype != S_UTS);
   do { /* load this and all subsequent ltype labels */
      GetTrSym(src,FALSE);
      if (trSym != TRNUM)
         HError(6554,"LoadSCRIBELabels: Start Index expected [%d]\n",trSym);
      start = trNum * sp;
      GetTrSym(src,FALSE);
      if (trSym != TRCOMMA)
         HError(6554,"LoadSCRIBELabels: Comma expected [%d]\n",trSym);
      GetTrSym(src,FALSE);
      if (ltype == S_LBA || ltype == S_LBB) {   /* LBB and LBA have a centre field */
         if (trSym != TRCOMMA)
            HError(6554,"LoadSCRIBELabels: Comma expected [%d]\n",trSym);     
         GetTrSym(src,FALSE);
      }
      if (trSym != TRNUM)
         HError(6554,"LoadSCRIBELabels: End Index expected [%d]\n",trSym);
      end = trNum * sp;
      GetTrSym(src,FALSE);
      if (trSym != TRCOMMA)
         HError(6554,"LoadSCRIBELabels: Comma expected [%d]\n",trSym);
      GetTrSym(src,FALSE);
      if (trSym != TRSTR)
         HError(6554,"LoadSCRIBELabels: Label expected [%d]\n",trSym);
      strcpy(buf,trStr);
      GetTrSym(src,FALSE);
      while (trSym == TRSTR){
         strcat(buf,"_"); strcat(buf,trStr);
         GetTrSym(src,FALSE);
      }
      labid = GetLabId(buf,TRUE); 
      score = 0.0;
      AddLabel(x,ll,labid,start,end,score); 
      if (trSym != TREOL)
         HError(6554,"LoadSCRIBELabels: End of Line expected [%d]\n",trSym);
      lx = GetScribeLab(src);
   } while (lx != S_EOF);
}
开发者ID:nlphacker,项目名称:OpenSpeech,代码行数:63,代码来源:HLabel.c


示例14: AddLabel

void mitk::LabelSet::AddLabel(const std::string &name, const mitk::Color &color)
{
  if (m_LabelContainer.size() > 255)
    return;

  mitk::Label::Pointer newLabel = mitk::Label::New();
  newLabel->SetName(name);
  newLabel->SetColor(color);
  AddLabel(newLabel);
}
开发者ID:Cdebus,项目名称:MITK,代码行数:10,代码来源:mitkLabelSet.cpp


示例15: RETURN_VOID_IF_ERROR

void SpeedDialSuggestionsModel::AddHistorySuggestions(BOOL items_under_parent_folder /*= FALSE*/, INT32 num_of_item_to_add/* = -1*/)
{
	if (num_of_item_to_add == 0)
		return;

	DesktopHistoryModel* history_model = DesktopHistoryModel::GetInstance();

	if (!history_model)
		return;

	OpVector<HistoryModelPage> top_sites;
	INT32 top10_folder_idx = -1;
	
	// Add topten folder
	if (items_under_parent_folder)
	{
		OpString freq_visited_sites;
		RETURN_VOID_IF_ERROR(g_languageManager->GetString(Str::S_FREQUENTLY_VISITED_PAGES, freq_visited_sites));

		OpStringC8 toptenimage("Top10");
		INT32 top10_folder_idx = AddFolder(freq_visited_sites, toptenimage);
		if (top10_folder_idx == -1)
			return;
	}

	// Read more than needed in case some of the urls are alreay in the treeview or speeddial
	history_model->GetTopItems(top_sites, num_of_item_to_add + 20);

	INT32 count = 0;
	for (UINT32 i = 0; i < top_sites.GetCount() && count < num_of_item_to_add; i++)
	{
		OpString address, title;

		HistoryModelPage* item = top_sites.Get(i);
		item->GetAddress(address);
		item->GetTitle(title);

		if (!DocumentView::IsUrlRestrictedForViewFlag(address.CStr(), DocumentView::ALLOW_ADD_TO_SPEED_DIAL))
			continue;

		if (-1 != AddSuggestion(title, address, top10_folder_idx))
			count ++;
	}

	if (count == 0 && items_under_parent_folder)
	{
		/*
		Add information on 'no browsering history available' only if 'items_under_parent_folder' is set to TRUE and 
		history count is 0.
		*/
		OpString no_items_label;
		RETURN_VOID_IF_ERROR(g_languageManager->GetString(Str::S_NO_BROWSING_HISTORY_AVAILABLE, no_items_label));
		RETURN_VOID_IF_ERROR(AddLabel(no_items_label, top10_folder_idx));
	}
}
开发者ID:prestocore,项目名称:browser,代码行数:55,代码来源:SpeedDialSuggestions.cpp


示例16: AddInstrFor

bool AlanCode :: AddInstrFor(AlanVariable* var,AlanExpr* beg,AlanExpr* end,AlanExpr* step,string& error) {
	code.push_back( new AlanInstrLet(var,beg) );
	AlanInstrGoto* gt = new AlanInstrGoto("");
	code.push_back(gt);
	int refpc = AddSpecLabel(SpecialLabel::SLT_FOR,error);
	if( refpc < 0 ) return false;
	code.push_back( new AlanInstrFor(var,beg,end,step,"@[email protected]"+toString(refpc)) );
	AddLabel("@[email protected]"+toString(refpc));
	gt->SetLabel("@[email protected]"+toString(refpc));
	return true;
}
开发者ID:boskee,项目名称:lamos,代码行数:11,代码来源:_alan_interials.cpp


示例17: GenLabel

/*
 * GenLabel - stick a label before current statment
 */
void GenLabel( label where )
{
    vi_rc   rc;

    genItem( SRC_T_LABEL, where );
    if( (rc = AddLabel( tmpTail, cLab, where )) != ERR_NO_ERR ) {
        AbortGen( rc );
    }
    tmpTail->hasvar = FALSE;
    strcpy( where, cLab->name[cLab->cnt - 1] );

} /* GenLabel */
开发者ID:Ukusbobra,项目名称:open-watcom-v2,代码行数:15,代码来源:srcgen.c


示例18: AddGroup

int CBCGPMSMTasksPane::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CBCGPTasksPane::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	int nGroup = AddGroup (_T(""));

	COleDateTime now = COleDateTime::GetCurrentTime ();
	CString strDate = now.Format (_T("%B %d, %Y"));

	AddLabel (nGroup, strDate, -1, TRUE);

	AddLabel (nGroup, _T(" "));
	AddLabel (nGroup, _T(" "));
	
	AddLabel (nGroup, _T("Common tasks"), -1, TRUE);
	AddSeparator (nGroup);

	AddTask (nGroup, _T("Learn more about BCGControlBar library"), -1, ID_HELP_BCGSOFT);

	return 0;
}
开发者ID:zxlooong,项目名称:bcgexp,代码行数:22,代码来源:BCGPMSMTasksPane.cpp


示例19: AddLabel

bool FLabels::operator +=(const FLabels& rSource)
{
	if (this != &rSource)
	{
		for (size_t k = 0; k < rSource.m_Labels.GetCount(); k++)
		{
			AddLabel(rSource.m_Labels[k].m_StrLabel); 
		}

		BuildLabelStr(); 
	}
	return true; 
}
开发者ID:codeboost,项目名称:libertv,代码行数:13,代码来源:FLabels.cpp


示例20: CopyLabelList

/* EXPORT->CopyLabelList: return a copy of given label list */
LabList* CopyLabelList(MemHeap *x, LabList* ll)
{
   LabList *newll;
   LLink p,q;
   
   newll = CreateLabelList(x,ll->maxAuxLab);
   for (q=ll->head->succ; q->succ != NULL; q = q->succ){
      p = AddLabel(x,newll,q->labid,q->start,q->end,q->score);
      if (ll->maxAuxLab > 0)
         AddAuxLab(p,ll->maxAuxLab,q->auxLab,q->auxScore);
   }
   return newll;
}
开发者ID:nlphacker,项目名称:OpenSpeech,代码行数:14,代码来源:HLabel.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ AddLayer函数代码示例发布时间:2022-05-30
下一篇:
C++ AddKey函数代码示例发布时间: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