diff options
Diffstat (limited to 'views/controls/single_split_view.h')
-rw-r--r-- | views/controls/single_split_view.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/views/controls/single_split_view.h b/views/controls/single_split_view.h index 74377df..af982e4 100644 --- a/views/controls/single_split_view.h +++ b/views/controls/single_split_view.h @@ -20,6 +20,9 @@ class SingleSplitView : public views::View { SingleSplitView(View* leading, View* trailing, Orientation orientation); + virtual void DidChangeBounds(const gfx::Rect& previous, + const gfx::Rect& current); + virtual void Layout(); // SingleSplitView's preferred size is the sum of the preferred widths @@ -36,6 +39,13 @@ class SingleSplitView : public views::View { } int divider_offset() { return divider_offset_; } + // Sets whether the leading component is resized when the split views size + // changes. The default is true. A value of false results in the trailing + // component resizing on a bounds change. + void set_resize_leading_on_bounds_change(bool resize) { + resize_leading_on_bounds_change_ = resize; + } + protected: virtual bool OnMousePressed(const MouseEvent& event); virtual bool OnMouseDragged(const MouseEvent& event); @@ -70,6 +80,8 @@ class SingleSplitView : public views::View { // Position of the divider. int divider_offset_; + bool resize_leading_on_bounds_change_; + DISALLOW_COPY_AND_ASSIGN(SingleSplitView); }; |