本文整理汇总了C++中GetLanguage函数的典型用法代码示例。如果您正苦于以下问题:C++ GetLanguage函数的具体用法?C++ GetLanguage怎么用?C++ GetLanguage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetLanguage函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
void wxsSlider::OnBuildCreatingCode()
{
switch ( GetLanguage() )
{
case wxsCPP:
{
AddHeader(_T("<wx/slider.h>"),GetInfo().ClassName,hfInPCH);
Codef(_T("%C(%W, %I, %d, %d, %d, %P, %S, %T, %V, %N);\n"),Value,Min,Max);
if ( TickFrequency ) Codef( _T("%ASetTickFreq(%d);\n"), TickFrequency);
if ( PageSize ) Codef( _T("%ASetPageSize(%d);\n"), PageSize);
if ( LineSize ) Codef( _T("%ASetLineSize(%d);\n"), LineSize);
if ( ThumbLength ) Codef( _T("%ASetThumbLength(%d);\n"), ThumbLength);
if ( Tick ) Codef( _T("%ASetTick(%d);\n"), Tick);
if ( SelMin || SelMax ) Codef( _T("%ASetSelection(%d, %d);\n"), SelMin, SelMax);
BuildSetupWindowCode();
return;
}
default:
{
wxsCodeMarks::Unknown(_T("wxsSlider::OnBuildCreatingCode"),GetLanguage());
}
}
}
示例2: switch
void wxsHtmlWindow::OnBuildCreatingCode()
{
switch ( GetLanguage() )
{
case wxsCPP:
{
AddHeader(_T("<wx/html/htmlwin.h>"),GetInfo().ClassName,0);
Codef(_T("%C(%W, %I, %P, %S, %T, %N);\n"));
if ( Borders.Value )
Codef(_T("%ASetBorders(%s);\n"),Borders.GetPixelsCode(GetCoderContext()).wx_str());
if ( !Url.empty() )
Codef(_T("%ALoadPage(%t);\n"),Url.wx_str());
else if ( !HtmlCode.empty() )
Codef(_T("%ASetPage(%t);\n"),HtmlCode.wx_str());
BuildSetupWindowCode();
break;
}
default:
{
wxsCodeMarks::Unknown(_T("wxsHtmlWindow::OnBuildCreatingCode"),GetLanguage());
}
}
}
示例3: switch
void wxsListbook::OnBuildCreatingCode()
{
switch ( GetLanguage() )
{
case wxsCPP:
{
AddHeader(_T("<wx/listbook.h>"),GetInfo().ClassName,0);
AddHeader(_T("<wx/notebook.h>"),_T("wxNotebookEvent"),0);
Codef(_T("%C(%W, %I, %P, %S, %T, %N);\n"));
BuildSetupWindowCode();
AddChildrenCode();
for ( int i=0; i<GetChildCount(); i++ )
{
wxsListbookExtra* LBExtra = (wxsListbookExtra*)GetChildExtra(i);
Codef(_T("%AAddPage(%o, %t, %b);\n"),i,LBExtra->m_Label.wx_str(),LBExtra->m_Selected);
}
break;
}
case wxsUnknownLanguage: // fall-through
default:
{
wxsCodeMarks::Unknown(_T("wxsListbook::OnBuildCreatingCode"),GetLanguage());
}
}
}
示例4: GetCloudsDataPath
string CloudsClip::getSubtitlesPath() {
//for Higa-san, return english subtitles
if(getLanguage() == "JAPANESE" && GetLanguage() == "JAPANESE"){
return GetCloudsDataPath() + "language/ENGLISH/subtitles/" + getSubtitlesFilename();
}
return GetCloudsDataPath() + "language/" + GetLanguage() + "/subtitles/" + getSubtitlesFilename();
}
示例5: MAKELCID
//
// Convert TAutoVal to TUString, used by TAutoString contructor and assignment
//
TAutoVal::operator TUString*()
{
BSTR v;
HRESULT stat;
LCID lcid = MAKELCID(LangUserDefault, SORT_DEFAULT);
switch (vt) {
case atByte: stat = ::VarBstrFromUI1(bVal, lcid,0, &v); break;
case atShort: stat = ::VarBstrFromI2(iVal, lcid,0, &v); break;
case atLong: stat = ::VarBstrFromI4(lVal, lcid,0, &v); break;
case atFloat: stat = ::VarBstrFromR4(fltVal,lcid,0, &v); break;
case atDouble: stat = ::VarBstrFromR8(dblVal,lcid,0, &v); break;
case atCurrency: stat = ::VarBstrFromCy(cyVal ,lcid,0, &v); break;
case atDatetime: stat = ::VarBstrFromDate(date,lcid,0, &v); break;
case atString: if (bstrVal) vt = atLoanedBSTR;
return (s.Holder=TUString::Create(bstrVal, true, GetLanguage()));
case atObject: stat = ::VarBstrFromDisp(pdispVal,GetLocale(),0, &v); break;
case atBool: stat = ::VarBstrFromBool(boolVal,lcid,0, &v); break;
case atByRef+atByte: stat = ::VarBstrFromUI1(*pbVal, lcid,0, &v); break;
case atByRef+atShort: stat = ::VarBstrFromI2(*piVal, lcid,0, &v); break;
case atByRef+atLong: stat = ::VarBstrFromI4(*plVal, lcid,0, &v); break;
case atByRef+atFloat: stat = ::VarBstrFromR4(*pfltVal,lcid,0, &v); break;
case atByRef+atDouble: stat = ::VarBstrFromR8(*pdblVal,lcid,0, &v); break;
case atByRef+atCurrency: stat = ::VarBstrFromCy(*pcyVal ,lcid,0, &v); break;
case atByRef+atDatetime: stat = ::VarBstrFromDate(*pdate,lcid,0, &v); break;
case atByRef+atString: if (*pbstrVal) vt = atByRef+atLoanedBSTR;
return (s.Holder=TUString::Create(*pbstrVal, true, GetLanguage()));
case atByRef+atBool: stat = ::VarBstrFromBool(*pbool,lcid,0,&v);break;
default: stat = (HRESULT)-1;
}
if (stat != HR_NOERROR)
TXAuto::Raise(TXAuto::xConversionFailure);
return TUString::Create(v, false, LANGIDFROMLCID(lcid));
}
示例6: switch
/*! \brief Create the initial control.
*
* \return void
*
*/
void wxsFontPickerCtrl::OnBuildCreatingCode()
{
switch ( GetLanguage() )
{
case wxsCPP:
{
AddHeader(_T("<wx/fontpicker.h>"),GetInfo().ClassName,0);
wxString sFntName = GetCoderContext()->GetUniqueName(_T("PickerFont"));
wxString sFnt = m_fdFont.BuildFontCode(sFntName, GetCoderContext());
if ( sFnt.Len()==0 )
{
sFntName = wxT("wxNullFont");
}
Codef(_T("%s"), sFnt.wx_str());
Codef(_T("%C(%W, %I, %s, %P, %S, %T, %V, %N);\n"), sFntName.wx_str());
BuildSetupWindowCode();
return;
}
case wxsUnknownLanguage: // fall-through
default:
{
wxsCodeMarks::Unknown(_T("wxsFontPickerCtrl::OnBuildCreatingCode"),GetLanguage());
}
}
}
示例7: GetUserID
/*
数据过滤
Filter /DATA =表名 /EXPR \"条件表达式\"
*/
bool TCManager::Filter(TCPacket &inP,AnaWord &aw, TCPacket &outP)
{
int nUserID = GetUserID(inP);
if (nUserID==0)
return SetResultState(false,outP,GetLanguage(UserIDIsNotFound));
int nTableIndex = -1;
int nConditionIndex = -1;
for (int i=2;i<aw.GetWordCount();i++)
{
if (aw.GetAt(i-2)=="/DATA" && aw.GetAt(i-1)=="=")
{
nTableIndex = i;
}
if (aw.GetAt(i-1)=="/EXPR")
{
nConditionIndex = i;
}
}
if (nTableIndex == -1 || nConditionIndex == -1)
return SetResultState(false,outP,GetLanguage(FormatIsError));
CDataInterface *pDI = g_system.GetCurData(nUserID,aw.GetAt(nTableIndex));
if (pDI ==NULL)
return SetResultState(false,outP,GetLanguage(UserTableIsNotFound));
string sCondition = aw.GetAt(nConditionIndex);
#ifdef WINPLAT
CTString szPath = "tlBase.dll";
TCSystem::GetModulePath(szPath);
szPath += "/DataDeal.dll";
HINSTANCE hmod = LoadLibrary(szPath.GetData());
if (hmod==NULL)
{//没有找到对应的DLL
return SetResultState(false,outP,GetLanguage(DLLFileNotFind));//"没有找到对应的DLL"
}
typedef int (*pFilter)(CDataInterface *pData, LPCSTR sCondition);
pFilter proc;
proc = (pFilter)GetProcAddress(hmod,"Filter");
if (proc==NULL)
{//"没有找到对应的过程名"
return SetResultState(false,outP,GetLanguage(ProcNameNotFind));
}
int rst = (*proc)(pDI,sCondition.c_str());
if (rst == 0)
return SetResultState(false,outP,"");
else
return SetResultState(true,outP);
#else
#endif
return SetResultState(true,outP);
}
示例8: switch
/*! \brief Create the initial control.
*
* \return void
*
*/
void wxsAnimationCtrl::OnBuildCreatingCode()
{
switch ( GetLanguage() )
{
case wxsCPP:
{
AddHeader(_T("<wx/animate.h>"),GetInfo().ClassName,hfInPCH);
wxString sAnimName = GetCoderContext()->GetUniqueName(_T("anim"));
Codef(_T("\twxAnimation %s(%n);\n"), sAnimName.wx_str(), m_sAnimation.wx_str());
Codef(_T("%C(%W, %I, %s, %P, %S, %T, %N);\n"), sAnimName.wx_str());
if(!m_bmpInactive.IsEmpty()){
Codef(_T("%ASetInactiveBitmap(%i);\n"), &m_bmpInactive, _T("wxART_OTHER"));
}
if(m_bPlay){
Codef(_T("%APlay();\n"));
}
BuildSetupWindowCode();
return;
}
case wxsUnknownLanguage: // fall-through
default:
{
wxsCodeMarks::Unknown(_T("wxsAnimationCtrl::OnBuildCreatingCode"),GetLanguage());
}
}
}
示例9: SetResultState
/*
DeleteCol表名 所在列号 列数
列号是从0开始(-1表示从后面追加)
*/
bool TCManager::DeleteCol(TCPacket &inP,AnaWord &aw, TCPacket &outP)
{
if (aw.GetWordCount() !=4)
return SetResultState(false,outP,GetLanguage(FormatIsError));
int nUserID = GetUserID(inP);
if (nUserID==0)
return SetResultState(false,outP,GetLanguage(UserIDIsNotFound));
CDataInterface *pDI = g_system.GetCurData(nUserID,aw.GetAt(1));
if (pDI ==NULL)
return SetResultState(false,outP,GetLanguage(UserTableIsNotFound));
string sColStart = aw.GetAt(2);
int nColStart = atoi(sColStart.c_str());
string sColNum = aw.GetAt(3);
int nColNum = atoi(sColNum.c_str());
if (nColStart<0 || nColStart+nColNum-1 > pDI->GetColCount())
return SetResultState(false,outP,GetLanguage(ColIndexOutOfRangeFail));
while (nColNum)
{
pDI->m_DataAccess.m_pFieldList->Delete(nColStart);
nColNum--;
}
return SetResultState(true,outP);
}
示例10: switch
void wxsDialog::OnBuildCreatingCode()
{
switch ( GetLanguage() )
{
case wxsCPP:
{
AddHeader(_T("<wx/dialog.h>"),GetInfo().ClassName,hfInPCH);
Codef(_T("%C(%W, %I, %t, wxDefaultPosition, wxDefaultSize, %T, %N);\n"),Title.wx_str());
if ( !GetBaseProps()->m_Size.IsDefault || (GetPropertiesFlags()&flSource && IsRootItem() && GetBaseProps()->m_SizeFromArg) )
{
Codef(_T("%ASetClientSize(%S);\n"));
}
if ( !GetBaseProps()->m_Position.IsDefault || (GetPropertiesFlags()&flSource && IsRootItem() && GetBaseProps()->m_PositionFromArg) )
{
Codef(_T("%AMove(%P);\n"));
}
BuildSetupWindowCode();
AddChildrenCode();
if ( Centered )
{
Codef(_T("%ACenter();\n"));
}
return;
}
case wxsUnknownLanguage: // fall-through
default:
{
wxsCodeMarks::Unknown(_T("wxsDialog::OnBuildCreatingCode"),GetLanguage());
}
}
}
示例11: switch
void wxsChoice::OnBuildCreatingCode()
{
switch ( GetLanguage() )
{
case wxsCPP:
{
AddHeader(_T("<wx/choice.h>"),GetInfo().ClassName,hfInPCH);
Codef(_T("%C(%W, %I, %P, %S, 0, 0, %T, %V, %N);\n"));
for ( size_t i = 0; i < ArrayChoices.GetCount(); ++i )
{
if ( DefaultSelection == (int)i )
{
Codef(_T("%ASetSelection( "));
}
Codef(_T("%AAppend(%t)"),ArrayChoices[i].wx_str());
if ( DefaultSelection == (int)i )
{
Codef(_T(" )"));
}
Codef(_T(";\n"));
}
BuildSetupWindowCode();
return;
}
case wxsUnknownLanguage: // fall through
default:
{
wxsCodeMarks::Unknown(_T("wxsChoice::OnBuildCreatingCode"),GetLanguage());
}
}
}
示例12: switch
void wxsColourDialog::OnBuildCreatingCode()
{
switch ( GetLanguage() )
{
case wxsCPP:
{
AddHeader(_T("<wx/colordlg.h>"),GetInfo().ClassName,hfInPCH);
bool Defaults = true;
if ( !m_ChooseFull ) Defaults = false;
if ( m_Colour.m_type!=wxsCOLOUR_DEFAULT ) Defaults = false;
if ( !Defaults )
{
wxString ColourDataName = GetCoderContext()->GetUniqueName(_T("__ColourData"));
#if wxCHECK_VERSION(2, 9, 0)
Codef(_T("wxColourData %v;\n"),ColourDataName.wx_str());
#else
Codef(_T("wxColourData %v;\n"),ColourDataName.c_str());
#endif
if ( !m_ChooseFull )
{
#if wxCHECK_VERSION(2, 9, 0)
Codef(_T("%v.SetChooseFull(%b);\n"),ColourDataName.wx_str(),m_ChooseFull);
#else
Codef(_T("%v.SetChooseFull(%b);\n"),ColourDataName.c_str(),m_ChooseFull);
#endif
}
if ( m_Colour.m_type != wxsCOLOUR_DEFAULT )
{
#if wxCHECK_VERSION(2, 9, 0)
Codef(_T("%v.SetColour(%l);\n"),ColourDataName.wx_str(),&m_Colour);
#else
Codef(_T("%v.SetColour(%l);\n"),ColourDataName.c_str(),&m_Colour);
#endif
}
#if wxCHECK_VERSION(2, 9, 0)
Codef(_T("%C(%W, &%v);\n"),ColourDataName.wx_str());
#else
Codef(_T("%C(%W, &%v);\n"),ColourDataName.c_str());
#endif
}
else
{
Codef(_T("%C(%W);\n"));
}
BuildSetupWindowCode();
return;
}
default:
{
wxsCodeMarks::Unknown(_T("wxsColourDialog::OnBuildCreatingCode"),GetLanguage());
}
}
}
示例13: switch
void wxsSashLayoutWindow::OnBuildCreatingCode()
{
switch ( GetLanguage() )
{
case wxsCPP:
AddHeader(_T("<wx/sashwin.h>"),GetInfo().ClassName, 0);
AddHeader(_T("<wx/laywin.h>"), GetInfo().ClassName, 0);
Codef(_T("%C(%W, %I, %P, %S, %T, %N);\n"));
BuildSetupWindowCode();
AddChildrenCode();
Codef( _T("%ASetSashVisible(wxSASH_TOP, %b);\n"), mTop);
Codef( _T("%ASetSashVisible(wxSASH_BOTTOM, %b);\n"), mBottom);
Codef( _T("%ASetSashVisible(wxSASH_LEFT, %b);\n"), mLeft);
Codef( _T("%ASetSashVisible(wxSASH_RIGHT, %b);\n"), mRight);
if (mAlign == wxLAYOUT_TOP) Codef( _T("%ASetAlignment(wxLAYOUT_TOP);\n"));
else if (mAlign == wxLAYOUT_BOTTOM) Codef( _T("%ASetAlignment(wxLAYOUT_BOTTOM);\n"));
else if (mAlign == wxLAYOUT_LEFT) Codef( _T("%ASetAlignment(wxLAYOUT_LEFT);\n"));
else if (mAlign == wxLAYOUT_RIGHT) Codef( _T("%ASetAlignment(wxLAYOUT_RIGHT);\n"));
if (mOrient == wxLAYOUT_HORIZONTAL) Codef(_T("%ASetOrientation(wxLAYOUT_HORIZONTAL);\n"));
else Codef(_T("%ASetOrientation(wxLAYOUT_VERTICAL);\n"));
break;
default:
wxsCodeMarks::Unknown(_T("wxsSashLayoutWindow::OnBuildCreatingCode"),GetLanguage());
}
}
示例14: switch
void wxsSplitterWindow::OnBuildCreatingCode()
{
switch ( GetLanguage() )
{
case wxsCPP:
{
AddHeader(_T("<wx/splitter.h>"),GetInfo().ClassName,0);
AddHeader(_T("<wx/splitter.h>"),_T("wxSplitterEvent"),0);
Codef(_T("%C(%W, %I, %P, %S, %T, %N);\n"));
BuildSetupWindowCode();
if ( MinSize != -1 ) Codef(_T("%ASetMinimumPaneSize(%d);\n"),MinSize);
AddChildrenCode();
if ( GetChildCount() == 0 )
{
}
else if ( GetChildCount() == 1 )
{
Codef(_T("%AInitialize(%o);\n"),0);
}
else
{
Codef(_T("%ASplit%s(%o, %o);\n"),((Orientation==wxHORIZONTAL) ? _T("Horizontally") : _T("Vertically")),0,1);
if ( SashPos != 0 ) Codef(_T("%ASetSashPosition(%d);\n"),SashPos);
}
break;
}
default:
{
wxsCodeMarks::Unknown(_T("wxsSplitterWindow::OnBuildCreatingCode"),GetLanguage());
}
}
}
示例15: switch
void wxsFileDialog::OnBuildCreatingCode()
{
switch ( GetLanguage() )
{
case wxsCPP:
{
AddHeader(_T("<wx/filedlg.h>"),GetInfo().ClassName,hfInPCH);
if ( m_Wildcard.empty() )
{
Codef(_T("%C(%W, %t, %t, %t, wxFileSelectorDefaultWildcardStr, %T, %P, %S, %N);\n"),
m_Message.wx_str(),
m_DefaultDir.wx_str(),
m_DefaultFile.wx_str());
}
else
{
Codef(_T("%C(%W, %t, %t, %t, %t, %T, %P, %S, %N);\n"),
m_Message.wx_str(),
m_DefaultDir.wx_str(),
m_DefaultFile.wx_str(),
m_Wildcard.wx_str());
}
BuildSetupWindowCode();
return;
}
default:
{
wxsCodeMarks::Unknown(_T("wxsFileDialog::OnBuildCreatingCode"),GetLanguage());
}
}
}