summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-09-30 14:44:37 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-09-30 16:09:56 +0100
commita48cf78fab4a283ef43c091e8c324c968377f9db (patch)
tree53e1317b48d82d7df1c7ace695eaa6391aa45079 /include
parentdbd6ae7dfdd292f049bbed5beb659f99e963c47b (diff)
merge queue_layout and queue_resize
so that any window derived class, and not just dialogs, can trigger layouting of their children. Merge together the handful of hacked-up impls of this. Do that then for the sidebar PanelLayout so that when the label of the custom animation frame changes that the frame allocates enough space for the new label to display fully Change-Id: I9a95f6c3f60cd6cea47656e66cb9ffcc154a3a5a
Diffstat (limited to 'include')
-rw-r--r--include/svtools/wizdlg.hxx2
-rw-r--r--include/svx/sidebar/PanelLayout.hxx11
-rw-r--r--include/vcl/dialog.hxx2
-rw-r--r--include/vcl/layout.hxx2
-rw-r--r--include/vcl/tabctrl.hxx2
-rw-r--r--include/vcl/window.hxx2
6 files changed, 17 insertions, 4 deletions
diff --git a/include/svtools/wizdlg.hxx b/include/svtools/wizdlg.hxx
index 82212b3208c7..92a26ee376c4 100644
--- a/include/svtools/wizdlg.hxx
+++ b/include/svtools/wizdlg.hxx
@@ -263,7 +263,7 @@ public:
virtual void ActivatePage();
virtual long DeactivatePage();
- virtual void queue_layout();
+ virtual void queue_resize();
sal_Bool ShowPrevPage();
sal_Bool ShowNextPage();
diff --git a/include/svx/sidebar/PanelLayout.hxx b/include/svx/sidebar/PanelLayout.hxx
index 3395e7f9aab7..2fa82ee2d84d 100644
--- a/include/svx/sidebar/PanelLayout.hxx
+++ b/include/svx/sidebar/PanelLayout.hxx
@@ -14,19 +14,28 @@
#include <vcl/builder.hxx>
#include <vcl/ctrl.hxx>
+#include <vcl/timer.hxx>
#include <com/sun/star/frame/XFrame.hpp>
/// This class is the base for the Widget Layout-based sidebar panels.
class SVX_DLLPUBLIC PanelLayout : public Control, public VclBuilderContainer
{
+private:
+ Timer m_aPanelLayoutTimer;
+ bool m_bInClose;
+ bool hasPanelPendingLayout() const;
+
+ DECL_DLLPRIVATE_LINK( ImplHandlePanelLayoutTimerHdl, void* );
+
public:
PanelLayout(Window* pParent, const OString& rID, const OUString& rUIXMLDescription,
const com::sun::star::uno::Reference<com::sun::star::frame::XFrame> &rFrame);
- virtual ~PanelLayout() {}
+ virtual ~PanelLayout();
virtual Size GetOptimalSize() const;
virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL);
+ virtual void queue_resize();
};
#endif
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index 4e20d633e54d..afaea70ab27f 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -104,7 +104,7 @@ public:
bool isLayoutEnabled() const;
void setOptimalLayoutSize();
bool isCalculatingInitialLayoutSize() const { return mbIsCalculatingInitialLayoutSize; }
- virtual void queue_layout();
+ virtual void queue_resize();
virtual bool set_property(const OString &rKey, const OString &rValue);
VclButtonBox* get_action_area();
VclBox* get_content_area();
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index 47b9593f3fbc..0fa87ecab24f 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -39,6 +39,8 @@ public:
{
m_bLayoutDirty = true;
}
+
+ virtual void queue_resize();
protected:
//these are the two that need to be implemented by
//containers, figure out how much space you want...
diff --git a/include/vcl/tabctrl.hxx b/include/vcl/tabctrl.hxx
index 383c9236b700..53b3572feb15 100644
--- a/include/vcl/tabctrl.hxx
+++ b/include/vcl/tabctrl.hxx
@@ -201,6 +201,8 @@ public:
{
mbLayoutDirty = true;
}
+
+ virtual void queue_resize();
};
#endif // _SV_TABCTRL_HXX
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 4408adb98381..e255272ef6d8 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -1074,7 +1074,7 @@ public:
*
* akin to gtk_widget_queue_resize
*/
- void queue_resize();
+ virtual void queue_resize();
/*
* Sets the "width-request" property