summaryrefslogtreecommitdiff
path: root/sc/source/ui/inc/checklistmenu.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/inc/checklistmenu.hxx')
-rw-r--r--sc/source/ui/inc/checklistmenu.hxx44
1 files changed, 40 insertions, 4 deletions
diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx
index bf8281f90f1b..5f280d8a96ea 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -190,9 +190,31 @@ private:
VclPtr<ScMenuFloatingWindow> mpParentMenu;
};
+class ScCheckListMenuWindow;
+
+class ScTabStops
+{
+private:
+ typedef std::unordered_map<vcl::Window*, size_t> ControlToPosMap;
+ ScCheckListMenuWindow* mpMenuWindow;
+ ControlToPosMap maControlToPos;
+ std::vector<vcl::Window*> maControls;
+ size_t mnCurTabStop;
+public:
+ ScTabStops( ScCheckListMenuWindow* mpMenuWin );
+ ~ScTabStops();
+ void AddTabStop( vcl::Window* pWin );
+ void SetTabStop( vcl::Window* pWin );
+ void CycleFocus( bool bReverse = false );
+ vcl::Window* GetCurrentControl();
+ void clear();
+};
+
class ScCheckListBox : public SvTreeListBox
{
SvLBoxButtonData* mpCheckButton;
+ ScTabStops* mpTabStops;
+ bool mbSeenMouseButtonDown;
void CountCheckedEntries( SvTreeListEntry* pParent, sal_uLong& nCount ) const;
void CheckAllChildren( SvTreeListEntry* pEntry, bool bCheck = true );
@@ -210,7 +232,23 @@ class ScCheckListBox : public SvTreeListBox
sal_uInt16 GetCheckedEntryCount() const;
void ExpandChildren( SvTreeListEntry* pParent );
virtual void KeyInput( const KeyEvent& rKEvt ) override;
+ virtual void MouseButtonDown(const MouseEvent& rMEvt) override;
+ virtual void MouseButtonUp(const MouseEvent& rMEvt) override;
+ void SetTabStopsContainer( ScTabStops* pTabStops ) { mpTabStops = pTabStops; }
};
+
+class ScSearchEdit : public Edit
+{
+private:
+ ScTabStops* mpTabStops;
+public:
+ ScSearchEdit(Window* pParent) : Edit(pParent) {}
+ virtual ~ScSearchEdit() {}
+
+ virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
+ void SetTabStopsContainer( ScTabStops* pTabStops ) { mpTabStops = pTabStops; }
+};
+
/**
* This class implements a popup window for field button, for quick access
* of hide-item list, and possibly more stuff related to field options.
@@ -334,7 +372,7 @@ private:
DECL_LINK_TYPED( EdModifyHdl, Edit&, void );
private:
- VclPtr<Edit> maEdSearch;
+ VclPtr<ScSearchEdit> maEdSearch;
VclPtr<ScCheckListBox> maChecks;
VclPtr<TriStateBox> maChkToggleAll;
@@ -344,9 +382,6 @@ private:
VclPtr<OKButton> maBtnOk;
VclPtr<CancelButton> maBtnCancel;
- std::vector<VclPtr<vcl::Window> > maTabStopCtrls;
- size_t mnCurTabStop;
-
std::vector<Member> maMembers;
std::unique_ptr<ExtendedData> mpExtendedData;
std::unique_ptr<Action> mpOKAction;
@@ -356,6 +391,7 @@ private:
Size maWndSize; /// whole window size.
Size maMenuSize; /// size of all menu items combined.
TriState mePrevToggleAllState;
+ ScTabStops maTabStops;
};
#endif