MCPcopy Create free account
hub / github.com/MyGUI/mygui / notifyPropertyChangeCoord

Method notifyPropertyChangeCoord

Tools/LayoutEditor/WorkspaceControl.cpp:205–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203 }
204
205 void WorkspaceControl::notifyPropertyChangeCoord(
206 MyGUI::Widget* _widget,
207 const MyGUI::IntCoord& _coordValue,
208 std::string_view _owner)
209 {
210 if (_owner == "WorkspaceControl" || _widget != mCurrentWidget)
211 return;
212
213 // тут приходит в абсолютных, конвертим в локальные
214 mCoordValue = _coordValue;
215 if (mCurrentWidget != nullptr)
216 {
217 MyGUI::Widget* parent = mCurrentWidget->getParent();
218 if (parent != nullptr && !mCurrentWidget->isRootWidget())
219 mCoordValue = mCoordValue - parent->getAbsolutePosition();
220 }
221
222 updateSelectionFromValue();
223 }
224
225 void WorkspaceControl::Command_MoveLeft(const MyGUI::UString& _commandName, bool& _result)
226 {

Callers

nothing calls this directly

Calls 2

isRootWidgetMethod · 0.80
getParentMethod · 0.45

Tested by

no test coverage detected