1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00
This commit is contained in:
gnosygnu
2015-08-30 22:57:59 -04:00
parent ed911e3de5
commit 5fc4eb41ec
579 changed files with 2460 additions and 1564 deletions

View File

@@ -18,13 +18,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package gplx.gfui; import gplx.*;
class GfuiBtnClickBnd implements InjectAble, GfoInvkAble {
public void Inject(Object owner) {
GfuiElem elem = GfuiElem_.cast_(owner);
GfuiElem elem = GfuiElem_.cast(owner);
IptBnd_.cmd_(IptCfg_.Null, elem, GfuiElemKeys.ActionExec_cmd, IptKey_.Enter, IptKey_.Space);
IptBnd_.cmd_(IptCfg_.Null, elem, GfuiElemKeys.Focus_cmd, IptMouseBtn_.Left);
IptBnd_.ipt_to_(IptCfg_.Null, elem, this, ExecMouseUp_cmd, IptEventType_.MouseUp, IptMouseBtn_.Left);
}
void ExecMouseUp(IptEventData iptData) {
GfuiElem elem = GfuiElem_.cast_(iptData.Sender());
GfuiElem elem = GfuiElem_.cast(iptData.Sender());
int x = iptData.MousePos().X(), y = iptData.MousePos().Y();
SizeAdp buttonSize = elem.Size();
if ( x >= 0 && x <= buttonSize.Width()

View File

@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package gplx.gfui; import gplx.*;
public class GfuiBtn_ {
public static GfuiBtn as_(Object obj) {return obj instanceof GfuiBtn ? (GfuiBtn)obj : null;}
public static GfuiBtn cast_(Object obj) {try {return (GfuiBtn)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, GfuiBtn.class, obj);}}
public static GfuiBtn cast(Object obj) {try {return (GfuiBtn)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, GfuiBtn.class, obj);}}
public static GfuiBtn msg_(String key, GfuiElem owner, GfoMsg msg) {
GfuiBtn rv = new_(key); rv.Owner_(owner);

View File

@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package gplx.gfui; import gplx.*;
public class GfuiChkBox_ {
public static GfuiChkBox as_(Object obj) {return obj instanceof GfuiChkBox ? (GfuiChkBox)obj : null;}
public static GfuiChkBox cast_(Object obj) {try {return (GfuiChkBox)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, GfuiChkBox.class, obj);}}
public static GfuiChkBox cast(Object obj) {try {return (GfuiChkBox)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, GfuiChkBox.class, obj);}}
@gplx.Internal protected static GfuiChkBox new_() {
GfuiChkBox rv = new GfuiChkBox();
rv.ctor_GfuiBox_base(GfuiElem_.init_focusAble_true_());

View File

@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package gplx.gfui; import gplx.*;
public class GfuiTextBox_ {
public static GfuiTextBox as_(Object obj) {return obj instanceof GfuiTextBox ? (GfuiTextBox)obj : null;}
public static GfuiTextBox cast_(Object obj) {try {return (GfuiTextBox)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, GfuiTextBox.class, obj);}}
public static GfuiTextBox cast(Object obj) {try {return (GfuiTextBox)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, GfuiTextBox.class, obj);}}
public static final String NewLine = "\n";
public static final String Ctor_Memo = "TextBox_Memo";