-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e6199ce
Showing
15 changed files
with
804 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<buildpath> | ||
<buildpathentry kind="src" path="fan"/> | ||
<buildpathentry kind="con" path="org.eclipse.dltk.launching.INTERPRETER_CONTAINER"/> | ||
</buildpath> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="con" path="com.xored.fanide.jdt.launching.FANJAVA_CONTAINER"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
<classpathentry kind="output" path="build"/> | ||
</classpath> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/.hg/ | ||
/.skyspark/ | ||
/bin/ | ||
/build/ | ||
/sky/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>App Kit</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.dltk.core.scriptbuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>com.xored.fanide.core.nature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using build::BuildPod | ||
|
||
class Build : BuildPod { | ||
|
||
new make() { | ||
podName = "afAppKit" | ||
summary = "My Awesome appKit project" | ||
version = Version("0.0.1") | ||
|
||
meta = [ | ||
"pod.dis" : "App Kit", | ||
] | ||
|
||
depends = [ | ||
// ---- Fantom Core ----------------- | ||
"sys 1.0.73 - 1.0", | ||
"dom 1.0.73 - 1.0", | ||
] | ||
|
||
srcDirs = [`fan/`, `fan/appkit/`, `fan/core/`, `fan/util/`] | ||
resDirs = [`doc/`] | ||
jsDirs = [`js/`] | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
Overview | ||
******** | ||
afAppKit - My Awesome appKit project |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
using dom | ||
|
||
** | ||
** Checkbox displays a checkbox that can be toggled on and off. | ||
** | ||
** - domkit 1.0.75 | ||
@Js class Checkbox { | ||
|
||
Elem elem { private set } | ||
|
||
private new _make(Elem elem) { | ||
this.elem = elem | ||
|
||
if (elem.tagName != "input" && elem["type"] != "checkbox") | ||
throw ArgErr("Elem not an input checkbox: ${elem.html}") | ||
|
||
elem.onEvent("change", false) |e| { | ||
fireAction(e) | ||
} | ||
} | ||
|
||
static new fromSelector(Str selector) { | ||
elem := Win.cur.doc.querySelector(selector) | ||
if (elem == null) throw Err("Could not find Checkbox: ${selector}") | ||
return fromElem(elem) | ||
} | ||
|
||
static new fromElem(Elem elem) { | ||
if (elem.prop(Checkbox#.qname) == null) | ||
elem.setProp(Checkbox#.qname, Checkbox._make(elem)) | ||
return elem.prop(Checkbox#.qname) | ||
} | ||
|
||
** Set to 'true' to set field to readonly mode. | ||
Bool ro { | ||
get { elem->readOnly } | ||
set { elem->readOnly = it } | ||
} | ||
|
||
** Get or set indeterminate flag. | ||
Bool indeterminate { | ||
get { elem->indeterminate } | ||
set { elem->indeterminate = it } | ||
} | ||
|
||
** Name of input. | ||
Str? name { | ||
get { elem->name } | ||
set { elem->name = it } | ||
} | ||
|
||
** Value of checked. | ||
Bool checked { | ||
get { elem->checked } | ||
set { elem->checked = it } | ||
} | ||
|
||
** Callback when 'enter' key is pressed. | ||
Void onAction(|This| f) { this.cbAction = f } | ||
|
||
internal Void fireAction(Event? e) { cbAction?.call(this) } | ||
private Func? cbAction := null | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using dom | ||
|
||
** | ||
** Hyperlink anchor element | ||
** | ||
** - domkit 1.0.75 | ||
@Js class Link { | ||
|
||
Elem elem { private set } | ||
|
||
private new _make(Elem elem) { | ||
this.elem = elem | ||
|
||
if (elem.tagName != "a") | ||
throw ArgErr("Elem not an anchor: ${elem.html}") | ||
} | ||
|
||
static new fromSelector(Str selector) { | ||
elem := Win.cur.doc.querySelector(selector) | ||
if (elem == null) throw Err("Could not find Link: ${selector}") | ||
return fromElem(elem) | ||
} | ||
|
||
static new fromElem(Elem elem) { | ||
if (elem.prop(Link#.qname) == null) | ||
elem.setProp(Link#.qname, Link._make(elem)) | ||
return elem.prop(Link#.qname) | ||
} | ||
|
||
** The target attribute specifies where to open the linked document. | ||
Str target { | ||
get { this->target } | ||
set { this->target = it } | ||
} | ||
|
||
** URI to hyperlink to. | ||
Uri url { | ||
get { Uri.decode(elem->href ?: "") } | ||
set { elem->href = it.encode } | ||
} | ||
} |
Oops, something went wrong.