コード例 #1
0
ファイル: gbsizer.cpp プロジェクト: czxxjtu/wxPython-1
bool wxGBSizerItem::Intersects(const wxGBPosition& pos, const wxGBSpan& span)
{

    int row, col, endrow, endcol;
    int otherrow, othercol, otherendrow, otherendcol;

    GetPos(row, col);
    GetEndPos(endrow, endcol);

    otherrow = pos.GetRow();
    othercol = pos.GetCol();
    otherendrow = otherrow + span.GetRowspan() - 1;
    otherendcol = othercol + span.GetColspan() - 1;

    // is the other item's start or end in the range of this one?
    if (( InRange(otherrow, row, endrow) && InRange(othercol, col, endcol) ) ||
        ( InRange(otherendrow, row, endrow) && InRange(otherendcol, col, endcol) ))
        return true;

    // is this item's start or end in the range of the other one?
    if (( InRange(row, otherrow, otherendrow) && InRange(col, othercol, otherendcol) ) ||
        ( InRange(endrow, otherrow, otherendrow) && InRange(endcol, othercol, otherendcol) ))
        return true;

    return false;
}
コード例 #2
0
ファイル: wxe_return.cpp プロジェクト: AlainODea/otp
INLINE
void  wxeReturn::add(wxGBSpan val) {
    addInt(val.GetRowspan());
    addInt(val.GetColspan());
    addTupleCount(2);
}