本文整理汇总了C++中Glyph::allocate方法的典型用法代码示例。如果您正苦于以下问题:C++ Glyph::allocate方法的具体用法?C++ Glyph::allocate怎么用?C++ Glyph::allocate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Glyph
的用法示例。
在下文中一共展示了Glyph::allocate方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: allocate
void LayoutLayer::allocate(Canvas* c, const Allocation& a, Extension& ext) {
if (under_ != nil) {
under_->allocate(c, a, ext);
}
MonoGlyph::allocate(c, a, ext);
if (over_ != nil) {
over_->allocate(c, a, ext);
}
}
示例2: allocate
void BevelFrame::allocate(Canvas* c, const Allocation& a, Extension& ext) {
Glyph* g = body();
if (g != nil) {
if (hmargin_ || vmargin_) {
Allocation interior(a);
allocate_body(g, thickness(c), interior);
g->allocate(c, interior, ext);
} else {
g->allocate(c, a, ext);
}
}
ext.merge(c, a);
}
示例3: full_allocate
void BoxImpl::full_allocate(AllocationInfo& info) {
Canvas* c = info.canvas();
GlyphIndex n = box_->count();
Allocation* a = info.component_allocations();
Requisition* r = new Requisition[n];
GlyphIndex i;
for (i = 0; i < n; i++) {
Glyph* g = box_->component(i);
if (g != nil) {
g->request(r[i]);
}
}
layout_->allocate(info.allocation(), n, r, a);
delete [] r;
Extension& box = info.extension();
Extension child;
for (i = 0; i < n; i++) {
Glyph* g = box_->component(i);
if (g != nil) {
child.clear();
g->allocate(c, a[i], child);
box.merge(child);
}
}
}
示例4: allocate
void Layer::allocate( const Allocation & a)
{
for( GlyphIndex i = 0; i < getCount(); i++ )
{
Glyph* g = getComponent( i );
if( g )
g->allocate( a );
}
}
示例5: interior
void StripRuler2D::allocate( const Allocation& a )
{
Glyph* g = getBody();
if( g != nil )
{
Allocation interior( a );
allocateBody( g, interior );
g->allocate( interior );
}
}
示例6: allocate
void Deck::allocate(Canvas* c, const Allocation& a, Extension& ext) {
allocation_ = a;
if (card_ >= 0 && card_ < count()) {
Glyph* g = component(card_);
if (g != nil) {
g->allocate(c, a, ext);
}
ext.merge(c, a);
}
}
示例7: allocate
void Border::allocate( const Allocation& a )
{
Glyph* g = getBody();
if( g != nil )
{
Allocation interior( a );
allocateBody( g, d_thickness, interior );
g->allocate( interior );
}
}
示例8: reallocate
void TBScrollBoxImpl::reallocate() {
if (canvas_ == nil) {
return;
}
ScrollBox* s = scrollbox_;
GlyphIndex n = s->count();
end_ = n;
TBScrollBoxList& list = visible_;
list.remove_all();
Requisition req;
TBScrollBoxInfo info;
Extension e_i;
const Requirement& r = req.y_requirement();
Coord p = allocation_.top();
Coord bottom = allocation_.bottom();
bool found_start = false;
for (GlyphIndex i = start_; i < n; i++) {
Glyph* g = s->component(i);
if (g != nil) {
g->request(req);
Coord span = r.natural();
if (!Math::equal(span, Coord(0), float(1e-2))) {
if (!found_start) {
start_ = i;
found_start = true;
}
Coord alignment = r.alignment();
p -= span;
if (p < bottom) {
end_ = i;
break;
}
info.glyph_ = g;
Allotment& ax = info.allocation_.x_allotment();
ax = allocation_.x_allotment();
Allotment& ay = info.allocation_.y_allotment();
ay.span(span);
ay.origin(p + Coord(alignment * span));
ay.alignment(alignment);
list.append(info);
g->allocate(canvas_, info.allocation_, e_i);
}
}
}
}
示例9: offset_allocate
void BoxImpl::offset_allocate(AllocationInfo& info, Coord dx, Coord dy) {
Canvas* c = info.canvas();
Allocation* a = info.component_allocations();
Extension& box = info.extension();
Extension child;
GlyphIndex n = box_->count();
for (GlyphIndex i = 0; i < n; i++) {
Glyph* g = box_->component(i);
if (g != nil) {
Allocation& a_i = a[i];
Allotment& ax = a_i.x_allotment();
Allotment& ay = a_i.y_allotment();
ax.offset(dx);
ay.offset(dy);
child.clear();
g->allocate(c, a_i, child);
box.merge(child);
}
}
}