Skip to content

Commit

Permalink
Merge pull request #322 from mcorino/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mcorino authored Nov 6, 2024
2 parents e71e1fd + 933fa84 commit dc66844
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 1 deletion.
8 changes: 8 additions & 0 deletions lib/wx/core/brush.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,16 @@
# Copyright 2004-2007, wxRuby development team
# released under the MIT-like wxRuby2 license

require_relative './enum'

module Wx

TheBrushList = Wx::Brush

class BrushStyle < Wx::Enum

set_non_distinct(%i[BRUSHSTYLE_INVALID BRUSHSTYLE_FIRST_HATCH BRUSHSTYLE_LAST_HATCH])

end

end
49 changes: 49 additions & 0 deletions lib/wx/core/defs.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright (c) 2023 M.J.N. Corino, The Netherlands
#
# This software is released under the MIT license.
#
# Some parts are
# Copyright 2004-2007, wxRuby development team
# released under the MIT-like wxRuby2 license

require_relative './enum'

module Wx

class Orientation < Wx::Enum

set_non_distinct(%i[ORIENTATION_MASK])

end

class Direction < Wx::Enum

set_non_distinct(%i[TOP BOTTOM NORTH SOUTH WEST EAST ALL DIRECTION_MASK])

end

class Alignment < Wx::Enum

set_non_distinct(%i[ALIGN_INVALID ALIGN_CENTRE_HORIZONTAL ALIGN_LEFT ALIGN_TOP ALIGN_CENTRE_VERTICAL ALIGN_CENTER ALIGN_MASK])

end

class SizerFlagBits < Wx::Enum

set_non_distinct(%i[SIZER_FLAG_BITS_MASK])

end

class Stretch < Wx::Enum

set_non_distinct(%i[GROW STRETCH_MASK])

end

class Border < Wx::Enum

set_non_distinct(%i[BORDER_THEME BORDER_MASK])

end

end
14 changes: 14 additions & 0 deletions lib/wx/core/font.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Copyright (c) 2023 M.J.N. Corino, The Netherlands
#
# This software is released under the MIT license.
#
# Some parts are
# Copyright 2004-2007, wxRuby development team
# released under the MIT-like wxRuby2 license

require_relative './font/encoding'
require_relative './enum'

module Wx

Expand Down Expand Up @@ -27,4 +35,10 @@ def set_default_encoding_name(enc)
# can be accessed through that name too.
TheFontList = Font

class FontFlag < Wx::Enum

set_non_distinct(%i[FONTFLAG_MASK])

end

end
20 changes: 20 additions & 0 deletions lib/wx/core/pen.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,28 @@
# Copyright 2004-2007, wxRuby development team
# released under the MIT-like wxRuby2 license

require_relative './enum'

module Wx

ThePenList = Wx::Pen

class PenStyle < Wx::Enum

set_non_distinct(%i[PENSTYLE_INVALID PENSTYLE_FIRST_HATCH PENSTYLE_LAST_HATCH])

end

class PenJoin < Wx::Enum

set_non_distinct(%i[JOIN_INVALID])

end

class PenCap < Wx::Enum

set_non_distinct(%i[CAP_INVALID])

end

end
2 changes: 1 addition & 1 deletion lib/wx/doc/enum.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class << self
# Sets a class specific list of enumerator ids (symbols) that should be considered
# non-distinctive enum values (examples would be convenience constants combining
# multiple distinctive enumerators or enumerators denoting the first/lowest and/or last/highest
# distinctive enumerators).
# distinctive enumerators). Mostly useful for bitmask enum classes.
# @param [Array<Symbol>] lst
def set_non_distinct(lst) end
alias :non_distinct= :set_non_distinct
Expand Down

0 comments on commit dc66844

Please sign in to comment.