fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / include / svx / simptabl.hxx
blob8e448bc8b2c0e3b5ad5a2f98c014a536038fe278
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef _SVX_SIMPTABL_HXX
21 #define _SVX_SIMPTABL_HXX
23 #include <vcl/morebtn.hxx>
25 #include <vcl/combobox.hxx>
27 #include <vcl/group.hxx>
28 #include <svtools/headbar.hxx>
29 #include <svtools/svtabbx.hxx>
30 #include <vcl/lstbox.hxx>
31 #include "svx/svxdllapi.h"
33 class SvxSimpleTable;
34 class SVX_DLLPUBLIC SvxSimpleTableContainer : public Control
36 private:
37 SvxSimpleTable* m_pTable;
39 protected:
40 virtual long PreNotify( NotifyEvent& rNEvt );
42 public:
43 SvxSimpleTableContainer( Window* pParent, const ResId& rResId );
44 SvxSimpleTableContainer( Window* pParent, WinBits nBits = WB_BORDER );
46 void SetTable(SvxSimpleTable* pTable);
48 virtual void Resize();
50 virtual void GetFocus();
53 class SVX_DLLPUBLIC SvxSimpleTable : public SvHeaderTabListBox
55 private:
56 SvxSimpleTableContainer& m_rParentTableContainer;
58 Link aHeaderBarClickLink;
59 Link aHeaderBarDblClickLink;
60 Link aCommandLink;
61 CommandEvent aCEvt;
62 HeaderBar aHeaderBar;
63 long nOldPos;
64 sal_uInt16 nHeaderItemId;
65 sal_Bool bResizeFlag;
66 sal_Bool bPaintFlag;
67 sal_Bool bSortDirection;
68 sal_uInt16 nSortCol;
70 DECL_LINK( StartDragHdl, HeaderBar* );
71 DECL_LINK( DragHdl, HeaderBar* );
72 DECL_LINK( EndDragHdl, HeaderBar* );
73 DECL_LINK( HeaderBarClick, HeaderBar* );
74 DECL_LINK( HeaderBarDblClick, HeaderBar* );
75 DECL_LINK( CompareHdl, SvSortData* );
77 protected:
79 virtual void NotifyScrolled();
81 virtual void SetTabs();
82 virtual void Paint( const Rectangle& rRect );
84 virtual void HBarClick();
85 virtual void HBarDblClick();
86 virtual void HBarStartDrag();
87 virtual void HBarDrag();
88 virtual void HBarEndDrag();
90 virtual void Command( const CommandEvent& rCEvt );
92 virtual StringCompare ColCompare(SvTreeListEntry*,SvTreeListEntry*);
93 public:
95 SvxSimpleTable(SvxSimpleTableContainer& rParent, WinBits nBits = WB_BORDER);
96 ~SvxSimpleTable();
98 void UpdateViewSize();
100 void InsertHeaderEntry(const OUString& rText,
101 sal_uInt16 nCol=HEADERBAR_APPEND,
102 HeaderBarItemBits nBits = HIB_STDSTYLE);
104 void SetTabs( long* pTabs, MapUnit = MAP_APPFONT );
106 void ClearHeader();
108 // to be removed all calls of the related methods are redirected to *Table() methods
109 using Window::Show;
110 using Window::Hide;
111 using Window::Enable;
112 using Window::Disable;
113 using Window::ToTop;
115 void Show();
116 void Hide();
117 void Enable();
118 void Disable();
119 void ToTop();
121 // remove until this line
123 void ShowTable();
124 void HideTable();
125 sal_Bool IsVisible() const;
127 void EnableTable();
128 void DisableTable();
129 sal_Bool IsEnabled() const;
131 sal_uInt16 GetSelectedCol();
132 void SortByCol(sal_uInt16,sal_Bool bDir=sal_True);
133 sal_Bool GetSortDirection(){ return bSortDirection;}
134 sal_uInt16 GetSortedCol(){ return nSortCol;}
135 SvLBoxItem* GetEntryAtPos( SvTreeListEntry* pEntry, sal_uInt16 nPos ) const;
137 CommandEvent GetCommandEvent()const;
138 inline sal_Bool IsFocusOnCellEnabled() const { return IsCellFocusEnabled(); }
140 void SetCommandHdl( const Link& rLink ) { aCommandLink = rLink; }
141 const Link& GetCommandHdl() const { return aCommandLink; }
143 void SetHeaderBarClickHdl( const Link& rLink ) { aHeaderBarClickLink = rLink; }
144 const Link& GetHeaderBarClickHdl() const { return aHeaderBarClickLink; }
146 void SetHeaderBarDblClickHdl( const Link& rLink ) { aHeaderBarDblClickLink = rLink; }
147 const Link& GetHeaderBarDblClickHdl() const { return aHeaderBarDblClickLink; }
149 void SetHeaderBarHelpId(const OString& rHelpId) {aHeaderBar.SetHelpId(rHelpId);}
151 HeaderBar& GetTheHeaderBar() {return aHeaderBar;}
155 #endif // _SVX_SIMPTABL_HXX
157 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */