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

Method notifyUpdateItem

Tools/LayoutEditor/PanelItems.cpp:186–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184 }
185
186 void PanelItems::notifyUpdateItem(MyGUI::EditBox* _widget)
187 {
188 size_t item = mList->getIndexSelected();
189 if (MyGUI::ITEM_NONE == item)
190 {
191 notifyAddItem();
192 return;
193 }
194
195 MyGUI::UString value = mEdit->getOnlyText();
196 mList->setItemNameAt(item, MyGUI::TextIterator::toTagsString(value));
197
198 MyGUI::IItemContainer* itemContainer = dynamic_cast<MyGUI::IItemContainer*>(mCurrentWidget);
199
200 if (itemContainer != nullptr)
201 {
202 itemContainer->_setItemNameAt(item, value);
203 MyGUI::Widget* widget = itemContainer->_getItemAt(item);
204 if (widget != nullptr)
205 {
206 setContainerProperty(widget, "Caption", value);
207 }
208 else
209 {
210 setPropertyValue(mCurrentWidget, item, "AddItem", value);
211 }
212
213 UndoManager::getInstance().addValue();
214 }
215 }
216
217 void PanelItems::notifySelectItem(MyGUI::ListBox* _widget, size_t _position)
218 {

Callers

nothing calls this directly

Calls 7

setPropertyValueFunction · 0.85
addValueMethod · 0.80
getIndexSelectedMethod · 0.45
getOnlyTextMethod · 0.45
setItemNameAtMethod · 0.45
_setItemNameAtMethod · 0.45
_getItemAtMethod · 0.45

Tested by

no test coverage detected