File indexing completed on 2024-04-28 05:32:18

0001 /*
0002     this file is part of the oxygen gtk engine
0003     SPDX-FileCopyrightText: 2010 Hugo Pereira Da Costa <hugo.pereira@free.fr>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #include "oxygenstyleoptions.h"
0009 
0010 #include <vector>
0011 #include <string>
0012 
0013 namespace Oxygen
0014 {
0015 
0016     //______________________________________________________________
0017     std::ostream& operator << (std::ostream& out, const StyleOptions& options )
0018     {
0019         std::vector<std::string> flags;
0020         if( options & Blend ) flags.push_back( "Blend" );
0021         if( options & Sunken ) flags.push_back( "Sunken" );
0022         if( options & Flat ) flags.push_back( "Flat" );
0023         if( options & Focus ) flags.push_back( "Focus" );
0024         if( options & Hover ) flags.push_back( "Hover" );
0025         if( options & NoFill ) flags.push_back( "NoFill" );
0026         if( options & Vertical ) flags.push_back( "Vertical" );
0027         if( options & Alpha ) flags.push_back( "Alpha" );
0028         if( options & Round ) flags.push_back( "Round" );
0029         if( options & Contrast ) flags.push_back( "Contrast" );
0030         if( options & Selected ) flags.push_back( "Selected" );
0031         if( options & Disabled ) flags.push_back( "Disabled" );
0032         if( options & Menu ) flags.push_back( "Menu" );
0033 
0034         if( flags.empty() ) out << "None";
0035         else {
0036 
0037             for( std::vector<std::string>::const_iterator iter = flags.begin(); iter != flags.end(); ++iter )
0038             {
0039                 if( iter == flags.begin() ) out << *iter;
0040                 else out << "|" << *iter;
0041             }
0042 
0043         }
0044 
0045         return out;
0046 
0047     }
0048 
0049 }