Skip to content
Snippets Groups Projects
Commit 60d18897 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

Remove invisible views

parent f26dd590
No related branches found
No related tags found
No related merge requests found
// $Id: Callbacks.cpp,v 1.101 2002-01-03 10:25:06 geuzaine Exp $ // $Id: Callbacks.cpp,v 1.102 2002-01-26 01:25:20 geuzaine Exp $
#include <sys/types.h> #include <sys/types.h>
#include <signal.h> #include <signal.h>
...@@ -1775,6 +1775,17 @@ void view_remove_visible_cb(CALLBACK_ARGS) { ...@@ -1775,6 +1775,17 @@ void view_remove_visible_cb(CALLBACK_ARGS) {
Draw(); Draw();
} }
void view_remove_invisible_cb(CALLBACK_ARGS) {
int i;
if(!CTX.post.list) return;
REMOVE_ALL_VIEWS = 1;
for(i=List_Nbr(CTX.post.list)-1 ; i>=0 ; i--)
if(!opt_view_visible(i, GMSH_GET, 0))
view_remove_cb(NULL, (void*)i);
REMOVE_ALL_VIEWS = 0;
Draw();
}
void view_remove_cb(CALLBACK_ARGS){ void view_remove_cb(CALLBACK_ARGS){
int i, play=0; int i, play=0;
......
...@@ -222,6 +222,7 @@ void view_reload_visible_cb(CALLBACK_ARGS) ; ...@@ -222,6 +222,7 @@ void view_reload_visible_cb(CALLBACK_ARGS) ;
void view_remove_cb(CALLBACK_ARGS) ; void view_remove_cb(CALLBACK_ARGS) ;
void view_remove_all_cb(CALLBACK_ARGS) ; void view_remove_all_cb(CALLBACK_ARGS) ;
void view_remove_visible_cb(CALLBACK_ARGS) ; void view_remove_visible_cb(CALLBACK_ARGS) ;
void view_remove_invisible_cb(CALLBACK_ARGS) ;
void view_save_ascii_cb(CALLBACK_ARGS) ; void view_save_ascii_cb(CALLBACK_ARGS) ;
void view_save_binary_cb(CALLBACK_ARGS) ; void view_save_binary_cb(CALLBACK_ARGS) ;
void view_duplicate_cb(CALLBACK_ARGS) ; void view_duplicate_cb(CALLBACK_ARGS) ;
......
// $Id: GUI.cpp,v 1.143 2002-01-21 18:49:17 geuzaine Exp $ // $Id: GUI.cpp,v 1.144 2002-01-26 01:25:20 geuzaine Exp $
// To make the interface as visually consistent as possible, please: // To make the interface as visually consistent as possible, please:
// - use the IW, BB, BH, BW and WB values // - use the IW, BB, BH, BW and WB values
...@@ -674,6 +674,8 @@ void GUI::create_menu_window(int argc, char **argv){ ...@@ -674,6 +674,8 @@ void GUI::create_menu_window(int argc, char **argv){
(Fl_Callback *)view_remove_all_cb, (void*)i, 0); (Fl_Callback *)view_remove_all_cb, (void*)i, 0);
m_popup_butt[i]->add("Remove/All visible views", 0, m_popup_butt[i]->add("Remove/All visible views", 0,
(Fl_Callback *)view_remove_visible_cb, (void*)i, 0); (Fl_Callback *)view_remove_visible_cb, (void*)i, 0);
m_popup_butt[i]->add("Remove/All invisible views", 0,
(Fl_Callback *)view_remove_invisible_cb, (void*)i, 0);
m_popup_butt[i]->add("Duplicate/View without options", 0, m_popup_butt[i]->add("Duplicate/View without options", 0,
(Fl_Callback *)view_duplicate_cb, (void*)i, 0) ; (Fl_Callback *)view_duplicate_cb, (void*)i, 0) ;
m_popup_butt[i]->add("Duplicate/View with options", 0, m_popup_butt[i]->add("Duplicate/View with options", 0,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment