本文整理汇总了C++中Dismiss函数的典型用法代码示例。如果您正苦于以下问题:C++ Dismiss函数的具体用法?C++ Dismiss怎么用?C++ Dismiss使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Dismiss函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StopTimer
bool DropDownPopup::ProcessLeftDown( wxMouseEvent &event )
{
m_mouse = event.GetPosition();
//wxPrintf(wxT("DropDownPopup::ProcessLeftDown %d %d\n"), m_mouse.x, m_mouse.y); fflush(stdout);
if (m_popped_handler) return true; // shouldn't ever get here, but just in case
StopTimer();
// don't let the click on the dropdown button actually press it
wxCustomButton *dropBut = m_owner->GetDropDownButton();
if (dropBut)
{
wxPoint dropMousePt = dropBut->ScreenToClient(ClientToScreen(m_mouse));
if (dropBut->HitTest(dropMousePt) == wxHT_WINDOW_INSIDE)
{
m_ignore_popup = true;
Dismiss();
return true;
}
}
if (GetClientRect().Contains(m_mouse))
return false;
Dismiss();
return true;
}
示例2: GetUInt32Value
void Pet::Update(uint32 time)
{
Creature::Update(time); // passthrough
if(bHasLoyalty)
{
if(m_LoyaltyTimer == 0)
{
// Update loyalty.....
uint32 val = GetUInt32Value(UNIT_FIELD_POWER5);
if(PET_LOYALTY_UPDATE_VALUE > val)
val = 0;
else
val -= PET_LOYALTY_UPDATE_VALUE;
// Set the value
SetUInt32Value(UNIT_FIELD_POWER5, val);
if(val <= 0)
{
Dismiss();
return;
}
// reset timer
m_LoyaltyTimer = PET_LOYALTY_UPDATE_TIMER;
} else {
if(time > m_LoyaltyTimer)
m_LoyaltyTimer = 0;
else
m_LoyaltyTimer -= time;
}
}
if(bExpires)
{
if(m_ExpireTime == 0)
{
// remove
Dismiss(false);
return;
} else {
if(time > m_ExpireTime)
{
m_ExpireTime = 0;
} else {
m_ExpireTime -= time;
}
}
}
}
示例3: switch
void ContentAssistantPopup::UpdateResults()
{
wxString partial = m_editor->GetSelectionString();
m_completions = m_autocomplete->CompleteSymbol(partial, m_type);
m_completions.Sort();
switch(m_completions.GetCount())
{
case 1:
m_editor->ReplaceSelection(
m_editor->GetSelectionString(),
m_completions[0]
);
case 0:
m_editor->ClearSelection();
this->GetParent()->GetParent()->Refresh();
if(!m_editor->IsActive())
m_editor->ActivateCell();
Dismiss();
break;
default:
m_autocompletions->Set(m_completions);
m_autocompletions->SetSelection(0);
}
}
示例4: Dismiss
void HSWDisplay::Enable(bool enable)
{
Enabled = enable;
if(!enable && Displayed) // If it's visible but should not be...
Dismiss();
}
示例5: GetSelection
void wxTreeViewComboPopup::OnMouseClick(wxMouseEvent& event)
{
m_bClicked = true;
wxTreeItemId ItemId = GetSelection();
if(ItemId.IsOk())
{
if(m_PrewItemId.IsOk())
{
CollapseAllChildren(GetItemParent(m_PrewItemId));
}
if(ItemId != GetRootItem())
{
CollapseAllChildren(ItemId);
}
else
{
CollapseAll();
Expand(GetRootItem());
}
wxGxTreeItemData* pData = (wxGxTreeItemData*)GetItemData(ItemId);
if(pData != NULL)
{
SelectItem(ItemId);
m_pSelection->Select(pData->m_nObjectID, false, GetId());
m_PrewItemId = ItemId;
}
}
Dismiss();
event.Skip(true);
}
示例6: PushButtonCommand
long TabStops :: PushButtonCommand(wCommandMsg m)
{
if (m.usCmd() == TAB_OK)
{
ushort tmp = (ushort)spin->GetValue();
if (tmp > 200)
tmp = 200;
if (tmp < 1)
tmp = 1;
Dismiss(tmp);
}
if (m.usCmd() == TAB_CANCEL)
Dismiss(0);
return FALSE;
}
示例7: invariant
Status MigrationSourceManager::startClone(OperationContext* txn) {
invariant(!txn->lockState()->isLocked());
invariant(_state == kCreated);
auto scopedGuard = MakeGuard([&] { cleanupOnError(txn); });
grid.catalogClient(txn)->logChange(txn,
"moveChunk.start",
_args.getNss().ns(),
BSON("min" << _args.getMinKey() << "max" << _args.getMaxKey()
<< "from"
<< _args.getFromShardId()
<< "to"
<< _args.getToShardId()));
_cloneDriver = stdx::make_unique<MigrationChunkClonerSourceLegacy>(
_args, _committedMetadata->getKeyPattern());
{
// Register for notifications from the replication subsystem
ScopedTransaction scopedXact(txn, MODE_IX);
AutoGetCollection autoColl(txn, _args.getNss(), MODE_IX, MODE_X);
auto css = CollectionShardingState::get(txn, _args.getNss().ns());
css->setMigrationSourceManager(txn, this);
}
Status startCloneStatus = _cloneDriver->startClone(txn);
if (!startCloneStatus.isOK()) {
return startCloneStatus;
}
_state = kCloning;
scopedGuard.Dismiss();
return Status::OK();
}
示例8: StopPartialCompletion
void wxVListBoxComboPopup::OnKey(wxKeyEvent& event)
{
// Hide popup if certain key or key combination was pressed
if ( m_combo->IsKeyPopupToggle(event) )
{
StopPartialCompletion();
Dismiss();
}
else if ( event.AltDown() )
{
// On both wxGTK and wxMSW, pressing Alt down seems to
// completely freeze things in popup (ie. arrow keys and
// enter won't work).
return;
}
// Select item if ENTER is pressed
else if ( event.GetKeyCode() == WXK_RETURN || event.GetKeyCode() == WXK_NUMPAD_ENTER )
{
DismissWithEvent();
}
else
{
int comboStyle = m_combo->GetWindowStyle();
int keycode = event.GetKeyCode();
// Process partial completion key codes here, but not the arrow keys as the base class will do that for us
if ((comboStyle & wxCB_READONLY) &&
(keycode >= WXK_SPACE) && (keycode <=255) && (keycode != WXK_DELETE) && wxIsprint(keycode))
{
OnComboKeyEvent(event);
SetSelection(m_value); // ensure the highlight bar moves
}
else
event.Skip();
}
}
示例9: assert
/*
void MerryFrame::OnActivateEvent(wxActivateEvent& e)
{
#ifndef DEBUG_ALWAYS_SHOW
if (!e.GetActive() && !this->IsShownOnScreen())
this->Hide();
#endif
}
*/
void MerryFrame::OnShowEvent(wxShowEvent& e)
{
MerryTextCtrl* textCtrl = m_mainPanel->GetTextCtrl();
assert(textCtrl);
if (e.IsShown())
{
if (g_config->get(PlayPopupNotify))//ÊÇ·ñ²¥·ÅÌáʾÒô
wxSound("Popup.wav").Play();
textCtrl->ChangeValue(wxT(""));
this->CentreOnce();
m_listBoxPanel->Dismiss();
this->Raise();
g_controller->SetWindowPos(this->GetHWND(),HWND_TOPMOST,0,0,0,0,SWP_NOMOVE | SWP_NOSIZE);
ActiveWindow(this->GetHWND());
// textCtrl->SetFocus();
#ifdef __WXMSW__
textCtrl->SetEnInputMode();
#endif
if (g_config->get(AutoPopup))
textCtrl->AppendText(wxT(""));
}
else
textCtrl->ChangeValue(wxT(""));
textCtrl->EnterArgs = 0;
}
示例10: ThrowIfFailed
// static
std::shared_ptr<CanvasImageSourceDrawingSessionAdapter> CanvasImageSourceDrawingSessionAdapter::Create(
ISurfaceImageSourceNativeWithD2D* sisNative,
const RECT& updateRect,
float dpi,
ID2D1DeviceContext1** outDeviceContext)
{
//
// ISurfaceImageSourceNativeWithD2D needs exactly the right IID passed
// in, so we first ask for a ID2D1DeviceContext and we'll then take the
// resulting interface and QI for ID2D1DeviceContext1.
//
ComPtr<ID2D1DeviceContext> deviceContext;
POINT offset;
ThrowIfFailed(sisNative->BeginDraw(
updateRect,
IID_PPV_ARGS(&deviceContext),
&offset));
//
// If this function fails then we need to call EndDraw
//
auto endDrawWarden = MakeScopeWarden([&] { sisNative->EndDraw(); });
ThrowIfFailed(deviceContext.CopyTo(outDeviceContext));
//
// ISurfaceImageSourceNativeWithD2D is operating in batched mode. This
// means that BeginDraw() has returned a device context set up to render
// to an atlased surface (ie a surface containing multiple images). The
// image that we wish to render to appears at some offset in this
// surface -- and this is what has been given to us in offset. This
// call sets the transform on the device context to compensate for this,
// so when we ask to render to (0,0) we actually render to the
// appropriate location in the atlased surface.
//
const D2D1_POINT_2F renderingSurfaceOffset = D2D1::Point2F(
static_cast<float>(offset.x),
static_cast<float>(offset.y));
auto adapter = std::make_shared<CanvasImageSourceDrawingSessionAdapter>(
sisNative,
renderingSurfaceOffset);
//
// TODO #2140 Use a separate code path, responsible for resetting
// transforms for non-SiS drawing sessions.
//
deviceContext->SetTransform(D2D1::Matrix3x2F::Translation(
renderingSurfaceOffset.x,
renderingSurfaceOffset.y));
deviceContext->SetDpi(dpi, dpi);
//
// This function can't fail now, so we can dismiss the end draw warden.
//
endDrawWarden.Dismiss();
return adapter;
}
示例11: Dismiss
void CDlgOldNewsPost::OnClose( )
{
if ( IDYES != m_pServerDialog->DisplayMessageBox( "Cancel post ?", MB_YESNO | MB_ICONQUESTION ) )
return;
Dismiss( );
}
示例12: StopPartialCompletion
void wxVListBoxComboPopup::OnKey(wxKeyEvent& event)
{
// Hide popup if certain key or key combination was pressed
if ( m_combo->IsKeyPopupToggle(event) )
{
StopPartialCompletion();
Dismiss();
}
else if ( event.AltDown() )
{
// On both wxGTK and wxMSW, pressing Alt down seems to
// completely freeze things in popup (ie. arrow keys and
// enter won't work).
return;
}
// Select item if ENTER is pressed
else if ( event.GetKeyCode() == WXK_RETURN || event.GetKeyCode() == WXK_NUMPAD_ENTER )
{
DismissWithEvent();
}
else
{
// completion is handled in OnChar() below
event.Skip();
}
}
示例13: event
void wxInfoBar::GTKResponse(int btnid)
{
wxCommandEvent event(wxEVT_BUTTON, btnid);
event.SetEventObject(this);
if ( !HandleWindowEvent(event) )
Dismiss();
}
示例14: HideSpecialButton
//##ModelId=526529FC0399
void ListViewTab::RedrawWithOrder(List<Uint32> order)
{
if (curSpecialIndex != -1)
HideSpecialButton();
sortOrder = order;
Dismiss();
Display();
}
示例15: Dismiss
void CDlgFiles::OnClose( )
{
m_RemoteList.SetImageList( NULL, LVSIL_SMALL );
m_LocalList.SetImageList( NULL, LVSIL_SMALL );
m_pServerDialog->m_pFiles = NULL;
m_pServerDialog->m_bFileRequestSent = false;
Dismiss( );
}