本文整理汇总了C++中IsModal函数的典型用法代码示例。如果您正苦于以下问题:C++ IsModal函数的具体用法?C++ IsModal怎么用?C++ IsModal使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IsModal函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: GetLeftButtonRect
void 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,代码来源:IngameWindow.cpp
示例2: OnCancel
void dlgSearchObject::OnCancel(wxCommandEvent &ev)
{
if (IsModal())
EndModal(wxID_CANCEL);
else
Destroy();
}
开发者ID:aiht,项目名称:pgadmin3,代码行数:7,代码来源:dlgSearchObject.cpp
示例3: OnCancel
void pgDialog::OnCancel(wxCommandEvent &ev)
{
if (IsModal())
EndModal(wxID_CANCEL);
else
Destroy();
}
开发者ID:kleopatra999,项目名称:pgadmin3,代码行数:7,代码来源:dlgClasses.cpp
示例4: OnClose
void pgDialog::OnClose(wxCloseEvent &event)
{
if (IsModal())
EndModal(wxID_CANCEL);
else
Destroy();
}
开发者ID:kleopatra999,项目名称:pgadmin3,代码行数:7,代码来源:dlgClasses.cpp
示例5: OnOkClick
void 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,代码来源:DlgSaveLayout.cpp
示例6: VECTOR2D
void 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,代码来源:dialog_drc.cpp
示例7: ShowModal
int 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,代码来源:dialog.cpp
示例8: OnCancel
void frmExport::OnCancel(wxCommandEvent &ev)
{
if (IsModal())
EndModal(wxID_CANCEL);
else
Destroy();
}
开发者ID:lhcezar,项目名称:pgadmin3,代码行数:7,代码来源:frmExport.cpp
示例9: InitDialog
bool 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,代码来源:dialog.cpp
示例10: EndDialog
void wxDialogBase::EndDialog(int rc)
{
if ( IsModal() )
EndModal(rc);
else
Hide();
}
开发者ID:AaronDP,项目名称:wxWidgets,代码行数:7,代码来源:dlgcmn.cpp
示例11: OnLeftDClickItem
void 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,代码来源:dialog_cleanup_tracks_and_vias.cpp
示例12: DoStartModal
void 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,代码来源:tmwxOptimizerDialog_gtk.cpp
示例13: WX_TESTING_SHOW_MODAL_HOOK
int 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,代码来源:dialog.cpp
示例14: Close
void ParamEdit::Close() {
if (IsModal())
EndModal(wxID_OK);
else {
SetReturnCode(wxID_OK);
Show(false);
}
}
开发者ID:cyclefusion,项目名称:szarp,代码行数:8,代码来源:paredit.cpp
示例15: OnCloseWindow
void wxGenericAboutDialog::OnCloseWindow(wxCloseEvent& event)
{
// safeguards in case the window is still shown using ShowModal
if ( !IsModal() )
Destroy();
event.Skip();
}
开发者ID:CodeSmithyIDE,项目名称:wxWidgets,代码行数:8,代码来源:aboutdlgg.cpp
示例16: wxASSERT_MSG
void wxDialog::EndModal(int retCode)
{
wxASSERT_MSG( IsModal(), wxT("EndModal() called for non modal dialog") );
SetReturnCode(retCode);
Hide();
}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:8,代码来源:dialog.cpp
示例17: OnCancel
void ParamEdit::OnCancel(wxCommandEvent & event) {
if (IsModal())
EndModal(wxID_CANCEL);
else {
SetReturnCode(wxID_CANCEL);
Show(false);
}
}
开发者ID:cyclefusion,项目名称:szarp,代码行数:8,代码来源:paredit.cpp
示例18: wxASSERT_MSG
void 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,代码来源:dialog.cpp
示例19: WXUNUSED
void CConfigChooser::onCancel(wxCommandEvent& WXUNUSED(event))
{
if (IsModal()) {
EndModal(wxID_CANCEL);
} else {
SetReturnCode(wxID_CANCEL);
Show(false);
}
}
开发者ID:g4klx,项目名称:uWSDR,代码行数:9,代码来源:ConfigChooser.cpp
示例20: Abort
void ExecutionDialog::OnClose(wxCloseEvent &event)
{
Abort();
delete conn;
if (IsModal())
EndModal(-1);
else
Destroy();
}
开发者ID:Joe-xXx,项目名称:pgadmin3,代码行数:9,代码来源:dlgClasses.cpp
注:本文中的IsModal函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论