1*ff12d537SAndre Fischer /************************************************************** 2*ff12d537SAndre Fischer * 3*ff12d537SAndre Fischer * Licensed to the Apache Software Foundation (ASF) under one 4*ff12d537SAndre Fischer * or more contributor license agreements. See the NOTICE file 5*ff12d537SAndre Fischer * distributed with this work for additional information 6*ff12d537SAndre Fischer * regarding copyright ownership. The ASF licenses this file 7*ff12d537SAndre Fischer * to you under the Apache License, Version 2.0 (the 8*ff12d537SAndre Fischer * "License"); you may not use this file except in compliance 9*ff12d537SAndre Fischer * with the License. You may obtain a copy of the License at 10*ff12d537SAndre Fischer * 11*ff12d537SAndre Fischer * http://www.apache.org/licenses/LICENSE-2.0 12*ff12d537SAndre Fischer * 13*ff12d537SAndre Fischer * Unless required by applicable law or agreed to in writing, 14*ff12d537SAndre Fischer * software distributed under the License is distributed on an 15*ff12d537SAndre Fischer * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*ff12d537SAndre Fischer * KIND, either express or implied. See the License for the 17*ff12d537SAndre Fischer * specific language governing permissions and limitations 18*ff12d537SAndre Fischer * under the License. 19*ff12d537SAndre Fischer * 20*ff12d537SAndre Fischer *************************************************************/ 21*ff12d537SAndre Fischer 22*ff12d537SAndre Fischer #ifndef SFX_SIDEBAR_PAINT_HXX 23*ff12d537SAndre Fischer #define SFX_SIDEBAR_PAINT_HXX 24*ff12d537SAndre Fischer 25*ff12d537SAndre Fischer #include <tools/color.hxx> 26*ff12d537SAndre Fischer #include <vcl/gradient.hxx> 27*ff12d537SAndre Fischer #include <vcl/wall.hxx> 28*ff12d537SAndre Fischer 29*ff12d537SAndre Fischer #include <boost/variant.hpp> 30*ff12d537SAndre Fischer 31*ff12d537SAndre Fischer namespace sfx2 { namespace sidebar { 32*ff12d537SAndre Fischer 33*ff12d537SAndre Fischer /** Abstraction of different ways to fill outlines. 34*ff12d537SAndre Fischer Can be 35*ff12d537SAndre Fischer - none (empty: outline is not filled) 36*ff12d537SAndre Fischer - singular color 37*ff12d537SAndre Fischer - gradient 38*ff12d537SAndre Fischer */ 39*ff12d537SAndre Fischer class Paint 40*ff12d537SAndre Fischer { 41*ff12d537SAndre Fischer public: 42*ff12d537SAndre Fischer enum Type 43*ff12d537SAndre Fischer { 44*ff12d537SAndre Fischer NoPaint, 45*ff12d537SAndre Fischer ColorPaint, 46*ff12d537SAndre Fischer GradientPaint 47*ff12d537SAndre Fischer }; 48*ff12d537SAndre Fischer 49*ff12d537SAndre Fischer // Create paint with type NoPaint. 50*ff12d537SAndre Fischer explicit Paint (void); 51*ff12d537SAndre Fischer 52*ff12d537SAndre Fischer // Create a Paint object for the given color. 53*ff12d537SAndre Fischer explicit Paint (const Color& rColor); 54*ff12d537SAndre Fischer 55*ff12d537SAndre Fischer // Create a Paint object for the given gradient. 56*ff12d537SAndre Fischer explicit Paint (const Gradient& rGradient); 57*ff12d537SAndre Fischer 58*ff12d537SAndre Fischer void Set (const ::sfx2::sidebar::Paint& rOther); 59*ff12d537SAndre Fischer 60*ff12d537SAndre Fischer Type GetType (void) const; 61*ff12d537SAndre Fischer const Color& GetColor (void) const; 62*ff12d537SAndre Fischer const Gradient& GetGradient (void) const; 63*ff12d537SAndre Fischer 64*ff12d537SAndre Fischer Wallpaper GetWallpaper (void) const; 65*ff12d537SAndre Fischer 66*ff12d537SAndre Fischer private: 67*ff12d537SAndre Fischer Type meType; 68*ff12d537SAndre Fischer ::boost::variant< 69*ff12d537SAndre Fischer Color, 70*ff12d537SAndre Fischer Gradient 71*ff12d537SAndre Fischer > maValue; 72*ff12d537SAndre Fischer }; 73*ff12d537SAndre Fischer 74*ff12d537SAndre Fischer 75*ff12d537SAndre Fischer } } // end of namespace sfx2::sidebar 76*ff12d537SAndre Fischer 77*ff12d537SAndre Fischer #endif 78