void CPrintSize::OnOK() { if (ChangeFocus(0)) { CPmwDialog::OnOK(); } }
void CPrintSize::OnClickedSizeShow() { /* // This has more to do with getting the focus off an edit field, but let's // do an invalidate to make it flash anyway! */ if (ChangeFocus(0)) { m_preview.Invalidate(); } }
void CPrintSize::OnSetfocusSecret2() { BOOL bForward = (m_active_item_id == 0); if (ChangeFocus(0)) { if (bForward) { NextDlgCtrl(); } else { PrevDlgCtrl(); } } }
/** * Mouse clicked event * * * @param x coordinat * @param y coordinate * @param button code * * @return 1 if event was sucessfully processed and caught, 0 otherwise */ int TextInput::MouseClicked(int x, int y,int button) { if(!enabled) return 0; int x1,y1,w,h; //int processed=Element::MouseClicked(x,y,button); //if(processed!=0) // return processed; x1=Left(); y1=Top(); w=width; h=height; if(x1<x && x<x1+w && y1<y && y<y1+h) { ChangeFocus(this); return 1; } return 0; }
nsresult nsImageMap::Blur(nsIDOMEvent* aEvent) { return ChangeFocus(aEvent, PR_FALSE); }
nsresult nsImageMap::Focus(nsIDOMEvent* aEvent) { return ChangeFocus(aEvent, PR_TRUE); }
void CPrintSize::OnSetfocusPrintScale() { ChangeFocus(IDC_PRINT_SCALE); }
void CPrintSize::OnSetfocusSheetsTall() { ChangeFocus(IDC_SHEETS_TALL); }
void CPrintSize::OnSetfocusSheetsWide() { ChangeFocus(IDC_SHEETS_WIDE); }
void CPrintSize::OnSetfocusInchesTall() { ChangeFocus(IDC_INCHES_TALL); }
void CPrintSize::OnSetfocusInchesWide() { ChangeFocus(IDC_INCHES_WIDE); }
/*virtual*/ void CWndToolBar::OnMessage(CWnd* pSender, ui16 code, ui32 data) { if ( code == ToWord('g', 'i') ) { const CBarItem *pItems = GetMenuItems(); m_nFocus = (ui8)data; CWnd* pFocus = GetFocus(); SendMessage( GetParent(), ToWord('L', 'E'), (NATIVEPTR)pItems[m_nFocus].m_pWndMenu ); if ( GetFocus() == pFocus ) { // else the focus was stolen by the current wnd SetFocus(); } } if ( code == ToWord('g', 'o') ) { const char* strId = (const char*)data; int nItem = Find( strId ); code = ToWord('g', '2'); data = nItem; } if ( ( code == ToWord('M', 'C') || code == ToWord('M', 'D') ) && data ) { // select menu item by mouse position bool* pProcess = (bool*)data; *pProcess = false; int nOldFocus = m_nFocus; int nNewFocus = _FindItemByPoint( BIOS::MOUSE::GetX() ); if ( nNewFocus != -1 && nNewFocus != nOldFocus ) { m_nFocus = nNewFocus; SetFocus(); ChangeFocus(nOldFocus); Invalidate(); } } if ( code == ToWord('g', '2') ) { const CBarItem *pItems = GetMenuItems(); int nItem = data; if ( nItem == -1 ) return; SendMessage( GetParent(), ToWord('L', 'D'), (NATIVEPTR)pItems[m_nFocus].m_pWndMenu ); if ( pItems[nItem].m_eType == CBarItem::IMain ) m_nFocus = nItem+1; else m_nFocus = nItem; SendMessage( GetParent(), ToWord('L', 'E'), (NATIVEPTR)pItems[m_nFocus].m_pWndMenu ); SetFocus(); SendMessage( GetParent(), ToWord('L', 'R'), 0 ); Settings.Runtime.m_nMenuItem = m_nFocus; } }