您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ wxGetTranslation函数代码示例

51自学网 2021-06-03 10:10:24
  C++
这篇教程C++ wxGetTranslation函数代码示例写得很实用,希望能帮到您。

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

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

示例1: UpdateConfig

void DIALOG_GENDRILL::OnGenReportFile( wxCommandEvent& event ){    UpdateConfig(); // set params and Save drill options    wxFileName fn = m_parent->GetBoard()->GetFileName();    fn.SetName( fn.GetName() + wxT( "-drl" ) );    fn.SetExt( ReportFileExtension );    wxString defaultPath = m_plotOpts.GetOutputDirectory();    if( defaultPath.IsEmpty() )        defaultPath = ::wxGetCwd();    wxFileDialog dlg( this, _( "Save Drill Report File" ), defaultPath,                      fn.GetFullName(), wxGetTranslation( ReportFileWildcard ),                      wxFD_SAVE );    if( dlg.ShowModal() == wxID_CANCEL )        return;    EXCELLON_WRITER excellonWriter( m_parent->GetBoard(),                                    m_FileDrillOffset );    excellonWriter.SetFormat( !m_UnitDrillIsInch,                              (EXCELLON_WRITER::zeros_fmt) m_ZerosFormat,                              m_Precision.m_lhs, m_Precision.m_rhs );    excellonWriter.SetOptions( m_Mirror, m_MinimalHeader, m_FileDrillOffset, m_Merge_PTH_NPTH );    bool success = excellonWriter.GenDrillReportFile( dlg.GetPath() );    wxString   msg;    if( ! success )    {        msg.Printf(  _( "** Unable to create %s **/n" ), GetChars( dlg.GetPath() ) );        m_messagesBox->AppendText( msg );    }    else    {        msg.Printf( _( "Report file %s created/n" ), GetChars( dlg.GetPath() ) );        m_messagesBox->AppendText( msg );    }}
开发者ID:jerkey,项目名称:kicad,代码行数:43,


示例2: OnViewPopupSelected

void mmAssetsPanel::OnViewPopupSelected(wxCommandEvent& event){    int evt = std::max(event.GetId() - 1, 0);    if (evt == 0)    {        itemStaticTextMainFilter_->SetLabelText(_("All"));        this->m_filter_type = Model_Asset::TYPE(-1);    }    else    {        this->m_filter_type = Model_Asset::TYPE(evt - 1);        itemStaticTextMainFilter_->SetLabelText(wxGetTranslation(Model_Asset::all_type()[evt - 1]));    }    int trx_id = -1;    m_listCtrlAssets->doRefreshItems(trx_id);    updateExtraAssetData(trx_id);}
开发者ID:saga64,项目名称:moneymanagerex,代码行数:19,


示例3: while

wxString CServer::GetProtocolName(enum ServerProtocol protocol){	const t_protocolInfo *protocolInfo = protocolInfos;	while (protocolInfo->protocol != UNKNOWN)	{		if (protocolInfo->protocol != protocol)		{			protocolInfo++;			continue;		}		if (protocolInfo->translateable)			return wxGetTranslation(protocolInfo->name);		else			return protocolInfo->name;	}	return _T("");}
开发者ID:idgaf,项目名称:FileZilla3,代码行数:19,


示例4: switch

wxString CStatTreeItemSimple::GetDisplayString() const{	switch (m_valuetype) {		case vtInteger:			switch (m_displaymode) {				case dmTime:	return CFormat(wxGetTranslation(m_label)) % CastSecondsToHM(m_intvalue);				case dmBytes:	return CFormat(wxGetTranslation(m_label)) % CastItoXBytes(m_intvalue);				default:	return CFormat(wxGetTranslation(m_label)) % m_intvalue;			}		case vtFloat:	return CFormat(wxGetTranslation(m_label)) % m_floatvalue;		case vtString:	return CFormat(wxGetTranslation(m_label)) % m_stringvalue;		default:	return wxGetTranslation(m_label);	}}
开发者ID:Artoria2e5,项目名称:amule-dlp,代码行数:14,


示例5: _

wxString NewKeyShortcutDlg::ToString(wxKeyEvent& e){    wxString text;    // int flags = e.GetModifiers();    // if ( flags & wxMOD_ALT )    //     text += wxT("Alt-");    // if ( flags & wxMOD_CONTROL )    //     text += wxT("Ctrl-");    // if ( flags & wxMOD_SHIFT )    //     text += wxT("Shift-");    const int code = e.GetKeyCode();    if(code >= WXK_F1 && code <= WXK_F12)        text << _("F") << code - WXK_F1 + 1;    else if(code >= WXK_NUMPAD0 && code <= WXK_NUMPAD9)        text << code - WXK_NUMPAD0;    else if(code >= WXK_SPECIAL1 && code <= WXK_SPECIAL20)        text << _("SPECIAL") << code - WXK_SPECIAL1 + 1;    else { // check the named keys        size_t n;        for(n = 0; n < WXSIZEOF(wxKeyNames); n++) {            const wxKeyName& kn = wxKeyNames[n];            if(code == kn.code && kn.code != WXK_COMMAND) {                text << wxGetTranslation(kn.name);                break;            }        }        if(n == WXSIZEOF(wxKeyNames)) {            // must be a simple key            if(isascii(code)) {                text << (wxChar)code;            } else {                return wxEmptyString;            }        }    }    return text;}
开发者ID:GaganJotSingh,项目名称:codelite,代码行数:42,


示例6: wxGetTranslation

void EDA_APP::AddMenuLanguageList( wxMenu* MasterMenu ){    wxMenu*      menu = NULL;    wxMenuItem*  item;    unsigned int ii;    item = MasterMenu->FindItem( ID_LANGUAGE_CHOICE );    if( item )     // This menu exists, do nothing        return;    menu = new wxMenu;    for( ii = 0; ii < LANGUAGE_DESCR_COUNT; ii++ )    {        wxString label;        if( s_Language_List[ii].m_DoNotTranslate )            label = s_Language_List[ii].m_Lang_Label;        else            label = wxGetTranslation( s_Language_List[ii].m_Lang_Label );        AddMenuItem( menu, s_Language_List[ii].m_KI_Lang_Identifier,                     label, KiBitmap(s_Language_List[ii].m_Lang_Icon ),                     wxITEM_CHECK );    }    AddMenuItem( MasterMenu, menu,                 ID_LANGUAGE_CHOICE,                 _( "Language" ),                 _( "Select application language (only for testing!)" ),                 KiBitmap( language_xpm ) );    // Set Check mark on current selected language    for( ii = 0; ii < LANGUAGE_DESCR_COUNT; ii++ )    {        if( m_LanguageId == s_Language_List[ii].m_WX_Lang_Identifier )            menu->Check( s_Language_List[ii].m_KI_Lang_Identifier, true );        else            menu->Check( s_Language_List[ii].m_KI_Lang_Identifier, false );    }}
开发者ID:p12tic,项目名称:kicad-source-mirror,代码行数:42,


示例7: GetFlags

wxString wxAcceleratorEntry::ToString() const{    wxString text;    int flags = GetFlags();    if ( flags & wxACCEL_ALT )        text += _("Alt-");    if ( flags & wxACCEL_CTRL )        text += _("Ctrl-");    if ( flags & wxACCEL_SHIFT )        text += _("Shift-");    const int code = GetKeyCode();    if ( wxIsalnum(code) )        text << (wxChar)code;    else if ( code >= WXK_F1 && code <= WXK_F12 )        text << _("F") << code - WXK_F1 + 1;    else if ( code >= WXK_NUMPAD0 && code <= WXK_NUMPAD9 )        text << _("KP_") << code - WXK_NUMPAD0;    else if ( code >= WXK_SPECIAL1 && code <= WXK_SPECIAL20 )        text << _("SPECIAL") << code - WXK_SPECIAL1 + 1;    else // check the named keys    {        size_t n;        for ( n = 0; n < WXSIZEOF(wxKeyNames); n++ )        {            const wxKeyName& kn = wxKeyNames[n];            if ( code == kn.code )            {                text << wxGetTranslation(kn.name);                break;            }        }        wxASSERT_MSG( n != WXSIZEOF(wxKeyNames),                      wxT("unknown keyboard accelerator code") );    }    return text;}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:41,


示例8: DoPause

void CFrame::DoRecordingSave(){  bool paused = (Core::GetState() == Core::CORE_PAUSE);  if (!paused)    DoPause();  wxString path =      wxFileSelector(_("Select The Recording File"), wxEmptyString, wxEmptyString, wxEmptyString,                     _("Dolphin TAS Movies (*.dtm)") +                         wxString::Format("|*.dtm|%s", wxGetTranslation(wxALL_FILES)),                     wxFD_SAVE | wxFD_PREVIEW | wxFD_OVERWRITE_PROMPT, this);  if (path.IsEmpty())    return;  Movie::SaveRecording(WxStrToStr(path));  if (!paused)    DoPause();}
开发者ID:TwitchPlaysPokemon,项目名称:dolphinWatch,代码行数:21,


示例9: WXUNUSED

void CFrame::OnPlayRecording(wxCommandEvent& WXUNUSED(event)){  wxString path =      wxFileSelector(_("Select The Recording File"), wxEmptyString, wxEmptyString, wxEmptyString,                     _("Dolphin TAS Movies (*.dtm)") +                         wxString::Format("|*.dtm|%s", wxGetTranslation(wxALL_FILES)),                     wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST, this);  if (path.IsEmpty())    return;  if (!Movie::IsReadOnly())  {    // let's make the read-only flag consistent at the start of a movie.    Movie::SetReadOnly(true);    GetMenuBar()->FindItem(IDM_RECORD_READ_ONLY)->Check();  }  if (Movie::PlayInput(WxStrToStr(path)))    BootGame("");}
开发者ID:TwitchPlaysPokemon,项目名称:dolphinWatch,代码行数:21,


示例10: wxDialog

BacklashGraph::BacklashGraph(wxDialog *parent, BacklashTool *pBL)    : wxDialog(parent, wxID_ANY, wxGetTranslation(_("Backlash Results")), wxDefaultPosition, wxSize(500, 400)){    m_BLT = pBL;    // Just but a big button area for the graph with a button below it    wxBoxSizer *vSizer = new wxBoxSizer(wxVERTICAL);    // Use a bitmap button so we don't waste cycles in paint events    wxBitmap theGraph = CreateGraph(450, 300);    wxBitmapButton *graphButton = new wxBitmapButton(this, wxID_ANY, theGraph, wxDefaultPosition, wxSize(450, 300), wxBU_AUTODRAW | wxBU_EXACTFIT);    vSizer->Add(graphButton, 0, wxALIGN_CENTER_HORIZONTAL | wxALL | wxFIXED_MINSIZE, 5);    graphButton->SetBitmapDisabled(theGraph);    graphButton->Enable(false);    // ok button because we're modal    vSizer->Add(        CreateButtonSizer(wxOK),        wxSizerFlags(0).Expand().Border(wxALL, 10));    SetSizerAndFit(vSizer);}
开发者ID:simonct,项目名称:phd2,代码行数:21,


示例11: wxT

void EditToolBar::RegenerateTooltips(){#if wxUSE_TOOLTIPS   static const struct Entry {      int tool;      wxString commandName;      wxString untranslatedLabel;   } table[] = {      { ETBCutID,      wxT("Cut"),         XO("Cut")  },      { ETBCopyID,     wxT("Copy"),        XO("Copy")  },      { ETBPasteID,    wxT("Paste"),       XO("Paste")  },      { ETBTrimID,     wxT("Trim"),        XO("Trim Audio")  },      { ETBSilenceID,  wxT("Silence"),     XO("Silence Audio")  },      { ETBUndoID,     wxT("Undo"),        XO("Undo")  },      { ETBRedoID,     wxT("Redo"),        XO("Redo")  },#ifdef EXPERIMENTAL_SYNC_LOCK      { ETBSyncLockID, wxT("SyncLock"),    XO("Sync-Lock Tracks")  },#endif      { ETBZoomInID,   wxT("ZoomIn"),      XO("Zoom In")  },      { ETBZoomOutID,  wxT("ZoomOut"),     XO("Zoom Out")  },      { ETBZoomSelID,  wxT("ZoomSel"),     XO("Fit Selection")  },      { ETBZoomFitID,  wxT("FitInWindow"), XO("Fit Project")  },#if defined(EXPERIMENTAL_EFFECTS_RACK)      { ETBEffectsID,  wxT(""),            XO("Open Effects Rack")  },#endif   };   std::vector<wxString> commands;   for (const auto &entry : table) {      commands.clear();      commands.push_back(wxGetTranslation(entry.untranslatedLabel));      commands.push_back(entry.commandName);      ToolBar::SetButtonToolTip(*mButtons[entry.tool], commands);   }#endif}
开发者ID:Grunji,项目名称:audacity,代码行数:39,


示例12: wxASSERT

EffectDistortion::EffectDistortion(){   wxASSERT(kNumTableTypes == WXSIZEOF(kTableTypeStrings));   mParams.mTableChoiceIndx = DEF_TableTypeIndx;   mParams.mDCBlock = DEF_DCBlock;   mParams.mThreshold_dB = DEF_Threshold_dB;   mThreshold = DB_TO_LINEAR(mParams.mThreshold_dB);   mParams.mNoiseFloor = DEF_NoiseFloor;   mParams.mParam1 = DEF_Param1;   mParams.mParam2 = DEF_Param2;   mParams.mRepeats = DEF_Repeats;   mMakeupGain = 1.0;   mbSavedFilterState = DEF_DCBlock;   for (int i = 0; i < kNumTableTypes; i++)   {      mTableTypes.Add(wxGetTranslation(kTableTypeStrings[i]));   }   SetLinearEffectFlag(false);}
开发者ID:alendubri,项目名称:audacity,代码行数:22,


示例13: _

/* static */wxString wxFontMapperBase::GetEncodingDescription(wxFontEncoding encoding){    if ( encoding == wxFONTENCODING_DEFAULT )    {        return _("Default encoding");    }    const size_t count = WXSIZEOF(gs_encodingDescs);    for ( size_t i = 0; i < count; i++ )    {        if ( gs_encodings[i] == encoding )        {            return wxGetTranslation(gs_encodingDescs[i]);        }    }    wxString str;    str.Printf(_("Unknown encoding (%d)"), encoding);    return str;}
开发者ID:dezelin,项目名称:wxWidgets,代码行数:23,


示例14: while

void frmGrantWizard::AddObjects(pgCollection *collection){	bool traverseKids = (!collection->IsCollection() || collection->GetMetaType() == PGM_SCHEMA);	if (!traverseKids)	{		pgaFactory *factory = collection->GetFactory();		if (!factory->IsCollectionFor(tableFactory) &&		        !factory->IsCollectionFor(functionFactory) &&		        !factory->IsCollectionFor(triggerFunctionFactory) &&		        !factory->IsCollectionFor(procedureFactory) &&		        !factory->IsCollectionFor(viewFactory) &&		        !factory->IsCollectionFor(extTableFactory) &&		        !factory->IsCollectionFor(sequenceFactory))			return;	}	wxCookieType cookie;	wxTreeItemId item = mainForm->GetBrowser()->GetFirstChild(collection->GetId(), cookie);	while (item)	{		pgObject *obj = mainForm->GetBrowser()->GetObject(item);		if (obj)		{			if (traverseKids)				AddObjects((pgCollection *)obj);			else			{				if (obj->CanEdit())				{					objectArray.Add(obj);					chkList->Append((wxString)wxGetTranslation(obj->GetTypeName()) + wxT(" ") + obj->GetFullIdentifier());				}			}		}		item = mainForm->GetBrowser()->GetNextChild(collection->GetId(), cookie);	}}
开发者ID:AnnaSkawinska,项目名称:pgadmin3,代码行数:39,


示例15: WXUNUSED

void MyFrame::OnTest1(wxCommandEvent& WXUNUSED(event)){    const wxString& title = _("Testing _() (gettext)");    // NOTE: using the wxTRANSLATE() macro here we won't show a localized    //       string in the text entry dialog; we'll simply show the un-translated    //       string; however if the user press "ok" without altering the text,    //       since the "default value" string has been extracted by xgettext    //       the wxGetTranslation call later will manage to return a localized    //       string    wxTextEntryDialog d(this, _("Please enter text to translate"),                        title, wxTRANSLATE("default value"));    if (d.ShowModal() == wxID_OK)    {        wxString v = d.GetValue();        wxString s(title);        s << "/n" << v << " -> "            << wxGetTranslation(v.c_str()) << "/n";        wxMessageBox(s);    }}
开发者ID:ExperimentationBox,项目名称:Edenite,代码行数:22,


示例16: systemMessage

void systemMessage(int id, const char* fmt, ...){	static char* buf = NULL;	static int buflen = 80;	va_list args;	// auto-conversion of wxCharBuffer to const char * seems broken	// so save underlying wxCharBuffer (or create one of none is used)	wxCharBuffer _fmt(wxString(wxGetTranslation(wxString(fmt, wxConvLibc))).utf8_str());	if (!buf)	{		buf = (char*)malloc(buflen);		if (!buf)			exit(1);	}	while (1)	{		va_start(args, fmt);		int needsz = vsnprintf(buf, buflen, _fmt.data(), args);		va_end(args);		if (needsz < buflen)			break;		while (buflen <= needsz)			buflen *= 2;		free(buf);		buf = (char*)malloc(buflen);		if (!buf)			exit(1);	}	wxLogError(wxT("%s"), wxString(buf, wxConvLibc).c_str());}
开发者ID:MrSwiss,项目名称:visualboyadvance-m,代码行数:38,


示例17: enableEditDeleteButtons

void mmAssetsPanel::updateExtraAssetData(int selIndex){    wxStaticText* st = (wxStaticText*)FindWindow(IDC_PANEL_ASSET_STATIC_DETAILS);    wxStaticText* stm = (wxStaticText*)FindWindow(IDC_PANEL_ASSET_STATIC_DETAILS_MINI);    if (selIndex > -1)    {        const Model_Asset::Data& asset = this->m_assets[selIndex];        enableEditDeleteButtons(true);        wxString miniInfo;        miniInfo << "/t" << _("Change in Value") << ": "<< wxGetTranslation(asset.VALUECHANGE);        if (Model_Asset::rate(asset) != Model_Asset::RATE_NONE)            miniInfo<< " = " << asset.VALUECHANGERATE<< "%";        st->SetLabelText(asset.NOTES);        stm->SetLabelText(miniInfo);    }    else    {        stm->SetLabelText("");        st->SetLabelText(this->tips_);        enableEditDeleteButtons(false);    }}
开发者ID:afeimsdn,项目名称:moneymanagerex,代码行数:23,


示例18: enableEditDeleteButtons

void mmAssetsPanel::updateExtraAssetData(int selIndex){    wxStaticText* st = (wxStaticText*)FindWindow(IDC_PANEL_ASSET_STATIC_DETAILS);    wxStaticText* stm = (wxStaticText*)FindWindow(IDC_PANEL_ASSET_STATIC_DETAILS_MINI);    if (selIndex > -1)    {        const Model_Asset::Data& asset = this->m_assets[selIndex];        enableEditDeleteButtons(true);        const auto& change_rate = (Model_Asset::rate(asset) != Model_Asset::RATE_NONE)            ? wxString::Format("%.2f %%", asset.VALUECHANGERATE) : "";        const wxString& miniInfo = " " + wxString::Format(_("Change in Value: %s %s")            , wxGetTranslation(asset.VALUECHANGE), change_rate);        st->SetLabelText(asset.NOTES);        stm->SetLabelText(miniInfo);    }    else    {        stm->SetLabelText("");        st->SetLabelText(this->tips_);        enableEditDeleteButtons(false);    }}
开发者ID:saga64,项目名称:moneymanagerex,代码行数:23,


示例19: GetConfig

void wxGISApplicationEx::SerializeFramePosEx(bool bSave){	wxGISAppConfig oConfig = GetConfig();	if(!oConfig.IsOk())		return;	wxXmlNode *pPerspectiveXmlNode = oConfig.GetConfigNode(enumGISHKCU, GetAppName() + wxString(wxT("/frame/perspective")));	if(bSave)		oConfig.Write(enumGISHKCU, GetAppName() + wxString(wxT("/frame/perspective/data")), m_mgr.SavePerspective());	else	{		wxString wxPerspective = oConfig.Read(enumGISHKCU, GetAppName() + wxString(wxT("/frame/perspective/data")), wxEmptyString);		m_mgr.LoadPerspective(wxPerspective);        //update captions for current locale        wxAuiPaneInfoArray arr = m_mgr.GetAllPanes();        for (size_t i = 0; i < arr.GetCount(); ++i)        {            wxString sLocCaption = wxGetTranslation(arr[i].caption);            m_mgr.GetPane(arr[i].name).Caption(sLocCaption);        }	}}
开发者ID:GimpoByte,项目名称:nextgismanager,代码行数:23,


示例20: switch

void CFrame::OnInstallWAD(wxCommandEvent& event){  std::string fileName;  switch (event.GetId())  {  case IDM_LIST_INSTALL_WAD:  {    const GameListItem* iso = m_GameListCtrl->GetSelectedISO();    if (!iso)      return;    fileName = iso->GetFileName();    break;  }  case IDM_MENU_INSTALL_WAD:  {    wxString path = wxFileSelector(        _("Select a Wii WAD file to install"), wxEmptyString, wxEmptyString, wxEmptyString,        _("Wii WAD files (*.wad)") + "|*.wad|" + wxGetTranslation(wxALL_FILES),        wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST, this);    fileName = WxStrToStr(path);    break;  }  default:    return;  }  wxProgressDialog dialog(_("Installing WAD..."), _("Working..."), 1000, this,                          wxPD_APP_MODAL | wxPD_ELAPSED_TIME | wxPD_ESTIMATED_TIME |                              wxPD_REMAINING_TIME | wxPD_SMOOTH);  u64 titleID = DiscIO::CNANDContentManager::Access().Install_WiiWAD(fileName);  if (titleID == TITLEID_SYSMENU)  {    UpdateWiiMenuChoice();  }}
开发者ID:TwitchPlaysPokemon,项目名称:dolphinWatch,代码行数:37,


示例21: wxT

void TranscriptionToolBar::RegenerateTooltips(){   // We could also mention the shift- and ctrl-modified versions in the   // tool tip... but it would get long   static const struct Entry {      int tool;      wxString commandName;      wxString untranslatedLabel;   } table[] = {      { TTB_PlaySpeed,   wxT("PlayAtSpeed"),    XO("Play-at-speed")  },   };   std::vector<wxString> commands;   for (const auto &entry : table) {      commands.clear();      commands.push_back(wxGetTranslation(entry.untranslatedLabel));      commands.push_back(entry.commandName);      ToolBar::SetButtonToolTip(*mButtons[entry.tool], commands);   }#ifdef EXPERIMENTAL_VOICE_DETECTION   mButtons[TTB_StartOn]->SetToolTip(TRANSLATABLE("Left-to-On"));   mButtons[TTB_EndOn]->SetToolTip(   TRANSLATABLE("Right-to-Off"));   mButtons[TTB_StartOff]->SetToolTip(   TRANSLATABLE("Left-to-Off"));   mButtons[TTB_EndOff]->SetToolTip(   TRANSLATABLE("Right-to-On"));   mButtons[TTB_SelectSound]->SetToolTip(   TRANSLATABLE("Select-Sound"));   mButtons[TTB_SelectSilence]->SetToolTip(   TRANSLATABLE("Select-Silence"));   mButtons[TTB_AutomateSelection]->SetToolTip(   TRANSLATABLE("Make Labels"));   mButtons[TTB_MakeLabel]->SetToolTip(   TRANSLATABLE("Add Label"));   mButtons[TTB_Calibrate]->SetToolTip(   TRANSLATABLE("Calibrate"));   mSensitivitySlider->SetToolTip(TRANSLATABLE("Sensitivity"));   mKeyTypeChoice->SetToolTip(TRANSLATABLE("Key type"));#endif}
开发者ID:GYGit,项目名称:audacity-1,代码行数:37,


示例22: fillControls

void mmCurrencyDialog::fillControls(){    if (m_currency)    {        m_currencyType->SetStringSelection(wxGetTranslation(m_currency->CURRENCY_TYPE));        m_currencyName->ChangeValue(m_currency->CURRENCYNAME);        m_currencySymbol->ChangeValue(m_currency->CURRENCY_SYMBOL);        pfxTx_->ChangeValue(m_currency->PFX_SYMBOL);        sfxTx_->ChangeValue(m_currency->SFX_SYMBOL);        const wxString& decimal_separator = wxString::FromAscii(wxNumberFormatter::GetDecimalSeparator());        const wxString& ds = m_currency->DECIMAL_POINT.empty() ? decimal_separator : m_currency->DECIMAL_POINT;        decTx_->ChangeValue(ds);        grpTx_->ChangeValue(m_currency->GROUP_SEPARATOR);        m_scale = log10(m_currency->SCALE);        const wxString& scale_value = wxString::Format("%i", m_scale);        scaleTx_->ChangeValue(scale_value);        m_currencySymbol->ChangeValue(m_currency->CURRENCY_SYMBOL);        m_historic->SetValue(Model_Currency::BoolOf(m_currency->HISTORIC));    }}
开发者ID:moneymanagerex,项目名称:moneymanagerex,代码行数:24,


示例23: switch

void mmBudgetingPanel::OnMouseLeftDown(wxMouseEvent& event){    // depending on the clicked control's window id.    switch (event.GetId())    {        case ID_PANEL_BUDGETENTRY_STATIC_BITMAP_VIEW :        {            wxMenu menu;            menu.Append(MENU_VIEW_ALLBUDGETENTRIES, wxGetTranslation(VIEW_ALL));            menu.Append(MENU_VIEW_PLANNEDBUDGETENTRIES, wxGetTranslation(VIEW_PLANNED));            menu.Append(MENU_VIEW_NONZEROBUDGETENTRIES, wxGetTranslation(VIEW_NON_ZERO));            menu.Append(MENU_VIEW_INCOMEBUDGETENTRIES, wxGetTranslation(VIEW_INCOME));            menu.Append(MENU_VIEW_EXPENSEBUDGETENTRIES, wxGetTranslation(VIEW_EXPENSE));            menu.AppendSeparator();            menu.Append(MENU_VIEW_SUMMARYBUDGETENTRIES, wxGetTranslation(VIEW_SUMM));            PopupMenu(&menu, event.GetPosition());            break;        }    }    event.Skip();}
开发者ID:bacanhtai,项目名称:moneymanagerex,代码行数:21,


示例24: bsc

//.........这里部分代码省略.........    event.SetProjectName(pname);    event.SetConfigurationName(m_info.GetConfiguration());    if(EventNotifier::Get()->ProcessEvent(event)) {        // the build is being handled by some plugin, no need to build it        // using the standard way        return;    }    // Send the EVENT_STARTED : even if this event is sent, next event will    // be post, so no way to be sure the the build process has not started    SendStartMsg();    // if we require to run the makefile generation command only, replace the 'cmd' with the    // generation command line    BuildConfigPtr bldConf = w->GetProjBuildConf(m_info.GetProject(), m_info.GetConfiguration());    if(m_premakeOnly && bldConf) {        BuildConfigPtr bldConf = w->GetProjBuildConf(m_info.GetProject(), m_info.GetConfiguration());        if(bldConf) {            cmd = bldConf->GetMakeGenerationCommand();        }    }    if(bldConf) {        wxString cmpType = bldConf->GetCompilerType();        CompilerPtr cmp = bsc->GetCompiler(cmpType);        if(cmp) {            // Add the 'bin' folder of the compiler to the PATH environment variable            wxString scxx = cmp->GetTool("CXX");            scxx.Trim().Trim(false);            scxx.StartsWith("/"", &scxx);            scxx.EndsWith("/"", &scxx);            // Strip the double quotes            wxFileName cxx(scxx);            wxString pathvar;            pathvar << cxx.GetPath() << clPATH_SEPARATOR;                        // If we have an additional path, add it as well            if(!cmp->GetPathVariable().IsEmpty()) {                pathvar << cmp->GetPathVariable() << clPATH_SEPARATOR;            }            pathvar << "$PATH";            om["PATH"] = pathvar;        }    }    if(cmd.IsEmpty()) {        // if we got an error string, use it        if(errMsg.IsEmpty() == false) {            AppendLine(errMsg);        } else {            AppendLine(_("Command line is empty. Build aborted."));        }        return;    }    WrapInShell(cmd);    DirSaver ds;    DoSetWorkingDirectory(proj, false, m_fileName.IsEmpty() == false);    // expand the variables of the command    cmd = ExpandAllVariables(cmd, w, m_info.GetProject(), m_info.GetConfiguration(), m_fileName);    // print the build command    AppendLine(cmd + wxT("/n"));    if(m_info.GetProjectOnly() || m_fileName.IsEmpty() == false) {        // set working directory        DoSetWorkingDirectory(proj, false, m_fileName.IsEmpty() == false);    }    // print the prefix message of the build start. This is important since the parser relies    // on this message    if(m_info.GetProjectOnly() || m_fileName.IsEmpty() == false) {        wxString configName(m_info.GetConfiguration());        // also, send another message to the main frame, indicating which project is being built        // and what configuration        wxString text;        text << wxGetTranslation(BUILD_PROJECT_PREFIX) << m_info.GetProject() << wxT(" - ") << configName << wxT(" ]");        if(m_fileName.IsEmpty()) {            text << wxT("----------/n");        } else if(m_preprocessOnly) {            text << wxT(" (Preprocess Single File)----------/n");        } else {            text << wxT(" (Single File Build)----------/n");        }        AppendLine(text);    }    EnvSetter envir(env, &om, proj->GetName());    m_proc = CreateAsyncProcess(this, cmd);    if(!m_proc) {        wxString message;        message << _("Failed to start build process, command: ") << cmd << _(", process terminated with exit code: 0");        AppendLine(message);        return;    }}
开发者ID:capturePointer,项目名称:codelite,代码行数:101,


示例25: wxStringTranslator

std::string wxStringTranslator(const char *text){    return WxStrToStr(wxGetTranslation(wxString::FromUTF8(text)));}
开发者ID:podMatthias,项目名称:dolphin,代码行数:4,


示例26: GetLong

wxObject *wxRadioBoxXmlHandler::DoCreateResource(){    if ( m_class == wxT("wxRadioBox"))    {        // find the selection        long selection = GetLong( wxT("selection"), -1 );        // need to build the list of strings from children        m_insideBox = true;        CreateChildrenPrivately( NULL, GetParamNode(wxT("content")));        XRC_MAKE_INSTANCE(control, wxRadioBox)        control->Create(m_parentAsWindow,                        GetID(),                        GetText(wxT("label")),                        GetPosition(), GetSize(),                        m_labels,                        GetLong(wxT("dimension"), 1),                        GetStyle(),                        wxDefaultValidator,                        GetName());        if (selection != -1)            control->SetSelection(selection);        SetupWindow(control);        const unsigned count = m_labels.size();        for( unsigned i = 0; i < count; i++ )        {#if wxUSE_TOOLTIPS            if ( !m_tooltips[i].empty() )                control->SetItemToolTip(i, m_tooltips[i]);#endif // wxUSE_TOOLTIPS#if wxUSE_HELP            if ( m_helptextSpecified[i] )                control->SetItemHelpText(i, m_helptexts[i]);#endif // wxUSE_HELP            if ( !m_isShown[i] )                control->Show(i, false);            if ( !m_isEnabled[i] )                control->Enable(i, false);        }        // forget information about the items of this radiobox, we should start        // afresh for the next one        m_labels.clear();#if wxUSE_TOOLTIPS        m_tooltips.clear();#endif // wxUSE_TOOLTIPS#if wxUSE_HELP        m_helptexts.clear();        m_helptextSpecified.clear();#endif // wxUSE_HELP        m_isShown.clear();        m_isEnabled.clear();        return control;    }    else // inside the radiobox element    {        // we handle handle <item>Label</item> constructs here, and the item        // tag can have tooltip, helptext, enabled and hidden attributes        wxString label = GetNodeContent(m_node);        wxString tooltip;        m_node->GetAttribute(wxT("tooltip"), &tooltip);        wxString helptext;        bool hasHelptext = m_node->GetAttribute(wxT("helptext"), &helptext);        if (m_resource->GetFlags() & wxXRC_USE_LOCALE)        {            label = wxGetTranslation(label, m_resource->GetDomain());            if ( !tooltip.empty() )                tooltip = wxGetTranslation(tooltip, m_resource->GetDomain());            if ( hasHelptext )                helptext = wxGetTranslation(helptext, m_resource->GetDomain());        }        m_labels.push_back(label);#if wxUSE_TOOLTIPS        m_tooltips.push_back(tooltip);#endif // wxUSE_TOOLTIPS#if wxUSE_HELP        m_helptexts.push_back(helptext);        m_helptextSpecified.push_back(hasHelptext);#endif // wxUSE_HELP        m_isEnabled.push_back(GetBoolAttr("enabled", 1));        m_isShown.push_back(!GetBoolAttr("hidden", 0));        return NULL;    }//.........这里部分代码省略.........
开发者ID:BradleyKarkanen,项目名称:pcsx2,代码行数:101,



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


C++ wxGlobalDisplay函数代码示例
C++ wxGetTextFromUser函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。