diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp index 83e4f4d5422a26dd3f6e5ac8dc6b6934e9f75e49..7f58a38b3d7e5f708245de303ad57b446d38aeee 100644 --- a/Fltk/Callbacks.cpp +++ b/Fltk/Callbacks.cpp @@ -1,4 +1,4 @@ -// $Id: Callbacks.cpp,v 1.377 2005-11-26 16:01:10 geuzaine Exp $ +// $Id: Callbacks.cpp,v 1.378 2005-11-28 15:41:54 geuzaine Exp $ // // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // @@ -406,6 +406,30 @@ void status_xyz1p_cb(CALLBACK_ARGS) CTX.setQuaternionFromEulerAngles(); Draw(); } + else if(!strcmp(str, "nx")){ // X-axis pointing into the screen + // FIXME: dave + CTX.r[0] = 0.; + CTX.r[1] = 0.; + CTX.r[2] = 0.; + CTX.setQuaternionFromEulerAngles(); + Draw(); + } + else if(!strcmp(str, "ny")){ // Y-axis pointing into the screen + // FIXME: dave + CTX.r[0] = 0.; + CTX.r[1] = 0.; + CTX.r[2] = 0.; + CTX.setQuaternionFromEulerAngles(); + Draw(); + } + else if(!strcmp(str, "nz")){ // Z-axis pointing into the screen + // FIXME: dave + CTX.r[0] = 0.; + CTX.r[1] = 0.; + CTX.r[2] = 0.; + CTX.setQuaternionFromEulerAngles(); + Draw(); + } else if(!strcmp(str, "1:1")){ // reset translation and scaling CTX.t[0] = CTX.t[1] = CTX.t[2] = 0.; CTX.s[0] = CTX.s[1] = CTX.s[2] = 1.; @@ -1600,6 +1624,9 @@ void help_short_cb(CALLBACK_ARGS) Msg(DIRECT, " Alt+Shift+p Hide/show mesh points"); Msg(DIRECT, " Alt+Shift+s Hide/show mesh surfaces"); Msg(DIRECT, " Alt+Shift+v Hide/show mesh volumes"); + Msg(DIRECT, " Alt+Shift+x Set -X view"); + Msg(DIRECT, " Alt+Shift+y Set -Y view"); + Msg(DIRECT, " Alt+Shift+z Set -Z view"); Msg(DIRECT, " "); WID->create_message_window(); } diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp index f50cfd28c2e4cf2f06216f2f4a24950ddcf292fe..9ce93fb86dfc42f668bc00fa63c0afa1ffa1ff40 100644 --- a/Fltk/GUI.cpp +++ b/Fltk/GUI.cpp @@ -1,4 +1,4 @@ -// $Id: GUI.cpp,v 1.469 2005-11-26 16:01:11 geuzaine Exp $ +// $Id: GUI.cpp,v 1.470 2005-11-28 15:41:54 geuzaine Exp $ // // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // @@ -670,6 +670,18 @@ int GUI::global_shortcuts(int event) status_xyz1p_cb(0, (void *)"z"); return 1; } + else if(Fl::test_shortcut(FL_ALT + FL_SHIFT + 'x')) { + status_xyz1p_cb(0, (void *)"nx"); + return 1; + } + else if(Fl::test_shortcut(FL_ALT + FL_SHIFT + 'y')) { + status_xyz1p_cb(0, (void *)"ny"); + return 1; + } + else if(Fl::test_shortcut(FL_ALT + FL_SHIFT + 'z')) { + status_xyz1p_cb(0, (void *)"nz"); + return 1; + } else if(Fl::test_shortcut(FL_ALT + 'a')) { opt_general_axes(0, GMSH_SET | GMSH_GUI, opt_general_axes(0, GMSH_GET, 0) + 1); diff --git a/doc/texinfo/shortcuts.texi b/doc/texinfo/shortcuts.texi index 4db8302ee1d78c323b69b4feed7beb7d5f4908df..f758550a073769939bc4658763b33f2a3dee7713 100644 --- a/doc/texinfo/shortcuts.texi +++ b/doc/texinfo/shortcuts.texi @@ -139,5 +139,11 @@ Hide/show mesh points Hide/show mesh surfaces @item Alt+Shift+v Hide/show mesh volumes +@item Alt+Shift+x +Set -X view +@item Alt+Shift+y +Set -Y view +@item Alt+Shift+z +Set -Z view @end table