#include "AirportList.hxx"
#include "layout.hxx"
+////////////////////////////////////////////////////////////////////////
+// Implementation of GUIInfo.
+////////////////////////////////////////////////////////////////////////
+
/**
* User data for a GUI object.
*/
int key;
};
+GUIInfo::GUIInfo (FGDialog * d)
+ : dialog(d),
+ key(-1)
+{
+}
+
+GUIInfo::~GUIInfo ()
+{
+ for (unsigned int i = 0; i < bindings.size(); i++) {
+ delete bindings[i];
+ bindings[i] = 0;
+ }
+}
+\f
/**
* Key handler.
*/
puObject *fgPopup::getActiveInputField(puObject *object)
{
+ puObject *ret;
if(object->getType() & PUCLASS_GROUP)
for (puObject *obj = ((puGroup *)object)->getFirstChild();
obj; obj = obj->getNextObject())
- if (getActiveInputField(obj))
- return obj;
+ if ((ret = getActiveInputField(obj)))
+ return ret;
if (object->getType() & PUCLASS_INPUT && ((puInput *)object)->isAcceptingInput())
return object;
}
-\f
-////////////////////////////////////////////////////////////////////////
-// Implementation of GUIInfo.
-////////////////////////////////////////////////////////////////////////
-
-GUIInfo::GUIInfo (FGDialog * d)
- : dialog(d),
- key(-1)
-{
-}
-
-GUIInfo::~GUIInfo ()
-{
- for (unsigned int i = 0; i < bindings.size(); i++) {
- delete bindings[i];
- bindings[i] = 0;
- }
-}
-
-
\f
////////////////////////////////////////////////////////////////////////
// Implementation of FGDialog.