projects
/
org.ibex.core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
06ee5c5
)
support for font.ui.width and height
author
david
<david@zentus.com>
Sat, 28 Feb 2004 09:46:29 +0000
(09:46 +0000)
committer
david
<david@zentus.com>
Sat, 28 Feb 2004 09:46:29 +0000
(09:46 +0000)
darcs-hash:
20040228094629
-ac46f-
8966fbf95e777ea113c5b099402ecc13d58bc4da
.gz
src/org/ibex/Ibex.java
patch
|
blob
|
history
diff --git
a/src/org/ibex/Ibex.java
b/src/org/ibex/Ibex.java
index
1b55939
..
61b51a8
100644
(file)
--- a/
src/org/ibex/Ibex.java
+++ b/
src/org/ibex/Ibex.java
@@
-65,6
+65,8
@@
public final class Ibex extends JS.Cloneable {
case "ui": return getSub("ui");
case "ui.font": return getSub("ui.font");
case "ui.font.wait": return METHOD;
case "ui": return getSub("ui");
case "ui.font": return getSub("ui.font");
case "ui.font.wait": return METHOD;
+ case "ui.font.width": return METHOD;
+ case "ui.font.height": return METHOD;
case "ui.font.sansserif": return Main.builtin.get("fonts/vera/Vera.ttf");
case "ui.font.monospace": return Main.builtin.get("fonts/vera/VeraMono.ttf");
case "ui.font.serif": return Main.builtin.get("fonts/vera/VeraSe.ttf");
case "ui.font.sansserif": return Main.builtin.get("fonts/vera/Vera.ttf");
case "ui.font.monospace": return Main.builtin.get("fonts/vera/VeraMono.ttf");
case "ui.font.serif": return Main.builtin.get("fonts/vera/VeraSe.ttf");
@@
-198,7
+200,8
@@
public final class Ibex extends JS.Cloneable {
//#end
case 3:
//#switch(name)
//#end
case 3:
//#switch(name)
- case "font.wait":
+ case "ui.font.height": return N(Font.getFont((Stream)a, JS.toInt(b)).textheight((String)c));
+ case "ui.font.wait":
try {
JS.UnpauseCallback callback = JS.pause();
Font font = Font.getFont((Stream)a, JS.toInt(b));
try {
JS.UnpauseCallback callback = JS.pause();
Font font = Font.getFont((Stream)a, JS.toInt(b));
@@
-206,6
+209,8
@@
public final class Ibex extends JS.Cloneable {
} catch (JS.NotPauseableException npe) {
JS.error("can't wait for a font in a foreground thread");
}
} catch (JS.NotPauseableException npe) {
JS.error("can't wait for a font in a foreground thread");
}
+ return null;
+ case "ui.font.width": return N(Font.getFont((Stream)a, JS.toInt(b)).textwidth((String)c));
//#end
break;
}
//#end
break;
}
@@
-215,7
+220,7
@@
public final class Ibex extends JS.Cloneable {
throw new JSExn("invalid argument for ibex object method "+name+"()");
}
throw new JSExn("invalid argument for ibex object method "+name+"()");
}
- throw new JSExn("invalid number of arguments for ibex object method "+name+"()");
+ throw new JSExn("invalid number of arguments ("+nargs+") for ibex object method "+name+"()");
}
public Stream url2res(String url) throws JSExn {
}
public Stream url2res(String url) throws JSExn {