Ejemplo n.º 1
0
Archivo: WMenu.C Proyecto: LifeGo/wt
int WMenu::nextAfterHide(int index)
{
  if (current_ == index) {
    // Try to find visible item to the right of the current.
    for (int i = current_ + 1; i < count(); ++i)
      if (!isItemHidden(i) && itemAt(i)->isEnabled())
        return i;

    // Try to find visible item to the left of the current.
    for (int i = current_ - 1; i >= 0; --i)
      if (!isItemHidden(i) && itemAt(i)->isEnabled())
        return i;
  }

  return current_;
}
Ejemplo n.º 2
0
/**
 * Provides the titles.
 * Only for the checked ones.
 */
MAUtil::Vector<MAUtil::String> MediaWiki::getAllCheckedTitles()
{
	MAUtil::Vector<MAUtil::String> list;
	for (int i=0; i < mWiki->titleResults.size(); i++)
	{
		if ( !isItemHidden(i) )
		{
			list.add(mWiki->titleResults[i]);
		}
	}
	return list;
}
Ejemplo n.º 3
0
/**
 * Provides the snippets along with the title.
 * Only for the checked ones.
 */
MAUtil::Vector<MAUtil::String> MediaWiki::getAllSnippetsWithTitle()
{
	MAUtil::Vector<MAUtil::String> list;
	for (int i=0; i < mWiki->titleResults.size(); i++)
	{
		if ( !isItemHidden(i) )
		{
			// Each entry has title and the corresponding snippet.
			MAUtil::String line =
				mWiki->titleResults[i] +
				"\n" +
				mWiki->snippetResults[i] ;
			list.add(line);
		}
	}
	return list;
}
Ejemplo n.º 4
0
Archivo: WMenu.C Proyecto: LifeGo/wt
bool WMenu::isItemHidden(int index) const
{
  return isItemHidden(itemAt(index));
}