summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-05-28 11:47:28 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-05-29 14:39:56 +0100
commitb2d08d759ee755cb5722553e01fb6d007ac9ffbe (patch)
tree78f090a64d417f630d4a4cf20455bb1fd66d0b3d /include
parentd4116a4f66ce20b492c143606b67d5eb9ee2fc09 (diff)
convert more queryboxes to new message box replacement
Change-Id: Ice41a86e17d5cbee784e239224b640ea4378ac36
Diffstat (limited to 'include')
-rw-r--r--include/svx/dialogs.hrc3
-rw-r--r--include/svx/hdft.hxx24
-rw-r--r--include/vcl/layout.hxx17
-rw-r--r--include/vcl/vclenum.hxx4
4 files changed, 42 insertions, 6 deletions
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index e714c3941fd9..24279aafc878 100644
--- a/include/svx/dialogs.hrc
+++ b/include/svx/dialogs.hrc
@@ -155,9 +155,6 @@
//---------------------------------------------------------------------
-// ResId fuer die PageDialog
-#define RID_SVXQBX_DELETE_HEADFOOT (RID_SVX_START + 28)
-
// ResId's fuer Dialoge aus StarDraw
#define RID_SVXSW_FRAMEPOSITIONS (RID_SVX_START + 289)
diff --git a/include/svx/hdft.hxx b/include/svx/hdft.hxx
index 3af1316aba10..4a40479f2232 100644
--- a/include/svx/hdft.hxx
+++ b/include/svx/hdft.hxx
@@ -22,10 +22,10 @@
#include <sfx2/tabdlg.hxx>
#include <vcl/fixed.hxx>
-
#include <vcl/field.hxx>
-
#include <vcl/group.hxx>
+#include <vcl/layout.hxx>
+
#include <svx/pagectrl.hxx>
#include "svx/svxdllapi.h"
@@ -120,6 +120,26 @@ private:
SVX_DLLPRIVATE SvxFooterPage( Window* pParent, const SfxItemSet& rSet );
};
+class SVX_DLLPUBLIC DeleteHeaderDialog : public MessageDialog
+{
+public:
+ DeleteHeaderDialog(Window *pParent)
+ : MessageDialog(pParent, "DeleteHeaderDialog",
+ "svx/ui/deleteheaderdialog.ui")
+ {
+ }
+};
+
+class SVX_DLLPUBLIC DeleteFooterDialog : public MessageDialog
+{
+public:
+ DeleteFooterDialog(Window *pParent)
+ : MessageDialog(pParent, "DeleteFooterDialog",
+ "svx/ui/deletefooterdialog.ui")
+ {
+ }
+};
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index 5237c72c9bce..2b8fa8abb574 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -647,18 +647,33 @@ public:
bool set_property(const OString &rKey, const OString &rValue);
};
+enum VclButtonsType
+{
+ VCL_BUTTONS_NONE,
+ VCL_BUTTONS_OK,
+ VCL_BUTTONS_CLOSE,
+ VCL_BUTTONS_CANCEL,
+ VCL_BUTTONS_YES_NO,
+ VCL_BUTTONS_OK_CANCEL
+};
+
class VCL_DLLPUBLIC MessageDialog : public Dialog
{
private:
+ VclButtonsType m_eType;
VclGrid* m_pGrid;
FixedImage* m_pImage;
VclMultiLineEdit* m_pPrimaryMessage;
VclMultiLineEdit* m_pSecondaryMessage;
+ std::vector<PushButton*> m_aOwnedButtons;
+ std::map<const Window*, short> m_aResponses;
OUString m_sPrimaryString;
OUString m_sSecondaryString;
DECL_DLLPRIVATE_LINK(ButtonHdl, Button *);
- void setButtonHandlers();
+ void setButtonHandlers(VclButtonBox *pButtonBox);
+ short get_response(const Window *pWindow) const;
public:
+
MessageDialog(Window* pParent, WinBits nStyle);
MessageDialog(Window* pParent, const OString& rID, const OUString& rUIXMLDescription);
virtual bool set_property(const OString &rKey, const OString &rValue);
diff --git a/include/vcl/vclenum.hxx b/include/vcl/vclenum.hxx
index d37b11b71881..f0ea2fca77fe 100644
--- a/include/vcl/vclenum.hxx
+++ b/include/vcl/vclenum.hxx
@@ -143,6 +143,10 @@ enum VclResponseType
RET_NO = 3,
RET_RETRY = 4,
RET_IGNORE = 5,
+ RET_ACCEPT = 6,
+ RET_CLOSE = 7,
+ RET_APPLY = 8,
+ RET_NONE = 9,
RET_HELP = 10
};