diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-05-03 09:48:27 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-05-03 09:49:04 +0100 |
commit | ba69c0851b99a0f063e0f82fe93f22db25f65de8 (patch) | |
tree | 623fa72798d400b15f9543a9aecaa1c23ad02800 /include | |
parent | 2e2e1fecd5768829d6c0a2133206d2d740b941af (diff) |
implement native button order for messageboxes
Change-Id: I85d0991da3d2a1efa9d5c15569164d8bd2194356
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/builder.hxx | 10 | ||||
-rw-r--r-- | include/vcl/layout.hxx | 6 |
2 files changed, 12 insertions, 4 deletions
diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx index fc7a28690bc4..9ad812e7aa54 100644 --- a/include/vcl/builder.hxx +++ b/include/vcl/builder.hxx @@ -290,9 +290,14 @@ public: static OString extractCustomProperty(stringmap &rMap); - //see m_aDeferredProperties + //see m_aDeferredProperties, you need this for toplevel dialogs + //which build themselves from their ctor. The properties on + //the top level are stored in m_aDeferredProperties and need + //to be applied post ctor void setDeferredProperties(); + //Helpers to retrofit all the existing code to the builder + static void reorderWithinParent(Window &rWindow, sal_uInt16 nNewPosition); private: Window *insertObject(Window *pParent, const OString &rClass, const OString &rID, stringmap &rProps, stringmap &rPangoAttributes, @@ -350,9 +355,6 @@ private: void cleanupWidgetOwnScrolling(Window *pScrollParent, Window *pWindow, stringmap &rMap); void set_response(OString sID, short nResponse); - - //Helpers to retrofit all the existing code to the builder - static void reorderWithinParent(Window &rWindow, sal_uInt16 nNewPosition); }; diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx index f45fcb239089..5237c72c9bce 100644 --- a/include/vcl/layout.hxx +++ b/include/vcl/layout.hxx @@ -61,6 +61,7 @@ class VCL_DLLPUBLIC VclBox : public VclContainer { protected: bool m_bHomogeneous; + bool m_bVerticalContainer; int m_nSpacing; public: VclBox(Window *pParent, bool bHomogeneous, int nSpacing) @@ -112,6 +113,7 @@ public: VclVBox(Window *pParent, bool bHomogeneous = false, int nSpacing = 0) : VclBox(pParent, bHomogeneous, nSpacing) { + m_bVerticalContainer = true; } protected: virtual long getPrimaryDimension(const Size &rSize) const @@ -158,6 +160,7 @@ public: VclHBox(Window *pParent, bool bHomogeneous = false, int nSpacing = 0) : VclBox(pParent, bHomogeneous, nSpacing) { + m_bVerticalContainer = false; } protected: virtual long getPrimaryDimension(const Size &rSize) const @@ -225,6 +228,7 @@ public: return m_eLayoutStyle; } virtual bool set_property(const OString &rKey, const OString &rValue); + void sort_native_button_order(); protected: virtual Size calculateRequisition() const; virtual void setAllocation(const Size &rAllocation); @@ -248,6 +252,7 @@ public: VclVButtonBox(Window *pParent, int nSpacing = 0) : VclButtonBox(pParent, nSpacing) { + m_bVerticalContainer = true; } protected: virtual long getPrimaryDimension(const Size &rSize) const @@ -294,6 +299,7 @@ public: VclHButtonBox(Window *pParent, int nSpacing = 0) : VclButtonBox(pParent, nSpacing) { + m_bVerticalContainer = false; } protected: virtual long getPrimaryDimension(const Size &rSize) const |