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 SC_SORTKEYDLG_HXX
11 #define SC_SORTKEYDLG_HXX
13 #include <boost/ptr_container/ptr_vector.hpp>
15 #include "anyrefdg.hxx"
16 #include "sortdlg.hrc"
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 // =======================================================================
29 struct ScSortKeyItem
: public VclBuilderContainer
34 RadioButton
* m_pBtnUp
;
35 RadioButton
* m_pBtnDown
;
37 ScSortKeyItem(Window
* pParent
);
42 long getItemHeight() const;
45 typedef boost::ptr_vector
<ScSortKeyItem
> ScSortKeyItems
;
47 // =======================================================================
53 sal_Int32 nItemHeight
;
55 ScSortKeyItems
& mrSortKeyItems
;
58 ScSortKeyWindow(SfxTabPage
* pParent
, ScSortKeyItems
& mrSortKeyItems
);
61 void AddSortKey( sal_uInt16 nItem
);
62 void DoScroll( sal_Int32 nNewPos
);
63 sal_Int32
GetItemHeight() const { return nItemHeight
; }
64 sal_Int32
GetTotalHeight() const { return m_pBox
->GetSizePixel().Height(); }
67 // =======================================================================
72 ScSortKeyWindow m_aSortWin
;
73 VclScrolledWindow
& m_rScrolledWindow
;
74 ScrollBar
& m_rVertScroll
;
76 DECL_LINK(ScrollHdl
, ScrollBar
*);
78 void checkAutoVScroll();
81 ScSortKeyCtrl(SfxTabPage
* pParent
, ScSortKeyItems
& mrSortKeyItems
);
82 void setScrollRange();
83 void AddSortKey( sal_uInt16 nItem
);
86 #endif // SC_SORTKEYDLG_HXX
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */