summaryrefslogtreecommitdiff
path: root/include/sfx2
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-02-01 10:14:59 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-02-01 10:29:37 +0000
commite78be1c18fc0a3f893023e3086d8cdb5e6d5a6b9 (patch)
tree8c9c6e46415a11d0ef5be3fc90dfb7046378306b /include/sfx2
parentbbd34216dca07bb37b9188147c42e64bbf875d54 (diff)
InfoBar: Introduce different types
Makes it easier to push various infobars without specifiying the colors manually. Change-Id: I0f861ba02409a42ba2ae767a1ca7634eaf0e7aef Reviewed-on: https://gerrit.libreoffice.org/33777 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'include/sfx2')
-rw-r--r--include/sfx2/infobar.hxx17
-rw-r--r--include/sfx2/viewfrm.hxx5
2 files changed, 17 insertions, 5 deletions
diff --git a/include/sfx2/infobar.hxx b/include/sfx2/infobar.hxx
index 97671a968f05..3043a2f7c0b9 100644
--- a/include/sfx2/infobar.hxx
+++ b/include/sfx2/infobar.hxx
@@ -69,15 +69,18 @@ class SfxInfoBarWindow : public vcl::Window
*/
void addButton(PushButton* pButton);
- // Colors
- static basegfx::BColor getSuccessColor();
- static basegfx::BColor getDangerColor();
- static basegfx::BColor getWarningColor();
-
private:
DECL_LINK( CloseHandler, Button*, void );
};
+
+enum class InfoBarType {
+ Info,
+ Success,
+ Warning,
+ Danger
+};
+
class SfxInfoBarContainerWindow : public vcl::Window
{
private:
@@ -91,6 +94,10 @@ class SfxInfoBarContainerWindow : public vcl::Window
VclPtr<SfxInfoBarWindow> appendInfoBar(const OUString& sId,
const OUString& sMessage,
+ InfoBarType aInfoBarType,
+ WinBits nMessageStyle);
+ VclPtr<SfxInfoBarWindow> appendInfoBar(const OUString& sId,
+ const OUString& sMessage,
const basegfx::BColor* pBackgroundColor,
const basegfx::BColor* pForegroundColor,
const basegfx::BColor* pMessageColor,
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index ed8a994bc741..1ae2a58ba157 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -48,6 +48,7 @@ class Point;
class Size;
class SfxChildWindow;
class SfxInfoBarWindow;
+enum class InfoBarType;
namespace sfx2
{
@@ -172,6 +173,10 @@ public:
*/
VclPtr<SfxInfoBarWindow> AppendInfoBar(const OUString& sId,
const OUString& sMessage,
+ InfoBarType aInfoBarType,
+ WinBits nMessageStyle = 0);
+ VclPtr<SfxInfoBarWindow> AppendInfoBar(const OUString& sId,
+ const OUString& sMessage,
const basegfx::BColor* pBackgroundColor = nullptr,
const basegfx::BColor* pForegroundColor = nullptr,
const basegfx::BColor* pMessageColor = nullptr,