VSDLayerList.h
Go to the documentation of this file.
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
* This file is part of the libvisio project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef __VSDLAYERLIST_H__
#define __VSDLAYERLIST_H__
#include <map>
#include <vector>
#include <optional>
#include "VSDTypes.h"
namespace libvisio
{
struct VSDLayer
{
VSDLayer();
VSDLayer(const VSDLayer &layer);
~VSDLayer();
VSDLayer &operator=(const VSDLayer &layer);
std::optional<Colour> m_colour;
bool m_visible;
bool m_printable;
};
class VSDLayerList
{
public:
VSDLayerList();
VSDLayerList(const VSDLayerList &layerList);
~VSDLayerList();
VSDLayerList &operator=(const VSDLayerList &layerList);
void clear();
void addLayer(unsigned id, const VSDLayer &layer);
const Colour *getColour(const std::vector<unsigned> &ids);
bool getVisible(const std::vector<unsigned> &ids);
bool getPrintable(const std::vector<unsigned> &ids);
private:
std::map<unsigned, VSDLayer> m_elements;
};
} // namespace libvisio
#endif // __VSDLAYERLIST_H__
/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
VSDTypes.h
libvisio::VSDLayerList::getPrintable
bool getPrintable(const std::vector< unsigned > &ids)
Definition VSDLayerList.cpp:114
libvisio::VSDLayerList::VSDLayerList
VSDLayerList()
Definition VSDLayerList.cpp:39
libvisio::VSDLayerList::addLayer
void addLayer(unsigned id, const VSDLayer &layer)
Definition VSDLayerList.cpp:72
libvisio::VSDLayerList::operator=
VSDLayerList & operator=(const VSDLayerList &layerList)
Definition VSDLayerList.cpp:51
libvisio::VSDLayerList::clear
void clear()
Definition VSDLayerList.cpp:67
libvisio::VSDLayerList::getColour
const Colour * getColour(const std::vector< unsigned > &ids)
Definition VSDLayerList.cpp:77
libvisio::VSDLayerList::~VSDLayerList
~VSDLayerList()
Definition VSDLayerList.cpp:62
libvisio::VSDLayerList::m_elements
std::map< unsigned, VSDLayer > m_elements
Definition VSDLayerList.h:50
libvisio::VSDLayerList::getVisible
bool getVisible(const std::vector< unsigned > &ids)
Definition VSDLayerList.cpp:98
libvisio
Definition libvisio_utils.h:47
libvisio::Colour
Definition VSDTypes.h:71
libvisio::VSDLayer
Definition VSDLayerList.h:22
libvisio::VSDLayer::m_visible
bool m_visible
Definition VSDLayerList.h:29
libvisio::VSDLayer::m_printable
bool m_printable
Definition VSDLayerList.h:30
libvisio::VSDLayer::VSDLayer
VSDLayer()
Definition VSDLayerList.cpp:21
libvisio::VSDLayer::~VSDLayer
~VSDLayer()
Definition VSDLayerList.cpp:26
libvisio::VSDLayer::operator=
VSDLayer & operator=(const VSDLayer &layer)
Definition VSDLayerList.cpp:28
libvisio::VSDLayer::m_colour
std::optional< Colour > m_colour
Definition VSDLayerList.h:28