summaryrefslogtreecommitdiffstats
path: root/ui/views/controls/table/table_grouper.h
blob: ce100e4c98a44c8e36074091573af607f7cb3482 (plain)
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
// Copyright (c) 2012 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_VIEWS_CONTROLS_TABLE_TABLE_GROUPER_H_
#define UI_VIEWS_CONTROLS_TABLE_TABLE_GROUPER_H_

#include "ui/views/views_export.h"

namespace views {

struct VIEWS_EXPORT GroupRange {
  int start;
  int length;
};

// TableGrouper is used by TableView to group a set of rows and treat them
// as one. Rows that fall in the same group are selected together and sorted
// together.
class VIEWS_EXPORT TableGrouper {
 public:
  virtual void GetGroupRange(int model_index, GroupRange* range) = 0;

 protected:
  virtual ~TableGrouper() {}
};

}

#endif  // UI_VIEWS_CONTROLS_TABLE_GROUP_TABLE_VIEW_H_