本文整理汇总了C++中BasePlugin::GetInfo方法的典型用法代码示例。如果您正苦于以下问题:C++ BasePlugin::GetInfo方法的具体用法?C++ BasePlugin::GetInfo怎么用?C++ BasePlugin::GetInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BasePlugin
的用法示例。
在下文中一共展示了BasePlugin::GetInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateLayout
/*********************************************************************\
Function name : CCustomSubDialog::CreateLayout
Description :
Created at : 27.03.02, @ 12:04:28
Created by : Thomas Kunert
Modified by :
\*********************************************************************/
Bool CCustomSubDialog::CreateLayout(void)
{
Int32 i;
GroupBegin(100, BFH_SCALEFIT | BFV_SCALEFIT, 2, 0, "", 0);
Int32 lID = FIRST_CUSTOM_ELEMENT_ID;
if (!m_pProp || m_pProp[0].type == CUSTOMTYPE_END)
{
GroupBegin(100, BFH_SCALEFIT, 1, 0, "", 0);
}
AddCheckbox(IDC_CUSTOM_OPEN_CLOSE, BFH_LEFT, 0, 0, "Open");
Bool b = false;
if (m_pElement)
{
CCustomElements* pElement = g_pCustomElements->GetItem(m_pElement->m_lElement);
if (pElement)
{
BasePlugin *bs = (BasePlugin*)FindPlugin(pElement->m_lID, PLUGINTYPE_CUSTOMGUI);
if (bs)
{
b = true;
if (!(bs->GetInfo() & CUSTOMGUI_SUPPORT_LAYOUTSWITCH))
Enable(IDC_CUSTOM_OPEN_CLOSE, false);
else
Enable(IDC_CUSTOM_OPEN_CLOSE, true);
}
}
}
if (!b)
Enable(IDC_CUSTOM_OPEN_CLOSE, true);
if (!m_pProp || m_pProp[0].type == CUSTOMTYPE_END)
{
AddStaticText(100, BFH_LEFT | BFV_CENTER, 0, 0, GeLoadString(IDS_CUSTOM_NO_PROPS), 0);
GroupEnd();
}
AddStaticText(100, 0, 0, 0, "", 0);
for (i = 0; m_pProp && m_pProp[i].type != CUSTOMTYPE_END; i++, lID++)
{
AddStaticText(100, BFH_LEFT | BFV_CENTER, 0, 0, m_pProp[i].ident, 0);
switch (m_pProp[i].type)
{
case CUSTOMTYPE_FLAG:
AddCheckbox(lID, BFH_LEFT | BFV_CENTER, 0, 0, "");
break;
case CUSTOMTYPE_LONG:
AddEditNumber(lID, BFH_LEFT | BFV_CENTER);
break;
case CUSTOMTYPE_REAL:
AddEditNumber(lID, BFH_LEFT | BFV_CENTER);
break;
case CUSTOMTYPE_STRING:
AddEditText(lID, BFH_SCALEFIT | BFV_CENTER);
break;
case CUSTOMTYPE_VECTOR:
AddEditNumber(lID++, BFH_LEFT | BFV_CENTER);
AddEditNumber(lID++, BFH_LEFT | BFV_CENTER);
AddEditNumber(lID, BFH_LEFT | BFV_CENTER);
break;
default:
AddStaticText(lID, BFH_LEFT | BFV_CENTER, 0, 0, "wird auch noch ;-)", 0);
break;
}
}
/*if (!m_pProp || i == 0)
AddStaticText(100, BFH_LEFT | BFV_CENTER, 0, 0, GeLoadString(IDS_CUSTOM_NO_PROPS), 0);*/
return true;
}