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


C++ JXWindowPainter::Line方法代码示例

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


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

示例1: GetBounds

void
CBCommandTable::Draw
	(
	JXWindowPainter&	p,
	const JRect&		rect
	)
{
	JXEditTable::Draw(p, rect);

	if (itsDNDRowIndex > 0)
		{
		p.ResetClipRect();

		const JSize origLineWidth = p.GetLineWidth();
		p.SetLineWidth(3);

		const JRect b = GetBounds();
		if (RowIndexValid(itsDNDRowIndex))
			{
			const JRect r = GetCellRect(JPoint(1, itsDNDRowIndex));
			p.Line(b.left, r.top, b.right, r.top);
			}
		else
			{
			const JRect r = GetCellRect(JPoint(1, GetRowCount()));
			p.Line(b.left, r.bottom, b.right, r.bottom);
			}

		p.SetLineWidth(origLineWidth);
		}
}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:31,代码来源:CBCommandTable.cpp

示例2: GetRowCount

void
GMFilterNameTable::Draw
	(
	JXWindowPainter&	p,
	const JRect&		rect
	)
{
	JXEditTable::Draw(p, rect);
	if (itsDNDIsValid)
		{
		p.ResetClipRect();
		p.SetLineWidth(kDragLineWidth);
		if (itsCurrentDNDIndex == 0)
			{
			JRect crect =
				GetCellRect(JPoint(1, GetRowCount()));
			p.Line(0, crect.bottom, GetBoundsWidth(), crect.bottom);
			}
		else
			{
			JRect crect =
				GetCellRect(JPoint(1, itsCurrentDNDIndex));
			p.Line(0, crect.top, GetBoundsWidth(), crect.top);
			}
		}
}
开发者ID:jafl,项目名称:jx_application_framework,代码行数:26,代码来源:GMFilterNameTable.cpp

示例3: GetWindow

void
JXDocktab::Draw
	(
	JXWindowPainter&	p,
	const JRect&		rect
	)
{
	const JColormap* cmap = p.GetColormap();

	// drag region

	JXWindow* w = GetWindow();
	JXWindow* focusWindow;

	JXDockWidget* dock;
	if (w->GetDockWidget(&dock) &&
		(dock->GetDockDirector())->GetFocusWindow(&focusWindow) &&
		focusWindow == w)
		{
		p.SetPenColor(itsFocusColor);
		p.SetFilling(kJTrue);
		p.JPainter::Rect(rect);
		p.SetPenColor((GetColormap())->GetBlackColor());
		p.SetFilling(kJFalse);

		p.SetPenColor(cmap->GetWhiteColor());
		}
	else
		{
		p.SetPenColor(cmap->GetGrayColor(60));
		}

	const JRect ap       = GetAperture();
	const JCoordinate y1 = ap.top + 1;
	const JCoordinate y2 = ap.bottom - 2;

	p.Line(3, y1, 3, y2);
	p.Line(5, y1, 5, y2);
}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:39,代码来源:JXDocktab.cpp

示例4: GetAperture

void
JXHorizPartition::Draw
	(
	JXWindowPainter&	p,
	const JRect&		rect
	)
{
	p.SetPenColor((p.GetColormap())->GetGray60Color());

	const JRect ap       = GetAperture();
	const JCoordinate y1 = ap.top+1;
	const JCoordinate y2 = ap.bottom-2;

	const JSize compartmentCount = GetCompartmentCount();
	JCoordinate x = 0;
	for (JIndex i=1; i<compartmentCount; i++)
		{
		x += GetCompartmentSize(i);
		p.Line(x+1, y1, x+1, y2);
		p.Line(x+3, y1, x+3, y2);
		x += kDragRegionSize;
		}
}
开发者ID:mbert,项目名称:mulberry-lib-jx,代码行数:23,代码来源:JXHorizPartition.cpp

示例5: GetAperture

void
JXVertPartition::Draw
	(
	JXWindowPainter&	p,
	const JRect&		rect
	)
{
	p.SetPenColor((p.GetColormap())->GetGray60Color());

	const JRect ap       = GetAperture();
	const JCoordinate x1 = ap.left+1;
	const JCoordinate x2 = ap.right-2;

	const JSize compartmentCount = GetCompartmentCount();
	JCoordinate y = 0;
	for (JIndex i=1; i<compartmentCount; i++)
		{
		y += GetCompartmentSize(i);
		p.Line(x1, y+1, x2, y+1);
		p.Line(x1, y+3, x2, y+3);
		y += kDragRegionSize;
		}
}
开发者ID:mbert,项目名称:mulberry-lib-jx,代码行数:23,代码来源:JXVertPartition.cpp


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