• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ IsFocused函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: PaintStatusImage

	void CEditUI::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_FOCUSED) != 0 ) {
			if( !m_sFocusedImage.IsEmpty() ) {
				if( !DrawImage(hDC, (LPCTSTR)m_sFocusedImage) ) m_sFocusedImage.Empty();
				else return;
			}
		}
		else if( (m_uButtonState & UISTATE_HOT) != 0 ) {
			if( !m_sHotImage.IsEmpty() ) {
				if( !DrawImage(hDC, (LPCTSTR)m_sHotImage) ) m_sHotImage.Empty();
				else return;
			}
		}

		if( !m_sNormalImage.IsEmpty() ) {
			if( !DrawImage(hDC, (LPCTSTR)m_sNormalImage) ) m_sNormalImage.Empty();
			else return;
		}
	}
开发者ID:yuechuanbingzhi163,项目名称:myduilib,代码行数:31,代码来源:UIEdit.cpp


示例17: PaintText

	void CButtonUI::PaintText(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_dwTextColor == 0 ) m_dwTextColor = m_pManager->GetDefaultFontColor();
		if( m_dwDisabledTextColor == 0 ) m_dwDisabledTextColor = m_pManager->GetDefaultDisabledColor();

		if( m_sText.IsEmpty() ) return;
		int nLinks = 0;
		RECT rc = m_rcItem;
		rc.left += m_rcTextPadding.left;
		rc.right -= m_rcTextPadding.right;
		rc.top += m_rcTextPadding.top;
		rc.bottom -= m_rcTextPadding.bottom;

		DWORD clrColor = IsEnabled()?m_dwTextColor:m_dwDisabledTextColor;

		if( ((m_uButtonState & UISTATE_PUSHED) != 0) && (GetPushedTextColor() != 0) )
			clrColor = GetPushedTextColor();
		else if( ((m_uButtonState & UISTATE_HOT) != 0) && (GetHotTextColor() != 0) )
			clrColor = GetHotTextColor();
		else if( ((m_uButtonState & UISTATE_FOCUSED) != 0) && (GetFocusedTextColor() != 0) )
			clrColor = GetFocusedTextColor();

		if( m_bShowHtml )
			CRenderEngine::DrawHtmlText(hDC, m_pManager, rc, m_sText, clrColor, \
			NULL, NULL, nLinks, m_uTextStyle);
		else
			CRenderEngine::DrawText(hDC, m_pManager, rc, m_sText, clrColor, \
			m_iFont, m_uTextStyle);
	}
开发者ID:XLIVEMEN,项目名称:ScreenCaptrue,代码行数:34,代码来源:UIButton.cpp


示例18: DerivDraw

//---------------------------------------------------------------------------//
// DerivDraw
//
//---------------------------------------------------------------------------//
void CMGHotKey::DerivDraw()
{
  string text = "None";
  if (m_Char >= 0)
  {
    text = "";
    //if (m_Ctrl ) text = "Ctrl + ";
    //if (m_Shift) text+= "Shift + ";
    text+= m_Char;
  }
  
  if (IsFocused())
  {
    g_pMGDD->Rect    (TRect(Left(),   Top(),   Width(),   20), g_pMGDD->Skin()->Color(COL_EDIT_BORDER_ACTIVE));
    g_pMGDD->FillRect(TRect(Left()+1, Top()+1, Width()-2, 18), g_pMGDD->Skin()->Color(COL_EDIT_BG_ACTIVE));
    g_pMGDD->SetClipRect(TRect(Left()+1, Top()+1, Width()-2, Height()-2));
    g_pMGDD->TextDraw   (FONT_NORMAL, Left()+3, Top(), 0,20, CMGFont::LEFT, CMGFont::VCENTER, g_pMGDD->Skin()->Color(COL_FONT_EDIT_ACTIVE), text);
    g_pMGDD->SetClipRect();
  }
  else
  {
    g_pMGDD->Rect    (TRect(Left(),   Top(),   Width(),   20), g_pMGDD->Skin()->Color(COL_EDIT_BORDER));
    g_pMGDD->FillRect(TRect(Left()+1, Top()+1, Width()-2, 18), g_pMGDD->Skin()->Color(COL_EDIT_BG));
    g_pMGDD->SetClipRect(TRect(Left()+1, Top()+1, Width()-2, Height()-2));
    g_pMGDD->TextDraw   (FONT_NORMAL, Left()+3, Top(), 0,20, CMGFont::LEFT, CMGFont::VCENTER, g_pMGDD->Skin()->Color(COL_FONT_EDIT), text);
    g_pMGDD->SetClipRect();
  }
}
开发者ID:EQ4,项目名称:neonv2,代码行数:32,代码来源:MGHotKey.cpp


示例19: DoPaint

void CSingleLinePickUI::DoPaint(HDC hDC, const RECT& rcPaint)
{
	int cy = m_rcItem.bottom - m_rcItem.top;
	::SetRect(&m_rcButton, m_rcItem.right - cy, m_rcItem.top, m_rcItem.right, m_rcItem.bottom);
	RECT rcText = { m_rcItem.left, m_rcItem.top, m_rcButton.left - 4, m_rcItem.bottom };
	UITYPE_COLOR iTextColor = UICOLOR_EDIT_TEXT_NORMAL;
	UITYPE_COLOR iBorderColor = UICOLOR_CONTROL_BORDER_NORMAL;
	UITYPE_COLOR iBackColor = UICOLOR_CONTROL_BACKGROUND_NORMAL;
	if( IsFocused() ) {
		iTextColor = UICOLOR_EDIT_TEXT_NORMAL;
		iBorderColor = UICOLOR_CONTROL_BORDER_NORMAL;
		iBackColor = UICOLOR_CONTROL_BACKGROUND_HOVER;
	}
	if( !IsEnabled() ) {
		iTextColor = UICOLOR_EDIT_TEXT_DISABLED;
		iBorderColor = UICOLOR_CONTROL_BORDER_DISABLED;
		iBackColor = UICOLOR__INVALID;
	}
	CBlueRenderEngineUI::DoPaintFrame(hDC, m_pManager, rcText, iBorderColor, iBorderColor, iBackColor);
	::InflateRect(&rcText, -4, -2);
	m_nLinks = lengthof(m_rcLinks);
	CBlueRenderEngineUI::DoPaintPrettyText(hDC, m_pManager, rcText, m_sText, iTextColor, UICOLOR__INVALID, m_rcLinks, m_nLinks, DT_SINGLELINE);
	RECT rcPadding = { 0 };
	CBlueRenderEngineUI::DoPaintButton(hDC, m_pManager, m_rcButton, _T("<i 4>"), rcPadding, m_uButtonState, 0);
}
开发者ID:kovrov,项目名称:scrap,代码行数:25,代码来源:UICombo.cpp


示例20: IsFocused

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ IsFullScreen函数代码示例发布时间:2022-05-30
下一篇:
C++ IsFocus函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap