Exemple #1
0
void VMouse::Sim_Press(Graphic* orig, Graphic* porig, Event& e) {
    Canvas* screen = _myglass->GetCanvas();
    Graphic* parent;
    if (e.eventType == DownEvent) {
        parent = orig->Parent();
        if (parent != nil) {
            orig->Erase(screen);
            parent->Remove(orig);
            parent->Append(porig);
            porig->Draw(screen);
            if (e.leftmouse) {
                _vwriter->Request(1);

            } else if (e.middlemouse) {
                _vwriter->Request(2);

            } else if (e.rightmouse) {
                _vwriter->Request(3);
            }
        }
            
    } else if (e.eventType == UpEvent) {
        parent = porig->Parent();
        if (parent != nil) {
            porig->Erase(screen);
            parent->Remove(porig);
            parent->Append(orig);
            orig->Draw(screen);
        }
    }
}
Exemple #2
0
VMouse::VMouse(const char* name, const char* host) : VMouse_core(name) {
    Graphic* parent;
    parent = _pbutton1->Parent();
    parent->Remove(_pbutton1);
    parent = _pbutton2->Parent();
    parent->Remove(_pbutton2);
    parent = _pbutton3->Parent();
    parent->Remove(_pbutton3);
    _vwriter = new VMouseWriter(host, port_id);
}
Exemple #3
0
LinkView::~LinkView () {
    Graphic* parent = GraphicView::GetGraphic();
    Graphic* g1 = _connView1->GetGraphic();
    Graphic* g2 = _connView2->GetGraphic();

    parent->Remove(g1);
    parent->Remove(g2);

    delete _connView1;
    delete _connView2;
}
Exemple #4
0
LinkComp::~LinkComp () {
    Graphic* parent = GraphicComp::GetGraphic();
    Graphic* g1 = _conn1->GetGraphic();
    Graphic* g2 = _conn2->GetGraphic();

    parent->Remove(g1);
    parent->Remove(g2);

    delete _conn1;
    delete _conn2;
}
Exemple #5
0
ViewerView::~ViewerView () {
    Graphic* g = GetGraphic();
    Iterator i;
    g->First(i);

    while (!g->Done(i)) {
        g->Remove(i);
    }
    _vg->First(i);
    _vg->Remove(i);
    delete _vg;
}