1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
10 #ifndef INCLUDED_SC_SOURCE_UI_INC_SORTKEYDLG_HXX
11 #define INCLUDED_SC_SOURCE_UI_INC_SORTKEYDLG_HXX
16 #include "anyrefdg.hxx"
18 #include <vcl/edit.hxx>
19 #include <vcl/fixed.hxx>
20 #include <vcl/layout.hxx>
21 #include <vcl/lstbox.hxx>
22 #include <vcl/scrbar.hxx>
23 #include <vcl/ctrl.hxx>
24 #include <svtools/stdctrl.hxx>
25 #include <svx/langbox.hxx>
27 struct ScSortKeyItem
: public VclBuilderContainer
29 VclPtr
<VclFrame
> m_pFrame
;
30 VclPtr
<FixedText
> m_pFlSort
;
31 VclPtr
<ListBox
> m_pLbSort
;
32 VclPtr
<RadioButton
> m_pBtnUp
;
33 VclPtr
<RadioButton
> m_pBtnDown
;
35 ScSortKeyItem(vcl::Window
* pParent
);
40 long getItemHeight() const;
43 typedef std::vector
<std::unique_ptr
<ScSortKeyItem
> > ScSortKeyItems
;
48 VclPtr
<VclBox
> m_pBox
;
49 sal_Int32 nItemHeight
;
51 ScSortKeyItems
& mrSortKeyItems
;
54 ScSortKeyWindow(SfxTabPage
* pParent
, ScSortKeyItems
& mrSortKeyItems
);
58 void AddSortKey( sal_uInt16 nItem
);
59 void DoScroll( sal_Int32 nNewPos
);
60 sal_Int32
GetItemHeight() const { return nItemHeight
; }
66 ScSortKeyWindow m_aSortWin
;
67 VclScrolledWindow
& m_rScrolledWindow
;
68 ScrollBar
& m_rVertScroll
;
70 DECL_LINK_TYPED(ScrollHdl
, ScrollBar
*, void);
72 void checkAutoVScroll();
75 ScSortKeyCtrl(SfxTabPage
* pParent
, ScSortKeyItems
& mrSortKeyItems
);
77 void setScrollRange();
78 void AddSortKey( sal_uInt16 nItem
);
81 #endif // INCLUDED_SC_SOURCE_UI_INC_SORTKEYDLG_HXX
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */