#include <wxVTKRenderWindowInteractorPlus.h>
Public Member Functions | |
wxVTKRenderWindowInteractorPlus (wxWindow *parent, wxVtkBaseView *_wxvtkbaseview) | |
virtual | ~wxVTKRenderWindowInteractorPlus () |
wxVTKRenderWindowInteractorPlus () | |
void | OnLeftDClick (wxMouseEvent &event) |
void | OnRightDClick (wxMouseEvent &event) |
void | OnMiddleDClick (wxMouseEvent &event) |
void | OnMouseWheel (wxMouseEvent &event) |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | Initialize () |
void | Enable () |
bool | Enable (bool enable) |
void | Disable () |
void | Start () |
void | UpdateSize (int x, int y) |
int | CreateTimer (int timertype) |
int | DestroyTimer () |
void | TerminateApp () |
void | OnPaint (wxPaintEvent &event) |
void | OnEraseBackground (wxEraseEvent &event) |
void | OnMotion (wxMouseEvent &event) |
void | OnButtonDown (wxMouseEvent &event) |
(VTK_MAJOR_VERSION == 3 && VTK_MINOR_VERSION == 1) | |
void | OnButtonUp (wxMouseEvent &event) |
void | OnEnter (wxMouseEvent &event) |
void | OnLeave (wxMouseEvent &event) |
void | OnKeyDown (wxKeyEvent &event) |
void | OnKeyUp (wxKeyEvent &event) |
void | OnTimer (wxTimerEvent &event) |
void | OnSize (wxSizeEvent &event) |
void | Render () throw (char*) |
void | SetRenderWhenDisabled (int newValue) |
vtkGetMacro (Stereo, int) | |
vtkBooleanMacro (Stereo, int) | |
vtkBooleanMacro (UseCaptureMouse, int) | |
virtual void | SetStereo (int capable) |
vtkSetMacro (UseCaptureMouse, int) | |
Static Public Member Functions | |
static wxVTKRenderWindowInteractorPlus * | New () |
Protected Member Functions | |
long | GetHandleHack () |
Protected Attributes | |
wxTimer | timer |
int | ActiveButton |
int | RenderAllowed |
int | Stereo |
Private Member Functions | |
DECLARE_EVENT_TABLE () | |
Private Attributes | |
wxVtkBaseView * | _wxvtkbaseview |
Definition at line 10 of file wxVTKRenderWindowInteractorPlus.h.
wxVTKRenderWindowInteractorPlus::wxVTKRenderWindowInteractorPlus | ( | wxWindow * | parent, | |
wxVtkBaseView * | _wxvtkbaseview | |||
) |
Definition at line 20 of file wxVTKRenderWindowInteractorPlus.cxx.
References _wxvtkbaseview.
00021 : wxVTKRenderWindowInteractor(parent, -1) 00022 { 00023 _wxvtkbaseview = wxvtkbaseview; 00024 }
wxVTKRenderWindowInteractorPlus::~wxVTKRenderWindowInteractorPlus | ( | ) | [virtual] |
Definition at line 27 of file wxVTKRenderWindowInteractorPlus.cxx.
wxVTKRenderWindowInteractorPlus::wxVTKRenderWindowInteractorPlus | ( | ) |
Definition at line 13 of file wxVTKRenderWindowInteractorPlus.cxx.
00014 : wxVTKRenderWindowInteractor() 00015 { 00016 }
int wxVTKRenderWindowInteractor::CreateTimer | ( | int | timertype | ) | [inherited] |
wxVTKRenderWindowInteractorPlus::DECLARE_EVENT_TABLE | ( | ) | [private] |
int wxVTKRenderWindowInteractor::DestroyTimer | ( | ) | [inherited] |
Definition at line 267 of file wxVTKRenderWindowInteractor.cxx.
void wxVTKRenderWindowInteractor::Disable | ( | ) | [inherited] |
Definition at line 223 of file wxVTKRenderWindowInteractor.cxx.
bool wxVTKRenderWindowInteractor::Enable | ( | bool | enable | ) | [inherited] |
Definition at line 214 of file wxVTKRenderWindowInteractor.cxx.
References wxVTKRenderWindowInteractor::Enable().
00215 { 00216 #if defined(__WXGTK__) && defined(USE_WXGLCANVAS) 00217 return wxGLCanvas::Enable(enable); 00218 #else 00219 return wxWindow::Enable(enable); 00220 #endif 00221 }
void wxVTKRenderWindowInteractor::Enable | ( | ) | [inherited] |
Definition at line 200 of file wxVTKRenderWindowInteractor.cxx.
Referenced by wxVTKRenderWindowInteractor::Enable(), and wxVTKRenderWindowInteractor::Initialize().
00201 { 00202 // if already enabled then done 00203 if (Enabled) 00204 return; 00205 00206 // that's it 00207 Enabled = 1; 00208 #if defined(__WXGTK__) && defined(USE_WXGLCANVAS) 00209 SetCurrent(); 00210 #endif 00211 Modified(); 00212 }
long wxVTKRenderWindowInteractor::GetHandleHack | ( | ) | [protected, inherited] |
Definition at line 296 of file wxVTKRenderWindowInteractor.cxx.
Referenced by wxVTKRenderWindowInteractor::Render().
00297 { 00298 //helper function to hide the MSW vs GTK stuff 00299 long handle_tmp = 0; 00300 00301 // __WXMSW__ is for Win32 00302 //__WXMAX__ stands for using Carbon C-headers, using either the CarbonLib/CFM or the native Mach-O builds (which then also use the latest features available) 00303 // __WXGTK__ is for both gtk 1.2.x and gtk 2.x 00304 #if defined(__WXMSW__) || defined(__WXMAC__) 00305 handle_tmp = (long)this->GetHandle(); 00306 #endif //__WXMSW__ 00307 00308 //__WXCOCOA__ stands for using the objective-c Cocoa API 00309 #ifdef __WXCOCOA__ 00310 // Here is how to find the NSWindow 00311 wxTopLevelWindow* toplevel = dynamic_cast<wxTopLevelWindow*>( 00312 wxGetTopLevelParent( this ) ); 00313 if (toplevel != NULL ) 00314 { 00315 handle_tmp = (long)toplevel->GetNSWindow(); 00316 } 00317 // The NSView will be deducted from 00318 // [(NSWindow*)Handle contentView] 00319 // if only I knew how to write that in c++ 00320 #endif //__WXCOCOA__ 00321 00322 // Find and return the actual X-Window. 00323 #if defined(__WXGTK__) || defined(__WXX11__) 00324 return (long)GetXWindow(this); 00325 #endif 00326 00327 //#ifdef __WXMOTIF__ 00328 // handle_tmp = (long)this->GetXWindow(); 00329 //#endif 00330 00331 return handle_tmp; 00332 }
void wxVTKRenderWindowInteractor::Initialize | ( | ) | [inherited] |
Definition at line 185 of file wxVTKRenderWindowInteractor.cxx.
References wxVTKRenderWindowInteractor::Enable().
00186 { 00187 int *size = RenderWindow->GetSize(); 00188 // enable everything and start rendering 00189 Enable(); 00190 //RenderWindow->Start(); 00191 00192 // set the size in the render window interactor 00193 Size[0] = size[0]; 00194 Size[1] = size[1]; 00195 00196 // this is initialized 00197 Initialized = 1; 00198 }
wxVTKRenderWindowInteractorPlus * wxVTKRenderWindowInteractorPlus::New | ( | ) | [static] |
Reimplemented from wxVTKRenderWindowInteractor.
Definition at line 32 of file wxVTKRenderWindowInteractorPlus.cxx.
00033 { 00034 // we don't make use of the objectfactory, because we're not registered 00035 return new wxVTKRenderWindowInteractorPlus; 00036 }
void wxVTKRenderWindowInteractor::OnButtonDown | ( | wxMouseEvent & | event | ) | [inherited] |
(VTK_MAJOR_VERSION == 3 && VTK_MINOR_VERSION == 1)
Reimplemented in wxVTKRenderWindowInteractorEditContour.
Definition at line 541 of file wxVTKRenderWindowInteractor.cxx.
References wxVTKRenderWindowInteractor::ActiveButton, wxVTKRenderWindowInteractor::UseCaptureMouse, and WX_USE_X_CAPTURE.
00542 { 00543 if (!Enabled || (ActiveButton != wxEVT_NULL)) 00544 { 00545 return; 00546 } 00547 ActiveButton = event.GetEventType(); 00548 00549 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00550 SetEventInformationFlipY(event.GetX(), event.GetY(), 00551 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL); 00552 #endif 00553 00554 if(event.RightDown()) 00555 { 00556 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00557 // new style 00558 InvokeEvent(vtkCommand::RightButtonPressEvent, NULL); 00559 #else 00560 // old style 00561 InteractorStyle->OnRightButtonDown(event.ControlDown(), event.ShiftDown(), 00562 event.GetX(), Size[1] - event.GetY() - 1); 00563 #endif 00564 } 00565 else if(event.LeftDown()) 00566 { 00567 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00568 // new style 00569 InvokeEvent(vtkCommand::LeftButtonPressEvent, NULL); 00570 #else 00571 // old style 00572 InteractorStyle->OnLeftButtonDown(event.ControlDown(), event.ShiftDown(), 00573 event.GetX(), Size[1] - event.GetY() - 1); 00574 #endif 00575 } 00576 else if(event.MiddleDown()) 00577 { 00578 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00579 // new style 00580 InvokeEvent(vtkCommand::MiddleButtonPressEvent, NULL); 00581 #else 00582 // old style 00583 InteractorStyle->OnMiddleButtonDown(event.ControlDown(), event.ShiftDown(), 00584 event.GetX(), Size[1] - event.GetY() - 1); 00585 #endif 00586 } 00587 //save the button and capture mouse until the button is released 00588 //Only if : 00589 //1. it is possible (WX_USE_X_CAPTURE) 00590 //2. user decided to. 00591 if ((ActiveButton != wxEVT_NULL) && WX_USE_X_CAPTURE && UseCaptureMouse) 00592 { 00593 CaptureMouse(); 00594 } 00595 }
void wxVTKRenderWindowInteractor::OnButtonUp | ( | wxMouseEvent & | event | ) | [inherited] |
Reimplemented in wxVTKRenderWindowInteractorEditContour.
Definition at line 597 of file wxVTKRenderWindowInteractor.cxx.
References wxVTKRenderWindowInteractor::ActiveButton, wxVTKRenderWindowInteractor::UseCaptureMouse, and WX_USE_X_CAPTURE.
00598 { 00599 //EVT_xxx_DOWN == EVT_xxx_UP - 1 00600 //This is only needed if two mouse buttons are pressed at the same time. 00601 //In wxWindows 2.4 and later: better use of wxMOUSE_BTN_RIGHT or 00602 //wxEVT_COMMAND_RIGHT_CLICK 00603 if (!Enabled || (ActiveButton != (event.GetEventType()-1))) 00604 { 00605 return; 00606 } 00607 00608 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00609 SetEventInformationFlipY(event.GetX(), event.GetY(), 00610 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL); 00611 #endif 00612 00613 if(ActiveButton == wxEVT_RIGHT_DOWN) 00614 { 00615 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00616 // new style 00617 InvokeEvent(vtkCommand::RightButtonReleaseEvent, NULL); 00618 #else 00619 // old style 00620 InteractorStyle->OnRightButtonUp(event.ControlDown(), event.ShiftDown(), 00621 event.GetX(), Size[1] - event.GetY() - 1); 00622 #endif 00623 } 00624 else if(ActiveButton == wxEVT_LEFT_DOWN) 00625 { 00626 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00627 // new style 00628 InvokeEvent(vtkCommand::LeftButtonReleaseEvent, NULL); 00629 #else 00630 // old style 00631 InteractorStyle->OnLeftButtonUp(event.ControlDown(), event.ShiftDown(), 00632 event.GetX(), Size[1] - event.GetY() - 1); 00633 #endif 00634 } 00635 else if(ActiveButton == wxEVT_MIDDLE_DOWN) 00636 { 00637 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00638 // new style 00639 InvokeEvent(vtkCommand::MiddleButtonReleaseEvent, NULL); 00640 #else 00641 // old style 00642 InteractorStyle->OnMiddleButtonUp(event.ControlDown(), event.ShiftDown(), 00643 event.GetX(), Size[1] - event.GetY() - 1); 00644 #endif 00645 } 00646 //if the ActiveButton is realeased, then release mouse capture 00647 if ((ActiveButton != wxEVT_NULL) && WX_USE_X_CAPTURE && UseCaptureMouse) 00648 { 00649 ReleaseMouse(); 00650 } 00651 ActiveButton = wxEVT_NULL; 00652 }
void wxVTKRenderWindowInteractor::OnEnter | ( | wxMouseEvent & | event | ) | [inherited] |
Definition at line 406 of file wxVTKRenderWindowInteractor.cxx.
00407 { 00408 SetFocus(); 00409 if (!Enabled) 00410 { 00411 return; 00412 } 00413 00414 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00415 // new style 00416 SetEventInformationFlipY(event.GetX(), event.GetY(), 00417 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL); 00418 00419 InvokeEvent(vtkCommand::EnterEvent, NULL); 00420 #else 00421 // old style 00422 InteractorStyle->OnEnter(event.ControlDown(), event.ShiftDown(), 00423 event.GetX(), Size[1] - event.GetY() - 1); 00424 #endif 00425 }
void wxVTKRenderWindowInteractor::OnEraseBackground | ( | wxEraseEvent & | event | ) | [inherited] |
Definition at line 362 of file wxVTKRenderWindowInteractor.cxx.
void wxVTKRenderWindowInteractor::OnKeyDown | ( | wxKeyEvent & | event | ) | [inherited] |
Reimplemented in wxVTKRenderWindowInteractorEditContour.
Definition at line 447 of file wxVTKRenderWindowInteractor.cxx.
00448 { 00449 if (!Enabled) 00450 { 00451 return; 00452 } 00453 00454 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00455 // new style 00456 int keycode = event.GetKeyCode(); 00457 00458 00459 char key = '\0'; 00460 if ( keycode < 256 ) 00461 { 00462 // TODO: Unicode in non-Unicode mode ?? 00463 key = (char)keycode; 00464 } 00465 else//Dic 2007 00466 { 00467 if ( keycode==314 )//Real keyCode for Left ARROW and non-Unicode 00468 { 00469 key = 'L';//Left 00470 } 00471 else if( keycode==315 )//Real keyCode for Left ARROW and non-Unicode 00472 { 00473 key = 'U';//Up 00474 } 00475 else if( keycode==316 )//Real keyCode for Left ARROW and non-Unicode 00476 { 00477 key = 'R';//Right 00478 } 00479 else if( keycode==317 )//Real keyCode for Down ARROW and non-Unicode 00480 { 00481 key = 'D';//Down 00482 } 00483 else if( keycode==312 )//Real keyCode for Diagonal left down ARROW and non-Unicode 00484 { 00485 key = 'W';//Diagonal left down 00486 } 00487 else if( keycode==313 )//Real keyCode for Diagonal left up ARROW and non-Unicode 00488 { 00489 key = 'Q';//Diagonal left up 00490 } 00491 else if( keycode==366 )//Real keyCode for Diagonal right up ARROW and non-Unicode 00492 { 00493 key = 'P';//Diagonal right up 00494 } 00495 else if( keycode==367 )//Real keyCode for Diagonal right down ARROW and non-Unicode 00496 { 00497 key = 'M';//Diagonal right down 00498 } 00499 } 00500 00501 SetEventInformationFlipY(event.GetX(), event.GetY(), 00502 event.ControlDown(), event.ShiftDown(), key, 0, NULL); 00503 00504 InvokeEvent(vtkCommand::KeyPressEvent, NULL); 00505 InvokeEvent(vtkCommand::CharEvent, NULL); 00506 #else 00507 InteractorStyle->OnKeyDown(event.ControlDown(), event.ShiftDown(), 00508 event.GetKeyCode(), 1); 00509 #endif 00510 event.Skip(); 00511 }
void wxVTKRenderWindowInteractor::OnKeyUp | ( | wxKeyEvent & | event | ) | [inherited] |
Definition at line 513 of file wxVTKRenderWindowInteractor.cxx.
00514 { 00515 if (!Enabled) 00516 { 00517 return; 00518 } 00519 00520 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00521 // new style 00522 int keycode = event.GetKeyCode(); 00523 char key = '\0'; 00524 if (keycode < 256) 00525 { 00526 // TODO: Unicode in non-Unicode mode ?? 00527 key = (char)keycode; 00528 } 00529 00530 SetEventInformationFlipY(event.GetX(), event.GetY(), 00531 event.ControlDown(), event.ShiftDown(), key, 0, NULL); 00532 InvokeEvent(vtkCommand::KeyReleaseEvent, NULL); 00533 #else 00534 InteractorStyle->OnKeyUp(event.ControlDown(), event.ShiftDown(), 00535 event.GetKeyCode(), 1); 00536 #endif 00537 event.Skip(); 00538 }
void wxVTKRenderWindowInteractor::OnLeave | ( | wxMouseEvent & | event | ) | [inherited] |
Definition at line 427 of file wxVTKRenderWindowInteractor.cxx.
00428 { 00429 if (!Enabled) 00430 { 00431 return; 00432 } 00433 00434 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00435 // new style 00436 SetEventInformationFlipY(event.GetX(), event.GetY(), 00437 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL); 00438 00439 InvokeEvent(vtkCommand::LeaveEvent, NULL); 00440 #else 00441 // old style 00442 InteractorStyle->OnLeave(event.ControlDown(), event.ShiftDown(), 00443 event.GetX(), Size[1] - event.GetY() - 1); 00444 #endif 00445 }
void wxVTKRenderWindowInteractorPlus::OnLeftDClick | ( | wxMouseEvent & | event | ) |
JCP 14/05/09 wxvtkbaseview->GetInteractorStyleBaseView()->OnLeftDClick();
Definition at line 39 of file wxVTKRenderWindowInteractorPlus.cxx.
References _wxvtkbaseview, and wxVtkBaseView::GetInteractorStyleBaseView().
00040 { 00045 ((vtkInteractorStyleBaseView*)_wxvtkbaseview->GetInteractorStyleBaseView())->OnLeftDClick(); 00046 }
void wxVTKRenderWindowInteractorPlus::OnMiddleDClick | ( | wxMouseEvent & | event | ) |
JCP 14/05/09
_wxvtkbaseview->GetInteractorStyleBaseView()->OnMiddleDClick();
Definition at line 57 of file wxVTKRenderWindowInteractorPlus.cxx.
References _wxvtkbaseview, and wxVtkBaseView::GetInteractorStyleBaseView().
00058 { 00064 ((vtkInteractorStyleBaseView*)_wxvtkbaseview->GetInteractorStyleBaseView())->OnMiddleDClick(); 00065 }
void wxVTKRenderWindowInteractor::OnMotion | ( | wxMouseEvent & | event | ) | [inherited] |
Reimplemented in wxVTKRenderWindowInteractorEditContour.
Definition at line 387 of file wxVTKRenderWindowInteractor.cxx.
00388 { 00389 if (!Enabled) 00390 { 00391 return; 00392 } 00393 00394 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00395 SetEventInformationFlipY(event.GetX(), event.GetY(), 00396 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL); 00397 00398 InvokeEvent(vtkCommand::MouseMoveEvent, NULL); 00399 #else 00400 InteractorStyle->OnMouseMove(event.ControlDown(), event.ShiftDown(), 00401 event.GetX(), Size[1] - event.GetY() - 1); 00402 #endif 00403 }
void wxVTKRenderWindowInteractorPlus::OnMouseWheel | ( | wxMouseEvent & | event | ) |
JCP 14/05/09
_wxvtkbaseview->GetInteractorStyleBaseView()->OnMouseWheel();
Reimplemented from wxVTKRenderWindowInteractor.
Definition at line 67 of file wxVTKRenderWindowInteractorPlus.cxx.
References _wxvtkbaseview, and wxVtkBaseView::GetInteractorStyleBaseView().
00068 { 00074 ((vtkInteractorStyleBaseView*)_wxvtkbaseview->GetInteractorStyleBaseView())->OnMouseWheel(); 00075 }
void wxVTKRenderWindowInteractor::OnPaint | ( | wxPaintEvent & | event | ) | [inherited] |
void wxVTKRenderWindowInteractorPlus::OnRightDClick | ( | wxMouseEvent & | event | ) |
JCP 14/05/09 _wxvtkbaseview->GetInteractorStyleBaseView()->OnRightDClick();
Definition at line 48 of file wxVTKRenderWindowInteractorPlus.cxx.
References _wxvtkbaseview, and wxVtkBaseView::GetInteractorStyleBaseView().
00049 { 00054 ((vtkInteractorStyleBaseView*)_wxvtkbaseview->GetInteractorStyleBaseView())->OnRightDClick(); 00055 }
void wxVTKRenderWindowInteractor::OnSize | ( | wxSizeEvent & | event | ) | [inherited] |
void wxVTKRenderWindowInteractor::OnTimer | ( | wxTimerEvent & | event | ) | [inherited] |
void wxVTKRenderWindowInteractor::PrintSelf | ( | ostream & | os, | |
vtkIndent | indent | |||
) | [inherited] |
Definition at line 762 of file wxVTKRenderWindowInteractor.cxx.
00763 { 00764 this->Superclass::PrintSelf(os, indent); 00765 }
void wxVTKRenderWindowInteractor::Render | ( | ) | throw (char*) [inherited] |
Reimplemented in vtk3DSurfaceWidget.
Definition at line 680 of file wxVTKRenderWindowInteractor.cxx.
References wxVTKRenderWindowInteractor::GetHandleHack(), wxVTKRenderWindowInteractor::Handle, wxVTKRenderWindowInteractor::RenderAllowed, and wxVTKRenderWindowInteractor::RenderWhenDisabled.
Referenced by wxMaracasImageBrowser02::LoadData().
00681 { 00682 RenderAllowed = 1; 00683 if (!RenderWhenDisabled) 00684 { 00685 //the user doesn't want us to render when the toplevel frame 00686 //is disabled - first find the top level parent 00687 wxWindow *topParent = wxGetTopLevelParent(this); 00688 if (topParent) 00689 { 00690 //if it exists, check whether it's enabled 00691 //if it's not enabeld, RenderAllowed will be false 00692 RenderAllowed = topParent->IsEnabled(); 00693 } 00694 } 00695 00696 if (RenderAllowed) 00697 { 00698 if(Handle && (Handle == GetHandleHack()) ) 00699 { 00700 if(RenderWindow!=NULL){ 00701 RenderWindow->Render(); 00702 }else{ 00703 throw "wxVTKRenderWindowInteractor::Render(){RenderWindow not set}"; 00704 } 00705 } 00706 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 2) 00707 else if(GetHandleHack()) 00708 { 00709 //this means the user has reparented us; let's adapt to the 00710 //new situation by doing the WindowRemap dance 00711 //store the new situation 00712 if(RenderWindow!=NULL){ 00713 Handle = GetHandleHack(); 00714 RenderWindow->SetNextWindowId(reinterpret_cast<void *>(Handle)); 00715 RenderWindow->WindowRemap(); 00716 RenderWindow->Render(); 00717 } 00718 } 00719 #endif 00720 } 00721 }
void wxVTKRenderWindowInteractor::SetRenderWhenDisabled | ( | int | newValue | ) | [inherited] |
Definition at line 723 of file wxVTKRenderWindowInteractor.cxx.
References wxVTKRenderWindowInteractor::RenderWhenDisabled.
00724 { 00725 //Change value of __RenderWhenDisabled ivar. 00726 //If __RenderWhenDisabled is false (the default), this widget will not 00727 //call Render() on the RenderWindow if the top level frame (i.e. the 00728 //containing frame) has been disabled. 00729 00730 //This prevents recursive rendering during wxSafeYield() calls. 00731 //wxSafeYield() can be called during the ProgressMethod() callback of 00732 //a VTK object to have progress bars and other GUI elements updated - 00733 //it does this by disabling all windows (disallowing user-input to 00734 //prevent re-entrancy of code) and then handling all outstanding 00735 //GUI events. 00736 00737 //However, this often triggers an OnPaint() method for wxVTKRWIs, 00738 //resulting in a Render(), resulting in Update() being called whilst 00739 //still in progress. 00740 00741 RenderWhenDisabled = (bool)newValue; 00742 }
void wxVTKRenderWindowInteractor::SetStereo | ( | int | capable | ) | [virtual, inherited] |
Definition at line 748 of file wxVTKRenderWindowInteractor.cxx.
References wxVTKRenderWindowInteractor::Stereo.
void wxVTKRenderWindowInteractor::Start | ( | ) | [inherited] |
Definition at line 234 of file wxVTKRenderWindowInteractor.cxx.
void wxVTKRenderWindowInteractor::TerminateApp | ( | ) | [inline, inherited] |
Definition at line 124 of file wxVTKRenderWindowInteractor.h.
void wxVTKRenderWindowInteractor::UpdateSize | ( | int | x, | |
int | y | |||
) | [inherited] |
Definition at line 241 of file wxVTKRenderWindowInteractor.cxx.
00242 { 00243 if( RenderWindow ) 00244 { 00245 // if the size changed tell render window 00246 if ( x != Size[0] || y != Size[1] ) 00247 { 00248 // adjust our (vtkRenderWindowInteractor size) 00249 Size[0] = x; 00250 Size[1] = y; 00251 // and our RenderWindow's size 00252 RenderWindow->SetSize(x, y); 00253 } 00254 } 00255 }
wxVTKRenderWindowInteractor::vtkBooleanMacro | ( | UseCaptureMouse | , | |
int | ||||
) | [inherited] |
wxVTKRenderWindowInteractor::vtkBooleanMacro | ( | Stereo | , | |
int | ||||
) | [inherited] |
wxVTKRenderWindowInteractor::vtkGetMacro | ( | Stereo | , | |
int | ||||
) | [inherited] |
wxVTKRenderWindowInteractor::vtkSetMacro | ( | UseCaptureMouse | , | |
int | ||||
) | [inherited] |
Definition at line 28 of file wxVTKRenderWindowInteractorPlus.h.
Referenced by OnLeftDClick(), OnMiddleDClick(), OnMouseWheel(), OnRightDClick(), and wxVTKRenderWindowInteractorPlus().
int wxVTKRenderWindowInteractor::ActiveButton [protected, inherited] |
Definition at line 162 of file wxVTKRenderWindowInteractor.h.
Referenced by wxVTKRenderWindowInteractor::OnButtonDown(), and wxVTKRenderWindowInteractor::OnButtonUp().
int wxVTKRenderWindowInteractor::RenderAllowed [protected, inherited] |
Definition at line 163 of file wxVTKRenderWindowInteractor.h.
Referenced by wxVTKRenderWindowInteractor::Render().
int wxVTKRenderWindowInteractor::Stereo [protected, inherited] |
Definition at line 165 of file wxVTKRenderWindowInteractor.h.
Referenced by wxVTKRenderWindowInteractor::SetStereo().
wxTimer wxVTKRenderWindowInteractor::timer [protected, inherited] |
Definition at line 161 of file wxVTKRenderWindowInteractor.h.