您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ FindFocus函数代码示例

51自学网 2021-06-01 20:46:44
  C++
这篇教程C++ FindFocus函数代码示例写得很实用,希望能帮到您。

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

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

示例1: OnCaptureKey

void DeviceToolBar::OnCaptureKey(wxCommandEvent &event){   wxKeyEvent *kevent = (wxKeyEvent *)event.GetEventObject();   int keyCode = kevent->GetKeyCode();   // Pass UP/DOWN/LEFT/RIGHT through for input/output choice   if (FindFocus() == mInput && (keyCode == WXK_LEFT || keyCode == WXK_RIGHT                                 || keyCode == WXK_UP || keyCode == WXK_DOWN)) {      return;   }   if (FindFocus() == mOutput && (keyCode == WXK_LEFT || keyCode == WXK_RIGHT                                 || keyCode == WXK_UP || keyCode == WXK_DOWN)) {      return;   }   event.Skip();   return;}
开发者ID:jozsefmezei,项目名称:audacity,代码行数:19,


示例2: FindFocus

void wxTopLevelWindowMSW::DoSaveLastFocus(){    if ( m_iconized )        return;    // remember the last focused child if it is our child    wxWindow* const winFocus = FindFocus();    m_winLastFocused = IsDescendant(winFocus) ? winFocus : NULL;}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:10,


示例3: FindFocus

void SelectionBar::OnUpdate(wxCommandEvent &evt){   int index = evt.GetInt();   wxWindow *w = FindFocus();   bool leftFocus = (w == mLeftTime);   bool rightFocus = (w == mRightTime);   bool audioFocus = (w == mAudioTime);      evt.Skip(false);      /* we don't actually need a TimeTextCtrl, but need it's     * translations which are done at runtime */      TimeTextCtrl *ttc = new TimeTextCtrl(this, wxID_ANY, wxT(""), 0.0, mRate);   wxString formatName(ttc->GetBuiltinName(index));   gPrefs->Write(wxT("/SelectionFormat"), formatName);   gPrefs->Flush();   #if wxUSE_TOOLTIPS      mSnapTo->SetToolTip(wxString::Format(_("Snap Clicks/Selections to %s"), formatName.c_str()));   #endif   delete ttc;   // ToolBar::ReCreateButtons() will get rid of our sizers and controls   // so reset pointers first.   mLeftTime =   mRightTime =   mAudioTime = NULL;   mRightEndButton =   mRightLengthButton = NULL;   mRateBox = NULL;   mRateText = NULL;   ToolBar::ReCreateButtons();   ValuesToControls();   wxString formatString = mLeftTime->GetBuiltinFormat(index);   mLeftTime->SetFormatString(formatString);   mRightTime->SetFormatString(formatString);   mAudioTime->SetFormatString(formatString);   if (leftFocus) {      mLeftTime->SetFocus();   }   else if (rightFocus) {      mRightTime->SetFocus();   }   else if (audioFocus) {      mAudioTime->SetFocus();   }   Updated();}
开发者ID:tuanmasterit,项目名称:audacity,代码行数:55,


示例4: FindFocus

// Default activation behaviour - set the focus for the first child// subwindow found.void wxFrame::OnActivate(wxActivateEvent& event){    if ( !event.GetActive() )    {       // remember the last focused child if it is our child        m_winLastFocused = FindFocus();        // so we NULL it out if it's a child from some other frame        wxWindow *win = m_winLastFocused;        while ( win )        {            if ( win->IsTopLevel() )            {                if ( win != this )                    m_winLastFocused = NULL;                break;            }            win = win->GetParent();        }        event.Skip();    }    else    {        // restore focus to the child which was last focused        wxWindow *parent = m_winLastFocused            ? m_winLastFocused->GetParent()            : NULL;        if (parent == NULL)            parent = this;        wxSetFocusToChild(parent, &m_winLastFocused);#if wxUSE_MENUS        if (m_frameMenuBar != NULL)        {            m_frameMenuBar->MacInstallMenuBar();        }        else        {            wxFrame *tlf = wxDynamicCast( wxTheApp->GetTopWindow(), wxFrame );            if (tlf != NULL)            {                // Trying top-level frame membar                if (tlf->GetMenuBar())                    tlf->GetMenuBar()->MacInstallMenuBar();            }        }#endif    }}
开发者ID:mark711,项目名称:Cafu,代码行数:56,


示例5: OnOutputUpdate

void NyqBench::OnOutputUpdate(wxUpdateUIEvent & e){   if (mOutputBox && mOutput && FindFocus() == mOutput) {      wxString label = mOutputBox->GetLabel();      if (label == _("Output")) {         label += wxT("*");         mOutputBox->SetLabel(label);         mScriptBox->SetLabel(_("Script"));      }   }}
开发者ID:finefin,项目名称:audacity,代码行数:11,


示例6: FindFocus

void MvcController::UponChildFocus(wxChildFocusEvent& event){    event.Skip();    wxWindow* new_focused_window = FindFocus();    // A wxChildFocusEvent is sent for every window in the hierarchy,    // from new_focused_window up to this MvcController. Ignore all    // but the "deepest" one--see:    //   http://lists.nongnu.org/archive/html/lmi/2009-01/msg00001.html    if(event.GetWindow() != new_focused_window)        {        return;        }    // Do nothing if focus hasn't changed. This case arises when    // another application is activated, and then this application    // is reactivated.    if(last_focused_window_ == new_focused_window)        {        return;        }    if        (  wxID_CANCEL == new_focused_window->GetId()        || wxID_HELP   == new_focused_window->GetId()        )        {        return;        }    if(Validate())        {        if(new_focused_window)            {            last_focused_window_ = new_focused_window;            }        else            {            warning() << "Keyboard focus was lost." << LMI_FLUSH;            RefocusLastFocusedWindow();            }        }    else        {        LMI_ASSERT(!unit_test_refocus_event_pending_);        if(!unit_test_under_way_)            {            wxCommandEvent event0(wxEVT_REFOCUS_INVALID_CONTROL);            wxPostEvent(this, event0);            }        unit_test_refocus_event_pending_ = true;        }}
开发者ID:vadz,项目名称:lmi,代码行数:54,


示例7: SetStop

void ControlToolBar::SetStop(bool down){   if (down)      mStop->PushDown();   else {      if(FindFocus() == mStop)         mPlay->SetFocus();      mStop->PopUp();   }   EnableDisableButtons();}
开发者ID:PhilSee,项目名称:audacity,代码行数:11,


示例8: FindFocus

/*---------------------------------------------------------------------------*/void wxSQLBook::OnClearAllClick(wxCommandEvent& event){    wxWindow* window = FindFocus();    if (window)    {        if (window == m_SQLEdit)            m_SQLEdit->ClearAll();        else if (window == m_LogResult)            m_LogResult->SetValue(wxEmptyString);    }}
开发者ID:4silvertooth,项目名称:wxSqlitePlus,代码行数:12,


示例9: wxCHECK_RET

void wxNonOwnedWindow::SetDfbFocus(){    wxCHECK_RET( IsShown(), "cannot set focus to hidden window" );    wxASSERT_MSG( FindFocus() && FindFocus()->GetTLW() == this,                  "setting DirectFB focus to unexpected window" );    // Don't set DirectFB focus if we're called from HandleFocusEvent() on    // this window, because we already have the focus in that case. Not only    // would it be unnecessary, it would be harmful: RequestFocus() adds    // an event to DirectFB event queue and calling it when in    // HandleFocusEvent() could result in a window being focused when it    // should not be. Consider this example:    //    //     tlw1->SetFocus(); // (1)    //     tlw2->SetFocus(); // (2)    //    // This results in adding these events to DFB queue:    //    //     DWET_GOTFOCUS(tlw1)    //     DWET_LOSTFOCUS(tlw1)    //     DWET_GOTFOCUS(tlw2)    //    // Note that the events are processed by event loop, i.e. not between    // execution of lines (1) and (2) above. So by the time the first    // DWET_GOTFOCUS event is handled, tlw2->SetFocus() was already executed.    // If we onconditionally called RequestFocus() from here, handling the    // first event would result in this change to the event queue:    //    //     DWET_LOSTFOCUS(tlw1)    //     DWET_GOTFOCUS(tlw2) // (3)    //     DWET_LOSTFOCUS(tlw2)    //     DWET_GOTFOCUS(tlw1)    //    // And the focus would get back to tlw1 even though that's not what we    // wanted.    if ( gs_insideDFBFocusHandlerOf == this )        return;    GetDirectFBWindow()->RequestFocus();}
开发者ID:beanhome,项目名称:dev,代码行数:41,


示例10: OnCaptureKey

void MixerToolBar::OnCaptureKey(wxCommandEvent &event){   wxKeyEvent *kevent = (wxKeyEvent *)event.GetEventObject();   int keyCode = kevent->GetKeyCode();   // Pass LEFT/RIGHT/UP/DOWN/PAGEUP/PAGEDOWN through for input/output sliders   if (FindFocus() == mOutputSlider && (keyCode == WXK_LEFT || keyCode == WXK_RIGHT                                    || keyCode == WXK_UP || keyCode == WXK_DOWN                                    || keyCode == WXK_PAGEUP || keyCode == WXK_PAGEDOWN)) {      return;   }   if (FindFocus() == mInputSlider && (keyCode == WXK_LEFT || keyCode == WXK_RIGHT                                    || keyCode == WXK_UP || keyCode == WXK_DOWN                                    || keyCode == WXK_PAGEUP || keyCode == WXK_PAGEDOWN)) {      return;   }   event.Skip();   return;}
开发者ID:GYGit,项目名称:Audacity,代码行数:21,


示例11: FindFocus

void SelectionBar::OnUpdate(wxCommandEvent &evt){   int index = evt.GetInt();   wxWindow *w = FindFocus();   bool leftFocus = (w == mLeftTime);   bool rightFocus = (w == mRightTime);   bool audioFocus = (w == mAudioTime);   evt.Skip(false);   wxString format;   // Save format name before recreating the controls so they resize properly   format = mLeftTime->GetBuiltinName(index);   mListener->AS_SetSelectionFormat(format);#if wxUSE_TOOLTIPS   mSnapTo->SetToolTip(wxString::Format(_("Snap Clicks/Selections to %s"), format.c_str()));#endif   // ToolBar::ReCreateButtons() will get rid of our sizers and controls   // so reset pointers first.   mLeftTime =   mRightTime =   mAudioTime = NULL;   mRightEndButton =   mRightLengthButton = NULL;   mRateBox = NULL;   mRateText = NULL;   ToolBar::ReCreateButtons();   ValuesToControls();   format = mLeftTime->GetBuiltinFormat(index);   mLeftTime->SetFormatString(format);   mRightTime->SetFormatString(format);   mAudioTime->SetFormatString(format);   if (leftFocus) {      mLeftTime->SetFocus();   }   else if (rightFocus) {      mRightTime->SetFocus();   }   else if (audioFocus) {      mAudioTime->SetFocus();   }   Updated();}
开发者ID:Grunji,项目名称:audacity,代码行数:53,


示例12: FindFocus

/*---------------------------------------------------------------------------*/void wxTableBook::OnCopyClick(wxCommandEvent& event){    wxWindow* window = FindFocus();    if (window && ((window == m_PageDdl)||                   (m_PageColumns && m_PageColumns->HasFocus())||                   (m_PageData && m_PageData->HasFocus())||                   (m_PageForeignKey && m_PageForeignKey->HasFocus())||                   (m_PageTriggers && m_PageTriggers->HasFocus())||                   (m_PageIndexes && m_PageIndexes->HasFocus())))        window->GetEventHandler()->ProcessEvent(event);}
开发者ID:4silvertooth,项目名称:wxSqlitePlus,代码行数:13,


示例13: HitTest

void wxCheckListBox::OnLeftClick(wxMouseEvent& event){    // clicking on the item selects it, clicking on the checkmark toggles    int nItem = HitTest(event.GetX(), event.GetY());    if ( nItem != wxNOT_FOUND )    {        wxRect rect;        GetItemRect(nItem, rect);        // convert item rect to check mark rect        wxSize size = wxRendererNative::Get().GetCheckBoxSize(this);        rect.x += CHECKMARK_EXTRA_SPACE;        rect.y += (rect.GetHeight() - size.GetHeight()) / 2;        rect.SetSize(size);        if ( rect.Contains(event.GetX(), event.GetY()) )        {            // people expect to get "kill focus" event for the currently            // focused control before getting events from the other controls            // and, equally importantly, they may prevent the focus change from            // taking place at all (e.g. because the old control contents is            // invalid and needs to be corrected) in which case we shouldn't            // generate this event at all            SetFocus();            if ( FindFocus() == this )            {                Toggle(nItem);                SendEvent(nItem);                // scroll one item down if the item is the last one                // and isn't visible at all                int h;                GetClientSize(NULL, &h);                if ( rect.GetBottom() > h )                    ScrollLines(1);            }        }        else        {            // implement default behaviour: clicking on the item selects it            event.Skip();        }    }    else    {        // implement default behaviour on click outside of client zone        event.Skip();    }}
开发者ID:AdmiralCurtiss,项目名称:pcsx2,代码行数:51,


示例14: FindFocus

// Default activation behaviour - set the focus for the first child// subwindow found.void wxFrame::OnActivate(wxActivateEvent& event){    if ( !event.GetActive() )    {       // remember the last focused child if it is our child        m_winLastFocused = FindFocus();        // so we NULL it out if it's a child from some other frame        wxWindow *win = m_winLastFocused;        while ( win )        {            if ( win->IsTopLevel() )            {                if ( win != this )                {                    m_winLastFocused = NULL;                }                break;            }            win = win->GetParent();        }        event.Skip();    }    else    {        // restore focus to the child which was last focused        wxWindow *parent = m_winLastFocused ? m_winLastFocused->GetParent()                                            : NULL;        if ( !parent )        {            parent = this;        }        wxSetFocusToChild(parent, &m_winLastFocused);        if ( m_frameMenuBar != NULL )        {            m_frameMenuBar->MacInstallMenuBar() ;        }        else if (wxTheApp->GetTopWindow() && wxTheApp->GetTopWindow()->IsKindOf(CLASSINFO(wxFrame)))        {            // Trying toplevel frame menbar            if( ((wxFrame*)wxTheApp->GetTopWindow())->GetMenuBar() )                ((wxFrame*)wxTheApp->GetTopWindow())->GetMenuBar()->MacInstallMenuBar();         }    }}
开发者ID:gitrider,项目名称:wxsj2,代码行数:52,


示例15: FindFocus

void SelectionBar::OnUpdate(wxCommandEvent &evt){   int index = evt.GetInt();   wxWindow *w = FindFocus();   bool leftFocus = (w == mLeftTime);   bool rightFocus = (w == mRightTime);   bool audioFocus = (w == mAudioTime);      evt.Skip(false);   /* we need an object to call these methods on. It actually doesn't matter    * which as they have no effect on the object state, so we just use the first    * one to hand */   wxString formatName =  mLeftTime->GetBuiltinName(index);   wxString formatString = mLeftTime->GetBuiltinFormat(index);   gPrefs->Write(wxT("/SelectionFormat"), formatName);   // ToolBar::ReCreateButtons() will get rid of our sizers and controls   // so reset pointers first.   mLeftTime =   mRightTime =   mAudioTime = NULL;   mRightEndButton =   mRightLengthButton = NULL;   mRateBox = NULL;   ToolBar::ReCreateButtons();   ValuesToControls();   mLeftTime->SetFormatString(formatString);   mRightTime->SetFormatString(formatString);   mAudioTime->SetFormatString(formatString);   if (leftFocus) {      mLeftTime->SetFocus();   }   else if (rightFocus) {      mRightTime->SetFocus();   }   else if (audioFocus) {      mAudioTime->SetFocus();   }   Updated();}
开发者ID:ruthmagnus,项目名称:audacity,代码行数:49,


示例16: FindFocus

bool SearchPanel::IsActive() const {	if (!IsShown()) return false;	// Check if any local control has focus	wxWindow* focused = FindFocus();	if (focused == (wxWindow*)searchbox) return true;	if (focused == (wxWindow*)replaceBox) return true;	if (focused == (wxWindow*)nextButton) return true;	if (focused == (wxWindow*)prevButton) return true;	if (focused == (wxWindow*)replaceButton) return true;	if (focused == (wxWindow*)allButton) return true;	if (focused == (wxWindow*)closeButton) return true;	return false; // no focus}
开发者ID:dxtravi,项目名称:e,代码行数:15,


示例17: FindFocus

void wxSTEditorFindReplacePanel::OnIdle(wxIdleEvent &event){    if (IsShown())    {        // This is a really ugly hack because the combo forgets it's insertion        //   point in MSW whenever it loses focus        wxWindow* focus = FindFocus();        if (m_findCombo && (focus == m_findCombo))            m_find_insert_pos = m_findCombo->GetInsertionPoint();        if (m_replaceCombo && (focus == m_replaceCombo))            m_replace_insert_pos = m_replaceCombo->GetInsertionPoint();    }    event.Skip();}
开发者ID:Slulego,项目名称:GD,代码行数:15,


示例18: wxMax

//// Draw the background for a given line//// This is called by the listbox when it needs to redraw the view.//voidKeyView::OnDrawBackground(wxDC & dc, const wxRect & rect, size_t line) const{   const KeyNode *node = mLines[line];   wxRect r = rect;   wxCoord indent = 0;   // When in tree view mode, each younger branch gets indented by the   // width of the open/close bitmaps   if (mViewType == ViewByTree)   {      indent += node->depth * KV_BITMAP_SIZE;   }   // Offset left side by the indentation (if any) and scroll amounts   r.x = indent - mScrollX;   // If the line width is less than the client width, then we want to   // extend the background to the right edge of the client view.  Otherwise,   // go all the way to the end of the line width...this will draw past the    // right edge, but that's what we want.   r.width = wxMax(mWidth, r.width);   // Selected lines get a solid background   if (IsSelected(line))   {      if (FindFocus() == this)      {         // Focused lines get highlighted background         dc.SetBrush(wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT)));         AColor::DrawFocus(dc, r);         dc.DrawRectangle(r);      }      else      {         // Non ocused lines get a light background         dc.SetBrush(wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)));         dc.SetPen(*wxTRANSPARENT_PEN);         dc.DrawRectangle(r);      }   }   else   {      // Non-selected lines get a thin bottom border      dc.SetPen(wxColour(240, 240, 240));      dc.DrawLine(r.GetLeft(), r.GetBottom(), r.GetRight(), r.GetBottom());   }}
开发者ID:tuanmasterit,项目名称:audacity,代码行数:53,


示例19: FindFocus

void SpectralSelectionBar::OnUpdate(wxCommandEvent &evt){   int index = evt.GetInt();   wxWindow *w = FindFocus();   bool centerFocus = (w && w == mCenterCtrl);   bool widthFocus = (w && w == mWidthCtrl);   bool lowFocus = (w && w == mLowCtrl);   bool highFocus = (w && w == mHighCtrl);   evt.Skip(false);   // Save formats before recreating the controls so they resize properly   wxEventType type = evt.GetEventType();   if (type == EVT_FREQUENCYTEXTCTRL_UPDATED) {      NumericTextCtrl *frequencyCtrl = (mbCenterAndWidth ? mCenterCtrl : mLowCtrl);      wxString frequencyFormatName = frequencyCtrl->GetBuiltinName(index);      mListener->SSBL_SetFrequencySelectionFormatName(frequencyFormatName);   }   else if (mbCenterAndWidth &&            type == EVT_BANDWIDTHTEXTCTRL_UPDATED) {      wxString bandwidthFormatName = mWidthCtrl->GetBuiltinName(index);      mListener->SSBL_SetBandwidthSelectionFormatName(bandwidthFormatName);   }   // ToolBar::ReCreateButtons() will get rid of our sizers and controls   // so reset pointers first.   mCenterCtrl = mWidthCtrl = NULL;   mLowCtrl = mHighCtrl = NULL;   ToolBar::ReCreateButtons();   ValuesToControls();   if (centerFocus) {      mCenterCtrl->SetFocus();   }   else if (widthFocus) {      mWidthCtrl->SetFocus();   }   else if (lowFocus) {      mLowCtrl->SetFocus();   }   else if (highFocus) {      mHighCtrl->SetFocus();   }   Updated();}
开发者ID:AthiVarathan,项目名称:audacity,代码行数:48,


示例20: FindFocus

void LogFinderFrame::OnTabKeyPress(wxKeyEvent& Event){    wxWindow *Window = FindFocus();    if(Event.GetKeyCode() == WXK_TAB)        {            bool Backward = Event.ShiftDown();            switch (Window->GetId())            {                case ID_TEXT_FILE_PATH:                    if(Backward)                        FindWindow(ID_EXPORT_BUTTON)->SetFocus();                    else                        FindWindow(ID_FILE_BUTTON)->SetFocus();                    break;                case ID_FILE_BUTTON:                    if(Backward)                        FindWindow(ID_TEXT_FILE_PATH)->SetFocus();                    else                        FindWindow(ID_WORD_SEARCH)->SetFocus();                    break;                case ID_WORD_SEARCH:                    if(Backward)                        FindWindow(ID_FILE_BUTTON)->SetFocus();                    else                        FindWindow(ID_SEARCH_BUTTON)->SetFocus();                    break;                case ID_SEARCH_BUTTON:                    if(Backward)                        FindWindow(ID_WORD_SEARCH)->SetFocus();                    else                        FindWindow(ID_EXPORT_BUTTON)->SetFocus();                    break;                case ID_EXPORT_BUTTON:                    if(Backward)                        FindWindow(ID_SEARCH_BUTTON)->SetFocus();                    else                        FindWindow(ID_TEXT_FILE_PATH)->SetFocus();                    break;                default:                    if(Backward)                        FindWindow(ID_EXPORT_BUTTON)->SetFocus();                    else                        FindWindow(ID_TEXT_FILE_PATH)->SetFocus();            }        }}
开发者ID:rodrigoavalente,项目名称:LogFinder,代码行数:47,


示例21: dc

void TimeTextCtrl::OnPaint(wxPaintEvent &event){   wxPaintDC dc(this);   bool focused = (FindFocus() == this);   dc.DrawBitmap(*mBackgroundBitmap, 0, 0);   wxPen   Pen;   wxBrush Brush;   if (focused) {      theTheme.SetPenColour( Pen, clrTimeFontFocus );      dc.SetPen(Pen);      dc.SetBrush(*wxTRANSPARENT_BRUSH);      dc.DrawRectangle(0, 0, mWidth, mHeight);      dc.SetPen( wxNullPen );   }   dc.SetFont(*mDigitFont);   dc.SetTextForeground(theTheme.Colour( clrTimeFont ));   dc.SetTextBackground(theTheme.Colour( clrTimeBack ));   dc.SetPen(*wxTRANSPARENT_PEN);   theTheme.SetBrushColour( Brush , clrTimeBackFocus );   dc.SetBrush( Brush );   int i;   for(i=0; i<(int)mDigits.GetCount(); i++) {      wxRect box = mDigits[i].digitBox;      if (focused && mFocusedDigit == i) {         dc.DrawRectangle(box);         dc.SetTextForeground(theTheme.Colour( clrTimeFontFocus ));         dc.SetTextBackground(theTheme.Colour( clrTimeBackFocus ));      }      int pos = mDigits[i].pos;      wxString digit = mValueString.Mid(pos, 1);      int x = box.x + (mDigitBoxW - mDigitW)/2;      int y = box.y + (mDigitBoxH - mDigitH)/2;      dc.DrawText(digit, x, y);      if (focused && mFocusedDigit == i) {         dc.SetTextForeground(theTheme.Colour( clrTimeFont ));         dc.SetTextBackground(theTheme.Colour( clrTimeBack ));      }   }   dc.SetPen( wxNullPen );   dc.SetBrush( wxNullBrush );}
开发者ID:tuanmasterit,项目名称:audacity,代码行数:46,


示例22: OnKey

void MyFrame::OnKey(wxKeyEvent& event){	int key;	key = event.GetKeyCode();	if((currentcanvas != NULL) && (currentcanvas != FindFocus()))	{		if((key == WXK_F1) || (key == WXK_F2))		{			currentcanvas->OnKey(event);			currentcanvas->SetFocus();			return;		}	}	event.Skip();}
开发者ID:ashengmz,项目名称:espeak,代码行数:18,


示例23: DrawPlot

void FreqWindow::Recalc(){   if (!mData || mDataLen < mWindowSize) {      DrawPlot();      return;   }   SpectrumAnalyst::Algorithm alg =      SpectrumAnalyst::Algorithm(mAlgChoice->GetSelection());   int windowFunc = mFuncChoice->GetSelection();   wxWindow *hadFocus = FindFocus();   // In wxMac, the skipped window MUST be a top level window.  I'd originally made it   // just the mProgress window with the idea of preventing user interaction with the   // controls while the plot was being recalculated.  This doesn't appear to be necessary   // so just use the the top level window instead.   {      Maybe<wxWindowDisabler> blocker;      if (IsShown())         blocker.create(this);      wxYieldIfNeeded();      mAnalyst->Calculate(alg, windowFunc, mWindowSize, mRate,         mData.get(), mDataLen,         &mYMin, &mYMax, mProgress);   }   if (hadFocus) {      hadFocus->SetFocus();   }   if (alg == SpectrumAnalyst::Spectrum) {      if(mYMin < -dBRange)         mYMin = -dBRange;      if(mYMax <= -dBRange)         mYMax = -dBRange + 10.; // it's all out of range, but show a scale.      else         mYMax += .5;   }   // Prime the scrollbar   mPanScroller->SetScrollbar(0, (mYMax - mYMin) * 100, (mYMax - mYMin) * 100, 1);   DrawPlot();}
开发者ID:RaphaelMarinier,项目名称:audacity,代码行数:44,


示例24: event

bool wxNonOwnedWindow::Show(bool show){    // NB: this calls wxWindow::Show() and so ensures DoRefreshWindow() is    //     called on the window -- we'll need that below    if ( !wxWindow::Show(show) )        return false;    // If this is the first time Show was called, send size event,    // so that the frame can adjust itself (think auto layout or single child)    if ( !m_sizeSet )    {        m_sizeSet = true;        wxSizeEvent event(GetSize(), GetId());        event.SetEventObject(this);        HandleWindowEvent(event);    }    // make sure the window is fully painted, with all pending updates, before    // DFB WM shows it, otherwise it would attempt to show either empty (=    // black) window surface (if shown for the first time) or it would show    // window with outdated content; note that the window was already refreshed    // in the wxWindow::Show() call above:    if ( show )        Update();    // hide/show the window by setting its opacity to 0/full:    m_dfbwin->SetOpacity(show ? m_opacity : 0);    if ( show )    {        wxWindow *focused = FindFocus();        if ( focused && focused->GetTLW() == this )        {            // focus is on this frame or its children, apply it to DirectFB            SetDfbFocus();        }        // else: don't do anything, if this is wxFrame or wxDialog that should        //       get focus when it's shown,        //       wxTopLevelWindowDFB::HandleFocusEvent() will do it as soon as        //       the event loop starts    }    return true;}
开发者ID:beanhome,项目名称:dev,代码行数:44,


示例25: GetSpecialTextEntry

bool wxDialogEx::ProcessEvent(wxEvent& event){	if(event.GetEventType() != wxEVT_MENU) {		return wxDialog::ProcessEvent(event);	}	wxTextEntry* e = GetSpecialTextEntry(FindFocus(), 'V');	if( e && event.GetId() == pasteId ) {		e->Paste();		return true;	}	else if( e && event.GetId() == selectAllId ) {		e->SelectAll();		return true;	}	else {		return wxDialog::ProcessEvent(event);	}}
开发者ID:Typz,项目名称:FileZilla,代码行数:19,


示例26: Enable

bool wxWindow::Enable(bool enable){    if ( !wxWindowNative::Enable(enable) )        return false;    // disabled window can't keep focus    if ( FindFocus() == this && GetParent() != NULL )    {        GetParent()->SetFocus();    }    if ( m_renderer )    {        // a window with renderer is drawn by ourselves and it has to be        // refreshed to reflect its new status        Refresh();    }    return true;}
开发者ID:iokto,项目名称:newton-dynamics,代码行数:20,



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


C++ FindFunction函数代码示例
C++ FindFloatPlane函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。