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


C++ CGUIAction::ExecuteActions方法代码示例

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


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

示例1: OnInfo

bool CGUIControl::OnInfo()
{
  CGUIAction action = GetAction(ACTION_SHOW_INFO);
  if (action.HasAnyActions())
    return action.ExecuteActions(GetID(), GetParentID());
  return false;
}
开发者ID:0xheart0,项目名称:xbmc,代码行数:7,代码来源:GUIControl.cpp

示例2: OnClick

void CGUIButtonControl::OnClick()
{
  // Save values, as the click message may deactivate the window
  int controlID = GetID();
  int parentID = GetParentID();
  CGUIAction clickActions = m_clickActions;

  // button selected, send a message
  CGUIMessage msg(GUI_MSG_CLICKED, controlID, parentID, 0);
  SendWindowMessage(msg);

  clickActions.ExecuteActions(controlID, parentID);
}
开发者ID:OV3RDOSE,项目名称:xbmc,代码行数:13,代码来源:GUIButtonControl.cpp

示例3: OnMove

bool CGUIWindow::OnMove(int fromControl, int moveAction)
{
  const CGUIControl *control = GetFirstFocusableControl(fromControl);
  if (!control) control = GetControl(fromControl);
  if (!control)
  { // no current control??
    CLog::Log(LOGERROR, "Unable to find control %i in window %u",
              fromControl, GetID());
    return false;
  }
  vector<int> moveHistory;
  int nextControl = fromControl;
  while (control)
  { // grab the next control direction
    moveHistory.push_back(nextControl);
    CGUIAction action;
    if (!control->GetNavigationAction(moveAction, action))
      return false;
    action.ExecuteActions(nextControl, GetParentID());
    nextControl = action.GetNavigation();
    if (!nextControl) // 0 isn't valid control id
      return false;
    // check our history - if the nextControl is in it, we can't focus it
    for (unsigned int i = 0; i < moveHistory.size(); i++)
    {
      if (nextControl == moveHistory[i])
        return false; // no control to focus so do nothing
    }
    control = GetFirstFocusableControl(nextControl);
    if (control)
      break;  // found a focusable control
    control = GetControl(nextControl); // grab the next control and try again
  }
  if (!control)
    return false;   // no control to focus
  // if we get here we have our new control so focus it (and unfocus the current control)
  SET_CONTROL_FOCUS(nextControl, 0);
  return true;
}
开发者ID:AFFLUENTSOCIETY,项目名称:SPMC,代码行数:39,代码来源:GUIWindow.cpp


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