diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-01-13 21:43:27 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-01-14 21:31:32 +0900 |
commit | 1049511c0c5d881df4ba8042744d63d37878296f (patch) | |
tree | b300e1edd156be3f6124313e462ce9ddc6aba3e8 /include/sfx2/infobar.hxx | |
parent | 1149232c70d3f0383984091df597f3419045ba19 (diff) |
infobar: add buttons one by one with addButton
Change-Id: I5c9da630fe800df8da8ff32d7bb3e6b19fc37a8d
Diffstat (limited to 'include/sfx2/infobar.hxx')
-rw-r--r-- | include/sfx2/infobar.hxx | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/include/sfx2/infobar.hxx b/include/sfx2/infobar.hxx index ee92d398e674..14c680f37885 100644 --- a/include/sfx2/infobar.hxx +++ b/include/sfx2/infobar.hxx @@ -51,15 +51,19 @@ class SfxInfoBarWindow : public vcl::Window boost::ptr_vector<PushButton> m_aActionBtns; public: - SfxInfoBarWindow( vcl::Window* parent, const OUString& sId, - const OUString& sMessage, - std::vector< PushButton* > aButtons ); + SfxInfoBarWindow(vcl::Window* parent, const OUString& sId, const OUString& sMessage); virtual ~SfxInfoBarWindow( ); virtual const OUString& getId() const { return m_sId; } virtual void Paint( const Rectangle& ) SAL_OVERRIDE; virtual void Resize( ) SAL_OVERRIDE; + /** Add button to Infobar. + * Infobar takes ownership of the button so the button is + * destroyed when the infobar gets destroyed. + */ + void addButton(PushButton* pButton); + private: DECL_LINK( CloseHandler, void* ); }; @@ -71,14 +75,14 @@ class SfxInfoBarContainerWindow : public vcl::Window boost::ptr_vector<SfxInfoBarWindow> m_pInfoBars; public: - SfxInfoBarContainerWindow( SfxInfoBarContainerChild* pChildWin ); + SfxInfoBarContainerWindow(SfxInfoBarContainerChild* pChildWin); virtual ~SfxInfoBarContainerWindow( ); - void appendInfoBar( const OUString& sId, const OUString& sMessage, std::vector< PushButton* > aButtons ); - SfxInfoBarWindow* getInfoBar( const OUString& sId ); - void removeInfoBar( SfxInfoBarWindow* pInfoBar ); + SfxInfoBarWindow* appendInfoBar(const OUString& sId, const OUString& sMessage); + SfxInfoBarWindow* getInfoBar(const OUString& sId); + void removeInfoBar(SfxInfoBarWindow* pInfoBar); - virtual void Resize( ) SAL_OVERRIDE; + virtual void Resize() SAL_OVERRIDE; }; |