本文整理汇总了C++中GetLanguage函数的典型用法代码示例。如果您正苦于以下问题:C++ GetLanguage函数的具体用法?C++ GetLanguage怎么用?C++ GetLanguage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetLanguage函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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());
}
}
}
开发者ID:stahta01,项目名称:codeblocks_r7456,代码行数:25,代码来源:wxsslider.cpp
示例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());
}
}
}
开发者ID:simple-codeblocks,项目名称:Codeblocks,代码行数:26,代码来源:wxshtmlwindow.cpp
示例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());
}
}
}
开发者ID:simple-codeblocks,项目名称:Codeblocks,代码行数:28,代码来源:wxslistbook.cpp
示例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();
}
开发者ID:CLOUDS-Interactive-Documentary,项目名称:CLOUDS,代码行数:7,代码来源:CloudsClip.cpp
示例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));
}
开发者ID:Meridian59,项目名称:Meridian59,代码行数:37,代码来源:autoval.cpp
示例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());
}
}
}
开发者ID:WinterMute,项目名称:codeblocks_sf,代码行数:32,代码来源:wxsfontpickerctrl.cpp
示例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);
}
开发者ID:adoggie,项目名称:algorithm_package,代码行数:64,代码来源:Manager.cpp
示例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());
}
}
}
开发者ID:DowerChest,项目名称:codeblocks,代码行数:35,代码来源:wxsanimationctrl.cpp
示例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);
}
开发者ID:adoggie,项目名称:algorithm_package,代码行数:34,代码来源:Manager.cpp
示例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());
}
}
}
开发者ID:Three-DS,项目名称:codeblocks-13.12,代码行数:33,代码来源:wxsdialog.cpp
示例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());
}
}
}
开发者ID:simple-codeblocks,项目名称:Codeblocks,代码行数:34,代码来源:wxschoice.cpp
示例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());
}
}
}
开发者ID:stahta01,项目名称:EmBlocks,代码行数:60,代码来源:wxscolourdialog.cpp
示例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());
}
}
开发者ID:stahta01,项目名称:codeblocks_r7456,代码行数:31,代码来源:wxssashlayoutwindow.cpp
示例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());
}
}
}
开发者ID:stahta01,项目名称:codeblocks_r7456,代码行数:33,代码来源:wxssplitterwindow.cpp
示例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());
}
}
}
开发者ID:DowerChest,项目名称:codeblocks,代码行数:32,代码来源:wxsfiledialog.cpp
示例16: switch
void wxsMenu::OnBuildCreatingCode()
{
switch ( GetLanguage() )
{
case wxsCPP:
AddHeader(_T("<wx/menu.h>"),GetInfo().ClassName,hfInPCH);
if ( IsPointer() )
{
// There's no Create() method for wxMenu so we call ctor only when creating pointer
Codef(_T("%C();\n"));
}
for ( int i=0; i<GetChildCount(); i++ )
{
GetChild(i)->BuildCode(GetCoderContext());
}
if ( GetParent() && GetParent()->GetClassName()==_T("wxMenuBar") )
{
Codef(_T("%MAppend(%O, %t);\n"),m_Label.wx_str());
}
BuildSetupWindowCode();
break;
case wxsUnknownLanguage: // fall-through
default:
wxsCodeMarks::Unknown(_T("wxsMenu::OnBuildCreatingCode"),GetLanguage());
}
}
开发者ID:DowerChest,项目名称:codeblocks,代码行数:27,代码来源:wxsmenu.cpp
示例17: switch
void wxsChoicebook::OnBuildCreatingCode()
{
switch ( GetLanguage() )
{
case wxsCPP:
{
AddHeader(_T("<wx/choicebk.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++ )
{
wxsChoicebookExtra* Extra = (wxsChoicebookExtra*)GetChildExtra(i);
#if wxCHECK_VERSION(2, 9, 0)
Codef(_T("%AAddPage(%o, %t, %b);\n"),i,Extra->m_Label.wx_str(),Extra->m_Selected);
#else
Codef(_T("%AAddPage(%o, %t, %b);\n"),i,Extra->m_Label.c_str(),Extra->m_Selected);
#endif
}
break;
}
default:
{
wxsCodeMarks::Unknown(_T("wxsChoicebook::OnBuildCreatingCode"),GetLanguage());
}
}
}
开发者ID:stahta01,项目名称:codeblocks_r7456,代码行数:31,代码来源:wxschoicebook.cpp
示例18: switch
/*! \brief Build the code that creates the control.
*
* \return void
*
*/
void wxsLCDClock::OnBuildCreatingCode()
{
switch ( GetLanguage() )
{
case wxsCPP:
{
AddHeader(_T("\"wx/KWIC/LCDClock.h\""),GetInfo().ClassName);
Codef(_T("%C(%W,%P,%S);\n"));
// 6 digits is the default value.
if (m_iNumDigits && m_iNumDigits != 6){
Codef(_T("%ASetNumberDigits(%d);\n"), static_cast<int>(m_iNumDigits));
}
wxString ss = m_cdLightColour.BuildCode( GetCoderContext() );
if (!ss.IsEmpty()) Codef(_T("%ASetLightColour(%s);\n"), ss.wx_str());
ss = m_cdGrayColour.BuildCode( GetCoderContext() );
if (!ss.IsEmpty()) Codef(_T("%ASetGrayColour(%s);\n"), ss.wx_str());
BuildSetupWindowCode();
break;
}
default:
wxsCodeMarks::Unknown(_T("wxsLCDClock::OnBuildCreatingCode"),GetLanguage());
}
}
开发者ID:DowerChest,项目名称:codeblocks,代码行数:31,代码来源:wxslcdclock.cpp
示例19: switch
/*! \brief Build the code that creates the control.
*
* \return void
*
*/
void wxsLinearRegulator::OnBuildCreatingCode()
{
switch(GetLanguage())
{
case wxsCPP:
{
AddHeader(_T("\"wx/KWIC/LinearRegulator.h\""), GetInfo().ClassName);
Codef(_T("%C(%W,%I,%P,%S, %s);\n"), wxT("wxBORDER_NONE"));
// Default range is 0-100.
if(m_iRangeMin != 0 || m_iRangeMax != 100){
Codef(_T("%ASetRangeVal(%d, %d);\n"), static_cast<int>(m_iRangeMin), static_cast<int>(m_iRangeMax));
}
if(!m_bHorizontal){
Codef(_T("%ASetOrizDirection(false);\n"));
}
if(!m_bShowVal){
Codef(_T("%AShowCurrent(false);\n"));
}
if(!m_bShowLimits){
Codef(_T("%AShowLimits(false);\n"));
}
wxString ss = m_cdActiveBarColour.BuildCode(GetCoderContext());
if(!ss.IsEmpty()) Codef(_T("%ASetActiveBarColour(%s);\n"), ss.wx_str());
ss = m_cdPassiveBarColour.BuildCode(GetCoderContext());
if(!ss.IsEmpty()) Codef(_T("%ASetPassiveBarColour(%s);\n"), ss.wx_str());
ss = m_cdBorderColour.BuildCode(GetCoderContext());
if(!ss.IsEmpty()) Codef(_T("%ASetBorderColour(%s);\n"), ss.wx_str());
ss = m_cdLimitTextColour.BuildCode(GetCoderContext());
if(!ss.IsEmpty()) Codef(_T("%ASetTxtLimitColour(%s);\n"), ss.wx_str());
ss = m_cdValueTextColour.BuildCode(GetCoderContext());
if(!ss.IsEmpty()) Codef(_T("%ASetTxtValueColour(%s);\n"), ss.wx_str());
ss = m_cdTagColour.BuildCode(GetCoderContext());
if(!ss.IsEmpty()) Codef(_T("%ASetTagsColour(%s);\n"), ss.wx_str());
for(size_t i = 0; i < m_arrTags.Count(); i++){
TagDesc *Desc = m_arrTags[i];
Codef(_T("\t%AAddTag(%d);\n"), Desc->val);
}
ss = GetCoderContext()->GetUniqueName(_T("LinearRegulatorFont"));
wxString sFnt = m_fnt.BuildFontCode(ss, GetCoderContext());
if(sFnt.Len() > 0)
{
Codef(_T("%s"), sFnt.wx_str());
Codef(_T("%ASetTxtFont(%s);\n"), ss.wx_str());
}
// Value needs to be set after other params for correct display.
if(m_iValue){
Codef(_T("%ASetValue(%d);\n"), static_cast<int>(m_iValue));
}
BuildSetupWindowCode();
break;
}
case wxsUnknownLanguage: // fall-through
default:
wxsCodeMarks::Unknown(_T("wxsLinearRegulator::OnBuildCreatingCode"), GetLanguage());
}
}
开发者ID:WinterMute,项目名称:codeblocks_sf,代码行数:63,代码来源:wxslinearregulator.cpp
示例20: switch
/*! \brief Create the dialogue.
*
* \return void
*
*/
void wxsPrintDialog::OnBuildCreatingCode()
{
switch ( GetLanguage() )
{
case wxsCPP:
{
AddHeader(_T("<wx/printdlg.h>"),GetInfo().ClassName,hfInPCH);
wxString sDataName = GetCoderContext()->GetUniqueName(_T("printDialogData"));
AddDeclaration(wxString::Format(wxT("wxPrintDialogData *%s;"), sDataName.wx_str()));
Codef(_T("\t%s = new wxPrintDialogData;\n"), sDataName.wx_str());
if(m_bEnableHelp){
Codef(_T("\t%s->EnableHelp(%b);\n"), sDataName.wx_str(), m_bEnableHelp);
}
if(!m_bEnablePageNumbers){
Codef(_T("\t%s->EnablePageNumbers(%b);\n"), sDataName.wx_str(), m_bEnablePageNumbers);
}
if(!m_bEnablePrintToFile){
Codef(_T("\t%s->EnablePrintToFile(%b);\n"), sDataName.wx_str(), m_bEnablePrintToFile);
}
if(m_bEnableSelection){
Codef(_T("\t%s->EnableSelection(%b);\n"), sDataName.wx_str(), m_bEnableSelection);
if(m_bSelection){
Codef(_T("\t%s->SetSelection(%b);\n"), sDataName.wx_str(), m_bSelection);
}
}
if(m_bCollate){
Codef(_T("\t%s->SetCollate(%b);\n"), sDataName.wx_str(), m_bCollate);
}
if(m_iFromPage > 0){
Codef(_T("\t%s->SetFromPage(%d);\n"), sDataName.wx_str(), m_iFromPage);
}
if(m_iToPage > 0){
Codef(_T("\t%s->SetToPage(%d);\n"), sDataName.wx_str(), m_iToPage);
}
if(m_iMinPage > 0){
Codef(_T("\t%s->SetMinPage(%d);\n"), sDataName.wx_str(), m_iMinPage);
}
if(m_iMaxPage > 0){
Codef(_T("\t%s->SetMaxPage(%d);\n"), sDataName.wx_str(), m_iMaxPage);
}
if(m_iNoCopies > 1){
Codef(_T("\t%s->SetNoCopies(%d);\n"), sDataName.wx_str(), m_iNoCopies);
}
Codef(_T("%C(%W, %v);\n"), sDataName.wx_str());
BuildSetupWindowCode();
return;
}
case wxsUnknownLanguage: // fall-through
default:
{
wxsCodeMarks::Unknown(_T("wxsPrintDialog::OnBuildCreatingCode"),GetLanguage());
}
}
}
开发者ID:WinterMute,项目名称:codeblocks_sf,代码行数:63,代码来源:wxsprintdialog.cpp
注:本文中的GetLanguage函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论