1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef UI_VIEWS_CONTROLS_SINGLE_SPLIT_VIEW_LISTENER_H_ 6 #define UI_VIEWS_CONTROLS_SINGLE_SPLIT_VIEW_LISTENER_H_ 7 8 #include "ui/views/views_export.h" 9 10 namespace views { 11 12 class SingleSplitView; 13 14 // An interface implemented by objects that want to be notified when the 15 // splitter moves. 16 class VIEWS_EXPORT SingleSplitViewListener { 17 public: 18 // Invoked when split handle is moved by the user. |sender|'s divider_offset 19 // is already set to the new value, but Layout has not happened yet. 20 // Returns false if the layout has been handled by the listener, returns 21 // true if |sender| should do it by itself. 22 virtual bool SplitHandleMoved(SingleSplitView* sender) = 0; 23 24 protected: 25 virtual ~SingleSplitViewListener() {} 26 }; 27 28 } // namespace views 29 30 #endif // UI_VIEWS_CONTROLS_SINGLE_SPLIT_VIEW_LISTENER_H_ 31