本文整理汇总了C++中IsShown函数的典型用法代码示例。如果您正苦于以下问题:C++ IsShown函数的具体用法?C++ IsShown怎么用?C++ IsShown使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IsShown函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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();
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:15,代码来源:UIActorMenu.cpp
示例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();
}
开发者ID:Slulego,项目名称:GD,代码行数:15,代码来源:stefindr.cpp
示例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
}
开发者ID:nwhitehead,项目名称:wxWidgets,代码行数:15,代码来源:toplevel.cpp
示例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
}
开发者ID:dxtravi,项目名称:e,代码行数:15,代码来源:SearchPanel.cpp
示例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();
}
开发者ID:ejs-ejs,项目名称:kicad-source-mirror,代码行数:48,代码来源:pl_editor_frame.cpp
示例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
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:48,代码来源:dialog.cpp
示例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
}
开发者ID:rkvsraman,项目名称:eviacam,代码行数:48,代码来源:wxappbar.cpp
示例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;
}
}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:16,代码来源:dialog.cpp
示例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;
}
开发者ID:Codermay,项目名称:Unreal4,代码行数:16,代码来源:PaperBatchSceneProxy.cpp
示例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 );
}
}
开发者ID:IlDucci,项目名称:pcsx2,代码行数:16,代码来源:FrameForGS.cpp
示例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();
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:47,代码来源:listbox.cpp
示例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();
}
}
}
开发者ID:ArcScofield,项目名称:Amaya,代码行数:22,代码来源:AmayaAttributePanel.cpp
示例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");
}
}
开发者ID:BeyondEngine,项目名称:BeyondEngine,代码行数:17,代码来源:ParticleControlWnd.cpp
示例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);
}
}
开发者ID:noriter,项目名称:wxWidgets,代码行数:17,代码来源:Thumbnail.cpp
示例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;
}
}
}
开发者ID:beanhome,项目名称:dev,代码行数:17,代码来源:mdi.cpp
示例16: sett
MapSelectDialog::~MapSelectDialog()
{
//(*Destroy(MapSelectDialog)
//*)
sett().SetHorizontalSortkeyIndex( m_horizontal_choice->GetSelection() );
sett().SetVerticalSortkeyIndex( m_vertical_choice->GetSelection() );
sett().SetHorizontalSortorder( m_horizontal_direction );
sett().SetVerticalSortorder( m_vertical_direction );
if ( m_filter_all->GetValue() )
sett().SetMapSelectorFilterRadio( m_filter_all_sett );
else if ( m_filter_recent->GetValue() )
sett().SetMapSelectorFilterRadio( m_filter_recent_sett );
else
sett().SetMapSelectorFilterRadio( m_filter_popular_sett );
if ( IsShown() )
EndModal( 0 );
}
开发者ID:jamerlan,项目名称:springlobby,代码行数:17,代码来源:mapselectdialog.cpp
示例17: UpdateWindowUI
// Do the toolbar button updates (check for EVT_UPDATE_UI handlers)
void wxToolBarBase::UpdateWindowUI(long flags)
{
wxWindowBase::UpdateWindowUI(flags);
// don't waste time updating state of tools in a hidden toolbar
if ( !IsShown() )
return;
wxEvtHandler* evtHandler = GetEventHandler() ;
#if defined(__INTEL_COMPILER) && 1 /* VDM auto patch */
# pragma ivdep
# pragma swp
# pragma unroll
# pragma prefetch
# if 0
# pragma simd noassert
# endif
#endif /* VDM auto patch */
for ( wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst();
node;
node = node->GetNext() )
{
wxToolBarToolBase * const tool = node->GetData();
if ( tool->IsSeparator() )
continue;
int toolid = tool->GetId();
wxUpdateUIEvent event(toolid);
event.SetEventObject(this);
if ( evtHandler->ProcessEvent(event) )
{
if ( event.GetSetEnabled() )
EnableTool(toolid, event.GetEnabled());
if ( event.GetSetChecked() )
ToggleTool(toolid, event.GetChecked());
#if 0
if ( event.GetSetText() )
// Set tooltip?
#endif // 0
}
}
}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:46,代码来源:tbarbase.cpp
示例18: GetSize
void DockCont::Handle::Paint(Draw& w)
{
if (IsShown() && dc) {
const DockableCtrl::Style &s = dc->GetStyle();
Rect r = GetSize();
const Rect &m = s.handle_margins;
Point p;
if (s.handle_vert)
p = Point(r.left-1 + m.left, r.bottom - m.bottom);
else
p = Point(r.left + m.left, r.top + m.top);
ChPaint(w, r, s.handle[focus]);
Image img = dc->GetIcon();
if (!img.IsEmpty()) {
if (s.handle_vert) {
int isz = r.GetWidth();
p.y -= isz;
isz -= (m.left + m.right);
ChPaint(w, max(p.x+m.left, r.left), p.y, isz, isz, img);
p.y -= 2;
}
else {
int isz = r.GetHeight();
isz -= (m.top + m.bottom);
ChPaint(w, p.x, max(p.y, r.top), isz, isz, img);
p.x += isz + 2;
}
}
if (!s.title_font.IsNull()) {
Ctrl *c = GetLastChild();
while (c && !c->IsShown() && c->GetParent())
c = c->GetNext();
if (s.handle_vert)
r.top = c ? c->GetRect().bottom + m.top : m.top;
else
r.right = c ? c->GetRect().left + m.right : m.right;
w.Clip(r);
WString text = IsNull(dc->GetGroup()) ? dc->GetTitle() : (WString)Format("%s (%s)", dc->GetTitle(), dc->GetGroup());
w.DrawText(p.x, p.y, s.handle_vert ? 900 : 0, text, s.title_font, s.title_ink[focus]);
w.End();
}
}
}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:45,代码来源:DockCont.cpp
示例19: WXUNUSED
void TruncSilenceDialog::OnControlChange(wxCommandEvent & WXUNUSED(event))
{
// We may even get called during the constructor.
// This test saves us from calling unsafe functions.
if( !IsShown() )
return;
TransferDataFromWindow();
bool bOk = true;
wxString warningText;
if (mEffect->mInitialAllowedSilence < 0.001) {
bOk = false;
warningText = _("Minimum detection duration: 0.001 seconds.");
} else if (mEffect->mInitialAllowedSilence > 10000.0) {
bOk = false;
warningText = _("Maximum detection duration: 10000 seconds.");
}
if ((mEffect->mTruncLongestAllowedSilence < 0.0f) && (mEffect->mProcessIndex != 1)) {
bOk = false;
warningText = _("Cannot truncate to less than 0 seconds.");
} else if ((mEffect->mTruncLongestAllowedSilence > 10000.0) && (mEffect->mProcessIndex != 1)) {
bOk = false;
warningText = _("Maximum truncation length is 10000 seconds.");
}
if ((mEffect->mSilenceCompressPercent < 0.0) && (mEffect->mProcessIndex != 0)) {
bOk = false;
warningText = _("Compression cannot be less than 0 percent.");
} else if ((mEffect->mSilenceCompressPercent >= 100.0) && (mEffect->mProcessIndex != 0)) {
bOk = false;
warningText = _("Compression must be less than 100 percent");
}
pWarning->SetLabel( bOk ? wxT("") : warningText);
wxWindow *pWnd;
pWnd = FindWindowById( wxID_OK, this );
pWnd->Enable( bOk );
pWnd = FindWindowById( ID_EFFECT_PREVIEW, this );
pWnd->Enable( bOk );
UpdateUI();
}
开发者ID:GYGit,项目名称:Audacity,代码行数:45,代码来源:TruncSilence.cpp
示例20: UpdateTrackingControls
void ClimatologyDialog::UpdateTrackingControls()
{
if(!g_pOverlayFactory || !IsShown())
return;
m_tWind->SetValue(GetValue(ClimatologyOverlaySettings::WIND));
m_tWindDir->SetValue(GetValue(ClimatologyOverlaySettings::WIND, DIRECTION));
m_tCurrent->SetValue(GetValue(ClimatologyOverlaySettings::CURRENT));
m_tCurrentDir->SetValue(GetValue(ClimatologyOverlaySettings::CURRENT, DIRECTION));
m_tPressure->SetValue(GetValue(ClimatologyOverlaySettings::SLP));
m_tSeaTemperature->SetValue(GetValue(ClimatologyOverlaySettings::SST));
m_tAirTemperature->SetValue(GetValue(ClimatologyOverlaySettings::AT));
m_tCloudCover->SetValue(GetValue(ClimatologyOverlaySettings::CLOUD));
m_tPrecipitation->SetValue(GetValue(ClimatologyOverlaySettings::PRECIPITATION));
m_tRelativeHumidity->SetValue(GetValue(ClimatologyOverlaySettings::RELATIVE_HUMIDITY));
m_tLightning->SetValue(GetValue(ClimatologyOverlaySettings::LIGHTNING));
m_tSeaDepth->SetValue(GetValue(ClimatologyOverlaySettings::SEADEPTH));
}
开发者ID:nohal,项目名称:climatology_pi,代码行数:18,代码来源:ClimatologyDialog.cpp
注:本文中的IsShown函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论