LibreOffice Module sd (master) 1
PreviewValueSet.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <svtools/valueset.hxx>
23
24namespace sd::sidebar
25{
29{
30public:
31 explicit PreviewValueSet();
32 virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
33 virtual ~PreviewValueSet() override;
34
36
37 virtual void Resize() override;
38 virtual bool Command(const CommandEvent& rEvent) override;
39
40 void SetPreviewSize(const Size& rSize);
41
42 sal_Int32 GetPreferredHeight(sal_Int32 nWidth);
43
47 void Rearrange();
48
49private:
52
53 sal_uInt16 CalculateColumnCount(int nWidth) const;
54 sal_uInt16 CalculateRowCount(sal_uInt16 nColumnCount) const;
55};
56
57} // end of namespace sd::sidebar
58
59/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Adapt the svtools valueset to the needs of the master page controls.
Link< const Point *, void > maContextMenuHandler
void Rearrange()
Set the number of rows and columns according to the current number of items.
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
sal_uInt16 CalculateRowCount(sal_uInt16 nColumnCount) const
virtual bool Command(const CommandEvent &rEvent) override
sal_uInt16 CalculateColumnCount(int nWidth) const
sal_Int32 GetPreferredHeight(sal_Int32 nWidth)
void SetContextMenuHandler(const Link< const Point *, void > &rLink)
virtual void Resize() override
virtual ~PreviewValueSet() override
void SetPreviewSize(const Size &rSize)