#include <wxVTKRenderWindowInteractor.h>
Public Member Functions | |
| wxVTKRenderWindowInteractor () | |
| wxVTKRenderWindowInteractor (wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxWANTS_CHARS|wxNO_FULL_REPAINT_ON_RESIZE, const wxString &name=wxPanelNameStr) | |
| void | PrintSelf (ostream &os, vtkIndent indent) |
| ~wxVTKRenderWindowInteractor () | |
| 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 | OnMouseWheel (wxMouseEvent &event) |
| void | Render () |
| void | SetRenderWhenDisabled (int newValue) |
| vtkGetMacro (Stereo, int) | |
| vtkBooleanMacro (Stereo, int) | |
| virtual void | SetStereo (int capable) |
| vtkSetMacro (UseCaptureMouse, int) | |
| vtkBooleanMacro (UseCaptureMouse, int) | |
| virtual void | Refresh (bool eraseBackground=true, const wxRect *rect=NULL) |
Static Public Member Functions | |
| static wxVTKRenderWindowInteractor * | New () |
Protected Member Functions | |
| long | GetHandleHack () |
Protected Attributes | |
| wxTimer | timer |
| int | ActiveButton |
| int | RenderAllowed |
| int | Stereo |
Private Attributes | |
| long | Handle |
| bool | Created |
| int | RenderWhenDisabled |
| int | UseCaptureMouse |
Definition at line 95 of file wxVTKRenderWindowInteractor.h.
| bbwxvtk::wxVTKRenderWindowInteractor::wxVTKRenderWindowInteractor | ( | ) |
Definition at line 139 of file wxVTKRenderWindowInteractor.cxx.
00139 : vtkRenderWindowInteractor(), wxWindow() 00140 #endif //__WXGTK__ 00141 , timer(this, ID_wxVTKRenderWindowInteractor_TIMER) 00142 , ActiveButton(wxEVT_NULL) 00143 , RenderAllowed(0) 00144 , Stereo(0) 00145 , Handle(0) 00146 , Created(true) 00147 , RenderWhenDisabled(1) 00148 , UseCaptureMouse(0) 00149 { 00150 00151 this->RenderWindow = NULL; 00152 this->SetRenderWindow(vtkRenderWindow::New()); 00153 this->RenderWindow->Delete(); 00154 00155 //this->SetBackgroundColour( wxColour(255,0,255) ); 00156 }
| bbwxvtk::wxVTKRenderWindowInteractor::wxVTKRenderWindowInteractor | ( | wxWindow * | parent, | |
| wxWindowID | id, | |||
| const wxPoint & | pos = wxDefaultPosition, |
|||
| const wxSize & | size = wxDefaultSize, |
|||
| long | style = wxWANTS_CHARS | wxNO_FULL_REPAINT_ON_RESIZE, |
|||
| const wxString & | name = wxPanelNameStr | |||
| ) |
Definition at line 158 of file wxVTKRenderWindowInteractor.cxx.
00165 : vtkRenderWindowInteractor(), wxGLCanvas(parent, id, pos, size, style, name) 00166 #else 00167 : vtkRenderWindowInteractor(), wxWindow(parent, id, pos, size, style, name) 00168 #endif //__WXGTK__ 00169 , timer(this, ID_wxVTKRenderWindowInteractor_TIMER) 00170 , ActiveButton(wxEVT_NULL) 00171 , RenderAllowed(0) 00172 , Stereo(0) 00173 , Handle(0) 00174 , Created(true) 00175 , RenderWhenDisabled(1) 00176 , UseCaptureMouse(0) 00177 { 00178 00179 this->RenderWindow = NULL; 00180 this->SetRenderWindow(vtkRenderWindow::New()); 00181 this->RenderWindow->Delete(); 00182 00183 // this->SetBackgroundColour( wxColour(255,0,0) ); 00184 }
| bbwxvtk::wxVTKRenderWindowInteractor::~wxVTKRenderWindowInteractor | ( | ) |
Definition at line 186 of file wxVTKRenderWindowInteractor.cxx.
00187 { 00188 // LG : trompe la mort ! 00189 SetRenderWindow(NULL); 00190 SetReferenceCount(0); 00191 }
| wxVTKRenderWindowInteractor * bbwxvtk::wxVTKRenderWindowInteractor::New | ( | ) | [static] |
Definition at line 193 of file wxVTKRenderWindowInteractor.cxx.
00194 { 00195 // we don't make use of the objectfactory, because we're not registered 00196 return new wxVTKRenderWindowInteractor; 00197 }
| void bbwxvtk::wxVTKRenderWindowInteractor::PrintSelf | ( | ostream & | os, | |
| vtkIndent | indent | |||
| ) |
| void bbwxvtk::wxVTKRenderWindowInteractor::Initialize | ( | ) |
Definition at line 199 of file wxVTKRenderWindowInteractor.cxx.
References Enable().
00200 { 00201 int *size = RenderWindow->GetSize(); 00202 // enable everything and start rendering 00203 Enable(); 00204 //RenderWindow->Start(); 00205 00206 // set the size in the render window interactor 00207 Size[0] = size[0]; 00208 Size[1] = size[1]; 00209 00210 // this is initialized 00211 Initialized = 1; 00212 }
| void bbwxvtk::wxVTKRenderWindowInteractor::Enable | ( | ) |
Definition at line 214 of file wxVTKRenderWindowInteractor.cxx.
Referenced by Initialize().
00215 { 00216 // if already enabled then done 00217 if (Enabled) 00218 return; 00219 00220 // that's it 00221 Enabled = 1; 00222 #if defined(__WXGTK__) && defined(USE_WXGLCANVAS) 00223 SetCurrent(); 00224 #endif 00225 Modified(); 00226 }
| bool bbwxvtk::wxVTKRenderWindowInteractor::Enable | ( | bool | enable | ) |
Definition at line 228 of file wxVTKRenderWindowInteractor.cxx.
00229 { 00230 #if defined(__WXGTK__) && defined(USE_WXGLCANVAS) 00231 return wxGLCanvas::Enable(enable); 00232 #else 00233 return wxWindow::Enable(enable); 00234 #endif 00235 }
| void bbwxvtk::wxVTKRenderWindowInteractor::Disable | ( | ) |
Definition at line 237 of file wxVTKRenderWindowInteractor.cxx.
00238 { 00239 // if already disabled then done 00240 if (!Enabled) 00241 return; 00242 00243 // that's it (we can't remove the event handler like it should be...) 00244 Enabled = 0; 00245 Modified(); 00246 }
| void bbwxvtk::wxVTKRenderWindowInteractor::Start | ( | ) |
Definition at line 248 of file wxVTKRenderWindowInteractor.cxx.
00249 { 00250 // the interactor cannot control the event loop 00251 vtkErrorMacro( << "wxVTKRenderWindowInteractor::Start() " 00252 "interactor cannot control event loop."); 00253 }
| void bbwxvtk::wxVTKRenderWindowInteractor::UpdateSize | ( | int | x, | |
| int | y | |||
| ) |
Definition at line 255 of file wxVTKRenderWindowInteractor.cxx.
00256 { 00257 if( RenderWindow ) 00258 { 00259 // if the size changed tell render window 00260 if ( x != Size[0] || y != Size[1] ) 00261 { 00262 // adjust our (vtkRenderWindowInteractor size) 00263 Size[0] = x; 00264 Size[1] = y; 00265 // and our RenderWindow's size 00266 RenderWindow->SetSize(x, y); 00267 } 00268 } 00269 }
| int bbwxvtk::wxVTKRenderWindowInteractor::CreateTimer | ( | int | timertype | ) |
| int bbwxvtk::wxVTKRenderWindowInteractor::DestroyTimer | ( | ) |
| void bbwxvtk::wxVTKRenderWindowInteractor::TerminateApp | ( | ) | [inline] |
| void bbwxvtk::wxVTKRenderWindowInteractor::OnPaint | ( | wxPaintEvent & | event | ) |
| void bbwxvtk::wxVTKRenderWindowInteractor::OnEraseBackground | ( | wxEraseEvent & | event | ) |
Definition at line 376 of file wxVTKRenderWindowInteractor.cxx.
00377 { 00378 //printf("EED wxVTKRenderWindowInteractor::OnEraseBackground \n"); 00379 //turn off background erase to reduce flickering on MSW 00380 event.Skip(false); 00381 }
| void bbwxvtk::wxVTKRenderWindowInteractor::OnMotion | ( | wxMouseEvent & | event | ) |
Definition at line 401 of file wxVTKRenderWindowInteractor.cxx.
00402 { 00403 if (!Enabled) 00404 { 00405 return; 00406 } 00407 00408 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00409 SetEventInformationFlipY(event.GetX(), event.GetY(), 00410 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL); 00411 00412 InvokeEvent(vtkCommand::MouseMoveEvent, NULL); 00413 #else 00414 InteractorStyle->OnMouseMove(event.ControlDown(), event.ShiftDown(), 00415 event.GetX(), Size[1] - event.GetY() - 1); 00416 #endif 00417 }
| void bbwxvtk::wxVTKRenderWindowInteractor::OnButtonDown | ( | wxMouseEvent & | event | ) |
(VTK_MAJOR_VERSION == 3 && VTK_MINOR_VERSION == 1)
Definition at line 517 of file wxVTKRenderWindowInteractor.cxx.
References ActiveButton, UseCaptureMouse, and WX_USE_X_CAPTURE.
00518 { 00519 if (!Enabled || (ActiveButton != wxEVT_NULL)) 00520 { 00521 return; 00522 } 00523 ActiveButton = event.GetEventType(); 00524 00525 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00526 SetEventInformationFlipY(event.GetX(), event.GetY(), 00527 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL); 00528 #endif 00529 00530 if(event.RightDown()) 00531 { 00532 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00533 // new style 00534 InvokeEvent(vtkCommand::RightButtonPressEvent, NULL); 00535 #else 00536 // old style 00537 InteractorStyle->OnRightButtonDown(event.ControlDown(), event.ShiftDown(), 00538 event.GetX(), Size[1] - event.GetY() - 1); 00539 #endif 00540 } 00541 else if(event.LeftDown()) 00542 { 00543 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00544 // new style 00545 InvokeEvent(vtkCommand::LeftButtonPressEvent, NULL); 00546 #else 00547 // old style 00548 InteractorStyle->OnLeftButtonDown(event.ControlDown(), event.ShiftDown(), 00549 event.GetX(), Size[1] - event.GetY() - 1); 00550 #endif 00551 } 00552 else if(event.MiddleDown()) 00553 { 00554 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00555 // new style 00556 InvokeEvent(vtkCommand::MiddleButtonPressEvent, NULL); 00557 #else 00558 // old style 00559 InteractorStyle->OnMiddleButtonDown(event.ControlDown(), event.ShiftDown(), 00560 event.GetX(), Size[1] - event.GetY() - 1); 00561 #endif 00562 } 00563 //save the button and capture mouse until the button is released 00564 //Only if : 00565 //1. it is possible (WX_USE_X_CAPTURE) 00566 //2. user decided to. 00567 if ((ActiveButton != wxEVT_NULL) && WX_USE_X_CAPTURE && UseCaptureMouse) 00568 { 00569 CaptureMouse(); 00570 } 00571 }
| void bbwxvtk::wxVTKRenderWindowInteractor::OnButtonUp | ( | wxMouseEvent & | event | ) |
Definition at line 573 of file wxVTKRenderWindowInteractor.cxx.
References ActiveButton, UseCaptureMouse, and WX_USE_X_CAPTURE.
00574 { 00575 //EVT_xxx_DOWN == EVT_xxx_UP - 1 00576 //This is only needed if two mouse buttons are pressed at the same time. 00577 //In wxWindows 2.4 and later: better use of wxMOUSE_BTN_RIGHT or 00578 //wxEVT_COMMAND_RIGHT_CLICK 00579 if (!Enabled || (ActiveButton != (event.GetEventType()-1))) 00580 { 00581 return; 00582 } 00583 00584 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00585 SetEventInformationFlipY(event.GetX(), event.GetY(), 00586 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL); 00587 #endif 00588 00589 if(ActiveButton == wxEVT_RIGHT_DOWN) 00590 { 00591 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00592 // new style 00593 InvokeEvent(vtkCommand::RightButtonReleaseEvent, NULL); 00594 #else 00595 // old style 00596 InteractorStyle->OnRightButtonUp(event.ControlDown(), event.ShiftDown(), 00597 event.GetX(), Size[1] - event.GetY() - 1); 00598 #endif 00599 } 00600 else if(ActiveButton == wxEVT_LEFT_DOWN) 00601 { 00602 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00603 // new style 00604 InvokeEvent(vtkCommand::LeftButtonReleaseEvent, NULL); 00605 #else 00606 // old style 00607 InteractorStyle->OnLeftButtonUp(event.ControlDown(), event.ShiftDown(), 00608 event.GetX(), Size[1] - event.GetY() - 1); 00609 #endif 00610 } 00611 else if(ActiveButton == wxEVT_MIDDLE_DOWN) 00612 { 00613 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00614 // new style 00615 InvokeEvent(vtkCommand::MiddleButtonReleaseEvent, NULL); 00616 #else 00617 // old style 00618 InteractorStyle->OnMiddleButtonUp(event.ControlDown(), event.ShiftDown(), 00619 event.GetX(), Size[1] - event.GetY() - 1); 00620 #endif 00621 } 00622 //if the ActiveButton is realeased, then release mouse capture 00623 if ((ActiveButton != wxEVT_NULL) && WX_USE_X_CAPTURE && UseCaptureMouse) 00624 { 00625 ReleaseMouse(); 00626 } 00627 ActiveButton = wxEVT_NULL; 00628 }
| void bbwxvtk::wxVTKRenderWindowInteractor::OnEnter | ( | wxMouseEvent & | event | ) |
Definition at line 420 of file wxVTKRenderWindowInteractor.cxx.
00421 { 00422 if (!Enabled) 00423 { 00424 return; 00425 } 00426 00427 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00428 // new style 00429 SetEventInformationFlipY(event.GetX(), event.GetY(), 00430 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL); 00431 00432 InvokeEvent(vtkCommand::EnterEvent, NULL); 00433 #else 00434 // old style 00435 InteractorStyle->OnEnter(event.ControlDown(), event.ShiftDown(), 00436 event.GetX(), Size[1] - event.GetY() - 1); 00437 #endif 00438 }
| void bbwxvtk::wxVTKRenderWindowInteractor::OnLeave | ( | wxMouseEvent & | event | ) |
Definition at line 440 of file wxVTKRenderWindowInteractor.cxx.
00441 { 00442 if (!Enabled) 00443 { 00444 return; 00445 } 00446 00447 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00448 // new style 00449 SetEventInformationFlipY(event.GetX(), event.GetY(), 00450 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL); 00451 00452 InvokeEvent(vtkCommand::LeaveEvent, NULL); 00453 #else 00454 // old style 00455 InteractorStyle->OnLeave(event.ControlDown(), event.ShiftDown(), 00456 event.GetX(), Size[1] - event.GetY() - 1); 00457 #endif 00458 }
| void bbwxvtk::wxVTKRenderWindowInteractor::OnKeyDown | ( | wxKeyEvent & | event | ) |
Definition at line 460 of file wxVTKRenderWindowInteractor.cxx.
00461 { 00462 if (!Enabled) 00463 { 00464 return; 00465 } 00466 00467 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00468 // new style 00469 int keycode = event.GetKeyCode(); 00470 char key = '\0'; 00471 if (keycode < 256) 00472 { 00473 // TODO: Unicode in non-Unicode mode ?? 00474 key = (char)keycode; 00475 } 00476 00477 SetEventInformationFlipY(event.GetX(), event.GetY(), 00478 event.ControlDown(), event.ShiftDown(), key, 0, NULL); 00479 00480 InvokeEvent(vtkCommand::KeyPressEvent, NULL); 00481 InvokeEvent(vtkCommand::CharEvent, NULL); 00482 #else 00483 InteractorStyle->OnKeyDown(event.ControlDown(), event.ShiftDown(), 00484 event.GetKeyCode(), 1); 00485 #endif 00486 event.Skip(); 00487 }
| void bbwxvtk::wxVTKRenderWindowInteractor::OnKeyUp | ( | wxKeyEvent & | event | ) |
Definition at line 489 of file wxVTKRenderWindowInteractor.cxx.
00490 { 00491 if (!Enabled) 00492 { 00493 return; 00494 } 00495 00496 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0) 00497 // new style 00498 int keycode = event.GetKeyCode(); 00499 char key = '\0'; 00500 if (keycode < 256) 00501 { 00502 // TODO: Unicode in non-Unicode mode ?? 00503 key = (char)keycode; 00504 } 00505 00506 SetEventInformationFlipY(event.GetX(), event.GetY(), 00507 event.ControlDown(), event.ShiftDown(), key, 0, NULL); 00508 InvokeEvent(vtkCommand::KeyReleaseEvent, NULL); 00509 #else 00510 InteractorStyle->OnKeyUp(event.ControlDown(), event.ShiftDown(), 00511 event.GetKeyCode(), 1); 00512 #endif 00513 event.Skip(); 00514 }
| void bbwxvtk::wxVTKRenderWindowInteractor::OnTimer | ( | wxTimerEvent & | event | ) |
| void bbwxvtk::wxVTKRenderWindowInteractor::OnSize | ( | wxSizeEvent & | event | ) |
| void bbwxvtk::wxVTKRenderWindowInteractor::OnMouseWheel | ( | wxMouseEvent & | event | ) |
Definition at line 630 of file wxVTKRenderWindowInteractor.cxx.
00631 { 00632 // Mouse wheel was only added after VTK 4.4 (I think...) 00633 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 2) 00634 // new style 00635 //Set vtk event information ... The numebr of wheel rotations is stored in 00636 //the x varible. y varible is zero 00637 SetEventInformationFlipY(event.GetWheelRotation() / event.GetWheelDelta(), 0, 00638 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL); 00639 if(event.GetWheelRotation() > 0) 00640 { 00641 //Send event to VTK 00642 // EED 00643 // InvokeEvent(vtkCommand::MouseWheelForwardEvent, NULL); 00644 } 00645 else 00646 { 00647 //Send event to VTK 00648 // EED 00649 // InvokeEvent(vtkCommand::MouseWheelBackwardEvent, NULL); 00650 } 00651 #endif 00652 00653 }
| void bbwxvtk::wxVTKRenderWindowInteractor::Render | ( | ) |
Definition at line 656 of file wxVTKRenderWindowInteractor.cxx.
References GetHandleHack(), Handle, RenderAllowed, and RenderWhenDisabled.
Referenced by bbwxvtk::Viewer3DWidget::Update(), bbwxvtk::Viewer2DWidget::UpdateView(), and bbwxvtk::Viewer2DWidget::Viewer2DWidget().
00657 { 00658 RenderAllowed = 1; 00659 if (!RenderWhenDisabled) 00660 { 00661 //the user doesn't want us to render when the toplevel frame 00662 //is disabled - first find the top level parent 00663 wxWindow *topParent = wxGetTopLevelParent(this); 00664 if (topParent) 00665 { 00666 //if it exists, check whether it's enabled 00667 //if it's not enabeld, RenderAllowed will be false 00668 RenderAllowed = topParent->IsEnabled(); 00669 } 00670 } 00671 00672 if (RenderAllowed) 00673 { 00674 if(Handle && (Handle == GetHandleHack()) ) 00675 { 00676 RenderWindow->Render(); 00677 } 00678 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 2) 00679 else if(GetHandleHack()) 00680 { 00681 //this means the user has reparented us; let's adapt to the 00682 //new situation by doing the WindowRemap dance 00683 //store the new situation 00684 Handle = GetHandleHack(); 00685 RenderWindow->SetNextWindowId(reinterpret_cast<void *>(Handle)); 00686 RenderWindow->WindowRemap(); 00687 RenderWindow->Render(); 00688 } 00689 #endif 00690 } 00691 }
| void bbwxvtk::wxVTKRenderWindowInteractor::SetRenderWhenDisabled | ( | int | newValue | ) |
Definition at line 693 of file wxVTKRenderWindowInteractor.cxx.
References RenderWhenDisabled.
00694 { 00695 //Change value of __RenderWhenDisabled ivar. 00696 //If __RenderWhenDisabled is false (the default), this widget will not 00697 //call Render() on the RenderWindow if the top level frame (i.e. the 00698 //containing frame) has been disabled. 00699 00700 //This prevents recursive rendering during wxSafeYield() calls. 00701 //wxSafeYield() can be called during the ProgressMethod() callback of 00702 //a VTK object to have progress bars and other GUI elements updated - 00703 //it does this by disabling all windows (disallowing user-input to 00704 //prevent re-entrancy of code) and then handling all outstanding 00705 //GUI events. 00706 00707 //However, this often triggers an OnPaint() method for wxVTKRWIs, 00708 //resulting in a Render(), resulting in Update() being called whilst 00709 //still in progress. 00710 00711 RenderWhenDisabled = (bool)newValue; 00712 }
| bbwxvtk::wxVTKRenderWindowInteractor::vtkGetMacro | ( | Stereo | , | |
| int | ||||
| ) |
| bbwxvtk::wxVTKRenderWindowInteractor::vtkBooleanMacro | ( | Stereo | , | |
| int | ||||
| ) |
| void bbwxvtk::wxVTKRenderWindowInteractor::SetStereo | ( | int | capable | ) | [virtual] |
Definition at line 718 of file wxVTKRenderWindowInteractor.cxx.
References Stereo.
00719 { 00720 if (Stereo != capable) 00721 { 00722 Stereo = capable; 00723 RenderWindow->StereoCapableWindowOn(); 00724 RenderWindow->SetStereoTypeToCrystalEyes(); 00725 Modified(); 00726 } 00727 }
| bbwxvtk::wxVTKRenderWindowInteractor::vtkSetMacro | ( | UseCaptureMouse | , | |
| int | ||||
| ) |
| bbwxvtk::wxVTKRenderWindowInteractor::vtkBooleanMacro | ( | UseCaptureMouse | , | |
| int | ||||
| ) |
| void bbwxvtk::wxVTKRenderWindowInteractor::Refresh | ( | bool | eraseBackground = true, |
|
| const wxRect * | rect = NULL | |||
| ) | [virtual] |
Definition at line 738 of file wxVTKRenderWindowInteractor.cxx.
Referenced by bbwxvtk::Viewer2DWidget::Viewer2DWidget().
| long bbwxvtk::wxVTKRenderWindowInteractor::GetHandleHack | ( | ) | [protected] |
Definition at line 310 of file wxVTKRenderWindowInteractor.cxx.
Referenced by Render().
00311 { 00312 //helper function to hide the MSW vs GTK stuff 00313 long handle_tmp = 0; 00314 00315 // __WXMSW__ is for Win32 00316 //__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) 00317 // __WXGTK__ is for both gtk 1.2.x and gtk 2.x 00318 #if defined(__WXMSW__) || defined(__WXMAC__) 00319 handle_tmp = (long)this->GetHandle(); 00320 #endif //__WXMSW__ 00321 00322 //__WXCOCOA__ stands for using the objective-c Cocoa API 00323 #ifdef __WXCOCOA__ 00324 // Here is how to find the NSWindow 00325 wxTopLevelWindow* toplevel = dynamic_cast<wxTopLevelWindow*>( 00326 wxGetTopLevelParent( this ) ); 00327 if (toplevel != NULL ) 00328 { 00329 handle_tmp = (long)toplevel->GetNSWindow(); 00330 } 00331 // The NSView will be deducted from 00332 // [(NSWindow*)Handle contentView] 00333 // if only I knew how to write that in c++ 00334 #endif //__WXCOCOA__ 00335 00336 // Find and return the actual X-Window. 00337 #if defined(__WXGTK__) || defined(__WXX11__) 00338 return (long)GetXWindow(this); 00339 #endif 00340 00341 //#ifdef __WXMOTIF__ 00342 // handle_tmp = (long)this->GetXWindow(); 00343 //#endif 00344 00345 return handle_tmp; 00346 }
wxTimer bbwxvtk::wxVTKRenderWindowInteractor::timer [protected] |
Definition at line 170 of file wxVTKRenderWindowInteractor.h.
int bbwxvtk::wxVTKRenderWindowInteractor::ActiveButton [protected] |
Definition at line 171 of file wxVTKRenderWindowInteractor.h.
Referenced by OnButtonDown(), and OnButtonUp().
int bbwxvtk::wxVTKRenderWindowInteractor::RenderAllowed [protected] |
int bbwxvtk::wxVTKRenderWindowInteractor::Stereo [protected] |
long bbwxvtk::wxVTKRenderWindowInteractor::Handle [private] |
bool bbwxvtk::wxVTKRenderWindowInteractor::Created [private] |
Definition at line 178 of file wxVTKRenderWindowInteractor.h.
int bbwxvtk::wxVTKRenderWindowInteractor::RenderWhenDisabled [private] |
Definition at line 179 of file wxVTKRenderWindowInteractor.h.
Referenced by Render(), and SetRenderWhenDisabled().
int bbwxvtk::wxVTKRenderWindowInteractor::UseCaptureMouse [private] |
Definition at line 180 of file wxVTKRenderWindowInteractor.h.
Referenced by OnButtonDown(), and OnButtonUp().
1.5.6