fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / starmath / inc / ElementsDockingWindow.hxx
blobc338bdaf6ca966eb9a2ebcebdfe74e59968d6183
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 .
19 #ifndef _ELEMENTSDOCKINGWINDOW_HXX_
20 #define _ELEMENTSDOCKINGWINDOW_HXX_
22 #include <sfx2/dockwin.hxx>
23 #include <svx/dlgctrl.hxx>
25 #include <document.hxx>
26 #include <node.hxx>
28 class SmElement
30 SmNodePointer mpNode;
31 OUString maText;
32 public:
33 Point mBoxLocation;
34 Size mBoxSize;
36 SmElement(SmNodePointer pNode, OUString aText);
37 virtual ~SmElement();
39 SmNodePointer getNode();
40 OUString getText()
42 return maText;
45 virtual bool isSeparator()
47 return false;
51 class SmElementSeparator : public SmElement
53 public:
54 SmElementSeparator();
56 virtual bool isSeparator()
58 return true;
62 class SmElementsControl : public Control
65 static const sal_uInt16 aUnaryBinaryOperatorsList[];
66 static const sal_uInt16 aRelationsList[];
67 static const sal_uInt16 aSetOperations[];
68 static const sal_uInt16 aFunctions[];
69 static const sal_uInt16 aOperators[];
70 static const sal_uInt16 aAttributes[];
71 static const sal_uInt16 aBrackets[];
72 static const sal_uInt16 aFormats[];
73 static const sal_uInt16 aOthers[];
75 Link aSelectHdlLink;
77 virtual void Paint(const Rectangle&);
78 virtual void MouseButtonDown(const MouseEvent& rMEvt);
79 virtual void MouseMove( const MouseEvent& rMEvt );
81 typedef boost::shared_ptr<SmElement> SmElementPointer;
82 typedef std::vector< SmElementPointer > SmElementList;
84 SmDocShell* mpDocShell;
85 SmFormat maFormat;
86 sal_uInt16 maCurrentSetId;
87 SmElement* mpCurrentElement;
89 SmElementList maElementList;
90 Size maMaxElementDimensions;
92 void addElement(OUString aElementVisual, OUString aElementSource);
94 void addElements(const sal_uInt16 aElementsArray[], sal_uInt16 size);
96 void addSeparator();
98 void build();
100 public:
101 SmElementsControl(Window *pParent, const ResId& rResId);
103 void setElementSetId(sal_uInt16 aSetId);
105 void SetSelectHdl(const Link& rLink) { aSelectHdlLink = rLink; }
108 class SmElementsDockingWindow : public SfxDockingWindow
110 static const sal_uInt16 aCategories[];
112 SmElementsControl maElementsControl;
113 ListBox maElementListBox;
115 virtual void Resize();
116 SmViewShell* GetView();
118 DECL_LINK(SelectClickHdl, SmElement*);
119 DECL_LINK(ElementSelectedHandle, ListBox*);
121 public:
123 SmElementsDockingWindow( SfxBindings* pBindings,
124 SfxChildWindow* pChildWindow,
125 Window* pParent );
126 ~SmElementsDockingWindow();
129 class SmElementsDockingWindowWrapper : public SfxChildWindow
131 SFX_DECL_CHILDWINDOW_WITHID(SmElementsDockingWindowWrapper);
133 protected:
134 SmElementsDockingWindowWrapper( Window* pParentWindow,
135 sal_uInt16 nId,
136 SfxBindings* pBindings,
137 SfxChildWinInfo* pInfo );
138 virtual ~SmElementsDockingWindowWrapper();
142 #endif // _SYMBOLDOCKINGWINDOW_HXX_
144 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */