本文整理汇总了C++中JXWindowPainter::GetColormap方法的典型用法代码示例。如果您正苦于以下问题:C++ JXWindowPainter::GetColormap方法的具体用法?C++ JXWindowPainter::GetColormap怎么用?C++ JXWindowPainter::GetColormap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JXWindowPainter
的用法示例。
在下文中一共展示了JXWindowPainter::GetColormap方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetBounds
void
JXSearchTextButton::Draw
(
JXWindowPainter& p,
const JRect& rect
)
{
const JRect bounds = GetBounds();
JRect r;
r.top = bounds.ycenter() - kArrowHalfHeight;
r.bottom = r.top + 2*kArrowHalfHeight + 1;
r.left = bounds.xcenter() - kArrowHalfWidth;
r.right = r.left + 2*kArrowHalfWidth;
const JColorIndex colorIndex =
IsActive() ? (p.GetColormap())->GetGrayColor(40) :
(p.GetColormap())->GetInactiveLabelColor();
if (itsFwdFlag)
{
r.right++;
JXFillArrowRight(p, r, colorIndex);
}
else
{
r.left--;
JXFillArrowLeft(p, r, colorIndex);
}
}
示例2: GetBorderWidth
void
JX3DWidget::DrawBorder
(
JXWindowPainter& p,
const JRect& frame
)
{
const JSize borderWidth = GetBorderWidth();
if (itsShowFocusFlag && HasFocus() && borderWidth > 0)
{
p.SetLineWidth(borderWidth);
p.SetPenColor((p.GetColormap())->GetWhiteColor());
p.RectInside(frame);
}
else
{
JXDrawDownFrame(p, frame, borderWidth);
}
}
示例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);
}
示例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;
}
}
示例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;
}
}
示例6:
void
JXInputField::DrawBorder
(
JXWindowPainter& p,
const JRect& frame
)
{
if (itsTable != NULL)
{
if (IsDNDTarget())
{
p.SetPenColor((p.GetColormap())->GetDefaultDNDBorderColor());
}
else
{
p.SetPenColor((GetColormap())->GetBlackColor());
}
p.JPainter::Rect(frame);
}
else
{
JXTEBase::DrawBorder(p, frame);
}
}
示例7: r
void
JXTabGroup::DrawTabBorder
(
JXWindowPainter& p,
const JRect& rect,
const JBoolean isSelected
)
{
JXDrawUpFrame(p, rect, kBorderWidth);
const JColormap* cmap = p.GetColormap();
if (itsEdge == kTop)
{
p.SetPenColor(cmap->GetDefaultBackColor());
p.JPainter::Point(rect.topLeft());
p.JPainter::Point(rect.topRight() + JPoint(-1,0));
p.JPainter::Point(rect.topRight() + JPoint(-2,0));
p.JPainter::Point(rect.topRight() + JPoint(-1,1));
p.JPainter::Point(rect.topRight() + JPoint(-1,2));
p.SetPenColor(cmap->Get3DLightColor());
p.JPainter::Point(rect.topLeft() + JPoint(kBorderWidth, kBorderWidth));
p.SetPenColor(cmap->Get3DShadeColor());
p.JPainter::Point(rect.topRight() + JPoint(-kBorderWidth-1, kBorderWidth));
if (isSelected)
{
JRect r(rect.bottom - kBorderWidth, rect.left + kBorderWidth,
rect.bottom, rect.right - kBorderWidth);
p.SetPenColor(cmap->GetGrayColor(kSelGrayPercentage));
p.JPainter::Rect(r);
p.JPainter::Point(rect.topLeft() + JPoint(-1,kSelMargin+kBorderWidth));
p.SetPenColor(cmap->Get3DLightColor());
p.JPainter::Point(rect.bottomLeft() + JPoint(1,-1));
p.JPainter::Point(rect.bottomRight() + JPoint(-2,-1));
p.JPainter::Point(rect.bottomRight() + JPoint(-1,-2));
p.JPainter::Point(rect.bottomRight() + JPoint(-1,-1));
}
}
else if (itsEdge == kLeft)
{
p.SetPenColor(cmap->GetDefaultBackColor());
p.JPainter::Point(rect.topLeft());
p.JPainter::Point(rect.bottomLeft() + JPoint(0,-1));
p.JPainter::Point(rect.bottomLeft() + JPoint(0,-2));
p.JPainter::Point(rect.bottomLeft() + JPoint(1,-1));
p.JPainter::Point(rect.bottomLeft() + JPoint(2,-1));
p.SetPenColor(cmap->Get3DLightColor());
p.JPainter::Point(rect.topLeft() + JPoint(kBorderWidth, kBorderWidth));
p.SetPenColor(cmap->Get3DShadeColor());
p.JPainter::Point(rect.bottomLeft() + JPoint(kBorderWidth, -kBorderWidth-1));
if (isSelected)
{
JRect r(rect.top + kBorderWidth, rect.right - kBorderWidth,
rect.bottom - kBorderWidth, rect.right);
p.SetPenColor(cmap->GetGrayColor(kSelGrayPercentage));
p.JPainter::Rect(r);
p.JPainter::Point(rect.topLeft() + JPoint(kSelMargin+kBorderWidth,-1));
p.SetPenColor(cmap->Get3DLightColor());
p.JPainter::Point(rect.topRight() + JPoint(-1,1));
if (rect.bottom < (GetAperture()).bottom)
{
p.JPainter::Point(rect.bottomRight() + JPoint(-1,-1));
p.JPainter::Point(rect.bottomRight() + JPoint(-2,-1));
p.JPainter::Point(rect.bottomRight() + JPoint(-1,-2));
}
}
}
else if (itsEdge == kBottom)
{
p.SetPenColor(cmap->GetDefaultBackColor());
p.JPainter::Point(rect.bottomLeft() + JPoint(0,-1));
p.JPainter::Point(rect.bottomLeft() + JPoint(0,-2));
p.JPainter::Point(rect.bottomLeft() + JPoint(1,-1));
p.JPainter::Point(rect.bottomLeft() + JPoint(2,-1));
p.JPainter::Point(rect.bottomRight() + JPoint(-1,-1));
p.SetPenColor(cmap->Get3DLightColor());
p.JPainter::Point(rect.bottomLeft() + JPoint(kBorderWidth, -kBorderWidth-1));
p.SetPenColor(cmap->Get3DShadeColor());
p.JPainter::Point(rect.bottomRight() + JPoint(-kBorderWidth-1, -kBorderWidth-1));
if (isSelected)
{
JRect r(rect.top, rect.left + kBorderWidth,
rect.top + kBorderWidth, rect.right - kBorderWidth);
p.SetPenColor(cmap->GetGrayColor(kSelGrayPercentage));
p.JPainter::Rect(r);
p.SetPenColor(cmap->Get3DShadeColor());
if (rect.left > (GetAperture()).left)
{
p.JPainter::Point(rect.topLeft());
}
p.JPainter::Point(rect.topRight() + JPoint(-1,0));
p.JPainter::Point(rect.topRight() + JPoint(-2,0));
p.JPainter::Point(rect.topRight() + JPoint(-2,1));
}
}
//.........这里部分代码省略.........