这篇教程C++ wxAtoi函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中wxAtoi函数的典型用法代码示例。如果您正苦于以下问题:C++ wxAtoi函数的具体用法?C++ wxAtoi怎么用?C++ wxAtoi使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了wxAtoi函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: whilebool Tags::HandleXMLTag(const wxChar *tag, const wxChar **attrs){ if (wxStrcmp(tag, wxT("tags")) != 0) return false; // loop through attrs, which is a null-terminated list of // attribute-value pairs while(*attrs) { const wxChar *attr = *attrs++; const wxChar *value = *attrs++; if (!value) break; if (!wxStrcmp(attr, wxT("title"))) mTitle = value; else if (!wxStrcmp(attr, wxT("artist"))) mArtist = value; else if (!wxStrcmp(attr, wxT("album"))) mAlbum = value; else if (!wxStrcmp(attr, wxT("track"))) mTrackNum = wxAtoi(value); else if (!wxStrcmp(attr, wxT("year"))) mYear = value; else if (!wxStrcmp(attr, wxT("genre"))) mGenre = wxAtoi(value); else if (!wxStrcmp(attr, wxT("comments"))) mComments = value; else if (!wxStrcmp(attr, wxT("id3v2"))) mID3V2 = wxAtoi(value)?true:false; } // while return true;}
开发者ID:Kirushanr,项目名称:audacity,代码行数:35,
示例2: typeItemRecord::ItemRecord(wxString line) : type(0){ id = wxAtoi(line.BeforeFirst(',')); line = line.AfterFirst(','); quality = wxAtoi(line.BeforeFirst(',')); line = line.AfterFirst(','); try { ItemDB::Record r = itemdb.getById(id); model = r.getInt(ItemDB::ItemDisplayInfo); itemclass = r.getInt(ItemDB::Itemclass); subclass = r.getInt(ItemDB::Subclass); type = r.getInt(ItemDB::InventorySlot); switch(r.getInt(ItemDB::Sheath)) { case SHEATHETYPE_MAINHAND: sheath = ATT_LEFT_BACK_SHEATH; break; case SHEATHETYPE_LARGEWEAPON: sheath = ATT_LEFT_BACK; break; case SHEATHETYPE_HIPWEAPON: sheath = ATT_LEFT_HIP_SHEATH; break; case SHEATHETYPE_SHIELD: sheath = ATT_MIDDLE_BACK_SHEATH; break; default: sheath = SHEATHETYPE_NONE; } discovery = false; name.Printf(wxT("%s [%d] [%d]"), line.c_str(), id, model); } catch (ItemDB::NotFound) {}}
开发者ID:SamBao,项目名称:wowmodelviewer,代码行数:25,
示例3: FillChkListHerstellervoid ArtikelEdit::FillChkListHersteller(vector< vector< wxString > > data){ if(data.size() > 0) { if(chklist_herstellerBox) { arr_db_list.Clear(); chklist_herstellerBox->Clear(); for(int i = 0; i < data.size(); ++i) { arr_db_list.Add(wxAtoi(data[i][0])); chklist_herstellerBox->Append(data[i][1]); if(!herstellerSelectionChanged && wxAtoi(data[i][0]) == oldHerstellerId) { chklist_herstellerBox->Select(i); chklist_herstellerBox->Check(i, true); lastSelectedItem = i; herstellerIdArrPos = i; } } } } }
开发者ID:jmenzel,项目名称:artikelverwaltung,代码行数:27,
示例4: wxAtoibool szHelpController::InitializeContext(const wxString& filepath){ if (wxFileName::FileExists(filepath)) { m_begin_id = new map_id; m_begin_id->next=NULL; map_id *tmp_id = m_begin_id; wxTextFile *map_file = new wxTextFile; wxString tmp_str; map_file->Open(filepath); for (tmp_str = map_file->GetFirstLine(); !map_file->Eof(); tmp_str = map_file->GetNextLine()) { tmp_id->id = wxAtoi(tmp_str); tmp_id->section += tmp_str; tmp_id->section.Remove(0,(tmp_id->section.Find(_T(" ")))+1); tmp_id->next = new map_id; tmp_id = tmp_id->next; tmp_id->next=NULL; } tmp_id->id=wxAtoi(tmp_str); tmp_id->section += tmp_str; tmp_id->section.Remove(0,(tmp_id->section.Find(_T(" ")))+1); map_file->Close(); return TRUE; } return FALSE;}
开发者ID:cyclefusion,项目名称:szarp,代码行数:28,
示例5: towxstringvoid PWSGridTable::RestoreSettings(void) const{ wxString colShown = towxstring(PWSprefs::GetInstance()->GetPref(PWSprefs::ListColumns)); wxString colWidths = towxstring(PWSprefs::GetInstance()->GetPref(PWSprefs::ColumnWidths)); wxArrayString colShownArray = wxStringTokenize(colShown, wxT(" /r/n/t,"), wxTOKEN_STRTOK); wxArrayString colWidthArray = wxStringTokenize(colWidths, wxT(" /r/n/t,"), wxTOKEN_STRTOK); if (colShownArray.Count() != colWidthArray.Count() || colShownArray.Count() == 0) return; //turn off all the columns first for(size_t n = 0; n < WXSIZEOF(PWSGridCellData); ++n) { PWSGridCellData[n].visible = false; } //now turn on the selected columns for( size_t idx = 0; idx < colShownArray.Count(); ++idx) { const int fieldType = wxAtoi(colShownArray[idx]); const int fieldWidth = wxAtoi(colWidthArray[idx]); for(size_t n = 0; n < WXSIZEOF(PWSGridCellData); ++n) { if (PWSGridCellData[n].ft == fieldType) { PWSGridCellData[n].visible = true; PWSGridCellData[n].width = fieldWidth; PWSGridCellData[n].position = idx; break; } } }}
开发者ID:pwsafe,项目名称:pwsafe,代码行数:30,
示例6: wxCHECK/// Updates the contents of the FontSetting object using a delimited string containing the font settings/// @param string Comma delimited string containing the font settings (FaceName,PointSize,Weight,Italic(T/F),Underline(T/F),StrikeOut(T/F),Color)/// @return success or failurebool FontSetting::SetFontSettingFromString(const wxChar* string){ //------Last Checked------// // - Dec 6, 2004 wxCHECK(string != NULL, false); wxString temp; // Extract the face name wxExtractSubString(temp, string, 0, wxT(',')); temp.Trim(false); temp.Trim(); m_faceName = temp; if (m_faceName.IsEmpty()) m_faceName = DEFAULT_FACENAME; // Extract the point size wxExtractSubString(temp, string, 1, wxT(',')); temp.Trim(false); temp.Trim(); m_pointSize = wxAtoi(temp); if (m_pointSize == 0) m_pointSize = DEFAULT_POINTSIZE; // Extract the weight wxExtractSubString(temp, string, 2, wxT(',')); temp.Trim(false); temp.Trim(); m_weight = wxAtoi(temp); if ((m_weight % 100) != 0) m_weight = DEFAULT_WEIGHT; // Extract the italic setting wxExtractSubString(temp, string, 3, wxT(',')); temp.Trim(false); temp.Trim(); m_italic = (wxByte)((::wxStricmp(temp, wxT("T")) == 0) ? true : false); // Extract the underline setting wxExtractSubString(temp, string, 4, wxT(',')); temp.Trim(false); temp.Trim(); m_underline = (wxByte)((::wxStricmp(temp, wxT("T")) == 0) ? true : false); // Extract the strikeout setting wxExtractSubString(temp, string, 5, wxT(',')); temp.Trim(false); temp.Trim(); m_strikeOut = (wxByte)((::wxStricmp(temp, wxT("T")) == 0) ? true : false); // Extract the color wxExtractSubString(temp, string, 6, wxT(',')); temp.Trim(false); temp.Trim(); wxUint32 color = wxAtoi(temp); m_color = wxColor(LOBYTE(LOWORD(color)), HIBYTE(LOWORD(color)), LOBYTE(HIWORD(color))); return (true);}
开发者ID:BackupTheBerlios,项目名称:ptparser-svn,代码行数:62,
示例7: bHasChangeswxGISAcceleratorTable::wxGISAcceleratorTable(wxGISApplicationBase* pApp) : bHasChanges(true){ m_AccelEntryArray.reserve(20); wxGISAppConfig oConfig = GetConfig(); if(!oConfig.IsOk()) return; wxXmlNode* pAcceleratorsNodeCU = oConfig.GetConfigNode(enumGISHKCU, pApp->GetAppName() + wxString(wxT("/accelerators"))); wxXmlNode* pAcceleratorsNodeLM = oConfig.GetConfigNode(enumGISHKLM, pApp->GetAppName() + wxString(wxT("/accelerators"))); //merge two tables m_pApp = pApp; if(!pApp) return; //TODO: merge acc tables //TODO: if user delete key - it must be mark as deleted to avoid adding it fron LM table if(pAcceleratorsNodeCU) { wxXmlNode *child = pAcceleratorsNodeCU->GetChildren(); while(child) { wxString sCmdName = child->GetAttribute(wxT("cmd_name"), NON); unsigned char nSubtype = wxAtoi(child->GetAttribute(wxT("subtype"), wxT("0"))); wxGISCommand* pCmd = m_pApp->GetCommand(sCmdName, nSubtype); if(pCmd) { wxString sFlags = child->GetAttribute(wxT("flags"), wxT("NORMAL")); wxDword Flags = GetFlags(sFlags); wxString sKey = child->GetAttribute(wxT("keycode"), wxT("A")); int nKey = GetKeyCode(sKey); Add(wxAcceleratorEntry(Flags, nKey, pCmd->GetId())); } child = child->GetNext(); } } if(pAcceleratorsNodeLM) { wxXmlNode *child = pAcceleratorsNodeLM->GetChildren(); while(child) { wxString sCmdName = child->GetAttribute(wxT("cmd_name"), NON); unsigned char nSubtype = wxAtoi(child->GetAttribute(wxT("subtype"), wxT("0"))); wxGISCommand* pCmd = m_pApp->GetCommand(sCmdName, nSubtype); if(pCmd) { wxString sFlags = child->GetAttribute(wxT("flags"), wxT("NORMAL")); wxDword Flags = GetFlags(sFlags); wxString sKey = child->GetAttribute(wxT("keycode"), wxT("A")); int nKey = GetKeyCode(sKey); Add(wxAcceleratorEntry(Flags, nKey, pCmd->GetId())); } child = child->GetNext(); } }}
开发者ID:GimpoByte,项目名称:nextgismanager,代码行数:57,
示例8: wxAtoiint wxSystemOptions::GetOptionInt(const wxString& name){#ifdef _PACC_VER // work around the PalmOS pacc compiler bug return wxAtoi (GetOption(name).data());#else return wxAtoi (GetOption(name));#endif}
开发者ID:erwincoumans,项目名称:wxWidgets,代码行数:9,
示例9: tokenizervoid ViewerWindow::onStatsTimer(wxTimerEvent& event){ if(canvas && canvas->conn) { VNCConn* c = canvas->conn; text_ctrl_updrawbytes->Clear(); text_ctrl_updcount->Clear(); text_ctrl_latency->Clear(); text_ctrl_lossratio->Clear(); if(!c->isMulticast()) { label_lossratio->Show(false); text_ctrl_lossratio->Show(false); label_recvbuf->Show(false); gauge_recvbuf->Show(false); } else { label_lossratio->Show(true); text_ctrl_lossratio->Show(true); label_recvbuf->Show(true); gauge_recvbuf->Show(true); } stats_container->Layout(); if( ! c->getStats().IsEmpty() ) { // it is imperative here to obey the format of the sample string! wxStringTokenizer tokenizer(c->getStats().Last(), wxT(",")); tokenizer.GetNextToken(); // skip UTC time tokenizer.GetNextToken(); // skip conn time tokenizer.GetNextToken(); // skip rcvd bytes *text_ctrl_updrawbytes << wxAtoi(tokenizer.GetNextToken())/1024; // inflated bytes *text_ctrl_updcount << tokenizer.GetNextToken(); int latency = wxAtoi(tokenizer.GetNextToken()); if(latency >= 0) *text_ctrl_latency << latency; double lossratio = c->getMCLossRatio(); if(lossratio >= 0) // can be -1 if nothing to measure *text_ctrl_lossratio << lossratio; } gauge_recvbuf->SetRange(c->getMCBufSize()); gauge_recvbuf->SetValue(c->getMCBufFill()); // flash red when buffer full if(gauge_recvbuf->GetRange() == gauge_recvbuf->GetValue()) label_recvbuf->SetForegroundColour(*wxRED); else label_recvbuf->SetForegroundColour(dflt_fg); }}
开发者ID:gvsurenderreddy,项目名称:multivnc,代码行数:55,
示例10: wxSplit// return true if version string is older than compare stringbool RenderableEffect::IsVersionOlder(const std::string& compare, const std::string& version){ wxArrayString compare_parts = wxSplit(compare, '.'); wxArrayString version_parts = wxSplit(version, '.'); if( wxAtoi(version_parts[0]) < wxAtoi(compare_parts[0]) ) return true; if( wxAtoi(version_parts[0]) > wxAtoi(compare_parts[0]) ) return false; if( wxAtoi(version_parts[1]) < wxAtoi(compare_parts[1]) ) return true; if( wxAtoi(version_parts[1]) > wxAtoi(compare_parts[1]) ) return false; if( wxAtoi(version_parts[2]) < wxAtoi(compare_parts[2]) ) return true; return false;}
开发者ID:rickcowan,项目名称:xLights,代码行数:12,
示例11: RenderPianovoid PianoEffect::Render(Effect *effect, const SettingsMap &SettingsMap, RenderBuffer &buffer) { RenderPiano(buffer, SettingsMap["CHOICE_Piano_Style"], wxAtoi(SettingsMap["SLIDER_Piano_NumKeys"]), wxAtoi(SettingsMap["SLIDER_Piano_NumRows"]), SettingsMap["CHOICE_Piano_Placement"], SettingsMap["CHECKBOX_Piano_Clipping"] == "1", SettingsMap["TEXTCTRL_Piano_CueFilename"], SettingsMap["TEXTCTRL_Piano_MapFilename"], SettingsMap["TEXTCTRL_Piano_ShapeFilename"]);}
开发者ID:rickcowan,项目名称:xLights,代码行数:11,
示例12: bHasChangeswxGISAcceleratorTable::wxGISAcceleratorTable(IApplication* pApp, IGISConfig* pConf) : bHasChanges(true){ m_AccelEntryArray.reserve(20); m_pConf = pConf; wxXmlNode* pAcceleratorsNodeCU = m_pConf->GetConfigNode(enumGISHKCU, wxString(wxT("accelerators"))); wxXmlNode* pAcceleratorsNodeLM = m_pConf->GetConfigNode(enumGISHKLM, wxString(wxT("accelerators"))); //merge two tables m_pApp = pApp; if(!pApp) return; //merge acc tables //if user delete key - it must be mark as deleted to avoid adding it fron LM table if(pAcceleratorsNodeCU) { wxXmlNode *child = pAcceleratorsNodeCU->GetChildren(); while(child) { wxString sCmdName = child->GetPropVal(wxT("cmd_name"), NON); unsigned char nSubtype = wxAtoi(child->GetPropVal(wxT("subtype"), wxT("0"))); ICommand* pCmd = m_pApp->GetCommand(sCmdName, nSubtype); if(pCmd) { wxString sFlags = child->GetPropVal(wxT("flags"), wxT("NORMAL")); WXDWORD Flags = GetFlags(sFlags); wxString sKey = child->GetPropVal(wxT("keycode"), wxT("A")); int nKey = GetKeyCode(sKey); Add(wxAcceleratorEntry(Flags, nKey, pCmd->GetID())); } child = child->GetNext(); } } if(pAcceleratorsNodeLM) { wxXmlNode *child = pAcceleratorsNodeLM->GetChildren(); while(child) { wxString sCmdName = child->GetPropVal(wxT("cmd_name"), NON); unsigned char nSubtype = wxAtoi(child->GetPropVal(wxT("subtype"), wxT("0"))); ICommand* pCmd = m_pApp->GetCommand(sCmdName, nSubtype); if(pCmd) { wxString sFlags = child->GetPropVal(wxT("flags"), wxT("NORMAL")); WXDWORD Flags = GetFlags(sFlags); wxString sKey = child->GetPropVal(wxT("keycode"), wxT("A")); int nKey = GetKeyCode(sKey); Add(wxAcceleratorEntry(Flags, nKey, pCmd->GetID())); } child = child->GetNext(); } }}
开发者ID:jacklibj,项目名称:r5,代码行数:54,
示例13: SeqBlockbool Sequence::HandleXMLTag(const wxChar *tag, const wxChar **attrs){ if (!wxStrcmp(tag, wxT("waveblock"))) { SeqBlock *wb = new SeqBlock(); wb->f = 0; wb->start = 0; // loop through attrs, which is a null-terminated list of // attribute-value pairs while(*attrs) { const wxChar *attr = *attrs++; const wxChar *value = *attrs++; if (!value) break; if (!wxStrcmp(attr, wxT("start"))) wb->start = wxAtoi(value); // Handle length tag from legacy project file if (!wxStrcmp(attr, wxT("len"))) mDirManager->SetLoadingBlockLength(wxAtoi(value)); } // while mBlock->Add(wb); mDirManager->SetLoadingTarget(&wb->f); return true; } if (!wxStrcmp(tag, wxT("sequence"))) { while(*attrs) { const wxChar *attr = *attrs++; const wxChar *value = *attrs++; if (!value) break; if (!wxStrcmp(attr, wxT("maxsamples"))) mMaxSamples = wxAtoi(value); else if (!wxStrcmp(attr, wxT("sampleformat"))) mSampleFormat = (sampleFormat)wxAtoi(value); else if (!wxStrcmp(attr, wxT("numsamples"))) mNumSamples = wxAtoi(value); } // while return true; } return false;}
开发者ID:andreipaga,项目名称:audacity,代码行数:52,
示例14: whilewxHtmlImageMapAreaCell::wxHtmlImageMapAreaCell( wxHtmlImageMapAreaCell::celltype t, wxString &incoords, double pixel_scale ){ int i; wxString x = incoords, y; type = t; while ((i = x.Find( ',' )) != wxNOT_FOUND) { coords.Add( (int)(pixel_scale * (double)wxAtoi( x.Left( i ).c_str())) ); x = x.Mid( i + 1 ); } coords.Add( (int)(pixel_scale * (double)wxAtoi( x.c_str())) );}
开发者ID:beanhome,项目名称:dev,代码行数:13,
示例15: idNPCRecord::NPCRecord(wxString line) : id(0), model(0), type(0){ if (line.Len() <= 3) return; id = wxAtoi(line.BeforeFirst(',')); line = line.AfterFirst(','); model = wxAtoi(line.BeforeFirst(',')); line = line.AfterFirst(','); type = wxAtoi(line.BeforeFirst(',')); line = line.AfterFirst(','); discovery = false; name.Printf(wxT("%s [%d] [%d]"), line.c_str(), id, model);}
开发者ID:SamBao,项目名称:wowmodelviewer,代码行数:14,
示例16: wxAtoivoid mmReportBudget::GetFinancialYearValues(int& day, int& month){ day = wxAtoi(mmOptions::instance().financialYearStartDayString_); month = wxAtoi(mmOptions::instance().financialYearStartMonthString_) - 1; if ( (day > 28) && (month == wxDateTime::Feb) ) day = 28; else if ( ((day > 30) && (month == wxDateTime::Sep)) || ((day > 30) && (month == wxDateTime::Apr)) || ((day > 30) && (month == wxDateTime::Jun)) || ((day > 30) && (month == wxDateTime::Nov)) ) { day = 30; }}
开发者ID:unrealps,项目名称:moneymanagerex,代码行数:14,
示例17: void rc2wxr::ReadRect(int & x, int & y, int & width, int & height){x=wxAtoi(GetToken());y=wxAtoi(GetToken());width=wxAtoi(GetToken());height=wxAtoi(GetToken());}
开发者ID:Bluehorn,项目名称:wxPython,代码行数:15,
示例18: wxTbool wxGISGPParameter::SetFromString(wxString &sParam){ sParam.Replace(wxT("///""), wxT("/"")); switch(m_DataType) { case enumGISGPParamDTBool: m_Value = wxVariant((bool)wxAtoi(sParam)); break; case enumGISGPParamDTInteger: m_Value = wxVariant(wxAtoi(sParam)); break; case enumGISGPParamDTDouble: m_Value = wxVariant(wxAtof(sParam)); break; case enumGISGPParamDTText: case enumGISGPParamDTSpatRef: case enumGISGPParamDTPath: case enumGISGPParamDTPathArray: case enumGISGPParamDTStringChoice: m_Value = wxVariant(sParam); break; case enumGISGPParamDTIntegerChoice: m_Value = wxVariant(wxAtoi(sParam)); break; case enumGISGPParamDTDoubleChoice: m_Value = wxVariant(wxAtof(sParam)); break; case enumGISGPParamDTStringList: case enumGISGPParamDTIntegerList: case enumGISGPParamDTDoubleList: m_Value = wxStringTokenize(sParam, wxT(";"), wxTOKEN_RET_EMPTY); break; case enumGISGPParamDTUnknown: default: m_Value = wxVariant(sParam); break; } if(m_pDomain) { int nPos = m_pDomain->GetPosByValue(m_Value); if(nPos != wxNOT_FOUND) SetSelDomainValue(nPos); } return true;}
开发者ID:Mileslee,项目名称:wxgis,代码行数:48,
示例19: switchint WrappedType::ReadAsInt(){ switch( eWrappedType ) { case eWrappedString: return wxAtoi( *mpStr ); break; case eWrappedInt: return *mpInt; break; case eWrappedDouble: return (int)*mpDouble; break; case eWrappedBool: return (* mpBool) ? 1 : 0; break; case eWrappedEnum: wxASSERT( false ); break; default: wxASSERT( false ); break; } return -1;//Compiler pacifier}
开发者ID:Cactuslegs,项目名称:audacity-of-nope,代码行数:25,
示例20: wxAtoivoid ArchesModel::InitModel() { int NumArches=parm1; int SegmentsPerArch=parm2; arc = wxAtoi(ModelXml->GetAttribute("arc", "180")); SetBufferSize(NumArches,SegmentsPerArch); if (SingleNode) { SetNodeCount(NumArches * SegmentsPerArch, parm3,rgbOrder); } else { SetNodeCount(NumArches, SegmentsPerArch, rgbOrder); if (parm3 > 1) { for (int x = 0; x < Nodes.size(); x++) { Nodes[x]->Coords.resize(parm3); } } } screenLocation.SetRenderSize(SegmentsPerArch, NumArches); for (int y=0; y < NumArches; y++) { for(int x=0; x<SegmentsPerArch; x++) { int idx = y * SegmentsPerArch + x; Nodes[idx]->ActChan = stringStartChan[y] + x*GetNodeChannelCount(StringType); Nodes[idx]->StringNum=y; for(size_t c=0; c < GetCoordCount(idx); c++) { Nodes[idx]->Coords[c].bufX=IsLtoR ? x : SegmentsPerArch-x-1; Nodes[idx]->Coords[c].bufY=isBotToTop ? y : NumArches-y-1; } } } SetArchCoord();}
开发者ID:bagumondigi,项目名称:xLights,代码行数:32,
示例21: GetIntSettingint Model_Setting::GetIntSetting(const wxString& key, int default_value){ wxString value = this->GetStringSetting(key, ""); if (!value.IsEmpty() && value.IsNumber()) return wxAtoi(value); return default_value;}
开发者ID:bacanhtai,项目名称:moneymanagerex,代码行数:7,
示例22: _Tbool ViewChControl::UpdateControls( ){ if( this->m_is_virtual) this->m_main_sizer_text->SetLabel( wxString::Format( _T("VIRT %d"), this->m_ch_count)); else this->m_main_sizer_text->SetLabel( wxString::Format( _T("%d"), this->m_ch_count)); this->m_color_control->SetBackgroundColour( this->m_p_board_channel->m_line_color[ this->m_scope_index]); this->m_line_width_control->SetValue( this->m_p_board_channel->m_line_width[ this->m_scope_index]); this->m_ch_offset_control->SetValue( (int)(double)(this->m_p_board_channel->m_offset_y[ this->m_scope_index]* 10.0)); if( this->m_p_board_channel->m_volt_2_div[ this->m_scope_index]== 0) this->m_p_board_channel->m_volt_2_div[ this->m_scope_index]= 0.01; wxString voltPerDiv= wxString::Format( _T("%d"), (int)(double)(1000.0/ this->m_p_board_channel->m_volt_2_div[ this->m_scope_index]) ); // For previous version compatibility int idx= this->m_ch_volt_per_div_comboBox->FindString( voltPerDiv); if( idx>= 0) { this->m_ch_volt_per_div_comboBox->Select( idx); } else { this->m_ch_volt_per_div_comboBox->Select(0); int value= wxAtoi( this->m_ch_volt_per_div_comboBox->GetLabelText( ) ); this->UpdateVoltPerDiv( value); } this->UpdateLinePen(); this->m_view_enable_control->SetValue( this->m_p_board_channel->m_scope_view_enabled[ this->m_scope_index]); this->m_view_enable_control->SetLabel( this->m_view_enable_control->GetValue( )? _("Disable"): _("Enable")); return true;}
开发者ID:cjpl,项目名称:caen-suite,代码行数:32,
示例23: wxAssocQueryStringbool wxFileTypeImpl::GetIcon(wxIconLocation *iconLoc) const{ wxString strIcon = wxAssocQueryString(wxASSOCSTR_DEFAULTICON, m_ext); if ( !strIcon.empty() ) { wxString strFullPath = strIcon.BeforeLast(wxT(',')), strIndex = strIcon.AfterLast(wxT(',')); // index may be omitted, in which case BeforeLast(',') is empty and // AfterLast(',') is the whole string if ( strFullPath.empty() ) { strFullPath = strIndex; strIndex = wxT("0"); } // if the path contains spaces, it can be enclosed in quotes but we // must not pass a filename in that format to any file system function, // so remove them here. if ( strFullPath.StartsWith('"') && strFullPath.EndsWith('"') ) strFullPath = strFullPath.substr(1, strFullPath.length() - 2); if ( iconLoc ) { iconLoc->SetFileName(wxExpandEnvVars(strFullPath)); iconLoc->SetIndex(wxAtoi(strIndex)); } return true; } // no such file type or no value or incorrect icon entry return false;}
开发者ID:MediaArea,项目名称:wxWidgets,代码行数:35,
示例24: GetParentvoid NetBuilderProperties_frame::OnCellClick( wxGridEvent& event ){ MainFrame *myparent=(MainFrame *) GetParent(); int error=0; wxChar *endptr; char rest[100]; if (event.GetRow()==3){ pop_selected=event.GetCol(); int total_fdomains_value= (int) wxStrtol(Properties_grid->GetCellValue(2,pop_selected),&endptr,10); strcpy(rest,wxString(endptr).mb_str()); rest[100-1]='/0'; if (total_fdomains_value > 0 && strcmp(rest,"")==0){ if (total_fdomains_value!=population[pop_selected].total_fdomains) Initialize_Fdomains(pop_selected,total_fdomains_value); } else{ myparent->text_status->SetForegroundColour( wxColour( 247, 22, 10 ) ); wxLogMessage(wxT(">> WARNING: fdomains of population ") + int2wxStr(pop_selected) + wxT(" must be an integer greater than 0.")); myparent->text_status->SetForegroundColour( wxColour( 0, 0, 0 ) ); error=-1; } if (error==0) { population[pop_selected].total_fdomains=wxAtoi(Properties_grid->GetCellValue(2,pop_selected)); this->Enable(false); NetBuilderDynamics_frame *Dynamics_frame=new NetBuilderDynamics_frame(this); Dynamics_frame->Show(); } } event.Skip();}
开发者ID:msGenDev,项目名称:neuralsyns,代码行数:30,
示例25: GetHelpbool wxHelpControllerHelpProvider::ShowHelp(wxWindowBase *window){ wxString text = GetHelp(window); if ( !text.empty() ) { if (m_helpController) { if (text.IsNumber()) return m_helpController->DisplayContextPopup(wxAtoi(text)); // If the help controller is capable of popping up the text... else if (m_helpController->DisplayTextPopup(text, wxGetMousePosition())) { return true; } else // ...else use the default method. return wxSimpleHelpProvider::ShowHelp(window); } else return wxSimpleHelpProvider::ShowHelp(window); } return false;}
开发者ID:HackLinux,项目名称:chandler-1,代码行数:26,
示例26: WXUNUSEDvoid CRichTextFrame::OnTabStops(wxCommandEvent& WXUNUSED(event)){ wxString tabsStr = wxGetTextFromUser ( _("Please enter the tab stop positions in tenths of a millimetre, separated by spaces./nLeave empty to reset tab stops."), _("Tab Stops"), wxEmptyString, this ); wxArrayInt tabs; wxStringTokenizer tokens(tabsStr, _T(" ")); while (tokens.HasMoreTokens()) { wxString token = tokens.GetNextToken(); tabs.Add(wxAtoi(token)); } wxTextAttr attr; attr.SetTabs(tabs); long start, end; m_textCtrl->GetSelection(& start, & end); m_textCtrl->SetStyle(start, end, attr); m_currentPosition = -1;}
开发者ID:adakite,项目名称:main,代码行数:28,
注:本文中的wxAtoi函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ wxAuiPaneInfo函数代码示例 C++ wxArrayString函数代码示例 |