stream << ctEscapeHTMLCharacters(prop->GetVariant().GetString()) ;
stream << wxT("</") << prop->GetName() << wxT(">");
- node = node->Next();
+ node = node->GetNext();
}
// Output children
ctConfigItem* child = (ctConfigItem*) node->GetData();
DoSave(child, stream, indent);
- node = node->Next();
+ node = node->GetNext();
}
indent --;
wxString precludes = item->GetPropertyString(wxT("precludes"));
wxString enabledIf = item->GetPropertyString(wxT("enabled-if"));
wxString enabledIfNot = item->GetPropertyString(wxT("enabled-if-not"));
+ wxString indeterminateIf = item->GetPropertyString(wxT("indeterminate-if"));
wxString context = item->GetPropertyString(wxT("context"));
if (!requires.IsEmpty())
if (!enabledIf.IsEmpty())
item->StringToArray(enabledIf, requiresArr);
+ if (!indeterminateIf.IsEmpty())
+ item->StringToArray(indeterminateIf, requiresArr);
+
// Add the parent to the list of dependencies, if the
// parent is a check or radio group.
ctConfigItem* parent = item->GetParent();
wxString name = item->GetName();
// We don't process the platform choice
- if (item->GetName() == wxT("Platform"))
+ if (item->GetName() == wxT("Target"))
return;
if (item->IsInActiveContext() &&
str << path << wxT("configure");
- // Find the platform option to use
- ctConfigItem* platformsFolder = GetTopItem()->FindItem(wxT("Platform"));
+ // Find the target to use
+ ctConfigItem* platformsFolder = GetTopItem()->FindItem(wxT("Target"));
if (platformsFolder)
{
for ( wxNode* node = platformsFolder->GetChildren().GetFirst(); node; node = node->GetNext() )
{
// We don't process the platform group, since we've
// already done so.
- if (item->GetName() == wxT("Platform"))
+ if (item->GetName() == wxT("Target"))
return;
if (item->IsInActiveContext() &&
return path;
}
+/// Finds the next item in the tree
+ctConfigItem* ctConfigToolDoc::FindNextItem(ctConfigItem* item, bool wrap)
+{
+ if (!item)
+ return GetTopItem();
+
+ // First, try to find the first child
+ if (item->GetChildCount() > 0)
+ {
+ return item->GetChild(0);
+ }
+ else
+ {
+ ctConfigItem* p = item;
+ while (p)
+ {
+ ctConfigItem* toFind = FindNextSibling(p);
+ if (toFind)
+ return toFind;
+ p = p->GetParent();
+ }
+ }
+
+ // Finally, wrap around to the root.
+ if (wrap)
+ return GetTopItem();
+ else
+ return NULL;
+}
+
+/// Finds the next sibling in the tree
+ctConfigItem* ctConfigToolDoc::FindNextSibling(ctConfigItem* item)
+{
+ if (item->GetParent())
+ {
+ wxNode* node = item->GetParent()->GetChildren().Member(item);
+ if (node && node->GetNext())
+ {
+ ctConfigItem* nextItem = (ctConfigItem*) node->GetNext()->GetData();
+ return nextItem;
+ }
+ }
+ return NULL;
+}
+
/*
* Implements a document editing command.
return TRUE;
}
+