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


C++ CGumpEditorDoc::GetGump方法代码示例

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


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

示例1: ApplyValues

void CGumpSliderPropertyPage::ApplyValues()
{
	if (GetSafeHwnd() && GetEntity())
	{
		UpdateData();

		CGumpEditorDoc* pDoc = GfxGetGumpDocument();
		CGumpSlider* pSlider= dynamic_cast<CGumpSlider*>(GetEntity()); ASSERT(pSlider);
		if (!pSlider) return;

		int iTrackID = GfxAtoX(m_strTrackID);
		int iThumbID = GfxAtoX(m_strThumbID);

		CGumpPtr pTrack, pThumb, pGump;
		pSlider->GetGump(pTrack, pThumb);

		if (pTrack->GetGumpID() != iTrackID  && (pGump = pDoc->GetGump(iTrackID))) 
		{
			pSlider->SetGump(CGumpSlider::TRACK, pGump);
		}
		if (pThumb->GetGumpID() != iThumbID  && (pGump = pDoc->GetGump(iThumbID))) 
		{
			pSlider->SetGump(CGumpSlider::THUMB, pGump);
		}

		pSlider->SetRange(m_iMin, m_iMax);
		pSlider->SetPos(m_iPos);
		pSlider->SetVertical(m_bVertical);

		Redraw();
	}
}
开发者ID:BackupTheBerlios,项目名称:iris-svn,代码行数:32,代码来源:GumpSliderPropertyPage.cpp

示例2: ApplyValues

void CGumpCheckboxPropertyPage::ApplyValues()
{
    if (GetSafeHwnd() && GetEntity())
    {
        UpdateData();

        CGumpEditorDoc* pDoc = GfxGetGumpDocument();
        ASSERT(pDoc);
        CGumpCheckbox* pCheckbox = (CGumpCheckbox*)GetEntity();

        pCheckbox->SetCheck(m_bChecked);

        int iNormalID =GfxAtoX(m_strNormalID);
        int iCheckedID  =GfxAtoX(m_strCheckedID);

        CGumpPtr pNormal, pChecked, pPressed, pGump;
        pCheckbox->GetGump(pNormal, pChecked);

        if (pNormal->GetGumpID() != iNormalID
                && (pGump = pDoc->GetGump(iNormalID)))
        {
            pCheckbox->SetGump(CGumpCheckbox::NORMAL, pGump);
            m_btnTest.SetGump(CHoverButton::NORMAL, pGump);
        }
        if (pChecked->GetGumpID() != iCheckedID
                && (pGump = pDoc->GetGump(iCheckedID)))
        {
            pCheckbox->SetGump(CGumpCheckbox::CHECKED, pGump);
            m_btnTest.SetGump(CHoverButton::PRESSED, pGump);
        }

        Redraw();
    }
}
开发者ID:BackupTheBerlios,项目名称:iris-svn,代码行数:34,代码来源:GumpCheckboxPropertyPage.cpp

示例3: ApplyValues

void CGumpScrollbarPropertyPage::ApplyValues()
{
	if (GetSafeHwnd() && GetEntity())
	{
		UpdateData();

		CGumpEditorDoc* pDoc = GfxGetGumpDocument();
		CGumpScrollbar* pScrollbar = dynamic_cast<CGumpScrollbar*>(GetEntity()); ASSERT(pScrollbar);
		if (!pScrollbar) return;

		CGumpPtr pGump;

		int iGumpID1 = -1, iGumpID2 = -1;
		for (int i = 0; i < NUM_PART; i++) {
			iGumpID1 = GfxAtoX(m_strGumpID[i]);
			iGumpID2 = pScrollbar->GetGumpID(CGumpScrollbar::PART(i));

			if (iGumpID1 != iGumpID2  && (pGump = pDoc->GetGump(iGumpID1))) 
				pScrollbar->SetGump(CGumpScrollbar::PART(i), pGump);
		}
		
		pScrollbar->SetRange(m_iMin, m_iMax);
		pScrollbar->SetPos(m_iPos);
		pScrollbar->SetVertical(m_bVertical);
		pScrollbar->SetUseArrowButton(m_bUseArrow);

		Redraw();
	}
}
开发者ID:Admin-Yukiko,项目名称:Iris1_DeveloperTools,代码行数:29,代码来源:GumpScrollbarPropertyPage.cpp

示例4: SetGump

void CGumpBorder::SetGump(CGumpPtr pGump, bool bUpdateRect)
{
//	ASSERT(pGump);
	for (int i = 0; i < NUM_PART; i++) { 
		m_pGumpB[i] = NULL;
		m_sizeGumpB[i].SetSize(0,0);
	}
	
	if (!pGump) return;
	int iGumpID = pGump->GetGumpID();

	int iWidth = 0, iHeight = 0;
	CGumpEditorDoc* pDoc = GfxGetGumpDocument();
	m_pGumpB[LT] = pGump;
	m_sizeGumpB[LT] = pGump->GetDimensions();
	for (int i = 1; i < NUM_PART; i++) {
		m_pGumpB[i] = pDoc->GetGump(iGumpID+i);
		if (!m_pGumpB[i]) continue;
		m_sizeGumpB[i] = m_pGumpB[i]->GetDimensions();
		if (i < LC) iWidth += m_sizeGumpB[i].cx;
		if (i % LC == 0) iHeight += m_sizeGumpB[i].cy;
	}

	if (!bUpdateRect) return;
	
	CRect rect = GetRect();
	SetRect(rect.left,rect.top,rect.left+iWidth,rect.top+iHeight);
}
开发者ID:Admin-Yukiko,项目名称:Iris1_DeveloperTools,代码行数:28,代码来源:GumpBorder.cpp

示例5: ApplyValues

void CGumpBorderPropertyPage::ApplyValues()
{
	if (GetSafeHwnd() && GetEntity())
	{
		UpdateData();
		CGumpBorder* pBorder = (CGumpBorder*)GetEntity();
		CGumpEditorDoc* pDoc = GfxGetGumpDocument();
		int iGumpID = GfxAtoX(m_strGumpID);

		if (pBorder->GetGumpID() != iGumpID) {	
			CGumpPtr pGump = pDoc->GetGump(iGumpID);
			if (!pGump) return;
			pBorder->SetGump(pGump);
		}
					
		Redraw();
	
	}	
}
开发者ID:Admin-Yukiko,项目名称:Iris1_DeveloperTools,代码行数:19,代码来源:GumpBorderPropertyPage.cpp


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