本文整理汇总了C++中IsShown函数的典型用法代码示例。如果您正苦于以下问题:C++ IsShown函数的具体用法?C++ IsShown怎么用?C++ IsShown使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IsShown函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetPartner
void CUIActorMenu::SetPartner(CInventoryOwner* io)
{
R_ASSERT (!IsShown());
m_pPartnerInvOwner = io;
if ( m_pPartnerInvOwner )
{
if (m_pPartnerInvOwner->use_simplified_visual() )
m_PartnerCharacterInfo->ClearInfo();
else
m_PartnerCharacterInfo->InitCharacter( m_pPartnerInvOwner->object_id() );
SetInvBox( NULL );
}else
m_PartnerCharacterInfo->ClearInfo();
}
示例2: OnIdle
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();
}
示例3: IsIconized
bool wxTopLevelWindowMSW::IsIconized() const
{
#ifdef __WXWINCE__
return false;
#else
if ( !IsShown() )
return m_iconized;
// don't use m_iconized, it may be briefly out of sync with the real state
// as it's only modified when we receive a WM_SIZE and we could be called
// from an event handler from one of the messages we receive before it,
// such as WM_MOVE
return ::IsIconic(GetHwnd()) != 0;
#endif
}
示例4: IsActive
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
}
示例5: GetScreen
void PL_EDITOR_FRAME::RedrawActiveWindow( wxDC* aDC, bool aEraseBg )
{
GetScreen()-> m_ScreenNumber = GetPageNumberOption() ? 1 : 2;
if( aEraseBg )
m_canvas->EraseScreen( aDC );
m_canvas->DrawBackGround( aDC );
const WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance();
WORKSHEET_DATAITEM* selecteditem = GetSelectedItem();
// the color to draw selected items
if( GetDrawBgColor() == WHITE )
WORKSHEET_DATAITEM::m_SelectedColor = DARKCYAN;
else
WORKSHEET_DATAITEM::m_SelectedColor = YELLOW;
for( unsigned ii = 0; ; ii++ )
{
WORKSHEET_DATAITEM* item = pglayout.GetItem( ii );
if( item == NULL )
break;
item->SetSelected( item == selecteditem );
}
DrawWorkSheet( aDC, GetScreen(), 0, IU_PER_MILS, GetCurrFileName() );
#ifdef USE_WX_OVERLAY
if( IsShown() )
{
m_overlay.Reset();
wxDCOverlay overlaydc( m_overlay, (wxWindowDC*)aDC );
overlaydc.Clear();
}
#endif
if( m_canvas->IsMouseCaptured() )
m_canvas->CallMouseCapture( aDC, wxDefaultPosition, false );
m_canvas->DrawCrossHair( aDC );
// Display the filename
UpdateTitleAndInfo();
}
示例6: Show
bool wxDialog::Show( bool bShow )
{
if ( bShow == IsShown() )
return false;
if (!bShow && m_modalData )
{
// we need to do this before calling wxDialogBase version because if we
// had disabled other app windows, they must be reenabled right now as
// if they stay disabled Windows will activate another window (one
// which is enabled, anyhow) when we're hidden in the base class Show()
// and we will lose activation
m_modalData->ExitLoop();
#if 0
wxDELETE(m_pWindowDisabler);
#endif
}
if (bShow)
{
if (CanDoLayoutAdaptation())
DoLayoutAdaptation();
// this usually will result in TransferDataToWindow() being called
// which will change the controls values so do it before showing as
// otherwise we could have some flicker
InitDialog();
}
wxDialogBase::Show(bShow);
wxString title = GetTitle();
if (!title.empty())
::WinSetWindowText((HWND)GetHwnd(), title.c_str());
if ( bShow )
{
// dialogs don't get WM_SIZE message after creation unlike most (all?)
// other windows and so could start their life not laid out correctly
// if we didn't call Layout() from here
//
// NB: normally we should call it just the first time but doing it
// every time is simpler than keeping a flag
Layout();
}
return true;
} // end of wxDialog::Show
示例7: GetWindowStyleFlag
void WXAppBar::SetBorderDecorations (bool enable, bool apply)
{
if (enable == GetBorderDecorations()) return;
// Changes the flag
long style= GetWindowStyleFlag();
if (enable) {
// Enable decorations
style= style & ~wxNO_BORDER;
// style= style | wxCAPTION;
}
else {
// Disable decorations
style= style | wxNO_BORDER;
// style= style & ~wxCAPTION;
}
SetWindowStyleFlag(style);
// According to the manual, after changing flags a Refresh is needed
Refresh();
#if defined(__WXMSW__)
// TODO
(void)(apply); // Remove warning
assert (false);
#elif defined(__WXGTK__)
//
// On WXGTK the above code is not enough, so we change this property
// using gtk+ directly
//
// Get X11 handle for our window
GtkWindow *gtkWindow= (GtkWindow *) GetHandle();
assert (gtkWindow);
if (!gtkWindow) return;
bool isShown= IsShown();
if (apply && isShown) wxDialog::Show(false);
gtk_window_set_decorated ((GtkWindow *) GetHandle(), (enable? TRUE : FALSE));
if (apply && isShown) {
wxDialog::Show(true);
Refresh();
Update();
}
#else
assert (false);
#endif
}
示例8: wxASSERT_MSG
void wxDialog::DestroyGripper()
{
if ( m_hGripper )
{
// we used to have trouble with gripper appearing on top (and hence
// overdrawing) the other, real, dialog children -- check that this
// isn't the case automatically (but notice that this could be false if
// we're not shown at all as in this case ResizeGripper() might not
// have been called yet)
wxASSERT_MSG( !IsShown() ||
::GetWindow((HWND)m_hGripper, GW_HWNDNEXT) == 0,
wxT("Bug in wxWidgets: gripper should be at the bottom of Z-order") );
::DestroyWindow((HWND) m_hGripper);
m_hGripper = 0;
}
}
示例9: checkSlow
FPrimitiveViewRelevance FPaperBatchSceneProxy::GetViewRelevance(const FSceneView* View)
{
checkSlow(IsInParallelRenderingThread());
FPrimitiveViewRelevance Result;
Result.bDrawRelevance = IsShown(View) && View->Family->EngineShowFlags.Paper2DSprites;
Result.bRenderCustomDepth = ShouldRenderCustomDepth();
Result.bRenderInMainPass = ShouldRenderInMainPass();
Result.bMaskedRelevance = true;
//Result.bNormalTranslucencyRelevance = true;
Result.bDynamicRelevance = true;
Result.bOpaqueRelevance = true;
return Result;
}
示例10: SetWindowStyle
void GSFrame::AppStatusEvent_OnSettingsApplied()
{
if( IsBeingDeleted() ) return;
SetWindowStyle((g_Conf->GSWindow.DisableResizeBorders ? 0 : wxRESIZE_BORDER) | wxCAPTION | wxCLIP_CHILDREN |
wxSYSTEM_MENU | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxCLOSE_BOX);
if (!IsFullScreen() && !IsMaximized())
SetClientSize(g_Conf->GSWindow.WindowSize);
Refresh();
if( g_Conf->GSWindow.CloseOnEsc )
{
if( IsShown() && !CorePlugins.IsOpen(PluginId_GS) )
Show( false );
}
}
示例11: IsShown
void wxListBox::DoSetItems(const wxArrayString& choices, void** clientData)
{
// avoid flicker - but don't need to do this for a hidden listbox
bool hideAndShow = IsShown();
if ( hideAndShow )
{
ShowWindow(GetHwnd(), SW_HIDE);
}
ListBox_ResetContent(GetHwnd());
m_noItems = choices.GetCount();
int i;
for (i = 0; i < m_noItems; i++)
{
ListBox_AddString(GetHwnd(), choices[i]);
if ( clientData )
{
SetClientData(i, clientData[i]);
}
}
#if wxUSE_OWNER_DRAWN
if ( m_windowStyle & wxLB_OWNERDRAW ) {
// first delete old items
WX_CLEAR_ARRAY(m_aItems);
// then create new ones
for ( size_t ui = 0; ui < (size_t)m_noItems; ui++ ) {
wxOwnerDrawn *pNewItem = CreateLboxItem(ui);
pNewItem->SetName(choices[ui]);
m_aItems.Add(pNewItem);
ListBox_SetItemData(GetHwnd(), ui, pNewItem);
}
}
#endif // wxUSE_OWNER_DRAWN
SetHorizontalExtent();
if ( hideAndShow )
{
// show the listbox back if we hid it
ShowWindow(GetHwnd(), SW_SHOW);
}
InvalidateBestSize();
}
示例12: SendDataToPanel
/*----------------------------------------------------------------------
SendDataToPanel refresh the attribute list or show the value panels
params:
returns:
----------------------------------------------------------------------*/
void AmayaAttributeToolPanel::SendDataToPanel( AmayaParams& p )
{
if (IsShown())
{
if ( (int)(p.param1) == wxATTR_ACTION_LISTUPDATE)
{
DesactivatePanel();
m_firstSel = (PtrElement)(p.param5);
m_lastSel = (PtrElement)(p.param6);
m_firstChar = p.param7;
m_lastChar = p.param8;
ShowAttributValue( wxATTR_PANEID_NONE );
SetupListValue ((DLList)(p.param2));
ActivePanel();
}
}
}
示例13: Update
void CParticleControlWnd::Update(float /*dtt*/)
{
super::Update();
if (IsShown())
{
double fSpeed = 1.0f;
m_pPlaybackSpeedTextCtrl->GetValue().ToDouble(&fSpeed);
BEATS_ASSERT(m_pAttachedEmitter != nullptr);
if (!m_pAttachedEmitter->IsPlaying() && !m_pAttachedEmitter->IsPaused())
{
CParticleManager::GetInstance()->RemovePlayingEmitter(m_pAttachedEmitter);
}
m_pAttachedEmitter->m_fPlaySpeed = fSpeed;
m_pPlaybackTimeTextCtrl->SetValue(wxString::FromDouble(m_pAttachedEmitter->GetPlayingTime(true), 2));
m_pPlayBtn->SetLabel(m_pAttachedEmitter->IsPlaying() ? "Pause" : "Simulate");
}
}
示例14: _OnMouseMove
void wxSFThumbnail::_OnMouseMove(wxMouseEvent& event)
{
if( m_pCanvas && IsShown() && event.Dragging() )
{
int ux, uy;
m_pCanvas->GetScrollPixelsPerUnit( &ux, &uy );
wxPoint szDelta = event.GetPosition() - m_nPrevMousePos;
wxSize szCanvasOffset = GetCanvasOffset();
m_pCanvas->Scroll( (double(szDelta.x)/m_nScale + szCanvasOffset.x)/ux, (double(szDelta.y)/m_nScale + szCanvasOffset.y)/uy );
m_nPrevMousePos = event.GetPosition();
Refresh(false);
}
}
示例15: wxDynamicCast
void wxMDIParentFrame::AddChild(wxWindowBase *child)
{
// moved this to front, so that we don't run into unset m_parent problems later
wxFrame::AddChild(child);
if ( !m_currentChild )
{
m_currentChild = wxDynamicCast(child, wxMDIChildFrame);
if ( m_currentChild && IsShown() && !ShouldBeVisible() )
{
// we shouldn't remain visible any more
wxFrame::Show(false);
m_shouldBeShown = true;
}
}
}