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

Reply via email to