mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.8.5.1
This commit is contained in:
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
package gplx.gfui; import gplx.*;
|
||||
class GfuiFocusXferBnd implements InjectAble, GfoInvkAble {
|
||||
public void Inject(Object owner) {
|
||||
GfuiElem elem = GfuiElem_.cast_(owner);
|
||||
GfuiElem elem = GfuiElem_.cast(owner);
|
||||
IptBnd_.cmd_to_(IptCfg_.Null, elem, this, Invk_FocusNext, IptKey_.Down);
|
||||
IptBnd_.cmd_to_(IptCfg_.Null, elem, this, Invk_FocusPrev, IptKey_.Up);
|
||||
}
|
||||
@@ -28,7 +28,7 @@ class GfuiFocusXferBnd implements InjectAble, GfoInvkAble {
|
||||
GfuiElem target = cur;
|
||||
while (true) { // find next visible elem
|
||||
int cycle = TabBox_.Cycle(fwd, curIdx, allElemsInOwnerWin.Count());
|
||||
target = GfuiElem_.cast_(allElemsInOwnerWin.Get_at(cycle));
|
||||
target = GfuiElem_.cast(allElemsInOwnerWin.Get_at(cycle));
|
||||
if (target.Visible()) break;
|
||||
if (cycle == curIdx) break; // either (a) one elem in allElemsInOwnerWin or (b) n elems, and cycled back to start; break, else infinite loop
|
||||
curIdx = cycle;
|
||||
@@ -43,8 +43,8 @@ class GfuiFocusXferBnd implements InjectAble, GfoInvkAble {
|
||||
}
|
||||
}
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
|
||||
if (ctx.Match(k, Invk_FocusNext)) Focus(GfuiElem_.cast_(ctx.MsgSrc()), true);
|
||||
else if (ctx.Match(k, Invk_FocusPrev)) Focus(GfuiElem_.cast_(ctx.MsgSrc()), false);
|
||||
if (ctx.Match(k, Invk_FocusNext)) Focus(GfuiElem_.cast(ctx.MsgSrc()), true);
|
||||
else if (ctx.Match(k, Invk_FocusPrev)) Focus(GfuiElem_.cast(ctx.MsgSrc()), false);
|
||||
else return GfoInvkAble_.Rv_unhandled;
|
||||
return this;
|
||||
} public static final String Invk_FocusNext = "FocusNext", Invk_FocusPrev = "FocusPrev";
|
||||
|
||||
@@ -111,7 +111,7 @@ public class GfuiMenuBar implements GfoInvkAble {
|
||||
String keyChar = String_.MidByLen(text, pos + 1, 1);
|
||||
if (!Char_.IsLetterEnglish(String_.CharAt(keyChar, 0))) return ipt; // keyChar is not a character; EX: 'A & B' (keyChar = space)
|
||||
String keyCharRaw = "key." + String_.Lower(keyChar);
|
||||
ipt = IptKey_.parse_(keyCharRaw);
|
||||
ipt = IptKey_.parse(keyCharRaw);
|
||||
text = String_.MidByLen(text, 0, pos) + String_.Mid(text, pos + 1); // remove mnemPrefix; ex: &File -> File && key.f
|
||||
itm.Text_(text);
|
||||
return ipt;
|
||||
@@ -241,7 +241,7 @@ class GfuiMenuBarItmType {
|
||||
public int Val() {return val;} int val;
|
||||
public String Name() {return name;} private String name;
|
||||
GfuiMenuBarItmType(int v, String n) {val = v; name = n; regy.Add(n, this);}
|
||||
public static GfuiMenuBarItmType parse_(String raw) {
|
||||
public static GfuiMenuBarItmType parse(String raw) {
|
||||
try {return (GfuiMenuBarItmType)regy.Get_by(raw);}
|
||||
catch (Exception e) {Err_.Noop(e); throw Err_.new_parse("GfuiMenuBarItmType", raw);}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class GfuiWinKeyCmdMgr implements GfuiWinOpenAble, GfoInvkAble, GfoEvObj {
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
|
||||
ctx.Match(k, k);
|
||||
CheckForHotKey(IptEventData.ctx_(ctx, m));
|
||||
//boolean handled = CheckForHotKey(IptEventData.cast_(msg.Val())); msg.Fwd_set(!handled); // TOMBSTONE: somehow cause alt-F4 to continue processing and dispose form
|
||||
//boolean handled = CheckForHotKey(IptEventData.cast(msg.Val())); msg.Fwd_set(!handled); // TOMBSTONE: somehow cause alt-F4 to continue processing and dispose form
|
||||
return this;
|
||||
} @gplx.Internal protected static final String CheckForHotKey_cmd = "CheckForHotKey_cmd";
|
||||
|
||||
@@ -56,6 +56,6 @@ class GfuiWinKeyCmdMgr implements GfuiWinOpenAble, GfoInvkAble, GfoEvObj {
|
||||
}
|
||||
public static IptKey ExtractKeyFromText(String raw) {
|
||||
int pos = ExtractPosFromText(raw); if (pos == String_.Find_none) return IptKey_.None;
|
||||
return IptKey_.parse_("key." + String_.Lower(Char_.To_str(String_.CharAt(raw, pos + 1)))); // pos=& pos; + 1 to get next letter
|
||||
return IptKey_.parse("key." + String_.Lower(Char_.To_str(String_.CharAt(raw, pos + 1)))); // pos=& pos; + 1 to get next letter
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ public class GfuiWin_ {
|
||||
, InitKey_winType_tool = "tool"
|
||||
;
|
||||
public static GfuiWin as_(Object obj) {return obj instanceof GfuiWin ? (GfuiWin)obj : null;}
|
||||
public static GfuiWin cast_(Object obj) {try {return (GfuiWin)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, GfuiWin.class, obj);}}
|
||||
public static GfuiWin cast(Object obj) {try {return (GfuiWin)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, GfuiWin.class, obj);}}
|
||||
public static GfuiWin app_(String key) {return bld_(key, InitKey_winType_app, KeyValHash.new_());}
|
||||
public static GfuiWin tool_(String key) {return bld_(key, InitKey_winType_tool, KeyValHash.new_()).TaskbarVisible_(false);}
|
||||
public static GfuiWin sub_(String key, GfuiWin ownerWin) {
|
||||
|
||||
Reference in New Issue
Block a user