Beispiel #1
0
static void
_elm_label_smart_sizing_eval(Evas_Object *obj)
{
   Evas_Coord minw = -1, minh = -1;
   Evas_Coord resw, resh;

   ELM_LABEL_DATA_GET(obj, sd);

   if (sd->linewrap)
     {
        evas_object_geometry_get
          (ELM_WIDGET_DATA(sd)->resize_obj, NULL, NULL, &resw, &resh);
        if (resw == sd->lastw) return;
        sd->lastw = resw;
        _recalc(obj);
     }
   else
     {
        evas_event_freeze(evas_object_evas_get(obj));
        evas_object_geometry_get
          (ELM_WIDGET_DATA(sd)->resize_obj, NULL, NULL, &resw, &resh);
        edje_object_size_min_calc
          (ELM_WIDGET_DATA(sd)->resize_obj, &minw, &minh);
        if (sd->wrap_w > 0 && minw > sd->wrap_w) minw = sd->wrap_w;
        evas_object_size_hint_min_set(obj, minw, minh);
        evas_event_thaw(evas_object_evas_get(obj));
        evas_event_thaw_eval(evas_object_evas_get(obj));
     }
}
Beispiel #2
0
void Bitfield::SetReferBuffer(const char *buf)
{
    if( !b ) {
        b = new unsigned char[nbytes];
#ifndef WINDOWS
        if( !b ) throw 9;
#endif
    }
    memcpy(b, buf, nbytes);
    if( nbits % 8 )
        b[nbytes - 1] &= ~(BIT_HEX[nbits % 8 - 1] - 1);
    _recalc();
}
Beispiel #3
0
void Bitfield::Or(const Bitfield &bf)
{
    if( !_isempty_sp(bf) && !_isfull() ) {
        if( _isfull_sp(bf) ) {
            SetAll();
        } else if( _isempty() ) {
            memcpy(b, bf.b, nbytes);
            nset = bf.nset;
        } else {
            bt_index_t i;
            for( i = 0; i < nbytes; i++ )
                b[i] |= bf.b[i];
            _recalc();
        }
    }
}
Beispiel #4
0
void Bitfield::Except(const Bitfield &bf)
{
    if( !_isempty_sp(bf) && !_isempty() ) {
        if( _isfull_sp(bf) ) {
            Clear();
        } else {
            if( _isfull() ) {
                b = new unsigned char[nbytes];
#ifndef WINDOWS
                if( !b ) throw 9;
#endif
                _setall(b);
            }
            for( bt_index_t i = 0; i < nbytes; i++ )
                b[i] &= ~bf.b[i];
            _recalc();
        }
    }
}
Beispiel #5
0
void Bitfield::And(const Bitfield &bf)
{
    if( !_isfull_sp(bf) && !_isempty() ) {
        if( _isempty_sp(bf) ) {
            Clear();
        } else {
            if( _isfull() ) {
                b = new unsigned char[nbytes];
#ifndef WINDOWS
                if( !b ) throw 9;
#endif
                memcpy(b, bf.b, nbytes);
                nset = bf.nset;
            } else {
                for( bt_index_t i = 0; i < nbytes; i++ )
                    b[i] &= bf.b[i];
                _recalc();
            }
        }
    }
}