Enumerator for GuiType objects.
| 161 | |
| 162 | // Enumerator for GuiType objects. |
| 163 | ResultType GuiType::GetEnumItem(UINT &aIndex, Var *aOutputVar1, Var *aOutputVar2, int aVarCount) |
| 164 | { |
| 165 | if (aIndex >= mControlCount) // Use >= vs. == in case the Gui was destroyed. |
| 166 | return CONDITION_FALSE; |
| 167 | GuiControlType* ctrl = mControl[aIndex]; |
| 168 | if (aVarCount < 2) // `for x in myGui` or `[myGui*]` |
| 169 | { |
| 170 | aOutputVar2 = aOutputVar1; // Return the more useful value in single-var mode: the control object. |
| 171 | aOutputVar1 = nullptr; |
| 172 | } |
| 173 | if (aOutputVar1) |
| 174 | aOutputVar1->AssignHWND(ctrl->hwnd); |
| 175 | if (aOutputVar2) |
| 176 | aOutputVar2->Assign(ctrl); |
| 177 | return CONDITION_TRUE; |
| 178 | } |
| 179 | |
| 180 | |
| 181 | ObjectMember GuiType::sMembers[] = |
nothing calls this directly
no test coverage detected