package b4a.ClsCustomButton;


import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;

public class custombutton extends B4AClass.ImplB4AClass implements BA.SubDelegator{
    private static java.util.HashMap<String, java.lang.reflect.Method> htSubs;
    private void innerInitialize(BA _ba) throws Exception {
        if (ba == null) {
            ba = new anywheresoftware.b4a.ShellBA(_ba, this, htSubs, "b4a.ClsCustomButton.custombutton");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", b4a.ClsCustomButton.custombutton.class).invoke(this, new Object[] {null});
        else
            ba.raiseEvent2(null, true, "class_globals", false);
    }

 
    public void  innerInitializeHelper(anywheresoftware.b4a.BA _ba) throws Exception{
        innerInitialize(_ba);
    }
    public Object callSub(String sub, Object sender, Object[] args) throws Exception {
        return BA.SubDelegator.SubNotFound;
    }
public anywheresoftware.b4a.keywords.Common __c = null;
public String _meventname = "";
public Object _mcallback = null;
public anywheresoftware.b4a.objects.PanelWrapper _mbase = null;
public int _mleft = 0;
public int _mtop = 0;
public int _mwidth = 0;
public int _mheight = 0;
public String _mtext = "";
public String _micon = "";
public anywheresoftware.b4a.keywords.constants.TypefaceWrapper _micontypeface = null;
public int _mtextcolor = 0;
public float _micontextsize = 0f;
public float _mtextsize = 0f;
public Object _mtag = null;
public anywheresoftware.b4a.objects.LabelWrapper _mlabel = null;
public anywheresoftware.b4a.objects.LabelWrapper _miconlabel = null;
public anywheresoftware.b4a.objects.PanelWrapper _mparent = null;
public b4a.ClsCustomButton.main _main = null;
public String  _initialize(b4a.ClsCustomButton.custombutton __ref,anywheresoftware.b4a.BA _ba,Object _callback,String _eventname) throws Exception{
__ref = this;
innerInitialize(_ba);
RDebugUtils.currentModule="custombutton";
if (Debug.shouldDelegate(ba, "initialize"))
	return (String) Debug.delegate(ba, "initialize", new Object[] {_ba,_callback,_eventname});
RDebugUtils.currentLine=458752;
 //BA.debugLineNum = 458752;BA.debugLine="Public Sub Initialize (Callback As Object, EventNa";
RDebugUtils.currentLine=458753;
 //BA.debugLineNum = 458753;BA.debugLine="mEventName = EventName";
__ref._meventname = _eventname;
RDebugUtils.currentLine=458754;
 //BA.debugLineNum = 458754;BA.debugLine="mCallBack = Callback";
__ref._mcallback = _callback;
RDebugUtils.currentLine=458756;
 //BA.debugLineNum = 458756;BA.debugLine="mIcon = Chr(0xE859)";
__ref._micon = BA.ObjectToString(__c.Chr((int) (0xe859)));
RDebugUtils.currentLine=458757;
 //BA.debugLineNum = 458757;BA.debugLine="mText = \"Test\"";
__ref._mtext = "Test";
RDebugUtils.currentLine=458758;
 //BA.debugLineNum = 458758;BA.debugLine="mTextColor = Colors.Black";
__ref._mtextcolor = __c.Colors.Black;
RDebugUtils.currentLine=458759;
 //BA.debugLineNum = 458759;BA.debugLine="End Sub";
return "";
}
public String  _seticontypeface(b4a.ClsCustomButton.custombutton __ref,anywheresoftware.b4a.keywords.constants.TypefaceWrapper _icontypeface) throws Exception{
__ref = this;
RDebugUtils.currentModule="custombutton";
if (Debug.shouldDelegate(ba, "seticontypeface"))
	return (String) Debug.delegate(ba, "seticontypeface", new Object[] {_icontypeface});
RDebugUtils.currentLine=917504;
 //BA.debugLineNum = 917504;BA.debugLine="Public Sub setIconTypeface(IconTypeface As Typefac";
RDebugUtils.currentLine=917505;
 //BA.debugLineNum = 917505;BA.debugLine="mIconTypeface = IconTypeface";
__ref._micontypeface = _icontypeface;
RDebugUtils.currentLine=917506;
 //BA.debugLineNum = 917506;BA.debugLine="End Sub";
return "";
}
public String  _addtoparent(b4a.ClsCustomButton.custombutton __ref,anywheresoftware.b4a.objects.PanelWrapper _parent,int _left,int _top,int _width,int _height,int _textcolor,String _icon,String _text) throws Exception{
__ref = this;
RDebugUtils.currentModule="custombutton";
if (Debug.shouldDelegate(ba, "addtoparent"))
	return (String) Debug.delegate(ba, "addtoparent", new Object[] {_parent,_left,_top,_width,_height,_textcolor,_icon,_text});
RDebugUtils.currentLine=655360;
 //BA.debugLineNum = 655360;BA.debugLine="Public Sub AddToParent(Parent As Panel, Left As In";
RDebugUtils.currentLine=655361;
 //BA.debugLineNum = 655361;BA.debugLine="mLeft = Left";
__ref._mleft = _left;
RDebugUtils.currentLine=655362;
 //BA.debugLineNum = 655362;BA.debugLine="mTop = Top";
__ref._mtop = _top;
RDebugUtils.currentLine=655363;
 //BA.debugLineNum = 655363;BA.debugLine="mWidth = Width";
__ref._mwidth = _width;
RDebugUtils.currentLine=655364;
 //BA.debugLineNum = 655364;BA.debugLine="mHeight = Height";
__ref._mheight = _height;
RDebugUtils.currentLine=655365;
 //BA.debugLineNum = 655365;BA.debugLine="mParent = Parent";
__ref._mparent = _parent;
RDebugUtils.currentLine=655367;
 //BA.debugLineNum = 655367;BA.debugLine="mBase.Initialize(\"mBase\")";
__ref._mbase.Initialize(ba,"mBase");
RDebugUtils.currentLine=655368;
 //BA.debugLineNum = 655368;BA.debugLine="Parent.AddView(mBase, mLeft, mTop, mWidth, mHeigh";
_parent.AddView((android.view.View)(__ref._mbase.getObject()),__ref._mleft,__ref._mtop,__ref._mwidth,__ref._mheight);
RDebugUtils.currentLine=655370;
 //BA.debugLineNum = 655370;BA.debugLine="mIcon = Icon";
__ref._micon = _icon;
RDebugUtils.currentLine=655371;
 //BA.debugLineNum = 655371;BA.debugLine="mText = Text";
__ref._mtext = _text;
RDebugUtils.currentLine=655372;
 //BA.debugLineNum = 655372;BA.debugLine="mTextColor = TextColor";
__ref._mtextcolor = _textcolor;
RDebugUtils.currentLine=655374;
 //BA.debugLineNum = 655374;BA.debugLine="InitClass";
__ref._initclass(null);
RDebugUtils.currentLine=655375;
 //BA.debugLineNum = 655375;BA.debugLine="End Sub";
return "";
}
public String  _settag(b4a.ClsCustomButton.custombutton __ref,Object _tag) throws Exception{
__ref = this;
RDebugUtils.currentModule="custombutton";
if (Debug.shouldDelegate(ba, "settag"))
	return (String) Debug.delegate(ba, "settag", new Object[] {_tag});
RDebugUtils.currentLine=983040;
 //BA.debugLineNum = 983040;BA.debugLine="Public Sub setTag(Tag As Object)";
RDebugUtils.currentLine=983041;
 //BA.debugLineNum = 983041;BA.debugLine="mTag = Tag";
__ref._mtag = _tag;
RDebugUtils.currentLine=983042;
 //BA.debugLineNum = 983042;BA.debugLine="mBase.Tag = Tag";
__ref._mbase.setTag(_tag);
RDebugUtils.currentLine=983043;
 //BA.debugLineNum = 983043;BA.debugLine="End Sub";
return "";
}
public Object  _gettag(b4a.ClsCustomButton.custombutton __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="custombutton";
if (Debug.shouldDelegate(ba, "gettag"))
	return (Object) Debug.delegate(ba, "gettag", null);
RDebugUtils.currentLine=1048576;
 //BA.debugLineNum = 1048576;BA.debugLine="Public Sub getTag As Object";
RDebugUtils.currentLine=1048577;
 //BA.debugLineNum = 1048577;BA.debugLine="Return mTag";
if (true) return __ref._mtag;
RDebugUtils.currentLine=1048578;
 //BA.debugLineNum = 1048578;BA.debugLine="End Sub";
return null;
}
public String  _initclass(b4a.ClsCustomButton.custombutton __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="custombutton";
if (Debug.shouldDelegate(ba, "initclass"))
	return (String) Debug.delegate(ba, "initclass", null);
int _lblleft = 0;
int _lblwidth = 0;
RDebugUtils.currentLine=720896;
 //BA.debugLineNum = 720896;BA.debugLine="Private Sub InitClass";
RDebugUtils.currentLine=720898;
 //BA.debugLineNum = 720898;BA.debugLine="Private lblLeft, lblWidth  As Int";
_lblleft = 0;
_lblwidth = 0;
RDebugUtils.currentLine=720899;
 //BA.debugLineNum = 720899;BA.debugLine="lblWidth = 2 * mHeight / 3		'icon Label width and";
_lblwidth = (int) (2*__ref._mheight/(double)3);
RDebugUtils.currentLine=720900;
 //BA.debugLineNum = 720900;BA.debugLine="lblLeft = (mWidth - lblWidth) / 2";
_lblleft = (int) ((__ref._mwidth-_lblwidth)/(double)2);
RDebugUtils.currentLine=720903;
 //BA.debugLineNum = 720903;BA.debugLine="mIconLabel.Initialize(\"\")";
__ref._miconlabel.Initialize(ba,"");
RDebugUtils.currentLine=720904;
 //BA.debugLineNum = 720904;BA.debugLine="mIconTextSize = mHeight / 2 / GetDeviceLayoutValu";
__ref._micontextsize = (float) (__ref._mheight/(double)2/(double)__c.GetDeviceLayoutValues(ba).Scale);
RDebugUtils.currentLine=720905;
 //BA.debugLineNum = 720905;BA.debugLine="mIconLabel.Typeface = mIconTypeface'";
__ref._miconlabel.setTypeface((android.graphics.Typeface)(__ref._micontypeface.getObject()));
RDebugUtils.currentLine=720906;
 //BA.debugLineNum = 720906;BA.debugLine="mIconLabel.TextSize = mIconTextSize";
__ref._miconlabel.setTextSize(__ref._micontextsize);
RDebugUtils.currentLine=720907;
 //BA.debugLineNum = 720907;BA.debugLine="mIconLabel.Gravity = Gravity.CENTER";
__ref._miconlabel.setGravity(__c.Gravity.CENTER);
RDebugUtils.currentLine=720908;
 //BA.debugLineNum = 720908;BA.debugLine="mIconLabel.TextColor = mTextColor";
__ref._miconlabel.setTextColor(__ref._mtextcolor);
RDebugUtils.currentLine=720909;
 //BA.debugLineNum = 720909;BA.debugLine="mBase.AddView(mIconLabel, lblLeft, 0, lblWidth, l";
__ref._mbase.AddView((android.view.View)(__ref._miconlabel.getObject()),_lblleft,(int) (0),_lblwidth,_lblwidth);
RDebugUtils.currentLine=720910;
 //BA.debugLineNum = 720910;BA.debugLine="mIconLabel.Text = mIcon";
__ref._miconlabel.setText((Object)(__ref._micon));
RDebugUtils.currentLine=720913;
 //BA.debugLineNum = 720913;BA.debugLine="mLabel.Initialize(\"\")";
__ref._mlabel.Initialize(ba,"");
RDebugUtils.currentLine=720914;
 //BA.debugLineNum = 720914;BA.debugLine="mTextSize = lblWidth / 3 / GetDeviceLayoutValues.";
__ref._mtextsize = (float) (_lblwidth/(double)3/(double)__c.GetDeviceLayoutValues(ba).Scale);
RDebugUtils.currentLine=720915;
 //BA.debugLineNum = 720915;BA.debugLine="mLabel.TextSize = mTextSize";
__ref._mlabel.setTextSize(__ref._mtextsize);
RDebugUtils.currentLine=720916;
 //BA.debugLineNum = 720916;BA.debugLine="mLabel.TextColor = mTextColor";
__ref._mlabel.setTextColor(__ref._mtextcolor);
RDebugUtils.currentLine=720917;
 //BA.debugLineNum = 720917;BA.debugLine="mLabel.Gravity = Bit.Or(Gravity.CENTER_HORIZONTAL";
__ref._mlabel.setGravity(__c.Bit.Or(__c.Gravity.CENTER_HORIZONTAL,__c.Gravity.TOP));
RDebugUtils.currentLine=720918;
 //BA.debugLineNum = 720918;BA.debugLine="mBase.AddView(mLabel, 0, 2 * mHeight / 3, mWidth,";
__ref._mbase.AddView((android.view.View)(__ref._mlabel.getObject()),(int) (0),(int) (2*__ref._mheight/(double)3),__ref._mwidth,(int) (__ref._mheight/(double)3));
RDebugUtils.currentLine=720919;
 //BA.debugLineNum = 720919;BA.debugLine="mLabel.Text = mText";
__ref._mlabel.setText((Object)(__ref._mtext));
RDebugUtils.currentLine=720920;
 //BA.debugLineNum = 720920;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(b4a.ClsCustomButton.custombutton __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="custombutton";
RDebugUtils.currentLine=393216;
 //BA.debugLineNum = 393216;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=393217;
 //BA.debugLineNum = 393217;BA.debugLine="Private mEventName As String";
_meventname = "";
RDebugUtils.currentLine=393218;
 //BA.debugLineNum = 393218;BA.debugLine="Private mCallBack As Object";
_mcallback = new Object();
RDebugUtils.currentLine=393219;
 //BA.debugLineNum = 393219;BA.debugLine="Private mBase As Panel";
_mbase = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=393221;
 //BA.debugLineNum = 393221;BA.debugLine="Private mLeft, mTop, mWidth, mHeight As Int";
_mleft = 0;
_mtop = 0;
_mwidth = 0;
_mheight = 0;
RDebugUtils.currentLine=393222;
 //BA.debugLineNum = 393222;BA.debugLine="Private mText, mIcon As String";
_mtext = "";
_micon = "";
RDebugUtils.currentLine=393223;
 //BA.debugLineNum = 393223;BA.debugLine="Private mIconTypeface As Typeface";
_micontypeface = new anywheresoftware.b4a.keywords.constants.TypefaceWrapper();
RDebugUtils.currentLine=393224;
 //BA.debugLineNum = 393224;BA.debugLine="Private mTextColor As Int";
_mtextcolor = 0;
RDebugUtils.currentLine=393225;
 //BA.debugLineNum = 393225;BA.debugLine="Private mIconTextSize, mTextSize As Float";
_micontextsize = 0f;
_mtextsize = 0f;
RDebugUtils.currentLine=393226;
 //BA.debugLineNum = 393226;BA.debugLine="Private mTag As Object";
_mtag = new Object();
RDebugUtils.currentLine=393228;
 //BA.debugLineNum = 393228;BA.debugLine="Private mLabel, mIconLabel As Label";
_mlabel = new anywheresoftware.b4a.objects.LabelWrapper();
_miconlabel = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=393229;
 //BA.debugLineNum = 393229;BA.debugLine="Private mParent As Panel";
_mparent = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=393230;
 //BA.debugLineNum = 393230;BA.debugLine="End Sub";
return "";
}
public String  _designercreateview(b4a.ClsCustomButton.custombutton __ref,anywheresoftware.b4a.objects.PanelWrapper _base,anywheresoftware.b4a.objects.LabelWrapper _lbl,anywheresoftware.b4a.objects.collections.Map _props) throws Exception{
__ref = this;
RDebugUtils.currentModule="custombutton";
if (Debug.shouldDelegate(ba, "designercreateview"))
	return (String) Debug.delegate(ba, "designercreateview", new Object[] {_base,_lbl,_props});
RDebugUtils.currentLine=524288;
 //BA.debugLineNum = 524288;BA.debugLine="Public Sub DesignerCreateView (Base As Panel, Lbl";
RDebugUtils.currentLine=524289;
 //BA.debugLineNum = 524289;BA.debugLine="mLeft = Base.Left";
__ref._mleft = _base.getLeft();
RDebugUtils.currentLine=524290;
 //BA.debugLineNum = 524290;BA.debugLine="mTop = Base.Top";
__ref._mtop = _base.getTop();
RDebugUtils.currentLine=524291;
 //BA.debugLineNum = 524291;BA.debugLine="mWidth = Base.Width";
__ref._mwidth = _base.getWidth();
RDebugUtils.currentLine=524292;
 //BA.debugLineNum = 524292;BA.debugLine="mHeight = Base.Height";
__ref._mheight = _base.getHeight();
RDebugUtils.currentLine=524293;
 //BA.debugLineNum = 524293;BA.debugLine="mIcon = Lbl.Text";
__ref._micon = _lbl.getText();
RDebugUtils.currentLine=524294;
 //BA.debugLineNum = 524294;BA.debugLine="mParent = Props.Get(\"activity\")";
__ref._mparent.setObject((android.view.ViewGroup)(_props.Get((Object)("activity"))));
RDebugUtils.currentLine=524295;
 //BA.debugLineNum = 524295;BA.debugLine="mText = Props.Get(\"Text\")";
__ref._mtext = BA.ObjectToString(_props.Get((Object)("Text")));
RDebugUtils.currentLine=524296;
 //BA.debugLineNum = 524296;BA.debugLine="mBase.Initialize(\"mBase\")";
__ref._mbase.Initialize(ba,"mBase");
RDebugUtils.currentLine=524297;
 //BA.debugLineNum = 524297;BA.debugLine="mParent = Base.Parent";
__ref._mparent.setObject((android.view.ViewGroup)(_base.getParent()));
RDebugUtils.currentLine=524298;
 //BA.debugLineNum = 524298;BA.debugLine="mParent.AddView(mBase, mLeft, mTop, mWidth, mHeig";
__ref._mparent.AddView((android.view.View)(__ref._mbase.getObject()),__ref._mleft,__ref._mtop,__ref._mwidth,__ref._mheight);
RDebugUtils.currentLine=524300;
 //BA.debugLineNum = 524300;BA.debugLine="mTextColor = Lbl.TextColor";
__ref._mtextcolor = _lbl.getTextColor();
RDebugUtils.currentLine=524301;
 //BA.debugLineNum = 524301;BA.debugLine="mIconTypeface = Lbl.Typeface";
__ref._micontypeface.setObject((android.graphics.Typeface)(_lbl.getTypeface()));
RDebugUtils.currentLine=524302;
 //BA.debugLineNum = 524302;BA.debugLine="mTag = Base.Tag";
__ref._mtag = _base.getTag();
RDebugUtils.currentLine=524304;
 //BA.debugLineNum = 524304;BA.debugLine="InitClass";
__ref._initclass(null);
RDebugUtils.currentLine=524305;
 //BA.debugLineNum = 524305;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.objects.PanelWrapper  _getbase(b4a.ClsCustomButton.custombutton __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="custombutton";
if (Debug.shouldDelegate(ba, "getbase"))
	return (anywheresoftware.b4a.objects.PanelWrapper) Debug.delegate(ba, "getbase", null);
RDebugUtils.currentLine=589824;
 //BA.debugLineNum = 589824;BA.debugLine="Public Sub GetBase As Panel";
RDebugUtils.currentLine=589825;
 //BA.debugLineNum = 589825;BA.debugLine="Return mBase";
if (true) return __ref._mbase;
RDebugUtils.currentLine=589826;
 //BA.debugLineNum = 589826;BA.debugLine="End Sub";
return null;
}
public String  _mbase_click(b4a.ClsCustomButton.custombutton __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="custombutton";
if (Debug.shouldDelegate(ba, "mbase_click"))
	return (String) Debug.delegate(ba, "mbase_click", null);
RDebugUtils.currentLine=786432;
 //BA.debugLineNum = 786432;BA.debugLine="Private Sub mBase_Click";
RDebugUtils.currentLine=786433;
 //BA.debugLineNum = 786433;BA.debugLine="If SubExists(mCallBack, mEventName & \"_Click\") =";
if (__c.SubExists(ba,__ref._mcallback,__ref._meventname+"_Click")==__c.True) { 
RDebugUtils.currentLine=786434;
 //BA.debugLineNum = 786434;BA.debugLine="CallSub(mCallBack,  mEventName & \"_Click\")";
__c.CallSubNew(ba,__ref._mcallback,__ref._meventname+"_Click");
 };
RDebugUtils.currentLine=786436;
 //BA.debugLineNum = 786436;BA.debugLine="End Sub";
return "";
}
public String  _mbase_longclick(b4a.ClsCustomButton.custombutton __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="custombutton";
if (Debug.shouldDelegate(ba, "mbase_longclick"))
	return (String) Debug.delegate(ba, "mbase_longclick", null);
RDebugUtils.currentLine=851968;
 //BA.debugLineNum = 851968;BA.debugLine="Private Sub mBase_LongClick";
RDebugUtils.currentLine=851969;
 //BA.debugLineNum = 851969;BA.debugLine="If SubExists(mCallBack, mEventName & \"_LongClick\"";
if (__c.SubExists(ba,__ref._mcallback,__ref._meventname+"_LongClick")==__c.True) { 
RDebugUtils.currentLine=851970;
 //BA.debugLineNum = 851970;BA.debugLine="CallSub(mCallBack,  mEventName & \"_LongClick\")";
__c.CallSubNew(ba,__ref._mcallback,__ref._meventname+"_LongClick");
 };
RDebugUtils.currentLine=851972;
 //BA.debugLineNum = 851972;BA.debugLine="End Sub";
return "";
}
}