YSTest: BookmarkUI.h 源文件

YSTest PreAlpha_b900_20201012 The YSLib Test Project

BookmarkUI.h
浏览该文件的文档.
1 /*
2 © 2013, 2015, 2020 FrankHB.
3
4 This file is part of the YSLib project, and may only be used,
5 modified, and distributed under the terms of the YSLib project
6 license, LICENSE.TXT. By continuing to use, modify, or distribute
7 this file you indicate that you have read the license and
8 understand and accept it fully.
9 */
10
28 #ifndef INC_YReader_BookmarkUI_h_
29 #define INC_YReader_BookmarkUI_h_ 1
30
31 #include "ReadingList.h"
32
33 namespace YReader
34 {
35
37 class ShlTextReader;
38
39
44 class BookmarkPanel : public DialogPanel
45 {
47 friend class ShlTextReader;
48
49 protected:
50 ListBox lbPosition;
52 Button btnAdd, btnRemove;
53
54 private:
56 lref<ShlTextReader> shell;
61 BookmarkList bookmarks;
62
63 public:
65 BookmarkPanel(const BookmarkList&, ShlTextReader&);
70 ~BookmarkPanel() override;
71
73 YB_ATTR_nodiscard YB_PURE BookmarkList::difference_type
74 GetSelected() const;
75
77 void
78 LoadBookmarks();
79 };
80
81 } // namespace YReader;
82
83 #endif
84
YB_ATTR_nodiscard
#define YB_ATTR_nodiscard
标记返回值不被忽略的属性。
Definition: ydef.h:715
YReader::ShlTextReader
文本阅读器 Shell 。
Definition: ShlReader.h:227
ystdex::lref
左值引用包装。
Definition: ref.hpp:61
YB_PURE
#define YB_PURE
指示函数或函数模板实例为纯函数。
Definition: ydef.h:919
YReader
Definition: About.h:34
YSLib::UI::Button
按钮。
Definition: Button.h:127
YReader::BookmarkPanel
书签管理面板。
Definition: BookmarkUI.h:45
YReader::BookmarkPanel::~BookmarkPanel
~BookmarkPanel() override
虚析构：类定义外默认实现。
YReader::BookmarkPanel::BookmarkPanel
BookmarkPanel(const BookmarkList &, ShlTextReader &)
Definition: BookmarkUI.cpp:83
ReadingList.h
阅读列表。
YReader::BookmarkPanel::LoadBookmarks
void LoadBookmarks()
YReader::BookmarkPanel::GetSelected
YB_ATTR_nodiscard YB_PURE BookmarkList::difference_type GetSelected() const
YReader::BookmarkPanel::lbPosition
ListBox lbPosition
Definition: BookmarkUI.h:50
YSLib::UI::DialogPanel
对话面板。
Definition: UIContainerEx.h:79
YReader::BookmarkPanel::bookmarks
BookmarkList bookmarks
当前打开文件的书签列表。
Definition: BookmarkUI.h:61
YReader::BookmarkPanel::shell
lref< ShlTextReader > shell
Definition: BookmarkUI.h:56
YReader::BookmarkPanel::btnRemove
Button btnRemove
Definition: BookmarkUI.h:52
YReader::BookmarkPanel::btnAdd
Button btnAdd
Definition: BookmarkUI.h:52