< prev index next >

modules/javafx.graphics/src/main/native-glass/gtk/glass_window.cpp

Print this page




 506     cairo_region_destroy(region);
 507 #endif
 508 
 509     cairo_destroy(context);
 510     cairo_surface_destroy(cairo_surface);
 511 }
 512 
 513 void WindowContextBase::add_child(WindowContextTop* child) {
 514     children.insert(child);
 515     gtk_window_set_transient_for(child->get_gtk_window(), this->get_gtk_window());
 516 }
 517 
 518 void WindowContextBase::remove_child(WindowContextTop* child) {
 519     children.erase(child);
 520     gtk_window_set_transient_for(child->get_gtk_window(), NULL);
 521 }
 522 
 523 void WindowContextBase::show_or_hide_children(bool show) {
 524     std::set<WindowContextTop*>::iterator it;
 525     for (it = children.begin(); it != children.end(); ++it) {
 526         (*it)->set_visible(show);
 527         (*it)->show_or_hide_children(show);
 528     }
 529 }
 530 
 531 void WindowContextBase::reparent_children(WindowContext* parent) {
 532     std::set<WindowContextTop*>::iterator it;
 533     for (it = children.begin(); it != children.end(); ++it) {
 534         (*it)->set_owner(parent);
 535         parent->add_child(*it);
 536     }
 537     children.clear();
 538 }
 539 
 540 void WindowContextBase::set_visible(bool visible) {
 541     if (visible) {
 542         gtk_widget_show_all(gtk_widget);
 543     } else {
 544         gtk_widget_hide(gtk_widget);
 545         if (jview && is_mouse_entered) {
 546             is_mouse_entered = false;




 506     cairo_region_destroy(region);
 507 #endif
 508 
 509     cairo_destroy(context);
 510     cairo_surface_destroy(cairo_surface);
 511 }
 512 
 513 void WindowContextBase::add_child(WindowContextTop* child) {
 514     children.insert(child);
 515     gtk_window_set_transient_for(child->get_gtk_window(), this->get_gtk_window());
 516 }
 517 
 518 void WindowContextBase::remove_child(WindowContextTop* child) {
 519     children.erase(child);
 520     gtk_window_set_transient_for(child->get_gtk_window(), NULL);
 521 }
 522 
 523 void WindowContextBase::show_or_hide_children(bool show) {
 524     std::set<WindowContextTop*>::iterator it;
 525     for (it = children.begin(); it != children.end(); ++it) {
 526         (*it)->set_minimized(!show);
 527         (*it)->show_or_hide_children(show);
 528     }
 529 }
 530 
 531 void WindowContextBase::reparent_children(WindowContext* parent) {
 532     std::set<WindowContextTop*>::iterator it;
 533     for (it = children.begin(); it != children.end(); ++it) {
 534         (*it)->set_owner(parent);
 535         parent->add_child(*it);
 536     }
 537     children.clear();
 538 }
 539 
 540 void WindowContextBase::set_visible(bool visible) {
 541     if (visible) {
 542         gtk_widget_show_all(gtk_widget);
 543     } else {
 544         gtk_widget_hide(gtk_widget);
 545         if (jview && is_mouse_entered) {
 546             is_mouse_entered = false;


< prev index next >