本文整理汇总了C++中DashboardRegion::bottom方法的典型用法代码示例。如果您正苦于以下问题:C++ DashboardRegion::bottom方法的具体用法?C++ DashboardRegion::bottom怎么用?C++ DashboardRegion::bottom使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DashboardRegion
的用法示例。
在下文中一共展示了DashboardRegion::bottom方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: cssText
//.........这里部分代码省略.........
text += m_value.string;
text += ")";
break;
case CSS_COUNTER: {
String separator = m_value.counter->separator();
text = separator.isEmpty() ? "counter(" : "counters(";
text += m_value.counter->identifier();
if (!separator.isEmpty()) {
text += ", ";
text += quoteCSSStringIfNeeded(separator);
}
const char* listStyleName = getValueName(m_value.counter->listStyleNumber() + CSSValueDisc);
if (listStyleName) {
text += ", ";
text += listStyleName;
}
text += ")";
break;
}
case CSS_RECT: {
DEFINE_STATIC_LOCAL(const String, rectParen, ("rect("));
Rect* rectVal = getRectValue();
StringBuilder result;
result.reserveCapacity(32);
result.append(rectParen);
result.append(rectVal->top()->cssText());
result.append(' ');
result.append(rectVal->right()->cssText());
result.append(' ');
result.append(rectVal->bottom()->cssText());
result.append(' ');
result.append(rectVal->left()->cssText());
result.append(')');
text = result.toString();
break;
}
case CSS_QUAD: {
Quad* quadVal = getQuadValue();
Vector<UChar> result;
result.reserveInitialCapacity(32);
append(result, quadVal->top()->cssText());
if (quadVal->right() != quadVal->top() || quadVal->bottom() != quadVal->top() || quadVal->left() != quadVal->top()) {
result.append(' ');
append(result, quadVal->right()->cssText());
if (quadVal->bottom() != quadVal->top() || quadVal->right() != quadVal->left()) {
result.append(' ');
append(result, quadVal->bottom()->cssText());
if (quadVal->left() != quadVal->right()) {
result.append(' ');
append(result, quadVal->left()->cssText());
}
}
}
text = String::adopt(result);
break;
}
case CSS_RGBCOLOR:
case CSS_PARSER_HEXCOLOR: {
DEFINE_STATIC_LOCAL(const String, commaSpace, (", "));
DEFINE_STATIC_LOCAL(const String, rgbParen, ("rgb("));
示例2: customCssText
//.........这里部分代码省略.........
else
result.append("rgb(", 4);
appendNumber(result, static_cast<unsigned char>(color.red()));
result.append(", ", 2);
appendNumber(result, static_cast<unsigned char>(color.green()));
result.append(", ", 2);
appendNumber(result, static_cast<unsigned char>(color.blue()));
if (colorHasAlpha) {
result.append(", ", 2);
NumberToStringBuffer buffer;
const char* alphaString = numberToFixedPrecisionString(color.alpha() / 255.0f, 6, buffer, true);
result.append(alphaString, strlen(alphaString));
}
result.append(')');
text = String::adopt(result);
break;
}
case CSS_PAIR:
text = getPairValue()->cssText();
break;
#if ENABLE(DASHBOARD_SUPPORT)
case CSS_DASHBOARD_REGION: {
StringBuilder result;
for (DashboardRegion* region = getDashboardRegionValue(); region; region = region->m_next.get()) {
if (!result.isEmpty())
result.append(' ');
result.appendLiteral("dashboard-region(");
result.append(region->m_label);
if (region->m_isCircle)
result.appendLiteral(" circle");
else if (region->m_isRectangle)
result.appendLiteral(" rectangle");
else
break;
if (region->top()->m_primitiveUnitType == CSS_IDENT && region->top()->getIdent() == CSSValueInvalid) {
ASSERT(region->right()->m_primitiveUnitType == CSS_IDENT);
ASSERT(region->bottom()->m_primitiveUnitType == CSS_IDENT);
ASSERT(region->left()->m_primitiveUnitType == CSS_IDENT);
ASSERT(region->right()->getIdent() == CSSValueInvalid);
ASSERT(region->bottom()->getIdent() == CSSValueInvalid);
ASSERT(region->left()->getIdent() == CSSValueInvalid);
} else {
result.append(' ');
result.append(region->top()->cssText());
result.append(' ');
result.append(region->right()->cssText());
result.append(' ');
result.append(region->bottom()->cssText());
result.append(' ');
result.append(region->left()->cssText());
}
result.append(')');
}
text = result.toString();
break;
}
#endif
case CSS_PARSER_OPERATOR: {
char c = static_cast<char>(m_value.ident);
text = String(&c, 1U);
break;
}
case CSS_PARSER_IDENTIFIER:
text = quoteCSSStringIfNeeded(m_value.string);
break;
case CSS_CALC:
text = m_value.calc->cssText();
break;
case CSS_SHAPE:
text = m_value.shape->cssText();
break;
case CSS_VW:
text = formatNumber(m_value.num, "vw");
break;
case CSS_VH:
text = formatNumber(m_value.num, "vh");
break;
case CSS_VMIN:
text = formatNumber(m_value.num, "vmin");
break;
case CSS_VMAX:
text = formatNumber(m_value.num, "vmax");
break;
#if ENABLE(CSS_VARIABLES)
case CSS_VARIABLE_NAME:
text = "-webkit-var(" + String(m_value.string) + ")";
break;
#endif
}
ASSERT(!cssTextCache().contains(this));
cssTextCache().set(this, text);
m_hasCachedCSSText = true;
return text;
}
示例3: cssText
String CSSPrimitiveValue::cssText() const
{
// ### return the original value instead of a generated one (e.g. color
// name if it was specified) - check what spec says about this
String text;
switch ( m_type ) {
case CSS_UNKNOWN:
// ###
break;
case CSS_NUMBER:
text = String::number(m_value.num);
break;
case CSS_PERCENTAGE:
text = String::number(m_value.num) + "%";
break;
case CSS_EMS:
text = String::number(m_value.num) + "em";
break;
case CSS_EXS:
text = String::number(m_value.num) + "ex";
break;
case CSS_PX:
text = String::number(m_value.num) + "px";
break;
case CSS_CM:
text = String::number(m_value.num) + "cm";
break;
case CSS_MM:
text = String::number(m_value.num) + "mm";
break;
case CSS_IN:
text = String::number(m_value.num) + "in";
break;
case CSS_PT:
text = String::number(m_value.num) + "pt";
break;
case CSS_PC:
text = String::number(m_value.num) + "pc";
break;
case CSS_DEG:
text = String::number(m_value.num) + "deg";
break;
case CSS_RAD:
text = String::number(m_value.num) + "rad";
break;
case CSS_GRAD:
text = String::number(m_value.num) + "grad";
break;
case CSS_MS:
text = String::number(m_value.num) + "ms";
break;
case CSS_S:
text = String::number(m_value.num) + "s";
break;
case CSS_HZ:
text = String::number(m_value.num) + "hz";
break;
case CSS_KHZ:
text = String::number(m_value.num) + "khz";
break;
case CSS_DIMENSION:
// ###
break;
case CSS_STRING:
text = quoteStringIfNeeded(m_value.string);
break;
case CSS_URI:
text = "url(" + String(m_value.string) + ")";
break;
case CSS_IDENT:
text = getValueName(m_value.ident);
break;
case CSS_ATTR:
// ###
break;
case CSS_COUNTER:
// ###
break;
case CSS_RECT: {
RectImpl* rectVal = getRectValue();
text = "rect(";
text += rectVal->top()->cssText() + " ";
text += rectVal->right()->cssText() + " ";
text += rectVal->bottom()->cssText() + " ";
text += rectVal->left()->cssText() + ")";
break;
}
case CSS_RGBCOLOR: {
Color color(m_value.rgbcolor);
if (color.alpha() < 0xFF)
text = "rgba(";
else
text = "rgb(";
text += String::number(color.red()) + ", ";
text += String::number(color.green()) + ", ";
text += String::number(color.blue());
if (color.alpha() < 0xFF)
text += ", " + String::number((float)color.alpha() / 0xFF);
text += ")";
break;
//.........这里部分代码省略.........
示例4: cssText
String CSSPrimitiveValue::cssText() const
{
// FIXME: return the original value instead of a generated one (e.g. color
// name if it was specified) - check what spec says about this
String text;
switch (m_type) {
case CSS_UNKNOWN:
// FIXME
break;
case CSS_NUMBER:
case CSS_PARSER_INTEGER:
text = String::number(m_value.num);
break;
case CSS_PERCENTAGE:
text = String::format("%.6lg%%", m_value.num);
break;
case CSS_EMS:
text = String::format("%.6lgem", m_value.num);
break;
case CSS_EXS:
text = String::format("%.6lgex", m_value.num);
break;
case CSS_PX:
text = String::format("%.6lgpx", m_value.num);
break;
case CSS_CM:
text = String::format("%.6lgcm", m_value.num);
break;
case CSS_MM:
text = String::format("%.6lgmm", m_value.num);
break;
case CSS_IN:
text = String::format("%.6lgin", m_value.num);
break;
case CSS_PT:
text = String::format("%.6lgpt", m_value.num);
break;
case CSS_PC:
text = String::format("%.6lgpc", m_value.num);
break;
case CSS_DEG:
text = String::format("%.6lgdeg", m_value.num);
break;
case CSS_RAD:
text = String::format("%.6lgrad", m_value.num);
break;
case CSS_GRAD:
text = String::format("%.6lggrad", m_value.num);
break;
case CSS_MS:
text = String::format("%.6lgms", m_value.num);
break;
case CSS_S:
text = String::format("%.6lgs", m_value.num);
break;
case CSS_HZ:
text = String::format("%.6lghz", m_value.num);
break;
case CSS_KHZ:
text = String::format("%.6lgkhz", m_value.num);
break;
case CSS_DIMENSION:
// FIXME
break;
case CSS_STRING:
text = quoteStringIfNeeded(m_value.string);
break;
case CSS_URI:
text = "url(" + quoteURLIfNeeded(m_value.string) + ")";
break;
case CSS_IDENT:
text = valueOrPropertyName(m_value.ident);
break;
case CSS_ATTR:
// FIXME
break;
case CSS_COUNTER:
text = "counter(";
text += String::number(m_value.num);
text += ")";
// FIXME: Add list-style and separator
break;
case CSS_RECT: {
Rect* rectVal = getRectValue();
text = "rect(";
text += rectVal->top()->cssText() + " ";
text += rectVal->right()->cssText() + " ";
text += rectVal->bottom()->cssText() + " ";
text += rectVal->left()->cssText() + ")";
break;
}
case CSS_RGBCOLOR: {
Color color(m_value.rgbcolor);
text = (color.alpha() < 0xFF) ? "rgba(" : "rgb(";
text += String::number(color.red()) + ", ";
text += String::number(color.green()) + ", ";
text += String::number(color.blue());
if (color.alpha() < 0xFF)
text += ", " + String::number(static_cast<float>(color.alpha()) / 0xFF);
text += ")";
//.........这里部分代码省略.........