Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/haxeui/hxWidgets
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Sep 3, 2024
2 parents 7e676b2 + 1f66edf commit 76cadde
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
22 changes: 22 additions & 0 deletions src/wx/widgets/PGPropertyValuesFlags.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package wx.widgets;

#if (wxWidgetsVersion > version("3.2.4"))

@:include("wx/propgrid/propgriddefs.h")
extern enum abstract PGPropertyValuesFlags(PGPropertyValuesFlagsImpl) {
@:native("wxPGPropertyValuesFlags::DontRecurse") var DontRecurse;
Expand All @@ -15,3 +17,23 @@ extern enum abstract PGPropertyValuesFlags(PGPropertyValuesFlagsImpl) {
@:native("cpp::Struct<wxPGPropertyValuesFlags, cpp::EnumHandler>")
extern class PGPropertyValuesFlagsImpl {
}

#else

@:include("wx/propgrid/property.h")
extern enum abstract PGPropertyValuesFlags(PGPropertyValuesFlagsImpl) {
@:native("wxPG_PROPERTYVALUES_FLAGS::wxPG_DONT_RECURSE") var DontRecurse;
@:native("wxPG_PROPERTYVALUES_FLAGS::wxPG_KEEP_STRUCTURE") var KeepStructure;
@:native("wxPG_PROPERTYVALUES_FLAGS::wxPG_RECURSE") var Recurse;
@:native("wxPG_PROPERTYVALUES_FLAGS::wxPG_INC_ATTRIBUTES") var IncAttributes;
@:native("wxPG_PROPERTYVALUES_FLAGS::wxPG_RECURSE_STARTS") var RecurseStarts;
@:native("wxPG_PROPERTYVALUES_FLAGS::wxPG_FORCE") var Force;
@:native("wxPG_PROPERTYVALUES_FLAGS::wxPG_SORT_TOP_LEVEL_ONLY") var SortTopLevelOnly;
}

@:include("wx/propgrid/property.h")
@:native("cpp::Struct<wxPG_PROPERTYVALUES_FLAGS, cpp::EnumHandler>")
extern class PGPropertyValuesFlagsImpl {
}

#end
15 changes: 11 additions & 4 deletions src/wx/widgets/styles/PropertyGridAttributes.hx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@ package wx.widgets.styles;
// https://docs.wxwidgets.org/latest/property_8h.html#propgrid_property_attributes
@:headerCode("#include <wx/propgrid/propgrid.h>")
class PropertyGridAttributes {
public static var ATTR_HINT = untyped __cpp__("wxPG_ATTR_HINT");
public static var ATTR_MAX = untyped __cpp__("wxPG_ATTR_MAX");
public static var ATTR_MIN = untyped __cpp__("wxPG_ATTR_MIN");
#if (wxWidgetsVersion < version("3.2.3"))
public static var ATTR_HINT:String = untyped __cpp__("wxS(\"Hint\")");
public static var ATTR_MAX:String = untyped __cpp__("wxS(\"Max\")");
public static var ATTR_MIN:String = untyped __cpp__("wxS(\"Min\")");
public static var ATTR_UNITS:String = untyped __cpp__("wxS(\"Units\")");
#else
public static var ATTR_HINT:String = untyped __cpp__("wxPG_ATTR_HINT");
public static var ATTR_MAX:String = untyped __cpp__("wxPG_ATTR_MAX");
public static var ATTR_MIN:String = untyped __cpp__("wxPG_ATTR_MIN");
public static var ATTR_UNITS:String = untyped __cpp__("wxPG_ATTR_UNITS");
#end
public static var ATTR_MULTICHOICE_USERSTRINGMODE = untyped __cpp__("wxPG_ATTR_MULTICHOICE_USERSTRINGMODE");
public static var ATTR_SPINCTRL_MOTION = untyped __cpp__("wxPG_ATTR_SPINCTRL_MOTION");
public static var ATTR_SPINCTRL_STEP = untyped __cpp__("wxPG_ATTR_SPINCTRL_STEP");
public static var ATTR_SPINCTRL_WRAP = untyped __cpp__("wxPG_ATTR_SPINCTRL_WRAP");
public static var ATTR_UNITS = untyped __cpp__("wxPG_ATTR_UNITS");
public static var BOOL_USE_CHECKBOX = untyped __cpp__("wxPG_BOOL_USE_CHECKBOX");
public static var BOOL_USE_DOUBLE_CLICK_CYCLING = untyped __cpp__("wxPG_BOOL_USE_DOUBLE_CLICK_CYCLING");
public static var COLOUR_ALLOW_CUSTOM = untyped __cpp__("wxPG_COLOUR_ALLOW_CUSTOM");
Expand Down

0 comments on commit 76cadde

Please sign in to comment.