本文整理汇总了C++中Channels::setVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ Channels::setVisible方法的具体用法?C++ Channels::setVisible怎么用?C++ Channels::setVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Channels
的用法示例。
在下文中一共展示了Channels::setVisible方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: resized
void Mixer::resized()
{
//[UserResized] Add your own custom resize handling here..
DEBUG_TRACE_MIXER_COMPONENTS_VB
// master channels
int masters_x = getWidth() - this->masterChannels->getWidth() - GUI::PAD ;
int masters_y = GUI::MIXERGROUP_Y ;
int masters_w = this->masterChannels->getWidth() ;
int masters_h = GUI::MIXERGROUP_H ;
this->masterChannels->setBounds(masters_x , masters_y , masters_w , masters_h) ;
// local and remote channels
int channels_x = GUI::PAD ;
int channels_y = GUI::MIXERGROUP_Y ;
int n_groups = getNumDynamicMixers() ;
for (int group_n = GUI::LOCALS_IDX ; group_n < n_groups ; ++group_n)
{
Channels* channels = (Channels*)getChildComponent(group_n) ;
#ifndef FADE_HIDDEN_REMOTES
// hide scrolled previous remotes
if (group_n > GUI::LOCALS_IDX && group_n < this->scrollZ)
{
channels->setVisible(false) ;
if (group_n == GUI::FIRST_REMOTE_IDX)
channels_x += GUI::CHANNEL_SCROLL_BTN_W + GUI::RESIZER_W - GUI::PAD ;
continue ;
}
// position visible channels and increment next channel position
channels->setTopLeftPosition(channels_x , channels_y) ;
channels_x += GUI::PAD + channels->getWidth() ;
// hide scrolled next remotes
int masters_resizer_x = getMastersResizerNextX() ;
channels->setVisible(channels_x <= masters_resizer_x) ;
#else // FADE_HIDDEN_REMOTES
// hide scrolled previous remotes
if (group_n > GUI::LOCALS_IDX && group_n < this->scrollZ)
{
if (group_n < this->scrollZ - 1)
channels_x += GUI::CHANNEL_SCROLL_BTN_W + GUI::RESIZER_W - GUI::PAD
- GUI::PAD + channels->getWidth() ;
else{ channels->setVisible(false) ; continue ; }
}
// hide scrolled next remotes
int masters_resizer_x = getMastersResizerNextX() ;
channels->setVisible(channels_x <= masters_resizer_x) ;
// position visible channels and increment next channel position
channels->setTopLeftPosition(channels_x , channels_y) ;
channels_x += GUI::PAD + channels->getWidth() ;
#endif // FADE_HIDDEN_REMOTES
}
// resizers
positionResizers() ;
// scroll buttons
int locals_resizer_x = this->localsResizer ->getX() ;
int masters_resizer_x = this->mastersResizer->getX() ;
bool should_show_prev_scroll_button = this->scrollZ > GUI::FIRST_REMOTE_IDX ;
bool should_show_next_scroll_button = (channels_x > masters_resizer_x) ;
if (should_show_prev_scroll_button)
{
int prev_button_x = locals_resizer_x + GUI::RESIZER_W - 1 ;
prevScrollButton->setTopLeftPosition(prev_button_x , GUI::CHANNEL_SCROLL_BTN_Y) ;
}
if (should_show_next_scroll_button)
{
int next_button_x = masters_resizer_x - GUI::CHANNEL_SCROLL_BTN_W + 1 ;
nextScrollButton->setTopLeftPosition(next_button_x , GUI::CHANNEL_SCROLL_BTN_Y) ;
}
prevScrollButton->setVisible(should_show_prev_scroll_button) ;
nextScrollButton->setVisible(should_show_next_scroll_button) ;
//[/UserResized]
}