本文整理汇总了C++中NeedParentUpdate函数的典型用法代码示例。如果您正苦于以下问题:C++ NeedParentUpdate函数的具体用法?C++ NeedParentUpdate怎么用?C++ NeedParentUpdate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NeedParentUpdate函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: SetFixedWidth
void CControlUI::SetFixedWidth(int cx)
{
if( cx < 0 ) return;
m_cxyFixed.cx = cx;
if( !m_bFloat ) NeedParentUpdate();
else NeedUpdate();
}
开发者ID:vizcount,项目名称:work,代码行数:7,代码来源:UIControl.cpp
示例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;
}
开发者ID:wyrover,项目名称:DuiLib-wyrover,代码行数:26,代码来源:UITabLayout.cpp
示例3: NeedParentUpdate
void CControlUI::SetFloat(bool bFloat)
{
if( m_bFloat == bFloat ) return;
m_bFloat = bFloat;
NeedParentUpdate();
}
开发者ID:vizcount,项目名称:work,代码行数:7,代码来源:UIControl.cpp
示例4: SetFixedXY
void CControlUI::SetFixedXY(SIZE szXY)
{
m_cXY.cx = szXY.cx;
m_cXY.cy = szXY.cy;
if( !m_bFloat ) NeedParentUpdate();
else NeedUpdate();
}
开发者ID:vizcount,项目名称:work,代码行数:7,代码来源:UIControl.cpp
示例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;
}
开发者ID:Zhuguoping,项目名称:ui,代码行数:25,代码来源:UITabLayout.cpp
示例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;
}
开发者ID:deathmemory,项目名称:zhaigj,代码行数:26,代码来源:UITabLayout.cpp
示例7: NeedParentUpdate
void CLabelUI::SetText( LPCTSTR pstrText )
{
CControlUI::SetText(pstrText);
if(GetAutoCalcWidth()) {
NeedParentUpdate();
}
}
开发者ID:vizcount,项目名称:work,代码行数:7,代码来源:UILabel.cpp
示例8: NeedParentUpdate
void CTabLayoutUI::RemoveAll()
{
m_iCurSel = -1;
m_iOldSel = -1;
CContainerUI::RemoveAll();
NeedParentUpdate();
}
开发者ID:dragonwarrior95,项目名称:Setup,代码行数:7,代码来源:UITabLayout.cpp
示例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;
}
开发者ID:arlen7772gg,项目名称:TIMSDK,代码行数:30,代码来源:UIAnimationTabLayout.cpp
示例10: SetFixedHeight
void CControlUI::SetFixedHeight(int cy)
{
if( cy < 0 ) return;
m_cxyFixed.cy = cy;
if( !m_bFloat ) NeedParentUpdate();
else NeedUpdate();
}
开发者ID:vizcount,项目名称:work,代码行数:7,代码来源:UIControl.cpp
示例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();
}
开发者ID:vizcount,项目名称:work,代码行数:9,代码来源:UIControl.cpp
示例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();
}
开发者ID:vizcount,项目名称:work,代码行数:9,代码来源:UIControl.cpp
示例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();
}
}
开发者ID:vizcount,项目名称:work,代码行数:14,代码来源:UIControl.cpp
示例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();
}
开发者ID:asdlei00,项目名称:sdklayout,代码行数:15,代码来源:UIContainer.cpp
示例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();
}
开发者ID:anlev5,项目名称:DuiLib_Ultimate,代码行数:20,代码来源:UIScrollBar.cpp
示例16: GetThumbRect
void CVerticalLayoutUI::DoEvent(TEventUI& event)
{
bool bBubble = false; //<By Jackie 2013-6-13>默认不冒泡.
bool bHandled = false; //是否被处理
//<By Jackie 2013-6-9> || true 处理消息不收m_iSepHeight的限制.
//if( m_iSepHeight != 0 || true)
//{
if( event.Type == UIEVENT_BUTTONDOWN && IsEnabled() )
{
bHandled = true;
RECT rcSeparator = GetThumbRect(false);
if( ::PtInRect(&rcSeparator, event.ptMouse) )
{
m_uButtonState |= UISTATE_CAPTURED;
ptLastMouse = event.ptMouse;
m_rcNewPos = m_rcItem;
if( !m_bImmMode && m_pManager ) m_pManager->AddPostPaint(this);
return;
}
}
else if( event.Type == UIEVENT_BUTTONUP )
{
bHandled = true;
if( (m_uButtonState & UISTATE_CAPTURED) != 0 )
{
m_uButtonState &= ~UISTATE_CAPTURED;
m_rcItem = m_rcNewPos;
if( !m_bImmMode && m_pManager ) m_pManager->RemovePostPaint(this);
NeedParentUpdate();
return;
}
}
else if( event.Type == UIEVENT_MOUSEMOVE )
{
bBubble = true;
bHandled = true;
//<By Jackie 2013-6-9> 支持Layout接收鼠标移动消息.
m_pManager->SendNotify(this, DUI_MSGTYPE_MOUSEMOVE, event.wParam, event.lParam);
//////////////////////////////////////////////////////////////////////////
if( (m_uButtonState & UISTATE_CAPTURED) != 0 )
{
LONG cy = event.ptMouse.y - ptLastMouse.y;
ptLastMouse = event.ptMouse;
RECT rc = m_rcNewPos;
if( m_iSepHeight >= 0 )
{
if( cy > 0 && event.ptMouse.y < m_rcNewPos.bottom + m_iSepHeight ) return;
if( cy < 0 && event.ptMouse.y > m_rcNewPos.bottom ) return;
rc.bottom += cy;
if( rc.bottom - rc.top <= GetMinHeight() )
{
if( m_rcNewPos.bottom - m_rcNewPos.top <= GetMinHeight() ) return;
rc.bottom = rc.top + GetMinHeight();
}
if( rc.bottom - rc.top >= GetMaxHeight() )
{
if( m_rcNewPos.bottom - m_rcNewPos.top >= GetMaxHeight() ) return;
rc.bottom = rc.top + GetMaxHeight();
}
}
else
{
if( cy > 0 && event.ptMouse.y < m_rcNewPos.top ) return;
if( cy < 0 && event.ptMouse.y > m_rcNewPos.top + m_iSepHeight ) return;
rc.top += cy;
if( rc.bottom - rc.top <= GetMinHeight() )
{
if( m_rcNewPos.bottom - m_rcNewPos.top <= GetMinHeight() ) return;
rc.top = rc.bottom - GetMinHeight();
}
if( rc.bottom - rc.top >= GetMaxHeight() )
{
if( m_rcNewPos.bottom - m_rcNewPos.top >= GetMaxHeight() ) return;
rc.top = rc.bottom - GetMaxHeight();
}
}
CDuiRect rcInvalidate = GetThumbRect(true);
m_rcNewPos = rc;
m_cxyFixed.cy = m_rcNewPos.bottom - m_rcNewPos.top;
if( m_bImmMode )
{
m_rcItem = m_rcNewPos;
NeedParentUpdate();
}
else
{
rcInvalidate.Join(GetThumbRect(true));
rcInvalidate.Join(GetThumbRect(false));
if( m_pManager ) m_pManager->Invalidate(rcInvalidate);
}
return;
}
}
else if(event.Type == UIEVENT_MOUSELEAVE)
{
bHandled = true;
m_pManager->SendNotify(this, DUI_MSGTYPE_MOUSELEAVE, event.wParam, event.lParam);
//.........这里部分代码省略.........
开发者ID:jackiesteed,项目名称:Duilib,代码行数:101,代码来源:UIVerticalLayout.cpp
示例17: NeedParentUpdate
void CTextUI::SetText(LPCTSTR pstrText)//修复当文字比默认文字长的时候,不能刷新的bug
{
CControlUI::SetText(pstrText);
NeedParentUpdate();
}
开发者ID:hgl888,项目名称:TeamTalk,代码行数:5,代码来源:UIText.cpp
示例18: GetThumbRect
void CHorizontalLayoutUI::DoEvent(TEventUI& event)
{
if( m_iSepWidth != 0 ) {
if( event.Type == UIEVENT_BUTTONDOWN && IsEnabled() )
{
RECT rcSeparator = GetThumbRect(false);
if( ::PtInRect(&rcSeparator, event.ptMouse) ) {
m_uButtonState |= UISTATE_CAPTURED;
m_ptLastMouse = event.ptMouse;
m_rcNewPos = m_rcItem;
if( !m_bImmMode && m_pManager ) m_pManager->AddPostPaint(this);
return;
}
}
if( event.Type == UIEVENT_BUTTONUP )
{
if( (m_uButtonState & UISTATE_CAPTURED) != 0 ) {
m_uButtonState &= ~UISTATE_CAPTURED;
m_rcItem = m_rcNewPos;
if( !m_bImmMode && m_pManager ) m_pManager->RemovePostPaint(this);
NeedParentUpdate();
return;
}
}
if( event.Type == UIEVENT_MOUSEMOVE )
{
if( (m_uButtonState & UISTATE_CAPTURED) != 0 ) {
LONG cx = event.ptMouse.x - m_ptLastMouse.x;
m_ptLastMouse = event.ptMouse;
RECT rc = m_rcNewPos;
if( m_iSepWidth >= 0 ) {
if( cx > 0 && event.ptMouse.x < m_rcNewPos.right - m_iSepWidth ) return;
if( cx < 0 && event.ptMouse.x > m_rcNewPos.right ) return;
rc.right += cx;
if( rc.right - rc.left <= GetMinWidth() ) {
if( m_rcNewPos.right - m_rcNewPos.left <= GetMinWidth() ) return;
rc.right = rc.left + GetMinWidth();
}
if( rc.right - rc.left >= GetMaxWidth() ) {
if( m_rcNewPos.right - m_rcNewPos.left >= GetMaxWidth() ) return;
rc.right = rc.left + GetMaxWidth();
}
}
else {
if( cx > 0 && event.ptMouse.x < m_rcNewPos.left ) return;
if( cx < 0 && event.ptMouse.x > m_rcNewPos.left - m_iSepWidth ) return;
rc.left += cx;
if( rc.right - rc.left <= GetMinWidth() ) {
if( m_rcNewPos.right - m_rcNewPos.left <= GetMinWidth() ) return;
rc.left = rc.right - GetMinWidth();
}
if( rc.right - rc.left >= GetMaxWidth() ) {
if( m_rcNewPos.right - m_rcNewPos.left >= GetMaxWidth() ) return;
rc.left = rc.right - GetMaxWidth();
}
}
CDuiRect rcInvalidate = GetThumbRect(true);
m_rcNewPos = rc;
m_cxyFixed.cx = m_rcNewPos.right - m_rcNewPos.left;
if( m_bImmMode ) {
m_rcItem = m_rcNewPos;
NeedParentUpdate();
}
else {
rcInvalidate.Join(GetThumbRect(true));
rcInvalidate.Join(GetThumbRect(false));
if( m_pManager ) m_pManager->Invalidate(rcInvalidate);
}
return;
}
}
if( event.Type == UIEVENT_SETCURSOR )
{
RECT rcSeparator = GetThumbRect(false);
if( IsEnabled() && ::PtInRect(&rcSeparator, event.ptMouse) ) {
::SetCursor(::LoadCursor(NULL, MAKEINTRESOURCE(IDC_SIZEWE)));
return;
}
}
}
CContainerUI::DoEvent(event);
}
开发者ID:2php,项目名称:duilib,代码行数:84,代码来源:UIHorizontalLayout.cpp
示例19: GetThumbRect
void CVerticalLayoutUI::DoEvent(TEventUI& event)
{
if( m_iSepHeight != 0 ) {
if( event.Type == UIEVENT_BUTTONDOWN && IsEnabled() )
{
RECT rcSeparator = GetThumbRect(false);
if( ::PtInRect(&rcSeparator, event.ptMouse) ) {
m_uButtonState |= UISTATE_CAPTURED;
ptLastMouse = event.ptMouse;
m_rcNewPos = m_rcItem;
if( !m_bImmMode && m_pManager ) m_pManager->AddPostPaint(this);
return;
}
}
if( event.Type == UIEVENT_BUTTONUP )
{
if( (m_uButtonState & UISTATE_CAPTURED) != 0 ) {
m_uButtonState &= ~UISTATE_CAPTURED;
m_rcItem = m_rcNewPos;
if( !m_bImmMode && m_pManager ) m_pManager->RemovePostPaint(this);
NeedParentUpdate();
return;
}
}
if( event.Type == UIEVENT_MOUSEMOVE )
{
if( (m_uButtonState & UISTATE_CAPTURED) != 0 ) {
LONG cy = event.ptMouse.y - ptLastMouse.y;
ptLastMouse = event.ptMouse;
RECT rc = m_rcNewPos;
if( m_iSepHeight >= 0 ) {
if( cy > 0 && event.ptMouse.y < m_rcNewPos.bottom + m_iSepHeight ) return;
if( cy < 0 && event.ptMouse.y > m_rcNewPos.bottom ) return;
rc.bottom += cy;
if( rc.bottom - rc.top <= GetMinHeight() ) {
if( m_rcNewPos.bottom - m_rcNewPos.top <= GetMinHeight() ) return;
rc.bottom = rc.top + GetMinHeight();
}
if( rc.bottom - rc.top >= GetMaxHeight() ) {
if( m_rcNewPos.bottom - m_rcNewPos.top >= GetMaxHeight() ) return;
rc.bottom = rc.top + GetMaxHeight();
}
}
else {
if( cy > 0 && event.ptMouse.y < m_rcNewPos.top ) return;
if( cy < 0 && event.ptMouse.y > m_rcNewPos.top + m_iSepHeight ) return;
rc.top += cy;
if( rc.bottom - rc.top <= GetMinHeight() ) {
if( m_rcNewPos.bottom - m_rcNewPos.top <= GetMinHeight() ) return;
rc.top = rc.bottom - GetMinHeight();
}
if( rc.bottom - rc.top >= GetMaxHeight() ) {
if( m_rcNewPos.bottom - m_rcNewPos.top >= GetMaxHeight() ) return;
rc.top = rc.bottom - GetMaxHeight();
}
}
CDuiRect rcInvalidate = GetThumbRect(true);
m_rcNewPos = rc;
m_cxyFixed.cy = m_rcNewPos.bottom - m_rcNewPos.top;
if( m_bImmMode ) {
m_rcItem = m_rcNewPos;
NeedParentUpdate();
}
else {
rcInvalidate.Join(GetThumbRect(true));
rcInvalidate.Join(GetThumbRect(false));
if( m_pManager ) m_pManager->Invalidate(rcInvalidate);
}
return;
}
}
if( event.Type == UIEVENT_SETCURSOR )
{
RECT rcSeparator = GetThumbRect(false);
if( IsEnabled() && ::PtInRect(&rcSeparator, event.ptMouse) ) {
::SetCursor(::LoadCursor(NULL, MAKEINTRESOURCE(IDC_SIZENS)));
return;
}
}
}
CContainerUI::DoEvent(event);
}
开发者ID:hgl888,项目名称:TeamTalk,代码行数:84,代码来源:UIVerticalLayout.cpp
示例20: NeedParentUpdate
void CAnimationTabLayoutUI::OnAnimationStop(INT nAnimationID)
{
NeedParentUpdate();
}
开发者ID:Crawping,项目名称:IocpServerClient_Side,代码行数:4,代码来源:UIAnimationTabLayout.cpp
注:本文中的NeedParentUpdate函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论