本文整理汇总了C++中mygui::Widget::getAbsoluteTop方法的典型用法代码示例。如果您正苦于以下问题:C++ Widget::getAbsoluteTop方法的具体用法?C++ Widget::getAbsoluteTop怎么用?C++ Widget::getAbsoluteTop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mygui::Widget
的用法示例。
在下文中一共展示了Widget::getAbsoluteTop方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: notifyClickAdd
void SettingsUpdateResourcesControl::notifyClickAdd(MyGUI::Widget* _sender)
{
mResources->addItem("");
mResources->beginToItemAt(mResources->getItemCount() - 1);
mTextFieldControl->setCaption(replaceTags("CaptionAddResource"));
mTextFieldControl->setTextField("");
MyGUI::Widget* widget = mResources->getWidgetByIndex(mResources->getItemCount() - 1);
if (widget != nullptr)
mTextFieldControl->setCoord(MyGUI::IntCoord(widget->getAbsoluteLeft(), widget->getAbsoluteTop(), widget->getWidth(), widget->getHeight()));
mTextFieldControl->doModal();
}
示例2: notifyMouseDrag
void ColourPanel::notifyMouseDrag(MyGUI::Widget* _sender, int _left, int _top, MyGUI::MouseButton _id)
{
if (_id != MyGUI::MouseButton::Left)
return;
MyGUI::Widget* parent = mImageColourPicker->getParent();
MyGUI::IntPoint point(_left - parent->getAbsoluteLeft(), _top - parent->getAbsoluteTop());
if (point.left < 0) point.left = 0;
if (point.top < 0) point.top = 0;
if (point.left > mColourRect->getWidth()) point.left = mColourRect->getWidth();
if (point.top > mColourRect->getHeight()) point.top = mColourRect->getHeight();
mImageColourPicker->setPosition(point.left - (mImageColourPicker->getWidth() / 2), point.top - (mImageColourPicker->getHeight() / 2));
updateFromPoint(point);
}
示例3: OnRenameData
void ListBoxDataControl::OnRenameData()
{
size_t index = mListBox->getIndexSelected();
if (index != MyGUI::ITEM_NONE)
{
mListBox->beginToItemAt(index);
MyGUI::Widget* widget = mListBox->getWidgetByIndex(index);
if (widget != nullptr)
{
DataPtr data = *mListBox->getItemDataAt<DataPtr>(index);
mTextFieldControl->setCaption(replaceTags("CaptionEnterName"));
mTextFieldControl->setTextField(data->getPropertyValue(mPropertyForName));
mTextFieldControl->setUserData(data);
mTextFieldControl->setCoord(MyGUI::IntCoord(widget->getAbsoluteLeft(), widget->getAbsoluteTop(), widget->getWidth(), widget->getHeight()));
mTextFieldControl->doModal();
}
}
}