diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-08-02 10:12:55 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-08-02 11:42:23 +0100 |
commit | 3b35bcf25fce566f91d084574650181ea791dff8 (patch) | |
tree | 6c88c34861607186707f2d6940fec81d99c9c223 /include/vcl/builder.hxx | |
parent | 0ac1e2ad19d4fdb46dcf54f67db2df081f4675bb (diff) |
split out VclBuilder static methods
Change-Id: Ic94b39351c9a6131fb61883a98ae9e3ee60ad119
Diffstat (limited to 'include/vcl/builder.hxx')
-rw-r--r-- | include/vcl/builder.hxx | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx index b2f6c94ca5e4..6d1fe7eed0a2 100644 --- a/include/vcl/builder.hxx +++ b/include/vcl/builder.hxx @@ -82,30 +82,12 @@ public: //release ownership of pWindow, i.e. don't delete it void drop_ownership(const vcl::Window *pWindow); - //apply the properties of rProps to pWindow - static void set_properties(vcl::Window *pWindow, const stringmap &rProps); - - //Convert _ gtk markup to ~ vcl markup - static OUString convertMnemonicMarkup(const OUString &rIn); - - static OUString extractCustomProperty(stringmap &rMap); - static FieldUnit detectUnit(OUString const&); - - static bool extractDropdown(stringmap &rMap); - - //add a default value of 25 width-chars to a map if width-chars not set - static void ensureDefaultWidthChars(VclBuilder::stringmap &rMap); - //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(std::vector< vcl::Window*>& rChilds, bool bIsButtonBox); - static void reorderWithinParent(vcl::Window &rWindow, sal_uInt16 nNewPosition); - /// return UI-File name (without '.ui') const OString& getUIFile() const { @@ -399,6 +381,27 @@ private: void delete_by_window(vcl::Window *pWindow); }; +namespace BuilderUtils +{ + //apply the properties of rProps to pWindow + VCL_DLLPUBLIC void set_properties(vcl::Window *pWindow, const VclBuilder::stringmap &rProps); + + //Convert _ gtk markup to ~ vcl markup + VCL_DLLPUBLIC OUString convertMnemonicMarkup(const OUString &rIn); + + VCL_DLLPUBLIC OUString extractCustomProperty(VclBuilder::stringmap &rMap); + VCL_DLLPUBLIC FieldUnit detectUnit(OUString const&); + + VCL_DLLPUBLIC bool extractDropdown(VclBuilder::stringmap &rMap); + + //add a default value of 25 width-chars to a map if width-chars not set + VCL_DLLPUBLIC void ensureDefaultWidthChars(VclBuilder::stringmap &rMap); + + //Helpers to retrofit all the existing code to the builder + VCL_DLLPUBLIC void reorderWithinParent(std::vector< vcl::Window*>& rChilds, bool bIsButtonBox); + VCL_DLLPUBLIC void reorderWithinParent(vcl::Window &rWindow, sal_uInt16 nNewPosition); +} + template <typename T> inline T* VclBuilder::get(VclPtr<T>& ret, const OString& sID) { |