package com.kdanmobile.reader.thumb

import android.graphics.Bitmap
import android.support.v4.util.LruCache
import java.util.HashMap

class ThumbData {
    var viewHeight = 0
    var viewWidth = 0
    var viewPadding = 0
    var currentPage = 0
    var isEditMode = false
    var pageCount = 0
    val maxMemory = Runtime.getRuntime().maxMemory() / 16
    val pages: LruCache<Int, Bitmap> = object: LruCache<Int, Bitmap>(maxMemory.toInt()) {
        override fun sizeOf(key: Int, value: Bitmap): Int {
            return value.byteCount
        }
    }
    var pageSelect: MutableMap<Int, Boolean> = HashMap()
    var hasBookMarks: Array<Boolean>? = null
}