当前位置: 首页>>代码示例>>C++>>正文


C++ Relation::AppendTarget方法代码示例

本文整理汇总了C++中Relation::AppendTarget方法的典型用法代码示例。如果您正苦于以下问题:C++ Relation::AppendTarget方法的具体用法?C++ Relation::AppendTarget怎么用?C++ Relation::AppendTarget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Relation的用法示例。


在下文中一共展示了Relation::AppendTarget方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: RelationByType

Relation HTMLGroupboxAccessible::RelationByType(RelationType aType) const {
  Relation rel = HyperTextAccessibleWrap::RelationByType(aType);
  // No override for label, so use <legend> for this <fieldset>
  if (aType == RelationType::LABELLED_BY) rel.AppendTarget(mDoc, GetLegend());

  return rel;
}
开发者ID:Noctem,项目名称:gecko-dev,代码行数:7,代码来源:HTMLFormControlAccessible.cpp

示例2: ChildCount

Relation
XULGroupboxAccessible::RelationByType(RelationType aType)
{
  Relation rel = AccessibleWrap::RelationByType(aType);
  if (aType != RelationType::LABELLED_BY)
    return rel;

  // The label for xul:groupbox is generated from xul:label that is
  // inside the anonymous content of the xul:caption.
  // The xul:label has an accessible object but the xul:caption does not
  uint32_t childCount = ChildCount();
  for (uint32_t childIdx = 0; childIdx < childCount; childIdx++) {
    Accessible* childAcc = GetChildAt(childIdx);
    if (childAcc->Role() == roles::LABEL) {
      // Ensure that it's our label
      Relation reverseRel = childAcc->RelationByType(RelationType::LABEL_FOR);
      Accessible* testGroupbox = nullptr;
      while ((testGroupbox = reverseRel.Next()))
        if (testGroupbox == this) {
          // The <label> points back to this groupbox
          rel.AppendTarget(childAcc);
        }
    }
  }

  return rel;
}
开发者ID:ConradIrwin,项目名称:gecko-dev,代码行数:27,代码来源:XULFormControlAccessible.cpp

示例3: GetChildCount

Relation
nsXULGroupboxAccessible::RelationByType(PRUint32 aType)
{
    Relation rel = nsAccessibleWrap::RelationByType(aType);
    if (aType != nsIAccessibleRelation::RELATION_LABELLED_BY)
        return rel;

    // The label for xul:groupbox is generated from xul:label that is
    // inside the anonymous content of the xul:caption.
    // The xul:label has an accessible object but the xul:caption does not
    PRInt32 childCount = GetChildCount();
    for (PRInt32 childIdx = 0; childIdx < childCount; childIdx++) {
        nsAccessible *childAcc = GetChildAt(childIdx);
        if (childAcc->Role() == nsIAccessibleRole::ROLE_LABEL) {
            // Ensure that it's our label
            Relation reverseRel =
                childAcc->RelationByType(nsIAccessibleRelation::RELATION_LABEL_FOR);
            nsAccessible* testGroupbox = nsnull;
            while ((testGroupbox = reverseRel.Next()))
                if (testGroupbox == this) {
                    // The <label> points back to this groupbox
                    rel.AppendTarget(childAcc);
                }
        }
    }

    return rel;
}
开发者ID:s-austin,项目名称:DOMinator,代码行数:28,代码来源:nsXULFormControlAccessible.cpp

示例4:

Relation
nsHTMLTableAccessible::RelationByType(PRUint32 aType)
{
  Relation rel = nsAccessibleWrap::RelationByType(aType);
  if (aType == nsIAccessibleRelation::RELATION_LABELLED_BY)
    rel.AppendTarget(Caption());

  return rel;
}
开发者ID:Anachid,项目名称:mozilla-central,代码行数:9,代码来源:nsHTMLTableAccessible.cpp

示例5: Caption

Relation
HTMLFigureAccessible::RelationByType(uint32_t aType)
{
  Relation rel = HyperTextAccessibleWrap::RelationByType(aType);
  if (aType == nsIAccessibleRelation::RELATION_LABELLED_BY)
    rel.AppendTarget(mDoc, Caption());

  return rel;
}
开发者ID:kirankaladharan,项目名称:devtools-window,代码行数:9,代码来源:HTMLFormControlAccessible.cpp

示例6:

Relation
HTMLTableAccessible::RelationByType(RelationType aType)
{
  Relation rel = AccessibleWrap::RelationByType(aType);
  if (aType == RelationType::LABELLED_BY)
    rel.AppendTarget(Caption());

  return rel;
}
开发者ID:kinetiknz,项目名称:gecko-dev,代码行数:9,代码来源:HTMLTableAccessible.cpp

示例7: Caption

Relation
HTMLFigureAccessible::RelationByType(RelationType aType)
{
  Relation rel = HyperTextAccessibleWrap::RelationByType(aType);
  if (aType == RelationType::LABELLED_BY)
    rel.AppendTarget(mDoc, Caption());

  return rel;
}
开发者ID:JerryShih,项目名称:gecko-dev,代码行数:9,代码来源:HTMLFormControlAccessible.cpp

示例8: RelationByType

Relation HTMLLabelAccessible::RelationByType(RelationType aType) const {
  Relation rel = AccessibleWrap::RelationByType(aType);
  if (aType == RelationType::LABEL_FOR) {
    dom::HTMLLabelElement* label = dom::HTMLLabelElement::FromNode(mContent);
    rel.AppendTarget(mDoc, label->GetControl());
  }

  return rel;
}
开发者ID:BorisChiou,项目名称:gecko-dev,代码行数:9,代码来源:HTMLElementAccessibles.cpp

示例9: GetLegend

Relation
HTMLGroupboxAccessible::RelationByType(uint32_t aType)
{
  Relation rel = HyperTextAccessibleWrap::RelationByType(aType);
    // No override for label, so use <legend> for this <fieldset>
  if (aType == nsIAccessibleRelation::RELATION_LABELLED_BY)
    rel.AppendTarget(mDoc, GetLegend());

  return rel;
}
开发者ID:kirankaladharan,项目名称:devtools-window,代码行数:10,代码来源:HTMLFormControlAccessible.cpp

示例10:

Relation
HTMLLabelAccessible::RelationByType(uint32_t aType)
{
  Relation rel = AccessibleWrap::RelationByType(aType);
  if (aType == nsIAccessibleRelation::RELATION_LABEL_FOR) {
    nsRefPtr<dom::HTMLLabelElement> label = dom::HTMLLabelElement::FromContent(mContent);
    rel.AppendTarget(mDoc, label->GetControl());
  }

  return rel;
}
开发者ID:Romitarath,项目名称:mozilla-central,代码行数:11,代码来源:HTMLElementAccessibles.cpp

示例11: Parent

Relation
HTMLLegendAccessible::RelationByType(uint32_t aType)
{
  Relation rel = HyperTextAccessibleWrap::RelationByType(aType);
  if (aType != nsIAccessibleRelation::RELATION_LABEL_FOR)
    return rel;

  Accessible* groupbox = Parent();
  if (groupbox && groupbox->Role() == roles::GROUPING)
    rel.AppendTarget(groupbox);

  return rel;
}
开发者ID:kirankaladharan,项目名称:devtools-window,代码行数:13,代码来源:HTMLFormControlAccessible.cpp

示例12: Parent

Relation
nsHTMLLegendAccessible::RelationByType(PRUint32 aType)
{
  Relation rel = nsHyperTextAccessibleWrap::RelationByType(aType);
  if (aType != nsIAccessibleRelation::RELATION_LABEL_FOR)
    return rel;

  nsAccessible* groupbox = Parent();
  if (groupbox && groupbox->Role() == nsIAccessibleRole::ROLE_GROUPING)
    rel.AppendTarget(groupbox);

  return rel;
}
开发者ID:ehsan,项目名称:mozilla-history,代码行数:13,代码来源:nsHTMLFormControlAccessible.cpp

示例13: Parent

Relation
nsXULTextAccessible::RelationByType(PRUint32 aType)
{
  Relation rel = nsHyperTextAccessibleWrap::RelationByType(aType);
  if (aType == nsIAccessibleRelation::RELATION_LABEL_FOR) {
    // Caption is the label for groupbox
    nsIContent *parent = mContent->GetParent();
    if (parent && parent->Tag() == nsGkAtoms::caption) {
      nsAccessible* parent = Parent();
      if (parent && parent->Role() == roles::GROUPING)
        rel.AppendTarget(parent);
    }
  }

  return rel;
}
开发者ID:dclarke,项目名称:services-central,代码行数:16,代码来源:nsXULTextAccessible.cpp

示例14: Parent

Relation
XULLabelAccessible::RelationByType(RelationType aType)
{
  Relation rel = HyperTextAccessibleWrap::RelationByType(aType);
  if (aType == RelationType::LABEL_FOR) {
    // Caption is the label for groupbox
    nsIContent* parent = mContent->GetFlattenedTreeParent();
    if (parent && parent->Tag() == nsGkAtoms::caption) {
      Accessible* parent = Parent();
      if (parent && parent->Role() == roles::GROUPING)
        rel.AppendTarget(parent);
    }
  }

  return rel;
}
开发者ID:ConradIrwin,项目名称:gecko-dev,代码行数:16,代码来源:XULElementAccessibles.cpp

示例15: RelationByType

Relation XULTabpanelAccessible::RelationByType(RelationType aType) const {
  Relation rel = AccessibleWrap::RelationByType(aType);
  if (aType != RelationType::LABELLED_BY) return rel;

  // Expose 'LABELLED_BY' relation on tabpanel accessible for tab accessible.
  if (!mContent->GetParent()) return rel;

  nsCOMPtr<nsIDOMXULRelatedElement> tabpanelsElm =
      mContent->GetParent()->AsElement()->AsXULRelated();
  if (!tabpanelsElm) return rel;

  RefPtr<mozilla::dom::Element> tabElement;
  tabpanelsElm->GetRelatedElement(GetNode(), getter_AddRefs(tabElement));
  if (!tabElement) return rel;

  rel.AppendTarget(mDoc, tabElement);
  return rel;
}
开发者ID:DimiL,项目名称:gecko-dev,代码行数:18,代码来源:XULTabAccessible.cpp


注:本文中的Relation::AppendTarget方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。