Managed to get it from GetWindows()->at(0) From: mikhail.pukhli...@outlook.com To: sascha.zel...@gmail.com; mitk-users@lists.sourceforge.net Date: Wed, 11 Nov 2015 11:36:55 +0400 Subject: Re: [mitk-users] is it possible to know active perspective
Thank you! But I also need it inside ::PostWindowCreate And on this stage berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow()->GetActivePage() doesn't exist and fails - is it possible to know which perspective will be loaded? Subject: Re: [mitk-users] is it possible to know active perspective To: c.g...@dkfz-heidelberg.de; mikhail.pukhli...@outlook.com; mitk-users@lists.sourceforge.net From: sascha.zel...@gmail.com Date: Tue, 10 Nov 2015 18:18:54 +0100 Hi, from within a class inheriting from IWorkbenchPart (all views and editors) you can call GetSite() and use the returned object to query for all sorts of things in the Workgench, e.g.: GetSite()->GetPage()->GetPerspective() will return a descriptor for the current perspective or null. If you need to react to perspective changes, you need a perspective listener. I suggest to browse through the interface classes and check the available API. Cheers, Sascha On 11/10/2015 02:26 PM, Goch, Caspar Jonas wrote: Hi, the berry::WorkbenchPage has the function /** * Returns the active perspective for the page, <code>null</code> if * none. */ SmartPointer<Perspective> GetActivePerspective(); Does this work for you or are there some other constraints? Best, Caspar Von: Pukhlikov Mikhail [mailto:mikhail.pukhli...@outlook.com] Gesendet: Dienstag, 10. November 2015 14:19 An: mitk-users@lists.sourceforge.net Betreff: [mitk-users] is it possible to know active perspective Hello Is it possible to get/detect currently active perspective? Thank you! ------------------------------------------------------------------------------ _______________________________________________ mitk-users mailing list mitk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mitk-users ------------------------------------------------------------------------------ _______________________________________________ mitk-users mailing list mitk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mitk-users
------------------------------------------------------------------------------
_______________________________________________ mitk-users mailing list mitk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mitk-users