本文整理汇总了C++中mygui::Widget::getBottom方法的典型用法代码示例。如果您正苦于以下问题:C++ Widget::getBottom方法的具体用法?C++ Widget::getBottom怎么用?C++ Widget::getBottom使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mygui::Widget
的用法示例。
在下文中一共展示了Widget::getBottom方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: buildNewControl
bool PropertyGridManager::buildNewControl(PropertyGridProperty *const property, int &height)
{
if(nullptr == mContainerWidget)
{
Debug::error(STEEL_METH_INTRO, "no container for controls. Aborting.").endl();
return false;
}
// build the control matching the property value type
Ogre::String const skin = "PanelEmpty";
Ogre::String const controlName = "PropertyGridManager_Control_" + property->id();
// original control size is set here, but the method that build the control can totally resize it.
MyGUI::IntCoord coords(0, height, mContainerWidget->getClientWidget()->getWidth(), 20);
MyGUI::Widget *control = mContainerWidget->createWidget<MyGUI::Widget>(skin, coords, MyGUI::Align::HCenter | MyGUI::Align::Top, controlName);
if(nullptr == control)
{
Debug::error(STEEL_METH_INTRO, "could not build control for property: ", *property, ". Skipping.").endl();
return false;
}
switch(property->valueType())
{
case PropertyGridPropertyValueType::Bool:
buildBoolControl(control, property);
break;
case PropertyGridPropertyValueType::String:
buildStringControl(control, property);
break;
case PropertyGridPropertyValueType::Range:
buildRangeControl(control, property);
break;
case PropertyGridPropertyValueType::StringVectorSelection:
buildStringVectorSelectionControl(control, property);
break;
case PropertyGridPropertyValueType::None:
default:
buildDummyControl(control, property);
}
height = control->getBottom();
mControlsMap.insert(std::make_pair(property->id(), control));
// subscribe to property changes
Signal propertyChanged = property->getSignal(PropertyGridProperty::PublicSignal::changed);
registerSignal(propertyChanged);
mSignals.propertyChanged.insert(propertyChanged);
// update control value
updateControlValue(control, property);
return true;
}