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: [email protected]; [email protected];
[email protected]
From: [email protected]
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:[email protected]]
Gesendet: Dienstag, 10. November 2015 14:19
An: [email protected]
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users
------------------------------------------------------------------------------
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users