StudyController
学习场景的主视图控制器,通过 Application.sharedInstance().studyController(window) 获取(通常传入 self.window)。是访问脑图、文档、当前笔记本等的根对象。
实例成员 (Instance members)
Section titled “实例成员 (Instance members)”属性(只读)
Section titled “属性(只读)”| 属性 | 类型 | 说明 |
|---|---|---|
view | UIView | 控制器主视图,可在此添加插件 UI。 |
notebookController | NotebookController | 脑图/大纲控制器(getter 为 fSearchViewController,JS 侧为 notebookController)。 |
readerController | ReaderController | 文档阅读区域控制器(getter 为 detailController)。 |
studyMode | number | 当前学习模式:0/1 文档模式,2 学习模式,3 复习模式。 |
narrowMode | boolean | 是否窄屏模式(窄屏下书本分屏模式 1 不可用)。 |
docMapSplitMode | number | 书本/脑图分屏模式:0 全脑图,1 半脑图半文档,2 全文档(getter/setter 为 bookSplitMode)。 |
rightMapMode | boolean | 脑图是否在右侧。 |
extensionPanelController | UIViewController | 扩展面板控制器(getter 为 extensionController)。 |
focusNoteInMindMapById
Section titled “focusNoteInMindMapById”在脑图中聚焦并高亮指定笔记。
focusNoteInMindMapById(noteId: string): voidParameters:
| Name | Type | Description |
|---|---|---|
noteId | string | 笔记 ID。 |
focusNoteInDocumentById
Section titled “focusNoteInDocumentById”在文档中聚焦指定笔记。
focusNoteInDocumentById(noteId: string): voidParameters:
| Name | Type | Description |
|---|---|---|
noteId | string | 笔记 ID。 |
refreshAddonCommands
Section titled “refreshAddonCommands”强制刷新插件在工具栏的图标状态。
refreshAddonCommands(): voidfocusNoteInFloatMindMapById
Section titled “focusNoteInFloatMindMapById”在浮动脑图中聚焦指定笔记。
focusNoteInFloatMindMapById(noteId: string): voidisNoteInReview
Section titled “isNoteInReview”判断某笔记是否处于复习队列/复习态。
isNoteInReview(noteId: string): booleanopenNotebookAndDocument
Section titled “openNotebookAndDocument”打开指定笔记本与文档。
openNotebookAndDocument(notebookId: string, docMd5: string): voidtoggleExtensionPanel
Section titled “toggleExtensionPanel”切换扩展面板显示/隐藏。
toggleExtensionPanel(): void类成员 (Class members)
Section titled “类成员 (Class members)”当前运行时未额外暴露 StudyController 的类成员。
- Application —
studyController(window) - NotebookController、ReaderController