fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / sc / source / ui / inc / sortkeydlg.hxx
blob07c12739b3dc1eaf984b7a77853cebac7bcd5bbb
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
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);
36 void DisableField();
37 void EnableField();
39 long getItemHeight() const;
42 typedef boost::ptr_vector<ScSortKeyItem> ScSortKeyItems;
44 class ScSortKeyWindow
46 private:
47 VclPtr<VclBox> m_pBox;
48 sal_Int32 nItemHeight;
50 ScSortKeyItems& mrSortKeyItems;
52 public:
53 ScSortKeyWindow(SfxTabPage* pParent, ScSortKeyItems& mrSortKeyItems);
54 ~ScSortKeyWindow();
55 void dispose();
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(); }
63 class ScSortKeyCtrl
65 private:
66 ScSortKeyWindow m_aSortWin;
67 VclScrolledWindow& m_rScrolledWindow;
68 ScrollBar& m_rVertScroll;
70 DECL_LINK(ScrollHdl, ScrollBar*);
72 void checkAutoVScroll();
74 public:
75 ScSortKeyCtrl(SfxTabPage* pParent, ScSortKeyItems& mrSortKeyItems);
76 void dispose();
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: */