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
13 #include <boost/ptr_container/ptr_vector.hpp>
15 #include "anyrefdg.hxx"
17 #include <vcl/edit.hxx>
18 #include <vcl/fixed.hxx>
19 #include <vcl/layout.hxx>
20 #include <vcl/lstbox.hxx>
21 #include <vcl/scrbar.hxx>
22 #include <vcl/ctrl.hxx>
23 #include <svtools/stdctrl.hxx>
24 #include <svx/langbox.hxx>
26 struct ScSortKeyItem
: public VclBuilderContainer
28 VclPtr
<VclFrame
> m_pFrame
;
29 VclPtr
<FixedText
> m_pFlSort
;
30 VclPtr
<ListBox
> m_pLbSort
;
31 VclPtr
<RadioButton
> m_pBtnUp
;
32 VclPtr
<RadioButton
> m_pBtnDown
;
34 ScSortKeyItem(vcl::Window
* pParent
);
39 long getItemHeight() const;
42 typedef boost::ptr_vector
<ScSortKeyItem
> ScSortKeyItems
;
47 VclPtr
<VclBox
> m_pBox
;
48 sal_Int32 nItemHeight
;
50 ScSortKeyItems
& mrSortKeyItems
;
53 ScSortKeyWindow(SfxTabPage
* pParent
, ScSortKeyItems
& mrSortKeyItems
);
57 void AddSortKey( sal_uInt16 nItem
);
58 void DoScroll( sal_Int32 nNewPos
);
59 sal_Int32
GetItemHeight() const { return nItemHeight
; }
60 sal_Int32
GetTotalHeight() const { return m_pBox
->GetSizePixel().Height(); }
66 ScSortKeyWindow m_aSortWin
;
67 VclScrolledWindow
& m_rScrolledWindow
;
68 ScrollBar
& m_rVertScroll
;
70 DECL_LINK(ScrollHdl
, ScrollBar
*);
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: */