Esempio n. 1
0
void Editor::RemoveDialog (Glyph* g) {
    for (ListUpdater(EditorImpl) i(*_impl); i.more(); i.next()) {
	TransientWindow* t = i.cur();
	if (t->glyph() == g) {
	    t->unmap();
	    i.remove_cur();
	    delete t;
	    break;
	}
    }
}
Esempio n. 2
0
boolean Dialog::post_for_aligned(Window* w, float x_align, float y_align) {
    TransientWindow* t = new TransientWindow(this);
    t->style(new Style(style()));
    t->transient_for(w);
    t->wm_delete(new DialogHandler(this));
    t->place(w->left() + 0.5 * w->width(), w->bottom() + 0.5 * w->height());
    t->align(x_align, y_align);
    t->map();
    boolean b = run();
    t->unmap();
    t->display()->sync();
    delete t;
    return b;
}
Esempio n. 3
0
boolean Dialog::post_at_aligned(
    Coord x, Coord y, float x_align, float y_align
) {
    TransientWindow* t = new TransientWindow(this);
    t->style(new Style(style()));
    t->wm_delete(new DialogHandler(this));
    t->place(x, y);
    t->align(x_align, y_align);
    t->map();
    boolean b = run();
    t->unmap();
    t->display()->sync();
    delete t;
    return b;
}
Esempio n. 4
0
void Editor::InsertDialog (Glyph* g) { 
    ManagedWindow* w = GetWindow();
    if (w != nil) w->deiconify();
    TransientWindow* dialog = nil;
    for (ListItr(EditorImpl) i(*_impl); i.more(); i.next()) {
	TransientWindow* t = i.cur();
	if (t->glyph() == g) {
	    dialog = t;
	    break;
	}
    }
    if (dialog == nil) {
	dialog = new TransientWindow(g);
	_impl->prepend(dialog);
    }
    dialog->transient_for(w);
    dialog->place(
	w->left() + w->width() * 0.5, w->bottom() + w->height() * 0.5
    );
    dialog->align(0.5, 0.5);
    dialog->map();
}
Esempio n. 5
0
void App::cancel_multimeter() {
    multitransient_->unmap();
    multitransient_->display()->sync();
    delete multitransient_;
}
Esempio n. 6
0
void App::cancel_meter() {
    transient_->unmap();
    transient_->display()->sync();
    delete transient_;
}
Esempio n. 7
0
void App::multimeter_it() {
    buildmultimeter();
    multitransient_ = new TransientWindow(multimeter_);
    multitransient_->map();
}
Esempio n. 8
0
void App::meter_it() {
    buildmeter();
    transient_ = new TransientWindow(meter_);
    transient_->map();
}