Show OC visibility status modifiable by user.
(self)
| 5702 | return last_loc.chapter, last_loc.page |
| 5703 | |
| 5704 | def layer_ui_configs(self): |
| 5705 | """Show OC visibility status modifiable by user.""" |
| 5706 | pdf = _as_pdf_document(self) |
| 5707 | info = mupdf.PdfLayerConfigUi() |
| 5708 | n = mupdf.pdf_count_layer_config_ui( pdf) |
| 5709 | rc = [] |
| 5710 | for i in range(n): |
| 5711 | mupdf.pdf_layer_config_ui_info( pdf, i, info) |
| 5712 | if info.type == 1: |
| 5713 | type_ = "checkbox" |
| 5714 | elif info.type == 2: |
| 5715 | type_ = "radiobox" |
| 5716 | else: |
| 5717 | type_ = "label" |
| 5718 | item = { |
| 5719 | "number": i, |
| 5720 | "text": info.text, |
| 5721 | "depth": info.depth, |
| 5722 | "type": type_, |
| 5723 | "on": info.selected, |
| 5724 | "locked": info.locked, |
| 5725 | } |
| 5726 | rc.append(item) |
| 5727 | return rc |
| 5728 | |
| 5729 | def layout(self, rect=None, width=0, height=0, fontsize=11): |
| 5730 | """Re-layout a reflowable document.""" |