这篇教程C++ IsModal函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中IsModal函数的典型用法代码示例。如果您正苦于以下问题:C++ IsModal函数的具体用法?C++ IsModal怎么用?C++ IsModal使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了IsModal函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: GetLeftButtonRectvoid IngameWindow::MouseLeftUp(const MouseCoords& mc){ // Bewegung stoppen isMoving = false; // beiden Buttons oben links und rechts prfen const Rect rec[2] = { GetLeftButtonRect(), GetRightButtonRect() }; for(unsigned i = 0; i < 2; ++i) { button_state[i] = BUTTON_UP; if(Coll(mc.x, mc.y, rec[i])) { if(i == 0 && (!IsModal() || closeOnRightClick_)) Close(); else if(i==1 && !IsModal()) { SetMinimized(!IsMinimized()); LOADER.GetSoundN("sound", 113)->Play(255, false); } } }}
开发者ID:vader1986,项目名称:s25client,代码行数:27,
示例2: OnCancelvoid dlgSearchObject::OnCancel(wxCommandEvent &ev){ if (IsModal()) EndModal(wxID_CANCEL); else Destroy();}
开发者ID:aiht,项目名称:pgadmin3,代码行数:7,
示例3: OnCancelvoid pgDialog::OnCancel(wxCommandEvent &ev){ if (IsModal()) EndModal(wxID_CANCEL); else Destroy();}
开发者ID:kleopatra999,项目名称:pgadmin3,代码行数:7,
示例4: OnClosevoid pgDialog::OnClose(wxCloseEvent &event){ if (IsModal()) EndModal(wxID_CANCEL); else Destroy();}
开发者ID:kleopatra999,项目名称:pgadmin3,代码行数:7,
示例5: OnOkClickvoid DlgSaveLayout::OnOkClick( wxCommandEvent& event ){ if(!m_ComboLayout->GetValue().IsEmpty()) { if(bSave) { wxMainFrame::Get()->AddLayout(m_ComboLayout->GetValue()); } else { wxMainFrame::Get()->RemoveLayout(m_ComboLayout->GetValue()); } if ( IsModal() ) EndModal(wxID_OK); // If modal else { SetReturnCode(wxID_OK); this->Show(false); // If modeless } } else { wxMessageBox(wxT("You must enter a layout name"), wxT("Error")); }}
开发者ID:cubemoon,项目名称:game-editor,代码行数:26,
示例6: VECTOR2Dvoid DIALOG_DRC_CONTROL::OnLeftDClickClearance( wxMouseEvent& event ){ event.Skip(); // I am assuming that the double click actually changed the selected item. // please verify this. int selection = m_ClearanceListBox->GetSelection(); if( selection != wxNOT_FOUND ) { // Find the selected MARKER in the PCB, position cursor there. // Then close the dialog. const DRC_ITEM* item = m_ClearanceListBox->GetItem( selection ); if( item ) { m_brdEditor->CursorGoto( item->GetPointA() ); m_brdEditor->GetGalCanvas()->GetView()->SetCenter( VECTOR2D( item->GetPointA() ) ); if( !IsModal() ) { // turn control over to m_brdEditor, hide this DIALOG_DRC_CONTROL window, // no destruction so we can preserve listbox cursor Show( false ); // We do not want the clarification popup window. // when releasing the left button in the main window m_brdEditor->SkipNextLeftButtonReleaseEvent(); } } }}
开发者ID:AlexanderBrevig,项目名称:kicad-source-mirror,代码行数:32,
示例7: ShowModalint wxDialog::ShowModal(){ if ( IsModal() ) { wxFAIL_MSG( wxT("wxDialog:ShowModal called twice") ); return GetReturnCode(); } // use the apps top level window as parent if none given unless explicitly // forbidden wxWindow * const parent = GetParentForModalDialog(); if ( parent && parent != this ) { m_parent = parent; } Show(true); m_isShowingModal = true; wxASSERT_MSG( !m_windowDisabler, wxT("disabling windows twice?") );#if defined(__WXGTK__) || defined(__WXMGL__) wxBusyCursorSuspender suspender; // FIXME (FIXME_MGL) - make sure busy cursor disappears under MSW too#endif m_windowDisabler = new wxWindowDisabler(this); if ( !m_eventLoop ) m_eventLoop = new wxEventLoop; m_eventLoop->Run(); return GetReturnCode();}
开发者ID:mark711,项目名称:Cafu,代码行数:35,
示例8: OnCancelvoid frmExport::OnCancel(wxCommandEvent &ev){ if (IsModal()) EndModal(wxID_CANCEL); else Destroy();}
开发者ID:lhcezar,项目名称:pgadmin3,代码行数:7,
示例9: InitDialogbool wxDialog::Show(bool show){ if ( !wxDialogBase::Show(show) ) { // nothing to do return FALSE; } if ( show ) { // usually will result in TransferDataToWindow() being called InitDialog(); } if ( IsModal() ) { if ( show ) { DoShowModal(); } else // end of modal dialog { // this will cause IsModalShowing() return FALSE and our local // message loop will terminate wxModalDialogs.DeleteObject(this); } } return TRUE;}
开发者ID:HackLinux,项目名称:chandler-1,代码行数:30,
示例10: EndDialogvoid wxDialogBase::EndDialog(int rc){ if ( IsModal() ) EndModal(rc); else Hide();}
开发者ID:AaronDP,项目名称:wxWidgets,代码行数:7,
示例11: OnLeftDClickItemvoid DIALOG_CLEANUP_TRACKS_AND_VIAS::OnLeftDClickItem( wxMouseEvent& event ){ event.Skip(); int selection = m_ItemsListBox->GetSelection(); if( selection != wxNOT_FOUND ) { // Find the selected DRC_ITEM in the listbox, position cursor there. // Then hide the dialog. const DRC_ITEM* item = m_ItemsListBox->GetItem( selection ); if( item ) { m_parentFrame->FocusOnLocation( item->GetPointA(), true, true ); if( !IsModal() ) { Show( false ); // We do not want the clarify selection popup when releasing the // left button in the main window m_parentFrame->SkipNextLeftButtonReleaseEvent(); } } }}
开发者ID:KiCad,项目名称:kicad-source-mirror,代码行数:26,
示例12: DoStartModalvoid tmwxOptimizerDialog::DoStartModal() { /* CAF - essentially lifted from wxGTK 2.5.1's wxDialog::ShowModal, up to grabbing the focus. */ if (IsModal()) { wxFAIL_MSG( wxT("wxDialog:ShowModal called twice") ); mStatus = GetReturnCode(); return; } // use the apps top level window as parent if none given unless explicitly // forbidden if (! GetParent() && !(GetWindowStyleFlag() & wxDIALOG_NO_PARENT)) { wxWindow *parent = wxTheApp->GetTopWindow(); if (parent && parent != this && parent -> IsBeingDeleted() && ! (parent->GetExtraStyle() & wxWS_EX_TRANSIENT)) { m_parent = parent; gtk_window_set_transient_for (GTK_WINDOW(m_widget), GTK_WINDOW(parent->m_widget) ); } } wxBeginBusyCursor (); Show (true); SetFocus(); m_modalShowing = true; g_openDialogs++; gtk_grab_add (m_widget);}
开发者ID:strange-attractors,项目名称:TreeMaker,代码行数:29,
示例13: WX_TESTING_SHOW_MODAL_HOOKint wxDialog::ShowModal(){ WX_TESTING_SHOW_MODAL_HOOK(); wxASSERT_MSG( !IsModal(), "ShowModal() can't be called twice" ); // release the mouse if it's currently captured as the window having it // will be disabled when this dialog is shown -- but will still keep the // capture making it impossible to do anything in the modal dialog itself wxWindow * const win = wxWindow::GetCapture(); if ( win ) win->GTKReleaseMouseAndNotify(); wxWindow * const parent = GetParentForModalDialog(); if ( parent ) { gtk_window_set_transient_for( GTK_WINDOW(m_widget), GTK_WINDOW(parent->m_widget) ); } wxBusyCursorSuspender cs; // temporarily suppress the busy cursor#if GTK_CHECK_VERSION(2,10,0) unsigned sigId = 0; gulong hookId = 0;#ifndef __WXGTK3__ // Ubuntu overlay scrollbar uses at least GTK 2.24 if (gtk_check_version(2,24,0) == NULL)#endif { sigId = g_signal_lookup("realize", GTK_TYPE_WIDGET); hookId = g_signal_add_emission_hook(sigId, 0, realize_hook, NULL, NULL); }#endif Show( true ); m_modalShowing = true; wxOpenModalDialogLocker modalLock; // NOTE: gtk_window_set_modal internally calls gtk_grab_add() ! gtk_window_set_modal(GTK_WINDOW(m_widget), TRUE); // Run modal dialog event loop. { wxGUIEventLoopTiedPtr modal(&m_modalLoop, new wxGUIEventLoop()); m_modalLoop->Run(); }#if GTK_CHECK_VERSION(2,10,0) if (sigId) g_signal_remove_emission_hook(sigId, hookId);#endif gtk_window_set_modal(GTK_WINDOW(m_widget), FALSE); return GetReturnCode();}
开发者ID:FWaqidi,项目名称:wxWidgets,代码行数:59,
示例14: Closevoid ParamEdit::Close() { if (IsModal()) EndModal(wxID_OK); else { SetReturnCode(wxID_OK); Show(false); }}
开发者ID:cyclefusion,项目名称:szarp,代码行数:8,
示例15: OnCloseWindowvoid wxGenericAboutDialog::OnCloseWindow(wxCloseEvent& event){ // safeguards in case the window is still shown using ShowModal if ( !IsModal() ) Destroy(); event.Skip();}
开发者ID:CodeSmithyIDE,项目名称:wxWidgets,代码行数:8,
示例16: wxASSERT_MSGvoid wxDialog::EndModal(int retCode){ wxASSERT_MSG( IsModal(), wxT("EndModal() called for non modal dialog") ); SetReturnCode(retCode); Hide();}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:8,
示例17: OnCancelvoid ParamEdit::OnCancel(wxCommandEvent & event) { if (IsModal()) EndModal(wxID_CANCEL); else { SetReturnCode(wxID_CANCEL); Show(false); }}
开发者ID:cyclefusion,项目名称:szarp,代码行数:8,
示例18: wxASSERT_MSGvoid wxDialog::EndModal(int retCode){ wxASSERT_MSG( IsModal(), _T("EndModal() called for non modal dialog") );// m_endModalCalled = true; SetReturnCode(retCode); Hide();}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:9,
示例19: WXUNUSEDvoid CConfigChooser::onCancel(wxCommandEvent& WXUNUSED(event)){ if (IsModal()) { EndModal(wxID_CANCEL); } else { SetReturnCode(wxID_CANCEL); Show(false); }}
开发者ID:g4klx,项目名称:uWSDR,代码行数:9,
示例20: Abortvoid ExecutionDialog::OnClose(wxCloseEvent &event){ Abort(); delete conn; if (IsModal()) EndModal(-1); else Destroy();}
开发者ID:Joe-xXx,项目名称:pgadmin3,代码行数:9,
示例21: wxASSERT_MSG// show dialog modallyint wxDialog::ShowModal(){ wxASSERT_MSG( !IsModal(), _T("wxDialog::ShowModal() reentered?") ); m_oldFocus = FindFocus(); m_endModalCalled = false; Show(); // EndModal may have been called from InitDialog handler (called from // inside Show()), which would cause an infinite loop if we didn't take it // into account if ( !m_endModalCalled ) { // modal dialog needs a parent window, so try to find one wxWindow *parent = GetParent(); if ( !parent ) { parent = FindSuitableParent(); } // remember where the focus was wxWindow *oldFocus = m_oldFocus; if ( !oldFocus ) { // VZ: do we really want to do this? oldFocus = parent; } // We have to remember the HWND because we need to check // the HWND still exists (oldFocus can be garbage when the dialog // exits, if it has been destroyed) HWND hwndOldFocus = oldFocus ? GetHwndOf(oldFocus) : NULL; // enter and run the modal loop { wxDialogModalDataTiedPtr modalData(&m_modalData, new wxDialogModalData(this)); modalData->RunLoop(); } // and restore focus // Note that this code MUST NOT access the dialog object's data // in case the object has been deleted (which will be the case // for a modal dialog that has been destroyed before calling EndModal). if ( oldFocus && (oldFocus != this) && ::IsWindow(hwndOldFocus)) { // This is likely to prove that the object still exists if (wxFindWinFromHandle((WXHWND) hwndOldFocus) == oldFocus) oldFocus->SetFocus(); } } return GetReturnCode();}
开发者ID:KrasnayaPloshchad,项目名称:madedit-mod,代码行数:58,
示例22: TransferDataFromWindowvoid DatChoiceDialog::OnOkButtonClick(wxCommandEvent& event){ TransferDataFromWindow(); sCam=Choice1->GetString(Choice1->GetSelection()); sCadr=TextCtrl1->GetValue(); sBright=TextCtrl2->GetValue(); if (IsModal()) EndModal(wxID_OK);}
开发者ID:uak3103,项目名称:voik,代码行数:9,
示例23: HandleUpdatevoid ComboBox::HandleUpdate( float seconds ) { Bin::HandleUpdate( seconds ); if( GetState() != State::ACTIVE ) { if( IsModal() ) { ReleaseModal(); } }}
开发者ID:Cruel,项目名称:SFGUI,代码行数:9,
示例24: OnCancelClickvoid DIALOG_ANNOTATE::OnCancelClick( wxCommandEvent& event ){ if( IsModal() ) EndModal( wxID_CANCEL ); else { SetReturnCode( wxID_CANCEL ); this->Show( false ); }}
开发者ID:PatMart,项目名称:kicad-source-mirror,代码行数:10,
示例25: ShowModal// Replacement for Show(TRUE) for modal dialogs - returns return codeint wxDialog::ShowModal(){ if ( !IsModal() ) { SetModal(TRUE); } Show(TRUE); return GetReturnCode();}
开发者ID:HackLinux,项目名称:chandler-1,代码行数:11,
示例26: Parentbool MenuBar::Command(int id, int subId, Win *win, void *d){ if (id == CMD_CHECK) return Parent() ? Parent()->Command(id,subId,this,d) : false; SetSelect(-1); if (IsModal()) EndModal(id); return (Parent()) ? Parent()->Command(id, subId, win, d) : false;}
开发者ID:Karamax,项目名称:WalCommander,代码行数:10,
注:本文中的IsModal函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ IsMouseEnabled函数代码示例 C++ IsMine函数代码示例 |