本文整理汇总了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);
}
示例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);
}
}
}
}
示例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;
}
示例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;
}
示例5: OnNewTransfersDone
void TransfersPanel::OnNewTransfersDone()
{
if (IsFocused(TRUE))
g_desktop_transfer_manager->SetNewTransfersDone(FALSE);
PanelChanged();
}
示例6: IsFocused
// ---------------------------------------------------------
// CSecModUIContainerBase::FocusChanged(TDrawNow aDrawNow)
// ---------------------------------------------------------
//
void CSecModUIContainerBase::FocusChanged( TDrawNow aDrawNow )
{
if ( iListBox )
{
iListBox->SetFocus( IsFocused(), aDrawNow );
}
}
示例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();
}
示例8: ShowConsoleTitle
void Panel::ShowConsoleTitle()
{
if (!IsFocused())
return;
ConsoleTitle::SetFarTitle(m_Title);
}
示例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;
}
}
示例10: IsFocused
// ---------------------------------------------------------
// CCertManUIContainerAuthority::FocusChanged( TDrawNow aDrawNow )
// ---------------------------------------------------------
//
void CCertManUIContainerAuthority::FocusChanged( TDrawNow aDrawNow )
{
if ( iListBox )
{
iListBox->SetFocus( IsFocused(), aDrawNow );
}
}
示例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;
}
示例12: FocusChanged
void CAknLockedNote::FocusChanged(TDrawNow /*aDrawNow*/)
{
if (!IsFocused() && iCommandObserver)
{
TRAP_IGNORE(iCommandObserver->ProcessCommandL(KNoteCmdFocusLost))
}
}
示例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);
}
示例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);
}
示例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);
}