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


C++ IsFocused函数代码示例

本文整理汇总了C++中IsFocused函数的典型用法代码示例。如果您正苦于以下问题:C++ IsFocused函数的具体用法?C++ IsFocused怎么用?C++ IsFocused使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: FocusChanged

	virtual void FocusChanged(TDrawNow aDrawNow)
	{
		if ( iFlags & FeedUi::EFocusInsideControl )
			{
				iDownloadButton->SetFocus( IsFocused(), aDrawNow );
				iPhoto->SetFocus( IsFocused(), aDrawNow );
			}
		else
			CPhotoHolder::FocusChanged(aDrawNow);
	}
开发者ID:flaithbheartaigh,项目名称:jaikuengine-mobile-client,代码行数:10,代码来源:jsui_photoholder.cpp

示例2: GetManager

	void CControlUI::PaintBorder(HDC hDC)
	{
		int nBorderSize = GetManager()->GetDPIObj()->Scale(m_nBorderSize);
		SIZE cxyBorderRound = GetManager()->GetDPIObj()->Scale(m_cxyBorderRound);
		RECT rcBorderSize = GetManager()->GetDPIObj()->Scale(m_rcBorderSize);
		if(m_dwBorderColor != 0 || m_dwFocusBorderColor != 0) {
			//»­Ô²½Ç±ß¿ò
			if(nBorderSize > 0 && ( cxyBorderRound.cx > 0 || cxyBorderRound.cy > 0 )) {
				if (IsFocused() && m_dwFocusBorderColor != 0)
					CRenderEngine::DrawRoundRect(hDC, m_rcItem, nBorderSize, cxyBorderRound.cx, cxyBorderRound.cy, GetAdjustColor(m_dwFocusBorderColor), m_nBorderStyle);
				else
					CRenderEngine::DrawRoundRect(hDC, m_rcItem, nBorderSize, cxyBorderRound.cx, cxyBorderRound.cy, GetAdjustColor(m_dwBorderColor), m_nBorderStyle);
			}
			else {
				if (IsFocused() && m_dwFocusBorderColor != 0 && m_nBorderSize > 0) {
					CRenderEngine::DrawRect(hDC, m_rcItem, nBorderSize, GetAdjustColor(m_dwFocusBorderColor), m_nBorderStyle);
				}
				else if(rcBorderSize.left > 0 || rcBorderSize.top > 0 || rcBorderSize.right > 0 || rcBorderSize.bottom > 0) {
					RECT rcBorder;

					if(rcBorderSize.left > 0){
						rcBorder		= m_rcItem;
						rcBorder.right	= rcBorder.left;
						CRenderEngine::DrawLine(hDC,rcBorder,rcBorderSize.left,GetAdjustColor(m_dwBorderColor),m_nBorderStyle);
					}
					if(rcBorderSize.top > 0){
						rcBorder		= m_rcItem;
						rcBorder.bottom	= rcBorder.top;
						CRenderEngine::DrawLine(hDC,rcBorder,rcBorderSize.top,GetAdjustColor(m_dwBorderColor),m_nBorderStyle);
					}
					if(rcBorderSize.right > 0){
						rcBorder		= m_rcItem;
						rcBorder.right -= 1;
						rcBorder.left	= rcBorder.right;
						CRenderEngine::DrawLine(hDC,rcBorder,rcBorderSize.right,GetAdjustColor(m_dwBorderColor),m_nBorderStyle);
					}
					if(rcBorderSize.bottom > 0){
						rcBorder		= m_rcItem;
						rcBorder.bottom -= 1;
						rcBorder.top	= rcBorder.bottom;
						CRenderEngine::DrawLine(hDC,rcBorder,rcBorderSize.bottom,GetAdjustColor(m_dwBorderColor),m_nBorderStyle);
					}
				}
				else if(nBorderSize > 0) {
					CRenderEngine::DrawRect(hDC, m_rcItem, nBorderSize, GetAdjustColor(m_dwBorderColor), m_nBorderStyle);
				}
			}
		}
	}
开发者ID:vizcount,项目名称:work,代码行数:49,代码来源:UIControl.cpp

示例3: if

LONG CSkinItemEdit::GetBorderHelper(LONG clrNormal, LONG clrHover, LONG clrFocus, LONG clrReadOnly, LONG clrDisabled)
{
    LONG color = 0;

    if (IsReadOnly() && m_bReadOnlyBorder) {
        color = clrReadOnly;
    } else if (IsFocused() && m_bFocusBorder) {
        color = clrFocus;
    } else if (IsHot()) {
        color = clrHover;
    } else {
        color = clrNormal;
    }

    if (GetDisabled())
        color = clrDisabled;

    if (color == -1)
        color = clrNormal;

    if (color == -1)
        return -1;

    if (GetColorTransform()) {
        GetEngine()->TransformColor(color, color);
    }

    return color;
}
开发者ID:mengskysama,项目名称:V8,代码行数:29,代码来源:SkinItemEdit.cpp

示例4: OnCharMessage

WMSG_RESULT CUISpinControl::OnCharMessage( MSG* pMsg )
{
	extern UBYTE	_abKeysPressed[256];

	// If editbox is not focused
	if( !IsFocused() || m_InValidEditBox )
		return WMSG_FAIL;

	if(m_bOnlyInteger && (pMsg->wParam < 48 || pMsg->wParam > 57))
	{
		return WMSG_SUCCESS;
	}

	InsertChar(m_nCursorIndex, pMsg->wParam);

	if (_atoi64(GetString()) > m_llMax)
	{
		CTString strTmp;
		strTmp.PrintF("%I64d", m_llMax);

		SetString(strTmp.str_String);
	}

	return WMSG_SUCCESS;
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:25,代码来源:UISpinControl.cpp

示例5: OnNewTransfersDone

void TransfersPanel::OnNewTransfersDone()
{
	if (IsFocused(TRUE))
		g_desktop_transfer_manager->SetNewTransfersDone(FALSE);

	PanelChanged();
}
开发者ID:prestocore,项目名称:browser,代码行数:7,代码来源:TransfersPanel.cpp

示例6: IsFocused

// ---------------------------------------------------------
// CSecModUIContainerBase::FocusChanged(TDrawNow aDrawNow)
// ---------------------------------------------------------
//
void CSecModUIContainerBase::FocusChanged( TDrawNow aDrawNow )
    {
    if ( iListBox )
        {
        iListBox->SetFocus( IsFocused(), aDrawNow );
        }
    }
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:11,代码来源:SecModUIContainerBase.cpp

示例7: Parent

void Panel::Show()
{
	if (!GetModalMode())
	{
		const auto AnotherPanel = Parent()->GetAnotherPanel(this);
		if (AnotherPanel->IsVisible())
		{
			if (SaveScr)
			{
				SaveScr->AppendArea(AnotherPanel->SaveScr.get());
			}

			if (AnotherPanel->IsFocused())
			{
				if (AnotherPanel->IsFullScreen())
				{
					SetVisible(true);
					return;
				}

				if (GetType() == panel_type::FILE_PANEL && IsFullScreen())
				{
					ScreenObject::Show();
					AnotherPanel->Show();
					return;
				}
			}
		}
	}

	ScreenObject::Show();
	ShowScreensCount();
}
开发者ID:johnd0e,项目名称:farmanager,代码行数:33,代码来源:panel.cpp

示例8: ShowConsoleTitle

void Panel::ShowConsoleTitle()
{
	if (!IsFocused())
		return;

	ConsoleTitle::SetFarTitle(m_Title);
}
开发者ID:johnd0e,项目名称:farmanager,代码行数:7,代码来源:panel.cpp

示例9: PrepareFocusTransition

// ---------------------------------------------------------
// CMsgBodyControlEditor::PrepareFocusTransition
//
// Do not change focus when automatic find parsing has been finished
// if focus transition out of this control has been performed.
// ---------------------------------------------------------
//
void CMsgBodyControlEditor::PrepareFocusTransition()
    {
    if ( IsFocused() )
        {
        iFocusChangedBeforeParseFinish = EFalse;
        }
    }
开发者ID:flaithbheartaigh,项目名称:lemonplayer,代码行数:14,代码来源:MsgBodyControlEditor.cpp

示例10: IsFocused

// ---------------------------------------------------------
// CCertManUIContainerAuthority::FocusChanged( TDrawNow aDrawNow )
// ---------------------------------------------------------
//
void CCertManUIContainerAuthority::FocusChanged( TDrawNow aDrawNow )
{
    if ( iListBox )
    {
        iListBox->SetFocus( IsFocused(), aDrawNow );
    }
}
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:11,代码来源:CertmanuicontainerAuthority.cpp

示例11: UpdateFWLData

FX_BOOL CXFA_FFTextEdit::UpdateFWLData() {
  if (!m_pNormalWidget) {
    return FALSE;
  }
  XFA_VALUEPICTURE eType = XFA_VALUEPICTURE_Display;
  if (IsFocused()) {
    eType = XFA_VALUEPICTURE_Edit;
  }
  FX_BOOL bUpdate = FALSE;
  if (m_pDataAcc->GetUIType() == XFA_ELEMENT_TextEdit &&
      m_pDataAcc->GetNumberOfCells() < 0) {
    XFA_ELEMENT elementType = XFA_ELEMENT_UNKNOWN;
    int32_t iMaxChars = m_pDataAcc->GetMaxChars(elementType);
    if (elementType == XFA_ELEMENT_ExData) {
      iMaxChars = eType == XFA_VALUEPICTURE_Edit ? iMaxChars : 0;
    }
    if (((CFWL_Edit*)m_pNormalWidget)->GetLimit() != iMaxChars) {
      ((CFWL_Edit*)m_pNormalWidget)->SetLimit(iMaxChars);
      bUpdate = TRUE;
    }
  }
  CFX_WideString wsText;
  m_pDataAcc->GetValue(wsText, eType);
  CFX_WideString wsOldText;
  ((CFWL_Edit*)m_pNormalWidget)->GetText(wsOldText);
  if (wsText != wsOldText || (eType == XFA_VALUEPICTURE_Edit && bUpdate)) {
    ((CFWL_Edit*)m_pNormalWidget)->SetText(wsText);
    bUpdate = TRUE;
  }
  if (bUpdate) {
    m_pNormalWidget->Update();
  }
  return TRUE;
}
开发者ID:primiano,项目名称:pdfium-merge,代码行数:34,代码来源:xfa_fftextedit.cpp

示例12: FocusChanged

void CAknLockedNote::FocusChanged(TDrawNow /*aDrawNow*/)
    {
    if (!IsFocused() &&  iCommandObserver)
        {
        TRAP_IGNORE(iCommandObserver->ProcessCommandL(KNoteCmdFocusLost))
        }
    }
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:7,代码来源:aknkeylocknotifierCdma.cpp

示例13: PaintStatusImage

	void CFadeButtonUI::PaintStatusImage(HDC hDC)
	{
		if( IsFocused() ) m_uButtonState |= UISTATE_FOCUSED;
		else m_uButtonState &= ~ UISTATE_FOCUSED;
		if( !IsEnabled() ) m_uButtonState |= UISTATE_DISABLED;
		else m_uButtonState &= ~ UISTATE_DISABLED;

		if( (m_uButtonState & UISTATE_DISABLED) != 0 ) {
			if( !m_sDisabledImage.IsEmpty() ) {
				if( !DrawImage(hDC, (LPCTSTR)m_sDisabledImage) ) m_sDisabledImage.Empty();
				else return;
			}
		}
		else if( (m_uButtonState & UISTATE_PUSHED) != 0 ) {
			if( !m_sPushedImage.IsEmpty() ) {
				if( !DrawImage(hDC, (LPCTSTR)m_sPushedImage) ) m_sPushedImage.Empty();
				else return;
			}
		}
		else if( (m_uButtonState & UISTATE_FOCUSED) != 0 ) {
			if( !m_sFocusedImage.IsEmpty() ) {
				if( !DrawImage(hDC, (LPCTSTR)m_sFocusedImage) ) m_sFocusedImage.Empty();
				else return;
			}
		}

		CFadeAnimation::PaintAnimationStatusImage(hDC,(LPCTSTR)m_sNormalImage,(LPCTSTR)m_sHotImage,m_uButtonState);
	}
开发者ID:uvbs,项目名称:myduilib,代码行数:28,代码来源:UIFadeButton.cpp

示例14: PaintStatusImage

	void BUIEdit::PaintStatusImage(HDC hDC)
	{
		if (IsFocused())
			m_buttonState |= UISTATE_FOCUSED;
		else
			m_buttonState &= ~UISTATE_FOCUSED;

		if (!IsEnabled())
			m_buttonState |= UISTATE_DISABLED;
		else
			m_buttonState &= ~UISTATE_DISABLED;

		bstring filePath = BApplication::GetInstance()->GetApplicationPath();
		if ((m_buttonState & UISTATE_DISABLED) != 0) {
			filePath += m_disabledImage;
		} else if ((m_buttonState & UISTATE_HOT) != 0) {
			filePath += m_hotImage;
		} else if ((m_buttonState & UISTATE_FOCUSED) != 0) {
			filePath += m_focusedImage;
		} else {
			filePath += m_normalImage;	
		}

		ImageDescription imageDesc;
		imageDesc.imageFile = filePath;
		imageDesc.rcSrc = m_rcItem;
		imageDesc.rcPaint = m_rcPaint;
		BRenderEngineManager::GetInstance()->RenderEngine()->DrawImage(hDC, imageDesc);
	}
开发者ID:czbreborn,项目名称:BUI,代码行数:29,代码来源:BUIEdit.cpp

示例15: MAKEINTRESOURCE

void CSingleLineEditUI::Event(TEventUI& event)
{
   if( event.Type == UIEVENT_SETCURSOR )
   {
      if( IsEnabled() ) {
         ::SetCursor(::LoadCursor(NULL, MAKEINTRESOURCE(IDC_IBEAM)));
         return;
      }
   }
   if( event.Type == UIEVENT_WINDOWSIZE )
   {
      if( m_pWindow != NULL ) m_pManager->SetFocus(NULL);
   }
   if( event.Type == UIEVENT_SETFOCUS ) 
   {
      if( IsEnabled() ) {
         m_pWindow = new CSingleLineEditWnd();
         ASSERT(m_pWindow);
         m_pWindow->Init(this);
      }
   }
   if( event.Type == UIEVENT_BUTTONDOWN && IsFocused() && m_pWindow == NULL ) 
   {
      // FIX: In the case of window having lost focus, editor is gone, but
      //      we don't get another SetFocus when we click on the control again.
      m_pWindow = new CSingleLineEditWnd();
      ASSERT(m_pWindow);
      m_pWindow->Init(this);
      return;
   }
   CControlUI::Event(event);
}
开发者ID:3rdexp,项目名称:DirectUI,代码行数:32,代码来源:UIEdit.cpp


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