package com.kdanmobile.reader.screen.view

import android.content.Context
import android.support.constraint.ConstraintLayout
import android.util.AttributeSet
import android.view.LayoutInflater
import com.kdanmobile.reader.R
import kotlinx.android.synthetic.main.view_viewer_edit_tab.view.*

class ViewerEditTabView : ConstraintLayout {

    var onClickListenerTabTextBox: OnClickListener? = null
        set(value) {
            field = value
            viewerEdit_tab_textBox?.setOnClickListener(value)
        }

    var onClickListenerTabSignature: OnClickListener? = null
        set(value) {
            field = value
            viewerEdit_tab_signature?.setOnClickListener(value)
        }

    var onClickListenerTabStamp: OnClickListener? = null
        set(value) {
            field = value
            viewerEdit_tab_stamp?.setOnClickListener(value)
        }

    var onClickListenerTabShape: OnClickListener? = null
        set(value) {
            field = value
            viewerEdit_tab_shape?.setOnClickListener(value)
        }

    var onClickListenerTabForm: OnClickListener? = null
        set(value) {
            field = value
            viewerEdit_tab_form?.setOnClickListener(value)
        }

    constructor(context: Context) : super(context) {
        initView()
    }

    constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
        initView()
    }

    constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle) {
        initView()
    }

    private fun initView() {
        LayoutInflater.from(context).inflate(R.layout.view_viewer_edit_tab, this)
    }
}