本文整理汇总了C++中JXWindowPainter::SetLineWidth方法的典型用法代码示例。如果您正苦于以下问题:C++ JXWindowPainter::SetLineWidth方法的具体用法?C++ JXWindowPainter::SetLineWidth怎么用?C++ JXWindowPainter::SetLineWidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JXWindowPainter
的用法示例。
在下文中一共展示了JXWindowPainter::SetLineWidth方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}
示例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);
}
}
}
示例3: if
void
JXImageCheckbox::DrawBorder
(
JXWindowPainter& p,
const JRect& frame
)
{
const JBoolean drawChecked = DrawChecked();
const JBoolean isActive = IsActive();
const JSize borderWidth = GetBorderWidth();
if (drawChecked && isActive)
{
JXDrawDownFrame(p, frame, borderWidth);
}
else if (isActive)
{
JXDrawUpFrame(p, frame, borderWidth);
}
else if (borderWidth > 0)
{
p.SetLineWidth(borderWidth);
if (drawChecked)
{
p.SetPenColor((GetColormap())->GetWhiteColor());
}
else
{
p.SetPenColor((GetColormap())->GetInactiveLabelColor());
}
p.RectInside(frame);
}
}
示例4: if
void
JXButton::DrawBorder
(
JXWindowPainter& p,
const JRect& origFrame
)
{
JSize borderWidth = GetBorderWidth();
if (borderWidth > 0 && IsActive())
{
JRect frame = origFrame;
if (itsIsReturnButtonFlag)
{
p.JPainter::Rect(frame);
frame.Shrink(1,1);
borderWidth--;
}
if (itsIsPushedFlag)
{
JXDrawDownFrame(p, frame, borderWidth);
}
else
{
JXDrawUpFrame(p, frame, borderWidth);
}
}
else if (borderWidth > 0)
{
p.SetLineWidth(borderWidth);
p.SetPenColor((GetColormap())->GetInactiveLabelColor());
p.RectInside(origFrame);
}
}
示例5: boxRect
void
JXTextCheckbox::Draw
(
JXWindowPainter& p,
const JRect& rect
)
{
const JRect bounds = GetBounds();
const JCoordinate y = bounds.ycenter();
// draw button
const JRect boxRect(y - kBoxHalfHeight, kMarginWidth,
y + kBoxHalfHeight, kMarginWidth + kBoxHeight);
const JBoolean drawChecked = DrawChecked();
const JBoolean isActive = IsActive();
if (drawChecked && isActive)
{
JXDrawDownFrame(p, boxRect, kJXDefaultBorderWidth, kJTrue, itsPushedColor);
}
else if (isActive)
{
JXDrawUpFrame(p, boxRect, kJXDefaultBorderWidth, kJTrue, itsNormalColor);
}
else
{
p.SetFilling(kJTrue);
if (drawChecked)
{
p.SetPenColor(itsPushedColor);
}
else
{
p.SetPenColor(itsNormalColor);
}
p.JPainter::Rect(boxRect);
p.SetFilling(kJFalse);
p.SetLineWidth(kJXDefaultBorderWidth);
p.SetPenColor((GetColormap())->GetInactiveLabelColor());
p.RectInside(boxRect);
}
// draw text
JRect textRect = bounds;
textRect.left += 2*kMarginWidth + kBoxHeight;
p.SetFont(itsFontName, itsFontSize, itsFontStyle);
p.String(textRect.left, textRect.top, itsLabel, itsULIndex,
textRect.width(), JPainter::kHAlignLeft,
textRect.height(), JPainter::kVAlignCenter);
}
示例6: 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);
}
}