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

Function requestDrawItem

UnitTests/UnitTest_ItemBox_Info/DemoKeeper.cpp:28–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26 }
27
28 static void requestDrawItem(MyGUI::ItemBox* _sender, MyGUI::Widget* _item, const MyGUI::IBDrawItemInfo& _info)
29 {
30 MyGUI::TextBox* text = *_item->getUserData<MyGUI::TextBox*>();
31 int data = *_sender->getItemDataAt<int>(_info.index);
32 if (_info.drag)
33 {
34 text->setCaption(MyGUI::utility::toString(
35 _info.drop_accept ? "#00FF00drag accept"
36 : (_info.drop_refuse ? "#FF0000drag refuse" : "#0000FFdrag miss"),
37 "\n#000000data : ",
38 data));
39 }
40 else
41 {
42 text->setCaption(MyGUI::utility::toString(
43 _info.drop_accept ? "#00FF00" : (_info.drop_refuse ? "#FF0000" : "#000000"),
44 "index : ",
45 _info.index,
46 "\n#000000data : ",
47 data,
48 _info.active ? "\n#00FF00focus" : "\n#800000focus",
49 _info.select ? "\n#00FF00select" : "\n#800000select"));
50 }
51 }
52
53 static void eventStartDrag(MyGUI::DDContainer* _sender, const MyGUI::DDItemInfo& _info, bool& _result)
54 {

Callers 9

_updateAllVisibleMethod · 0.85
findCurrentActiveItemMethod · 0.85
_setContainerItemInfoMethod · 0.85
setItemDataAtMethod · 0.85
redrawItemAtMethod · 0.85
setIndexSelectedMethod · 0.85
updateDropItemsStateMethod · 0.85

Calls 2

toStringFunction · 0.85
setCaptionMethod · 0.45

Tested by

no test coverage detected