LibreOffice Module sd (master) 1
|
This simple class is responsible for putting the form shell above or below the main view shell on the shell stack maintained by the ObjectBarManager. More...
#include <FormShellManager.hxx>
Public Member Functions | |
FormShellManager (ViewShellBase &rBase) | |
virtual | ~FormShellManager () override |
void | SetFormShell (FmFormShell *pFormShell) |
Typically called by a ShellFactory. More... | |
FmFormShell * | GetFormShell () |
Return the form shell last set with SetFormShell(). More... | |
Public Member Functions inherited from SfxListener | |
SfxListener () | |
SfxListener (const SfxListener &rCopy) | |
virtual | ~SfxListener () COVERITY_NOEXCEPT_FALSE |
void | StartListening (SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected) |
void | EndListening (SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false) |
void | EndListeningAll () |
bool | IsListening (SfxBroadcaster &rBroadcaster) const |
sal_uInt16 | GetBroadcasterCount () const |
SfxBroadcaster * | GetBroadcasterJOE (sal_uInt16 nNo) const |
virtual void | Notify (SfxBroadcaster &rBC, const SfxHint &rHint) |
void | RemoveBroadcaster_Impl (SfxBroadcaster &rBC) |
virtual bool | IsSdrView () const |
Private Member Functions | |
void | RegisterAtCenterPane () |
Register at window of center pane and at the form shell that represents the form tool bar. More... | |
void | UnregisterAtCenterPane () |
Unregister the listeners that were registered in RegisterAtCenterPane(). More... | |
DECL_LINK (WindowEventHandler, VclWindowEvent &, void) | |
This call back is called by the application window (among others) when the window gets the focus. More... | |
DECL_LINK (ConfigurationUpdateHandler, ::sd::tools::EventMultiplexerEvent &, void) | |
This call back is called when view in the center pane is replaced. More... | |
DECL_LINK (FormControlActivated, LinkParamNone *, void) | |
This call back is called by the form shell when it gets the focus. More... | |
virtual void | Notify (SfxBroadcaster &rBC, const SfxHint &rHint) override |
This method is called by the form shell when that is destroyed. More... | |
void | ImplDestroy () |
dtor body More... | |
Private Attributes | |
ViewShellBase & | mrBase |
FmFormShell * | mpFormShell |
Ownership of the form shell lies with the ViewShellManager. More... | |
bool | mbFormShellAboveViewShell |
Remember whether the form shell is currently above or below the main view shell. More... | |
ViewShellManager::SharedShellFactory | mpSubShellFactory |
The factory is remembered so that it removed from the ViewShellManager when the FormShellManager is destroyed. More... | |
bool | mbIsMainViewChangePending |
VclPtr< vcl::Window > | mpMainViewShellWindow |
This simple class is responsible for putting the form shell above or below the main view shell on the shell stack maintained by the ObjectBarManager.
The form shell is moved above the view shell when the form shell is activated, i.e. the FormControlActivated handler is called.
It is moved below the view shell when the main window of the main view shell is focused.
The form shell is created and destroyed by the ViewShellManager by using a factory object provided by the FormShellManager.
Definition at line 56 of file FormShellManager.hxx.
sd::FormShellManager::FormShellManager | ( | ViewShellBase & | rBase | ) |
Definition at line 52 of file FormShellManager.cxx.
References sd::ViewShellBase::GetEventMultiplexer(), LINK, mrBase, and RegisterAtCenterPane().
|
overridevirtual |
Definition at line 84 of file FormShellManager.cxx.
References ImplDestroy(), and suppress_fun_call_w_exception.
|
private |
This call back is called when view in the center pane is replaced.
When this happens then we unregister at the window of the old and register at the window of the new shell.
|
private |
This call back is called by the form shell when it gets the focus.
In this case the form shell is moved to the top of the shell stack.
|
private |
This call back is called by the application window (among others) when the window gets the focus.
In this case the form shell is moved to the bottom of the shell stack.
|
inline |
Return the form shell last set with SetFormShell().
Definition at line 75 of file FormShellManager.hxx.
References mpFormShell.
|
private |
dtor body
Definition at line 67 of file FormShellManager.cxx.
References sd::ViewShellBase::GetEventMultiplexer(), sd::ViewShellBase::GetMainViewShell(), sd::ViewShellBase::GetViewShellManager(), LINK, mpSubShellFactory, mrBase, SetFormShell(), and UnregisterAtCenterPane().
Referenced by ~FormShellManager().
|
overrideprivatevirtual |
This method is called by the form shell when that is destroyed.
It acts as a last resort against referencing a dead form shell. With the factory working properly this method should not be necessary (and may be removed in the future.)
Reimplemented from SfxListener.
Definition at line 266 of file FormShellManager.cxx.
References SfxHint::GetId(), sd::ViewShellBase::GetMainViewShell(), sd::ViewShellBase::GetViewShellManager(), mpFormShell, and mrBase.
|
private |
Register at window of center pane and at the form shell that represents the form tool bar.
The former informs this manager about the deselection of the form shell. The later informs about its selection.
Definition at line 131 of file FormShellManager.cxx.
References sd::ViewShell::GetActiveWindow(), sd::ViewShellBase::GetMainViewShell(), sd::ViewShell::GetShellType(), sd::ViewShellBase::GetViewShellManager(), LINK, mpMainViewShellWindow, mpSubShellFactory, mrBase, and sd::ViewShell::ST_SLIDE_SORTER.
Referenced by FormShellManager().
void sd::FormShellManager::SetFormShell | ( | FmFormShell * | pFormShell | ) |
Typically called by a ShellFactory.
It tells the FormShellManager which form shell to manage.
pFormShell | This may be <NULL> to disconnect the ViewShellManager from the form shell. |
Definition at line 89 of file FormShellManager.cxx.
References SfxListener::EndListening(), FmFormShell::GetFormView(), sd::ViewShellBase::GetMainViewShell(), sd::ViewShell::GetView(), sd::ViewShellBase::GetViewShellManager(), LINK, mbFormShellAboveViewShell, mpFormShell, mrBase, FmFormShell::SetControlActivationHandler(), FmFormShell::SetView(), and SfxListener::StartListening().
Referenced by ImplDestroy(), and UnregisterAtCenterPane().
|
private |
Unregister the listeners that were registered in RegisterAtCenterPane().
Definition at line 161 of file FormShellManager.cxx.
References sd::ViewShellBase::GetMainViewShell(), sd::ViewShellBase::GetViewShellManager(), LINK, mpMainViewShellWindow, mpSubShellFactory, mrBase, and SetFormShell().
Referenced by ImplDestroy().
|
private |
Remember whether the form shell is currently above or below the main view shell.
Definition at line 89 of file FormShellManager.hxx.
Referenced by SetFormShell().
|
private |
Definition at line 96 of file FormShellManager.hxx.
|
private |
Ownership of the form shell lies with the ViewShellManager.
This reference is kept so that the FormShellManager can detect when a new form shell is passed to SetFormShell().
Definition at line 84 of file FormShellManager.hxx.
Referenced by GetFormShell(), Notify(), and SetFormShell().
|
private |
Definition at line 98 of file FormShellManager.hxx.
Referenced by RegisterAtCenterPane(), and UnregisterAtCenterPane().
|
private |
The factory is remembered so that it removed from the ViewShellManager when the FormShellManager is destroyed.
Definition at line 94 of file FormShellManager.hxx.
Referenced by ImplDestroy(), RegisterAtCenterPane(), and UnregisterAtCenterPane().
|
private |
Definition at line 78 of file FormShellManager.hxx.
Referenced by FormShellManager(), ImplDestroy(), Notify(), RegisterAtCenterPane(), SetFormShell(), and UnregisterAtCenterPane().