Module AXOWidgets


module AXOWidgets: sig .. end
This module allows easy creation of "graphical" widgets


Each widget kind is organised with :

a virtual "interface" ( called generic_* ) with detailed comments on expected methods behaviour a half virtual plugin ( called *_plugin ) a wrapper to be used to avoid code duplication in implementation

class virtual common : object .. end
class common_wrap : JSOO.obj -> object .. end

Simple widgets



Inheriting from widget provides a complete set of methods for attributes and style manipulation. As it is based on Dom/XHTML/CSS properties, one should be familiar with concepts of , and the such.

types for attribute manipulation



type position =
| Absolute
| Fixed
| Relative
Position attribute enumeration
val string_of_position : position -> string
val position_of_string : string -> position
type color = string 
As there are many ways of giving a color proerty in css, it is very hardto give a better type for color. A private type with a Regexp-check constructor could be used...
val rgb : int -> int -> int -> color
val hex : int -> int -> int -> color
val px_string : int -> string
val pct_string : int -> string
class virtual generic_widget : object .. end
class virtual widget_plugin : object .. end
class virtual generic_container : object .. end
class virtual container_plugin : object .. end
val body : container_plugin
module Button_click: AXOEvents.Make(sig
type v = unit 
val name : string
val name_modifier : string option
val destruct : 'a -> unit
val default_value : unit option
end)
class virtual generic_button : object .. end
class virtual button_plugin : bool -> object .. end
module Dragg_n_drop_move: AXOEvents.Make(sig
type v = int * int 
val name : string
val name_modifier : string option
val destruct : JSOO.obj -> int * int
val default_value : 'a option
end)
module Dragg_n_drop_down: AXOEvents.Make(sig
type v = unit 
val name : string
val name_modifier : string option
val destruct : 'a -> unit
val default_value : 'a option
end)
module Dragg_n_drop_up: AXOEvents.Make(sig
type v = AXOWidgets.common 
val name : string
val name_modifier : string option
val destruct : JSOO.obj -> AXOWidgets.common_wrap
val default_value : 'a option
end)
class shadow : ?style:string -> JSOO.obj -> object .. end
class virtual generic_dragg : object .. end
class virtual dragg_plugin : < activate : unit; deactivate : 'a; .. > -> object .. end