当前位置: 首页>>代码示例>>C++>>正文


C++ CBCGPBaseRibbonElement::SetRect方法代码示例

本文整理汇总了C++中CBCGPBaseRibbonElement::SetRect方法的典型用法代码示例。如果您正苦于以下问题:C++ CBCGPBaseRibbonElement::SetRect方法的具体用法?C++ CBCGPBaseRibbonElement::SetRect怎么用?C++ CBCGPBaseRibbonElement::SetRect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CBCGPBaseRibbonElement的用法示例。


在下文中一共展示了CBCGPBaseRibbonElement::SetRect方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ReposActiveForm

//********************************************************************************
void CBCGPRibbonBackstageViewPanel::ReposActiveForm()
{
	ASSERT_VALID(this);

	CBCGPBaseRibbonElement* pSelected = m_pNewSelected != NULL ? m_pNewSelected : m_pSelected;

	if (pSelected != NULL)
	{
		ASSERT_VALID(pSelected);

		CBCGPBaseRibbonElement* pView = pSelected->GetBackstageAttachedView();
		if (pView != NULL)
		{
			ASSERT_VALID(pView);

			if (m_pMainButton != NULL)
			{
				ASSERT_VALID (m_pMainButton);
				ASSERT_VALID (m_pMainButton->GetParentRibbonBar ());

				pView->SetRect(m_rectRight);

				CClientDC dc(m_pMainButton->GetParentRibbonBar());

				CFont* pOldFont = dc.SelectObject (m_pMainButton->GetParentRibbonBar()->GetFont());
				ASSERT (pOldFont != NULL);

				pView->OnAfterChangeRect(&dc);
				m_sizeRightView = pView->GetSize(&dc);

				dc.SelectObject (pOldFont);

				if (m_pNewSelected != NULL)
				{
					RedrawElement(pView);
				}
			}
		}
	}
}
开发者ID:iclosure,项目名称:jframework,代码行数:41,代码来源:BCGPRibbonBackstageViewPanel.cpp

示例2: OnPageTransitionFinished

//**********************************************************************************
void CBCGPRibbonBackstageViewPanel::OnPageTransitionFinished()
{
	ASSERT_VALID(this);

	if (m_pNewSelected == NULL)
	{
		return;
	}

	ASSERT_VALID(m_pNewSelected);

	if (m_pSelected != NULL)
	{
		ASSERT_VALID(m_pSelected);

		CBCGPBaseRibbonElement* pView = m_pSelected->GetBackstageAttachedView();
		if (pView != NULL)
		{
			ASSERT_VALID(pView);
			pView->SetRect(CRect(0, 0, 0, 0));
			pView->OnAfterChangeRect(NULL);
		}
		
		m_pSelected->m_bIsChecked = FALSE;
		RedrawElement(m_pSelected);
	}

	m_pSelected = m_pNewSelected;

	ReposActiveForm();
	AdjustScrollBars();
	ReposActiveForm();

	RedrawElement(m_pSelected);

	m_pNewSelected = NULL;
}
开发者ID:iclosure,项目名称:jframework,代码行数:38,代码来源:BCGPRibbonBackstageViewPanel.cpp

示例3: SelectView

//**********************************************************************************
void CBCGPRibbonBackstageViewPanel::SelectView(CBCGPBaseRibbonElement* pElem)
{
	ASSERT_VALID(this);

	m_pNewSelected = NULL;

	if (pElem == NULL)
	{
		return;
	}

	ASSERT_VALID(pElem);

	if (pElem->IsDisabled())
	{
		return;
	}

	if (pElem != m_pSelected && pElem->GetBackstageAttachedView() != NULL)
	{
		if (m_pSelected != NULL)
		{
			ASSERT_VALID(m_pSelected);

			if (m_pMainButton->GetParentRibbonBar () != NULL)
			{
				ASSERT_VALID (m_pMainButton->GetParentRibbonBar ());

				m_PageTransitionEffect = m_pMainButton->GetParentRibbonBar ()->GetBackstagePageTransitionEffect();
				m_nPageTransitionTime = m_pMainButton->GetParentRibbonBar ()->GetBackstagePageTransitionTime();
			}

			if (m_bSelectedByMouseClick && m_PageTransitionEffect != BCGPPageTransitionNone && !globalData.IsHighContastMode())
			{
				m_bSelectedByMouseClick = FALSE;

				CBCGPRibbonBackstageViewItemForm* pForm1 = DYNAMIC_DOWNCAST(CBCGPRibbonBackstageViewItemForm, m_pSelected->GetBackstageAttachedView());
				if (pForm1 != NULL && pForm1->m_pWndForm->GetSafeHwnd() != NULL)
				{
					HWND hwndPanel = GetParentMenuBar()->GetSafeHwnd();
					GetParentMenuBar()->SetRedraw(FALSE);

					CBCGPRibbonBackstageViewItemForm* pForm2 = DYNAMIC_DOWNCAST(CBCGPRibbonBackstageViewItemForm, pElem->GetBackstageAttachedView());
					if (pForm2 != NULL && hwndPanel != NULL)
					{
						if (pForm2->m_pWndForm == NULL)
						{
							pForm2->m_pWndForm = pForm2->OnCreateFormWnd();
						}

						if (pForm2->m_pWndForm->GetSafeHwnd() != NULL)
						{
							m_pNewSelected = pElem;

							ReposActiveForm();

							pForm1->m_pWndForm->ShowWindow(SW_HIDE);
							pForm2->m_pWndForm->ShowWindow(SW_HIDE);

							CSize szPageMax(m_rect.Width(), 0);

							m_clrFillFrame = CBCGPVisualManager::GetInstance()->IsRibbonBackstageWhiteBackground() ?
								RGB(255, 255, 255) : globalData.clrBarFace;

							m_pNewSelected->m_bIsChecked = TRUE;
							m_pSelected->m_bIsChecked = FALSE;

							if (StartPageTransition(hwndPanel,
								pForm1->m_pWndForm->GetSafeHwnd(), pForm2->m_pWndForm->GetSafeHwnd(),
								m_pSelected->GetRect().top > pElem->GetRect().top, CSize(0, 0), szPageMax))
							{
								RedrawElement(m_pSelected);
								return;
							}

							GetParentMenuBar()->SetRedraw(TRUE);
						}
					}
				}
			}

			CBCGPBaseRibbonElement* pView = m_pSelected->GetBackstageAttachedView();
			if (pView != NULL)
			{
				ASSERT_VALID(pView);
				pView->SetRect(CRect(0, 0, 0, 0));
				pView->OnAfterChangeRect(NULL);
			}

			m_pSelected->m_bIsChecked = FALSE;
			RedrawElement(m_pSelected);
		}

		m_pSelected = pElem;
		m_pSelected->m_bIsChecked = TRUE;

		ReposActiveForm();
		AdjustScrollBars();
		ReposActiveForm();
//.........这里部分代码省略.........
开发者ID:iclosure,项目名称:jframework,代码行数:101,代码来源:BCGPRibbonBackstageViewPanel.cpp


注:本文中的CBCGPBaseRibbonElement::SetRect方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。