15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2011 The Chromium Authors. All rights reserved. 25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file. 45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifndef UI_VIEWS_CONTROLS_SINGLE_SPLIT_VIEW_LISTENER_H_ 65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define UI_VIEWS_CONTROLS_SINGLE_SPLIT_VIEW_LISTENER_H_ 75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 85d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "ui/views/views_export.h" 95d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)namespace views { 115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class SingleSplitView; 135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// An interface implemented by objects that want to be notified when the 155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// splitter moves. 165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)class VIEWS_EXPORT SingleSplitViewListener { 175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) public: 185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Invoked when split handle is moved by the user. |sender|'s divider_offset 195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // is already set to the new value, but Layout has not happened yet. 205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Returns false if the layout has been handled by the listener, returns 215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // true if |sender| should do it by itself. 225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual bool SplitHandleMoved(SingleSplitView* sender) = 0; 235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) protected: 255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual ~SingleSplitViewListener() {} 265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}; 275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)} // namespace views 295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif // UI_VIEWS_CONTROLS_SINGLE_SPLIT_VIEW_LISTENER_H_ 31