Last active
October 13, 2021 13:00
-
-
Save mockey/d8f5f3c802ea3557317e to your computer and use it in GitHub Desktop.
Basic Haxe extern for jQuery UI Dialog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// extern for jQuery UI Dialog (version: 1.8.17) | |
// docs: http://jqueryui.com/demos/dialog/ | |
package jquery.ui; | |
extern class Dialog { | |
inline static function dialog(jq:js.JQuery, opt:OptionsOrString):js.JQuery { | |
return untyped jq.dialog(opt); | |
} | |
} | |
private typedef OptionsOrString = haxe.EitherType<Options,String>; | |
private typedef Options = { | |
?disabled:Bool, //default: false | |
?autoOpen:Bool, //default: true | |
?buttons:Dynamic, //default: {}/[], Object|Array, | |
?closeOnEscape:Bool, //default: true | |
?closeText:String, //default: "close" | |
?dialogClass:String, //default: "" | |
?draggable:Bool, //default: true | |
?height:Int, //default: "auto" | |
?hide:String, //default: null | |
?maxHeight:Int, //default: false | |
?maxWidth:Int, //default: false | |
?minHeight:Int, //default: 150 | |
?minWidth:Int, //default: 150 | |
?modal:Bool, //default: false | |
?position:Dynamic, //default: "center", | |
//"center"|"left"|"right"|"top"|["right","top"]|[350,100] | |
?resizable:Bool, //default: true | |
?show:String, //default: null | |
?stack:Bool, //default: true | |
?title:String, //default: "" | |
?width:Int, //default: 300 | |
?zindex:Int, //default: 1000 | |
//events: | |
?create:Void->Void, | |
?beforeClose:Void->Bool, | |
?open:Void->Void, | |
?focus:Void->Void, | |
?dragStart:Void->Void, | |
?drag:Void->Void, | |
?dragStop:Void->Void, | |
?resizeStart:Void->Void, | |
?resize:Void->Void, | |
?resizeStop:Void->Void, | |
?close:Void->Void | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment