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

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

51自学网 2021-06-01 21:16:55
  C++
这篇教程C++ GetTranslation函数代码示例写得很实用,希望能帮到您。

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

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

示例1: while

std::string CFileDialog::AskPassword(LIBSU::CLibSU &suhandler){    std::string ret;        while (true)    {        ret = InputBox(GetTranslation("Your account doesn't have permissions to "                "create the directory./nTo create it with the root "                "(administrator) account, please enter it's password below."), "", 0, '*');        if (ret.empty())            break;        if (!suhandler.TestSU(ret.c_str()))        {            if (suhandler.GetError() == LIBSU::CLibSU::SU_ERROR_INCORRECTPASS)                WarningBox(GetTranslation("Incorrect password given for root user/nPlease retype"));            else            {                WarningBox(GetTranslation("Could not use su to gain root access./n"                                          "Make sure you can use su (adding the current user to the wheel group may help)."));                break;            }        }        else            break;    }        return ret;}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:30,


示例2: gtk_hbox_new

void CInstaller::InitButtonSection(GtkWidget *parentbox){    GtkWidget *hbox = gtk_hbox_new(FALSE, 0);        GtkWidget *buttonbox = gtk_hbutton_box_new();        m_pCancelLabel = gtk_label_new(GetTranslation("Cancel"));    m_pCancelButton = CreateButton(m_pCancelLabel, GTK_STOCK_CANCEL);    g_signal_connect(G_OBJECT(m_pCancelButton), "clicked", G_CALLBACK(CancelCB), this);    gtk_box_pack_start(GTK_BOX(buttonbox), m_pCancelButton, FALSE, FALSE, 5);        gtk_box_pack_start(GTK_BOX(hbox), buttonbox, FALSE, FALSE, 5);        buttonbox = gtk_hbutton_box_new();    gtk_box_set_spacing(GTK_BOX(buttonbox), 15);        m_pBackLabel = gtk_label_new(GetTranslation("Back"));    m_pBackButton = CreateButton(m_pBackLabel, GTK_STOCK_GO_BACK);    g_signal_connect(G_OBJECT(m_pBackButton), "clicked", G_CALLBACK(BackCB), this);    gtk_box_pack_end(GTK_BOX(buttonbox), m_pBackButton, FALSE, FALSE, 5);    m_pNextLabel = gtk_label_new(GetTranslation("Next"));    m_pNextButton = CreateButton(m_pNextLabel, GTK_STOCK_GO_FORWARD);    g_signal_connect(G_OBJECT(m_pNextButton), "clicked", G_CALLBACK(NextCB), this);    gtk_box_pack_end(GTK_BOX(buttonbox), m_pNextButton, FALSE, FALSE, 5);    gtk_box_pack_end(GTK_BOX(hbox), buttonbox, FALSE, FALSE, 5);        gtk_box_pack_start(GTK_BOX(parentbox), hbox, FALSE, FALSE, GetMainSpacing());}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:30,


示例3: GetCurEntry

void CLuaCFGMenu::ShowChoiceMenu(){    SEntry *entry = GetCurEntry();    std::string item = m_pMenu->Value();    NNCurses::TColorPair fc(COLOR_GREEN, COLOR_BLUE), dfc(COLOR_WHITE, COLOR_BLUE);    const char *msg = CreateText(GetTranslation("Please choose a new value for %s"), GetTranslation(item.c_str()));    NNCurses::CDialog *dialog = NNCurses::CreateBaseDialog(fc, dfc, 20, 0, msg);        NNCurses::CMenu *menu = new NNCurses::CMenu(15, 8);        for (TOptionsType::const_iterator it=entry->options.begin(); it!=entry->options.end(); it++)        menu->AddEntry(*it, GetTranslation(*it));        if (!entry->val.empty())        menu->Select(entry->val);        dialog->AddWidget(menu);        dialog->AddButton(new NNCurses::CButton(GetTranslation("OK")), true, false);        NNCurses::CButton *cancelbutton = new NNCurses::CButton(GetTranslation("Cancel"));    dialog->AddButton(cancelbutton, true, false);        NNCurses::TUI.AddGroup(dialog, true);        while (dialog->Run())        ;        if (dialog->ActivatedWidget() != cancelbutton)        entry->val = menu->Value();        delete dialog;}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:33,


示例4: switch

void CParasite::Retreat(CStateManager& mgr, EStateMsg msg, float) {  switch (msg) {  case EStateMsg::Activate: {    zeus::CVector3f dir = mgr.GetPlayer().GetTranslation() - GetTranslation();    dir.z() = 0.f;    if (dir.canBeNormalized())      dir.normalize();    else      dir = mgr.GetPlayer().GetTransform().basis[1];    x5f8_targetPos = GetTranslation() - dir * 3.f;    FaceTarget(x5f8_targetPos);    x5e8_stateProgress = 0;    x742_27_landed = false;    x742_28_onGround = false;    x742_25_jumpVelDirty = true;    x450_bodyController->GetCommandMgr().DeliverCmd(CBCJumpCmd(x5f8_targetPos, pas::EJumpType::One));    break;  }  case EStateMsg::Update:    x3b4_speed = 1.f;    break;  case EStateMsg::Deactivate:    x742_28_onGround = true;    break;  }}
开发者ID:AxioDL,项目名称:urde,代码行数:26,


示例5: CoreUpdateLanguage

void CInstaller::CoreUpdateLanguage(){    CBaseInstall::CoreUpdateLanguage();    m_pCancelButton->SetText(GetTranslation("Cancel"));    m_pPrevButton->SetText(GetTranslation("Back"));    UpdateButtons();}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:7,


示例6: while

const char *CFLTKDirDialog::AskPassword(CSuTerm *suterm){    const char *ret = NULL;    while (true)    {        ret = fl_password(GetTranslation("Your account doesn't have permissions to "                                         "create the directory./nTo create it with the root "                                         "(administrator) account, please enter the administrative password below."));        if (!ret || !ret[0])            break;        try        {            if (!suterm->TestPassword(ret))                fl_alert(GetTranslation("Incorrect password given, please retype."));            else                break;        }        catch (Exceptions::CExIO &e)        {            fl_alert(e.what());            break;        }    }    return ret;}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:29,


示例7: while

const char *CFLTKDirDialog::AskPassword(LIBSU::CLibSU &suhandler){    const char *ret = NULL;        while (true)    {        ret = fl_password(GetTranslation("Your account doesn't have permissions to "                "create the directory./nTo create it with the root "                "(administrator) account, please enter it's password below."));        if (!ret || !ret[0])            break;        if (!suhandler.TestSU(ret))        {            if (suhandler.GetError() == LIBSU::CLibSU::SU_ERROR_INCORRECTPASS)                fl_alert(GetTranslation("Incorrect password given for root user/nPlease retype"));            else            {                fl_alert(GetTranslation("Could not use su to gain root access./n"                        "Make sure you can use su (adding the current user to the wheel group may help)."));                break;            }        }        else            break;    }        return ret;}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:30,


示例8: main

int main(int argc, char *argv[]){    if (!MainInit(argc, argv))    {        printf("Error: %s/n", GetTranslation("Init failed, aborting"));        return 1;    }        // Init    if (!(MainWin = initscr())) throwerror(false, "Could not init ncurses");    if (!(CDKScreen = initCDKScreen(MainWin))) throwerror(false, "Could not init CDK");    initCDKColor();    if ((InstallInfo.dest_dir_type == DEST_DEFAULT) && !ReadAccess(InstallInfo.dest_dir))        throwerror(true, CreateText("This installer will install files to the following directory:/n%s/n"                                    "However you don't have read permissions to this directory/n"                                    "Please restart the installer as a user who does or as the root user",                                    InstallInfo.dest_dir.c_str()));        int i=0;    while(Functions[i])    {        if (Functions[i]()) i++;        else        {            if (YesNoBox(GetTranslation("This will abort the installation/nAre you sure?")))                break;        }    }    EndProg();    return 0;}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:33,


示例9: ShowWelcome

bool ShowWelcome(){    char *title = CreateText("<C></B/29>%s<!29!B>", GetTranslation("Welcome"));    char filename[] = "config/welcome";    char *buttons[2] = { GetTranslation("OK"), GetTranslation("Cancel") };    int ret = ViewFile(filename, buttons, 2, title);    return (ret==NO_FILE || ret==0);}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:8,


示例10: ShowLicense

bool ShowLicense(){    char *title = CreateText("<C></B/29>%s<!29!B>", GetTranslation("License agreement"));    char filename[] = "config/license";    char *buttons[2] = { GetTranslation("Agree"), GetTranslation("Decline") };        int ret = ViewFile(filename, buttons, 2, title);    return (ret==NO_FILE || ret==0);}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:9,


示例11: UpdateDesc

bool CLuaCFGMenu::CoreHandleEvent(NNCurses::CWidget *emitter, int event){    if (CLuaWidget::CoreHandleEvent(emitter, event))        return true;        if (m_pMenu->Empty())        return false;    if (emitter == m_pMenu)    {        if (event == EVENT_DATACHANGED)        {            UpdateDesc();            return true;        }        else if (event == EVENT_CALLBACK)        {            SEntry *entry = GetCurEntry();            std::string item = m_pMenu->Value();                if (entry)            {                switch (entry->type)                {                    case TYPE_STRING:                    {                        std::string ret = NNCurses::InputBox(CreateText(GetTranslation("Please enter a new value for %s"),                                                             GetTranslation(item.c_str())), entry->val);                        if (!ret.empty())                            entry->val = ret;                        break;                    }                    case TYPE_DIR:                    {                        std::string ret = NNCurses::DirectoryBox(CreateText(GetTranslation("Please choose a new value for %s"),                                                             GetTranslation(item.c_str())), entry->val);                        if (!ret.empty())                            entry->val = ret;                        break;                    }                    case TYPE_LIST:                    case TYPE_BOOL:                        ShowChoiceMenu();                        break;                }                                LuaDataChanged();                return true;            }        }    }        return false;}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:54,


示例12: GetTranslation

tvector3 CGizmoTransformMove::RayTrace(tvector3& rayOrigin, tvector3& rayDir, tvector3& norm){    tvector3 df,inters;    m_plan=vector4(GetTranslation(), norm);    m_plan.RayInter(inters,rayOrigin,rayDir);    ptd = inters;    df = inters - GetTranslation();    df /=GetScreenFactor();    m_LockVertex = inters;    return df;}
开发者ID:hkrn,项目名称:LibGizmo,代码行数:11,


示例13: GetOptions

void CLuaRadioButton::AddButton(const std::string &label, TSTLVecSize n){    const TSTLVecSize size = GetOptions().size();    if (n >= size)        m_pRadioButton->AddChoice(GetTranslation(label));    else        m_pRadioButton->InsertChoice(GetTranslation(label), n);            if (size == 1)        m_pRadioButton->Select(0);}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:11,


示例14: GetTranslation

bool CInstaller::AskQuit(){    const char *msg;    if (Installing())        msg = GetTranslation("Install commands are still running/n"        "If you abort now this may lead to a broken installation/n"        "Are you sure?");    else        msg = GetTranslation("This will abort the installation/nAre you sure?");        return YesNoBox(msg);}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:12,


示例15: m_bCancelled

CFileDialog::CFileDialog(const std::string &msg, const std::string &start) : m_bCancelled(true){    m_Directory = (start.empty()) ? "/" : GetFirstValidDir(start);        StartPack((m_pLabel = new CLabel(msg)), true, true, 1, 1);    StartPack(m_pFileMenu = new CMenu(25, 8), true, true, 0, 0);    StartPack((m_pInputField = new CInputField(m_Directory, CInputField::STRING, 1024)), false, false, 1, 0);    AddButton(m_pOKButton = new CButton(GetTranslation("Open directory")), true, false);    AddButton(m_pCancelButton = new CButton(GetTranslation("Cancel")), true, false);        OpenDir(m_Directory);}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:12,


示例16: FinishInstall

bool FinishInstall(){    char *file = CreateText("%s/config/finish", InstallInfo.own_dir.c_str());    if (FileExists(file))    {        char *title = CreateText("<C></B/29>%s<!29!B>", GetTranslation("Please read the following text"));        char *buttons[1] = { GetTranslation("OK") };        ViewFile(file, buttons, 1, title);        return true;    }        return true;}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:13,


示例17: SetAboutLabel

void CInstaller::CoreUpdateLanguage(){    CBaseInstall::CoreUpdateLanguage();        SetAboutLabel();        gtk_label_set(GTK_LABEL(m_pCancelLabel), GetTranslation("Cancel"));    gtk_label_set(GTK_LABEL(m_pBackLabel), GetTranslation("Back"));    UpdateButtons(); // Sets Next label    if (!m_CurTitle.empty())        SetTitle(m_CurTitle);}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:13,


示例18: GetTranslation

void CInstaller::AskQuit(){    const char *msg;    if (Installing())        msg = GetTranslation("Install commands are still running/n"                "If you abort now this may lead to a broken installation/n"                "Are you sure?");    else        msg = GetTranslation("This will abort the installation/nAre you sure?");        if (NNCurses::YesNoBox(msg))        throw Exceptions::CExUser();}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:13,


示例19: GetScreen

void CInstaller::CoreUpdateLanguage(void){    CBaseInstall::CoreUpdateLanguage();    CFLTKBase::CoreUpdateLanguage();    CInstallScreen *screen = GetScreen(m_pWizard->value());    if (screen)        SetTitle(GetTranslation(screen->GetTitle()));        m_pAboutBox->label(GetTranslation("About"));    m_pCancelButton->label(GetTranslation("Cancel"));    m_pBackButton->label(CreateText("@<-    %s", GetTranslation("Back")));    m_pNextButton->label(CreateText("%s    @->", GetTranslation("Next")));}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:14,


示例20: CoreSetTitle

void CLuaWidget::CoreSetTitle(){    if (!GetTitle().empty())    {        if (!m_pTitle)        {            m_pTitleBox->Enable(true);            m_pTitleBox->AddWidget(m_pTitle = new NNCurses::CLabel(GetTranslation(GetTitle()), false));            m_pTitle->SetMaxReqWidth(m_iMaxWidth);        }        else            m_pTitle->SetText(GetTranslation(GetTitle()));    }}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:14,


示例21: if

void CInstaller::UpdateButtons(void){    if (m_InstallScreens.empty() || (FirstValidScreen() &&         !m_InstallScreens[m_CurrentScreen]->HasPrevWidgets()))        m_pPrevButton->Enable(false);    else if (!m_bPrevButtonLocked)        m_pPrevButton->Enable(true);        if (m_InstallScreens.empty() || (LastValidScreen() &&         !m_InstallScreens[m_CurrentScreen]->HasNextWidgets()))        m_pNextButton->SetText(GetTranslation("Finish"));    else        m_pNextButton->SetText(GetTranslation("Next"));}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:14,


示例22: TestResult

bool FTransform::DebugEqualMatrix(const FMatrix& Matrix) const{	FTransform TestResult(Matrix);	if (!Equals(TestResult))	{		// see now which one isn't equal				if (!Scale3DEquals(TestResult.Scale3D, ScalarRegister(0.01f)))		{			UE_LOG(LogTransform, Log, TEXT("Matrix(S)/t%s"), *TestResult.GetScale3D().ToString());			UE_LOG(LogTransform, Log, TEXT("VQS(S)/t%s"), *GetScale3D().ToString());		}		// see now which one isn't equal		if (!RotationEquals(TestResult.Rotation))		{			UE_LOG(LogTransform, Log, TEXT("Matrix(R)/t%s"), *TestResult.GetRotation().ToString());			UE_LOG(LogTransform, Log, TEXT("VQS(R)/t%s"), *GetRotation().ToString());		}		// see now which one isn't equal		if (!TranslationEquals(TestResult.Translation, ScalarRegister(0.01f)))		{			UE_LOG(LogTransform, Log, TEXT("Matrix(T)/t%s"), *TestResult.GetTranslation().ToString());			UE_LOG(LogTransform, Log, TEXT("VQS(T)/t%s"), *GetTranslation().ToString());		}		return false;	}	return true;}
开发者ID:kidaa,项目名称:UnrealEngineVR,代码行数:30,


示例23: CBaseLuaWidget

CLuaInputField::CLuaInputField(const char *label, const char *desc, const char *val, int max,                               const char *type) : CBaseLuaWidget(desc), CBaseLuaInputField(label, type), m_pLabel(NULL){    const int inputh = 25;    m_pPack = new Fl_Pack(0, 0, 0, inputh);    m_pPack->resizable(NULL);    m_pPack->type(Fl_Pack::HORIZONTAL);    m_pPack->spacing(PackSpacing());    m_pPack->begin();        if (label && *label)    {        m_pLabel = new Fl_Box(0, 0, 0, inputh, GetTranslation(label));        m_pLabel->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE);        m_pLabel->labelfont(FL_COURIER); // Use a fixed font, so we can easily calc the width from GetLabelWidth()    }        if (GetType() == "number")        m_pInputField = new Fl_Int_Input(0, 0, 0, inputh);    else if (GetType() == "float")        m_pInputField = new Fl_Float_Input(0, 0, 0, inputh);    else        m_pInputField = new Fl_Input(0, 0, 0, inputh);        m_pInputField->maximum_size(max);    m_pInputField->callback(InputChangedCB, this);    m_pInputField->when(FL_WHEN_CHANGED);        if (val && *val)        m_pInputField->value(val);        m_pPack->end();    GetGroup()->add(m_pPack);}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:34,


示例24: InputBox

std::string InputBox(const std::string &msg, const std::string &init, int max, chtype out){    CDialog *dialog = CreateBaseDialog(TColorPair(COLOR_GREEN, COLOR_BLUE),                                       TColorPair(COLOR_WHITE, COLOR_BLUE), 50);        CLabel *label = new CLabel(msg, false);    label->SetMaxReqWidth(MaxW());    dialog->AddWidget(label);        CInputField *input = new CInputField(init, CInputField::STRING, max, out);    dialog->StartPack(input, true, true, 1, 0);        CButton *okbutton = new CButton(GetTranslation("OK")), *cancelbutton = new CButton(GetTranslation("Cancel"));    dialog->AddButton(okbutton, false, false);    dialog->AddButton(cancelbutton, false, false);    TUI.AddGroup(dialog, true);        while (dialog->Run())        ;        std::string ret;    if (dialog->ActivatedWidget() != cancelbutton)        ret = input->Value();        delete dialog;        return ret;}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:29,


示例25: Guard

//---------------------------------------------------------------------------UnicodeString TConfiguration::GetFileInfoString(const UnicodeString & Key,  const UnicodeString & FileName) const{  TGuard Guard(FCriticalSection);  UnicodeString Result;  void * Info = GetFileApplicationInfo(FileName);  SCOPE_EXIT  {    if (!FileName.IsEmpty() && Info)    {      FreeFileInfo(Info);    }  };  {    if ((Info != nullptr) && (GetTranslationCount(Info) > 0))    {      TTranslation Translation = GetTranslation(Info, 0);      try      {        Result = ::GetFileInfoString(Info, Translation, Key);      }      catch (const std::exception & e)      {        (void)e;        DEBUG_PRINTF(L"Error: %s", MB2W(e.what()).c_str());        Result = L"";      }    }  }  return Result;}
开发者ID:CyberShadow,项目名称:Far-NetBox,代码行数:33,


示例26: GTK_LIST_STORE

void CLuaCFGMenu::CoreAddVar(const char *name){    GtkTreeIter iter;    GtkListStore *store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(m_pVarListView)));    gtk_list_store_append(store, &iter);    gtk_list_store_set(store, &iter, COLUMN_TITLE, GetTranslation(name),                       COLUMN_DESC, GetTranslation(GetVariables()[name]->desc.c_str()),                       COLUMN_VAR, name, -1);        if (m_bInitSelection)    {        m_bInitSelection = false;        GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(m_pVarListView));        gtk_tree_selection_select_iter(selection, &iter);    }}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:16,


示例27: Guard

UnicodeString TConfiguration::GetFileFileInfoString(const UnicodeString & AKey,  const UnicodeString & AFileName, bool AllowEmpty) const{  TGuard Guard(FCriticalSection);  UnicodeString Result;  void * Info = GetFileApplicationInfo(AFileName);  SCOPE_EXIT  {    if (!AFileName.IsEmpty() && Info)    {      FreeFileInfo(Info);    }  };  if ((Info != nullptr) && (GetTranslationCount(Info) > 0))  {    TTranslation Translation = GetTranslation(Info, 0);    try    {      Result = ::GetFileInfoString(Info, Translation, AKey, AllowEmpty);    }    catch (const std::exception & e)    {      (void)e;      DEBUG_PRINTF("Error: %s", ::MB2W(e.what()).c_str());      Result.Clear();    }  }  else  {    assert(!AFileName.IsEmpty());  }  return Result;}
开发者ID:kocicjelena,项目名称:Far-NetBox,代码行数:34,



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


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