本文整理汇总了C++中Control::IsNull方法的典型用法代码示例。如果您正苦于以下问题:C++ Control::IsNull方法的具体用法?C++ Control::IsNull怎么用?C++ Control::IsNull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Control
的用法示例。
在下文中一共展示了Control::IsNull方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnRangeUpdated
void STFSliders::OnRangeUpdated( range_event_handler f, Control& c )
{
if ( f == 0 || c.IsNull() )
{
onRangeUpdated = 0;
onRangeUpdatedReceiver = 0;
}
else
{
onRangeUpdated = f;
onRangeUpdatedReceiver = &c;
}
}
示例2: OnFontHighlighted
void FontComboBox::OnFontHighlighted( font_event_handler f, Control& c )
{
if ( f == 0 || c.IsNull() )
{
onFontHighlighted = 0;
onFontHighlightedReceiver = 0;
}
else
{
onFontHighlighted = f;
onFontHighlightedReceiver = &c;
}
}
示例3: OnValueUpdated
void NumericEdit::OnValueUpdated( value_event_handler f, Control& c )
{
__PCL_NO_ALIAS_HANDLER;
if ( f == 0 || c.IsNull() )
{
onValueUpdated = 0;
onValueUpdatedReceiver = 0;
}
else
{
onValueUpdated = f;
onValueUpdatedReceiver = &c;
}
}
示例4: OnValueUpdated
void NumericEdit::OnValueUpdated( value_event_handler f, Control& c )
{
if ( f == nullptr || c.IsNull() )
{
if ( !m_handlers.IsNull() )
{
m_handlers->onValueUpdated = nullptr;
m_handlers->onValueUpdatedReceiver = nullptr;
}
}
else
{
INIT_EVENT_HANDLERS();
m_handlers->onValueUpdated = f;
m_handlers->onValueUpdatedReceiver = &c;
}
}
示例5: OnCheck
void SectionBar::OnCheck( check_event_handler f, Control& c )
{
if ( Title_CheckBox.IsNull() || f == nullptr || c.IsNull() )
{
if ( !m_handlers.IsNull() )
{
m_handlers->onCheck = nullptr;
m_handlers->onCheckReceiver = nullptr;
}
}
else
{
INIT_EVENT_HANDLERS();
m_handlers->onCheck = f;
m_handlers->onCheckReceiver = &c;
}
}
示例6: OnToggleSection
void SectionBar::OnToggleSection( section_event_handler f, Control& c )
{
if ( f == nullptr || c.IsNull() )
{
if ( !m_handlers.IsNull() )
{
m_handlers->onToggleSection = nullptr;
m_handlers->onToggleSectionReceiver = nullptr;
}
}
else
{
INIT_EVENT_HANDLERS();
m_handlers->onToggleSection = f;
m_handlers->onToggleSectionReceiver = &c;
}
}
示例7: SetSection
void SectionBar::SetSection( Control& section )
{
if ( m_section != nullptr )
{
m_section->OnShow( nullptr, Control::Null() );
m_section->OnHide( nullptr, Control::Null() );
m_section = nullptr;
}
if ( section.IsNull() )
return;
m_section = §ion;
m_section->OnShow( (Control::event_handler)&SectionBar::ControlShow, *this );
m_section->OnHide( (Control::event_handler)&SectionBar::ControlHide, *this );
Title_ToolButton.SetIcon( Bitmap( ScaledResource( m_section->IsVisible() ? contract_icon : expand_icon ) ) );
}
示例8: ButtonClick
void SectionBar::ButtonClick( Button& sender, bool checked )
{
if ( m_section != nullptr && sender == Title_ToolButton )
{
if ( !m_handlers.IsNull() )
if ( m_handlers->onToggleSection != nullptr )
(m_handlers->onToggleSectionReceiver->*m_handlers->onToggleSection)( *this, *m_section, true );
bool visible = m_section->IsVisible();
Control* p = &m_section->Parent();
if ( !p->IsNull() )
{
while ( !p->Parent().IsNull() )
p = &p->Parent();
p->DisableUpdates();
}
if ( visible )
m_section->Hide();
else
m_section->Show();
// On OS X, forcing event processing here causes a lot of flickering.
// On X11 and Windows, it's just the opposite...
#ifndef __PCL_MACOSX
Module->ProcessEvents();
#endif
if ( !p->IsNull() )
{
bool fixedWidth = p->IsFixedWidth();
if ( !fixedWidth )
p->SetFixedWidth();
bool fixedHeight = p->IsFixedHeight();
if ( fixedHeight )
p->SetVariableHeight();
p->AdjustToContents();
Module->ProcessEvents();
if ( !fixedWidth )
p->SetVariableWidth();
if ( fixedHeight )
p->SetFixedHeight();
p->EnableUpdates();
}
if ( !m_handlers.IsNull() )
if ( m_handlers->onToggleSection != nullptr )
(m_handlers->onToggleSectionReceiver->*m_handlers->onToggleSection)( *this, *m_section, false );
}
else if ( !Title_CheckBox.IsNull() && sender == *Title_CheckBox )
{
if ( m_section != nullptr )
m_section->Enable( checked );
if ( !m_handlers.IsNull() )
if ( m_handlers->onCheck != nullptr )
(m_handlers->onCheckReceiver->*m_handlers->onCheck)( *this, checked );
}
}