本文整理汇总了C++中NeedParentUpdate函数的典型用法代码示例。如果您正苦于以下问题:C++ NeedParentUpdate函数的具体用法?C++ NeedParentUpdate怎么用?C++ NeedParentUpdate使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NeedParentUpdate函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetFixedWidth
void CControlUI::SetFixedWidth(int cx)
{
if( cx < 0 ) return;
m_cxyFixed.cx = cx;
if( !m_bFloat ) NeedParentUpdate();
else NeedUpdate();
}
示例2: GetItemAt
bool CTabLayoutUI::SelectItem(int iIndex)
{
if (iIndex < 0 || iIndex >= m_items.GetSize()) return false;
if (iIndex == m_iCurSel) return true;
int iOldSel = m_iCurSel;
m_iCurSel = iIndex;
for (int it = 0; it < m_items.GetSize(); it++) {
if (it == iIndex) {
GetItemAt(it)->SetVisible(true);
GetItemAt(it)->SetFocus();
SetPos(m_rcItem);
} else GetItemAt(it)->SetVisible(false);
}
NeedParentUpdate();
if (m_pManager != NULL) {
m_pManager->SetNextTabControl();
m_pManager->SendNotify(this, DUI_MSGTYPE_TABSELECT, m_iCurSel, iOldSel);
}
return true;
}
示例3: NeedParentUpdate
void CControlUI::SetFloat(bool bFloat)
{
if( m_bFloat == bFloat ) return;
m_bFloat = bFloat;
NeedParentUpdate();
}
示例4: SetFixedXY
void CControlUI::SetFixedXY(SIZE szXY)
{
m_cXY.cx = szXY.cx;
m_cXY.cy = szXY.cy;
if( !m_bFloat ) NeedParentUpdate();
else NeedUpdate();
}
示例5: GetItemIndex
bool CTabLayoutUI::Remove(CControlUI* pControl)
{
if (pControl == NULL) return false;
int index = GetItemIndex(pControl);
bool ret = CContainerUI::Remove(pControl);
if( !ret ) return false;
if (m_nCurSel == index)
{
if (GetCount() > 0)
{
m_nCurSel=0;
GetItemAt(m_nCurSel)->SetVisible(true);
}
else m_nCurSel=-1;
NeedParentUpdate();
}
else if (m_nCurSel > index)
{
m_nCurSel -= 1;
}
return ret;
}
示例6: GetItemIndex
BOOL CTabLayoutUI::Remove(CControlUI* pControl)
{
if( pControl == NULL) return FALSE;
int index = GetItemIndex(pControl);
BOOL ret = CContainerUI::Remove(pControl);
if( !ret ) return FALSE;
if( m_iCurSel == index)
{
if( GetCount() > 0 )
{
m_iCurSel=0;
GetItemAt(m_iCurSel)->SetVisible(TRUE);
}
else
m_iCurSel=-1;
NeedParentUpdate();
}
else if( m_iCurSel > index )
{
m_iCurSel -= 1;
}
return ret;
}
示例7: NeedParentUpdate
void CLabelUI::SetText( LPCTSTR pstrText )
{
CControlUI::SetText(pstrText);
if(GetAutoCalcWidth()) {
NeedParentUpdate();
}
}
示例8: NeedParentUpdate
void CTabLayoutUI::RemoveAll()
{
m_iCurSel = -1;
m_iOldSel = -1;
CContainerUI::RemoveAll();
NeedParentUpdate();
}
示例9: GetItemAt
bool CAnimationTabLayoutUI::SelectItem( int iIndex )
{
if( iIndex < 0 || iIndex >= m_items.GetSize() ) return false;
if( iIndex == m_iCurSel ) return true;
if( iIndex > m_iCurSel ) m_nPositiveDirection = -1;
if( iIndex < m_iCurSel ) m_nPositiveDirection = 1;
int iOldSel = m_iCurSel;
m_iCurSel = iIndex;
for( int it = 0; it < m_items.GetSize(); it++ ) {
if( it == iIndex ) {
GetItemAt(it)->SetVisible(true);
GetItemAt(it)->SetFocus();
m_bControlVisibleFlag = false;
m_pCurrentControl = static_cast<CControlUI*>(m_items[it]);
}
else GetItemAt(it)->SetVisible(false);
}
NeedParentUpdate();
if( NULL != m_pCurrentControl ) m_pCurrentControl->SetVisible( false );
AnimationSwitch();
if( m_pManager != NULL ) {
m_pManager->SetNextTabControl();
m_pManager->SendNotify(this, _T("tabselect"), m_iCurSel, iOldSel);
}
return true;
}
示例10: SetFixedHeight
void CControlUI::SetFixedHeight(int cy)
{
if( cy < 0 ) return;
m_cxyFixed.cy = cy;
if( !m_bFloat ) NeedParentUpdate();
else NeedUpdate();
}
示例11: SetMaxHeight
void CControlUI::SetMaxHeight(int cy)
{
if( m_cxyMax.cy == cy ) return;
if( cy < 0 ) return;
m_cxyMax.cy = cy;
if( !m_bFloat ) NeedParentUpdate();
else NeedUpdate();
}
示例12: SetMaxWidth
void CControlUI::SetMaxWidth(int cx)
{
if( m_cxyMax.cx == cx ) return;
if( cx < 0 ) return;
m_cxyMax.cx = cx;
if( !m_bFloat ) NeedParentUpdate();
else NeedUpdate();
}
示例13: IsVisible
void CControlUI::SetVisible(bool bVisible)
{
if( m_bVisible == bVisible ) return;
bool v = IsVisible();
m_bVisible = bVisible;
if( m_bFocused ) m_bFocused = false;
if (!bVisible && m_pManager && m_pManager->GetFocus() == this) {
m_pManager->SetFocus(NULL) ;
}
if( IsVisible() != v ) {
NeedParentUpdate();
}
}
示例14: NeedParentUpdate
void CContainerUI::SetVisible( bool bVisible /*= true*/, bool bDispalyed /*= true*/ )
{
m_bVisible = bVisible;
m_bDisplayed = bDispalyed;
m_bEnableUpdate = false;
for(int i=0; i<m_items.GetSize(); i++){
CControlUI* pControl = static_cast<CControlUI*>(m_items[i]);
pControl->SetVisibleByParent(bVisible, bDispalyed);
}
m_bEnableUpdate = true;
NeedParentUpdate();
}
示例15: SetHorizontal
void CScrollBarUI::SetHorizontal(bool bHorizontal)
{
if( m_bHorizontal == bHorizontal ) return;
m_bHorizontal = bHorizontal;
if( m_bHorizontal ) {
if( m_cxyFixed.cy == 0 ) {
m_cxyFixed.cx = 0;
m_cxyFixed.cy = DEFAULT_SCROLLBAR_SIZE;
}
}
else {
if( m_cxyFixed.cx == 0 ) {
m_cxyFixed.cx = DEFAULT_SCROLLBAR_SIZE;
m_cxyFixed.cy = 0;
}
}
if( m_pOwner != NULL ) m_pOwner->NeedUpdate(); else NeedParentUpdate();
}