YSTest
PreAlpha_b500_20140530
The YSLib Test Project
|
文本阅读器 Shell 。 更多...
#include <ShlReader.h>
类 | |
class | BaseSession |
class | BookmarkSession |
class | SettingSession |
Public 成员函数 | |
ShlTextReader (const IO::Path &, const shared_ptr< Desktop > &={}, const shared_ptr< Desktop > &={}) | |
构造:使用指定路径和上下桌面。 更多... | |
~ShlTextReader () override | |
析构:释放资源。 更多... | |
void | LoadFile (const IO::Path &) |
读取文件。 更多... | |
bool | Locate (Bookmark::PositionType) |
定位到文本中的指定位置:更新阅读器状态、阅读列表和按钮状态。 更多... | |
void | Scroll () |
当自动滚屏有效状态为 true 时超时自动滚屏。 更多... | |
void | UpdateButtons () |
更新按钮状态。 更多... | |
![]() | |
ShlReader (const IO::Path &, const shared_ptr< Desktop > &={}, const shared_ptr< Desktop > &={}) | |
构造:使用指定路径和上下桌面。 更多... | |
void | Exit () |
退出阅读器:停止后台任务并发送消息准备切换至 ShlExplorer 。 更多... | |
void | OnInput () override |
处理输入消息:发送绘制消息,当处于滚屏状态时自动执行滚屏。 更多... | |
Public 属性 | |
ReadingList & | LastRead |
近期浏览记录。 更多... | |
ReaderSetting | CurrentSetting |
当前阅读器设置。 更多... | |
Protected 属性 | |
Timers::Timer | tmrScroll |
滚屏计时器。 更多... | |
bool | tmrScrollActive |
滚屏计时器激活状态。 更多... | |
InputTimer | tmrInput |
按键计时器。 更多... | |
size_t | nClick |
记录点击次数。 更多... | |
BookmarkPanel | pnlBookmark |
书签管理面板。 更多... | |
DualScreenReader | reader |
ReaderBox | boxReader |
TextInfoBox | boxTextInfo |
SettingPanel | pnlSetting |
设置面板。 更多... | |
unique_ptr< TextFile > | pTextFile |
MenuHost | mhMain |
![]() | |
IO::Path | CurrentPath |
当前路径。 更多... | |
std::function< void()> | fBackgroundTask |
背景任务:用于滚屏。 更多... | |
bool | bExit |
退出标识。 更多... | |
Private 成员函数 | |
void | Execute (IndexEventArgs::ValueType) |
执行阅读器命令。 更多... | |
void | ShowMenu (Menu::ID, const Point &) |
void | StartAutoScroll () |
开始自动滚屏。 更多... | |
void | StopAutoScroll () |
停止自动滚屏。 更多... | |
void | Switch (Text::Encoding) |
切换编码。 更多... | |
void | UpdateReadingList (bool) |
更新近期浏览记录并更新按钮状态。 更多... | |
void | OnClick (CursorEventArgs &&) |
void | OnKeyDown (KeyEventArgs &&) |
Private 属性 | |
unique_ptr< BaseSession > | session_ptr |
额外继承的成员函数 | |
![]() | |
static BookmarkList | LoadBookmarks (const string &) |
static ReaderSetting | LoadGlobalConfiguration () |
载入阅读器配置。 更多... | |
static void | SaveBookmarks (const string &, const BookmarkList &) |
static void | SaveGlobalConfiguration (const ReaderSetting &) |
保存阅读器配置。 更多... | |
|
override |
析构:释放资源。
在文件 ShlReader.cpp 第 485 行定义.
参考 YReader::BookmarkPanel::bookmarks, YReader::ShlReader::CurrentPath, YReader::ReadingList::Insert(), LastRead, pnlBookmark, YReader::ShlReader::SaveBookmarks() , 以及 YReader::ShlReader::SaveGlobalConfiguration().
|
private |
执行阅读器命令。
在文件 ShlReader.cpp 第 499 行定义.
参考 boxTextInfo, YReader::ShlReader::Exit(), reader, session_ptr, YSLib::UI::Show() , 以及 YReader::TextInfoBox::UpdateData().
void YReader::ShlTextReader::LoadFile | ( | const IO::Path & | pth | ) |
读取文件。
在文件 ShlReader.cpp 第 532 行定义.
参考 YReader::BookmarkPanel::bookmarks, YReader::ShlReader::CurrentPath, ystdex::erase_all_if(), CHRLib::CharSet::Null, pnlBookmark, pTextFile , 以及 reader.
参考自 UpdateReadingList().
bool YReader::ShlTextReader::Locate | ( | Bookmark::PositionType | pos | ) |
定位到文本中的指定位置:更新阅读器状态、阅读列表和按钮状态。
在文件 ShlReader.cpp 第 547 行定义.
参考 YReader::ShlReader::CurrentPath, YReader::ReadingList::Insert(), LastRead, reader, platform_ex::Windows::s, UpdateButtons() , 以及 YB_LIKELY.
|
private |
在文件 ShlReader.cpp 第 650 行定义.
参考 boxReader, YSLib::UI::Close(), YSLib::UI::IsVisible, nClick, reader, YSLib::UI::InputTimer::RefreshClick(), YSLib::UI::Show(), ShowMenu(), StartAutoScroll(), StopAutoScroll(), tmrInput, tmrScrollActive , 以及 yunused.
|
private |
在文件 ShlReader.cpp 第 686 行定义.
参考 YSLib::UI::Down, YReader::ShlReader::Exit(), YSLib::UI::FetchGUIState(), YSLib::UI::Left, YSLib::Drawing::Font::MaximalSize, mhMain, YSLib::Drawing::Font::MinimalSize, reader, YSLib::UI::RepeatHeld(), YSLib::UI::Right, StartAutoScroll(), StopAutoScroll(), tmrInput, tmrScrollActive, YSLib::UI::RoutedEventArgs::Tunnel, YSLib::UI::Up, YSLib::Drawing::X, YSLib::Drawing::Y, YB_LIKELY, YCL_KEY , 以及 YCL_KEY_Start.
void YReader::ShlTextReader::Scroll | ( | ) |
当自动滚屏有效状态为 true 时超时自动滚屏。
在文件 ShlReader.cpp 第 568 行定义.
参考 reader, tmrScroll, tmrScrollActive , 以及 YB_UNLIKELY.
参考自 StartAutoScroll().
|
private |
在文件 ShlReader.cpp 第 581 行定义.
参考 mhMain, reader, YSLib::UI::SetLocationOf() , 以及 YSLib::UI::MenuHost::Show().
参考自 OnClick().
|
private |
开始自动滚屏。
在文件 ShlReader.cpp 第 602 行定义.
参考 YSLib::Activate(), YReader::ShlReader::fBackgroundTask, Scroll(), tmrScroll , 以及 tmrScrollActive.
参考自 OnClick() , 以及 OnKeyDown().
|
private |
停止自动滚屏。
在文件 ShlReader.cpp 第 610 行定义.
参考 YReader::ShlReader::fBackgroundTask, reader , 以及 tmrScrollActive.
参考自 YReader::ShlTextReader::BaseSession::BaseSession(), OnClick() , 以及 OnKeyDown().
|
private |
切换编码。
在文件 ShlReader.cpp 第 618 行定义.
参考 CHRLib::enc, pTextFile , 以及 reader.
void YReader::ShlTextReader::UpdateButtons | ( | ) |
更新按钮状态。
在文件 ShlReader.cpp 第 643 行定义.
参考 boxReader, YReader::ReaderBox::btnNext, YReader::ReaderBox::btnPrev, YSLib::UI::Enable(), LastRead , 以及 yunseq.
参考自 Locate() , 以及 UpdateReadingList().
|
private |
更新近期浏览记录并更新按钮状态。
是否后退。 |
在文件 ShlReader.cpp 第 629 行定义.
参考 YReader::ShlReader::CurrentPath, YReader::ReadingList::Insert(), LastRead, LoadFile(), reader , 以及 UpdateButtons().
|
protected |
在文件 ShlReader.h 第 280 行定义.
参考自 YReader::ShlTextReader::BaseSession::BaseSession(), OnClick() , 以及 UpdateButtons().
|
protected |
在文件 ShlReader.h 第 281 行定义.
参考自 YReader::ShlTextReader::BaseSession::BaseSession() , 以及 Execute().
ReaderSetting YReader::ShlTextReader::CurrentSetting |
当前阅读器设置。
在文件 ShlReader.h 第 253 行定义.
参考自 YReader::ShlTextReader::SettingSession::SettingSession().
ReadingList& YReader::ShlTextReader::LastRead |
近期浏览记录。
在文件 ShlReader.h 第 248 行定义.
参考自 Locate(), UpdateButtons(), UpdateReadingList() , 以及 ~ShlTextReader().
|
protected |
在文件 ShlReader.h 第 285 行定义.
参考自 OnKeyDown() , 以及 ShowMenu().
|
protected |
|
protected |
书签管理面板。
在文件 ShlReader.h 第 291 行定义.
参考自 YReader::ShlTextReader::BookmarkSession::BookmarkSession(), LoadFile() , 以及 ~ShlTextReader().
|
protected |
|
protected |
在文件 ShlReader.h 第 284 行定义.
参考自 LoadFile() , 以及 Switch().
|
protected |
在文件 ShlReader.h 第 279 行定义.
参考自 Execute(), LoadFile(), Locate(), OnClick(), OnKeyDown(), Scroll(), YReader::ShlTextReader::SettingSession::SettingSession(), ShowMenu(), StopAutoScroll(), Switch() , 以及 UpdateReadingList().
|
private |
|
protected |
|
protected |
|
protected |
滚屏计时器激活状态。
在文件 ShlReader.h 第 265 行定义.
参考自 OnClick(), OnKeyDown(), Scroll(), StartAutoScroll() , 以及 StopAutoScroll().