本文整理汇总了C++中Hit::top方法的典型用法代码示例。如果您正苦于以下问题:C++ Hit::top方法的具体用法?C++ Hit::top怎么用?C++ Hit::top使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Hit
的用法示例。
在下文中一共展示了Hit::top方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: pick
void FieldStringEditor::pick(
Canvas*, const Allocation& a, int depth, Hit& h
) {
const Event* ep = h.event();
if (ep != nil && h.left() < a.right() && h.right() >= a.left() &&
h.bottom() < a.top() && h.top() >= a.bottom()
) {
h.target(depth, this, 0);
}
}
示例2: pick
void DebugGlyph::pick(Canvas* c, const Allocation& a, int depth, Hit& h) {
if ((flags_ & trace_pick) != 0) {
heading("pick ");
printf(
"at (%.2f,%.2f,%.2f,%.2f) ",
h.left(), h.bottom(), h.right(), h.top()
);
print_allotment(a.allotment(Dimension_X));
printf(", ");
print_allotment(a.allotment(Dimension_Y));
printf("\n");
}
MonoGlyph::pick(c, a, depth, h);
}
示例3: pick
void Page::pick(Canvas* c, const Allocation& a, int depth, Hit& h) {
if (background_ != nil) {
background_->pick(c, a, depth, h);
}
GlyphIndex count = info_->count();
for (GlyphIndex index = 0; index < count; ++index) {
PageInfo& info = info_->item_ref(index);
if (info.glyph_ != nil && !(info.status_ & PageInfoHidden)) {
Allocation& a = info.allocation_;
if (h.right() >= a.left() && h.left() < a.right() &&
h.top() >= a.bottom() && h.bottom() < a.top()
) {
h.begin(depth, this, index);
info.glyph_->pick(c, a, depth + 1, h);
h.end();
}
}
}
}
示例4: pick
void TBScrollBox::pick(Canvas* c, const Allocation& a, int depth, Hit& h) {
TBScrollBoxImpl& sb = *impl_;
sb.check(c, a);
if (h.left() < a.right() && h.right() >= a.left() &&
h.bottom() < a.top() && h.top() >= a.bottom()
) {
if (sb.changed_) {
sb.refresh();
}
GlyphIndex n = sb.start_;
for (ListItr(TBScrollBoxList) i(sb.visible_); i.more(); i.next()) {
const TBScrollBoxInfo& info = i.cur_ref();
Glyph* g = info.glyph_;
h.begin(depth, this, n);
g->pick(c, info.allocation_, depth + 1, h);
h.end();
++n;
}
}
}
示例5: pick
void Box::pick(Canvas* c, const Allocation& a, int depth, Hit& h) {
if (h.right() >= a.left() && h.left() < a.right() &&
h.top() >= a.bottom() && h.bottom() < a.top()
) {
BoxImpl* b = impl_;
Extension ext;
ext.clear();
AllocationInfo& info = b->info(c, a, ext);
Allocation* aa = info.component_allocations();
GlyphIndex n = count();
for (GlyphIndex i = 0; i < n; i++) {
Glyph* g = component(i);
if (g != nil) {
h.begin(depth, this, i);
g->pick(c, aa[i], depth + 1, h);
h.end();
}
}
}
}