forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtable_model_observer.h
37 lines (26 loc) · 1.12 KB
/
table_model_observer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_BASE_MODELS_TABLE_MODEL_OBSERVER_H_
#define UI_BASE_MODELS_TABLE_MODEL_OBSERVER_H_
#include "ui/base/ui_base_export.h"
namespace ui {
// Observer for a TableModel. Anytime the model changes, it must notify its
// observer.
class UI_BASE_EXPORT TableModelObserver {
public:
// Invoked when the model has been completely changed.
virtual void OnModelChanged() = 0;
// Invoked when a range of items has changed.
virtual void OnItemsChanged(int start, int length) = 0;
// Invoked when new items have been added.
virtual void OnItemsAdded(int start, int length) = 0;
// Invoked when a range of items has been removed.
virtual void OnItemsRemoved(int start, int length) = 0;
// Invoked when a range of items has been moved to a different position.
virtual void OnItemsMoved(int old_start, int length, int new_start) {}
protected:
virtual ~TableModelObserver() {}
};
} // namespace ui
#endif // UI_BASE_MODELS_TABLE_MODEL_OBSERVER_H_