tdf#164420 Fix unselected Check/Radio buttons not following themes in GTK
[LibreOffice.git] / filter / source / graphicfilter / icgm / bundles.hxx
blob209eae6dd396048fb5e06f79c4eec9695baf8a5f
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 #pragma once
22 #include <sal/types.h>
23 #include "cgmtypes.hxx"
24 #include <vector>
25 #include <memory>
28 class Bundle
31 tools::Long mnBundleIndex;
32 sal_uInt32 mnColor;
34 public:
35 void SetColor( sal_uInt32 nColor ) ;
36 sal_uInt32 GetColor() const { return mnColor;}
37 tools::Long GetIndex() const { return mnBundleIndex; } ;
38 void SetIndex( tools::Long nBundleIndex ) { mnBundleIndex = nBundleIndex; } ;
40 Bundle()
41 : mnBundleIndex( 0 )
42 , mnColor( 0 )
43 {};
45 virtual std::unique_ptr<Bundle> Clone() { return std::make_unique<Bundle>( *this ); };
47 virtual ~Bundle() {} ;
49 Bundle(Bundle const &) = default;
50 Bundle(Bundle &&) = default;
51 Bundle & operator =(Bundle const &) = default;
52 Bundle & operator =(Bundle &&) = default;
56 class LineBundle : public Bundle
58 public:
60 LineType eLineType;
61 double nLineWidth;
63 LineBundle()
64 : eLineType(LT_SOLID)
65 , nLineWidth(0)
68 virtual std::unique_ptr<Bundle> Clone() override { return std::make_unique<LineBundle>( *this ); }
72 class MarkerBundle : public Bundle
74 public:
76 MarkerType eMarkerType;
77 double nMarkerSize;
79 MarkerBundle()
80 : eMarkerType( MT_POINT )
81 , nMarkerSize( 0.0 )
82 {};
84 virtual std::unique_ptr<Bundle> Clone() override { return std::make_unique<MarkerBundle>( *this ); } ;
88 class EdgeBundle : public Bundle
90 public:
92 EdgeType eEdgeType;
93 double nEdgeWidth;
95 EdgeBundle()
96 : eEdgeType(ET_NONE)
97 , nEdgeWidth(0)
99 virtual std::unique_ptr<Bundle> Clone() override { return std::make_unique<EdgeBundle>( *this ); }
103 class TextBundle : public Bundle
105 public:
107 sal_uInt32 nTextFontIndex;
108 TextPrecision eTextPrecision;
109 double nCharacterExpansion;
110 double nCharacterSpacing;
112 TextBundle()
113 : nTextFontIndex( 0 )
114 , eTextPrecision( TPR_UNDEFINED )
115 , nCharacterExpansion( 0.0 )
116 , nCharacterSpacing( 0.0 )
119 virtual std::unique_ptr<Bundle> Clone() override { return std::make_unique<TextBundle>( *this ); } ;
123 class FillBundle : public Bundle
125 public:
127 FillInteriorStyle eFillInteriorStyle;
128 tools::Long nFillPatternIndex;
129 tools::Long nFillHatchIndex;
131 FillBundle()
132 : eFillInteriorStyle(FIS_HOLLOW)
133 , nFillPatternIndex(0)
134 , nFillHatchIndex(0)
136 virtual std::unique_ptr<Bundle> Clone() override { return std::make_unique<FillBundle>( *this ); }
140 struct FontEntry
142 std::vector<sal_Int8> aFontName;
143 std::vector<sal_Int8> aCharSetValue;
144 sal_uInt32 nFontType; // bit 0 = 1 -> Italic,
145 // bit 1 = 1 -> Bold
146 FontEntry()
147 : nFontType(0)
152 class CGMFList
154 sal_uInt32 nFontNameCount;
155 sal_uInt32 nCharSetCount;
156 std::vector<FontEntry> aFontEntryList;
158 public:
159 CGMFList();
161 FontEntry* GetFontEntry( sal_uInt32 );
162 void InsertName( sal_uInt8 const * pSource, sal_uInt32 nSize );
163 void InsertCharSet( sal_uInt8 const * pSource, sal_uInt32 nSize );
166 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */