LibreOffice Module toolkit (master)
1
toolkit
inc
controls
table
tablesort.hxx
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*
3
* This file is part of the LibreOffice project.
4
*
5
* This Source Code Form is subject to the terms of the Mozilla Public
6
* License, v. 2.0. If a copy of the MPL was not distributed with this
7
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
*
9
* This file incorporates work covered by the following license notice:
10
*
11
* Licensed to the Apache Software Foundation (ASF) under one or more
12
* contributor license agreements. See the NOTICE file distributed
13
* with this work for additional information regarding copyright
14
* ownership. The ASF licenses this file to you under the Apache
15
* License, Version 2.0 (the "License"); you may not use this file
16
* except in compliance with the License. You may obtain a copy of
17
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
18
*/
19
20
#pragma once
21
22
#include <
controls/table/tabletypes.hxx
>
23
24
namespace
svt::table
25
{
26
27
28
//= ColumnSortDirection
29
30
enum
ColumnSortDirection
31
{
32
ColumnSortAscending
,
33
ColumnSortDescending
34
};
35
36
37
//= ColumnSort
38
39
struct
ColumnSort
40
{
41
ColPos
nColumnPos
;
42
ColumnSortDirection
eSortDirection
;
43
44
ColumnSort
()
45
:
nColumnPos
(
COL_INVALID
)
46
,
eSortDirection
(
ColumnSortAscending
)
47
{
48
}
49
50
};
51
52
53
//= ITableDataSort
54
57
class
SAL_NO_VTABLE
ITableDataSort
58
{
59
public
:
62
virtual
void
sortByColumn
(
ColPos
const
i_column,
ColumnSortDirection
const
i_sortDirection ) = 0;
63
69
virtual
ColumnSort
getCurrentSortOrder
()
const
= 0;
70
71
protected
:
72
~ITableDataSort
() {}
73
};
74
75
76
}
// namespace svt::table
77
78
79
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
svt::table::ITableDataSort
provides sorting functionality for the data underlying an ITableModel
Definition:
tablesort.hxx:58
svt::table::ITableDataSort::getCurrentSortOrder
virtual ColumnSort getCurrentSortOrder() const =0
retrieves the current sort order of the data
svt::table::ITableDataSort::sortByColumn
virtual void sortByColumn(ColPos const i_column, ColumnSortDirection const i_sortDirection)=0
sorts the rows in the model by the given column's data, in the given direction.
svt::table::ITableDataSort::~ITableDataSort
~ITableDataSort()
Definition:
tablesort.hxx:72
svt::table
Definition:
defaultinputhandler.cxx:27
svt::table::ColumnSortDirection
ColumnSortDirection
Definition:
tablesort.hxx:31
svt::table::ColumnSortDescending
@ ColumnSortDescending
Definition:
tablesort.hxx:33
svt::table::ColumnSortAscending
@ ColumnSortAscending
Definition:
tablesort.hxx:32
svt::table::ColPos
sal_Int32 ColPos
a value denoting a column position within a table
Definition:
tabletypes.hxx:32
svt::table::ColumnSort
Definition:
tablesort.hxx:40
svt::table::ColumnSort::eSortDirection
ColumnSortDirection eSortDirection
Definition:
tablesort.hxx:42
svt::table::ColumnSort::nColumnPos
ColPos nColumnPos
Definition:
tablesort.hxx:41
svt::table::ColumnSort::ColumnSort
ColumnSort()
Definition:
tablesort.hxx:44
tabletypes.hxx
COL_INVALID
#define COL_INVALID
denotes an invalid column index
Definition:
tabletypes.hxx:44
SAL_NO_VTABLE
#define SAL_NO_VTABLE
Generated on Sun Jul 30 2023 04:29:33 for LibreOffice Module toolkit (master) by
1.9.3