Sha256: 8fb7f66da812bc60c0b4fecf32f4baff58b682ea24d22e21275c4c517c66d6c3

Contents?: true

Size: 916 Bytes

Versions: 4

Compression:

Stored size: 916 Bytes

Contents

require "openxml/drawingml/properties/color_property"

module OpenXml
  module DrawingML
    module Properties
      class ColorSystemColor < ColorProperty
        namespace :a
        tag :sysClr

        SYSTEM_COLORS = %i{
          3dDkShadow 3dLight activeBorder activeCaption appWorkspace
          background btnFace btnHighlight btnShadow btnText captionText
          gradientActiveCaption gradientInactiveCaption grayText highlight
          highlightText hotLight inactiveBorder inactiveCaption
          inactiveCaptionText infoBk infoText menu menuBar menuHighlight
          menuText scrollBar window windowFrame windowText
        }.freeze

        attribute :value, displays_as: :val, one_of: SYSTEM_COLORS
        attribute :last_color, displays_as: :lastClr, expects: :hex_color

        def initialize(value)
          super()
          self.value = value
        end

      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
openxml-drawingml-0.3.1 lib/openxml/drawingml/properties/color_system_color.rb
openxml-drawingml-0.3.0 lib/openxml/drawingml/properties/color_system_color.rb
openxml-drawingml-0.2.1 lib/openxml/drawingml/properties/color_system_color.rb
openxml-drawingml-0.2.0 lib/openxml/drawingml/properties/color_system_color.rb