本文整理汇总了C++中DisplayModel::SetScrollState方法的典型用法代码示例。如果您正苦于以下问题:C++ DisplayModel::SetScrollState方法的具体用法?C++ DisplayModel::SetScrollState怎么用?C++ DisplayModel::SetScrollState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DisplayModel
的用法示例。
在下文中一共展示了DisplayModel::SetScrollState方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: args
static WindowInfo *LoadOnStartup(const WCHAR *filePath, CommandLineInfo& i, bool isFirstWin)
{
LoadArgs args(filePath);
args.showWin = !(i.printDialog && i.exitWhenDone) && !gPluginMode;
WindowInfo *win = LoadDocument(args);
if (!win)
return win;
if (win->IsDocLoaded() && i.destName && isFirstWin) {
win->linkHandler->GotoNamedDest(i.destName);
} else if (win->IsDocLoaded() && i.pageNumber > 0 && isFirstWin) {
if (win->ctrl->ValidPageNo(i.pageNumber))
win->ctrl->GoToPage(i.pageNumber, false);
}
if (i.hwndPluginParent)
MakePluginWindow(*win, i.hwndPluginParent);
if (!win->IsDocLoaded() || !isFirstWin)
return win;
if (i.enterPresentation || i.enterFullScreen) {
if (i.enterPresentation && win->isFullScreen || i.enterFullScreen && win->presentation)
ExitFullScreen(*win);
EnterFullScreen(*win, i.enterPresentation);
}
if (i.startView != DM_AUTOMATIC)
SwitchToDisplayMode(win, i.startView);
if (i.startZoom != INVALID_ZOOM)
ZoomToSelection(win, i.startZoom);
if ((i.startScroll.x != -1 || i.startScroll.y != -1) && win->AsFixed()) {
DisplayModel *dm = win->AsFixed();
ScrollState ss = dm->GetScrollState();
ss.x = i.startScroll.x;
ss.y = i.startScroll.y;
dm->SetScrollState(ss);
}
if (i.forwardSearchOrigin && i.forwardSearchLine && win->AsFixed() && win->AsFixed()->pdfSync) {
UINT page;
Vec<RectI> rects;
ScopedMem<WCHAR> sourcePath(path::Normalize(i.forwardSearchOrigin));
int ret = win->AsFixed()->pdfSync->SourceToDoc(sourcePath, i.forwardSearchLine, 0, &page, rects);
ShowForwardSearchResult(win, sourcePath, i.forwardSearchLine, 0, ret, page, rects);
}
return win;
}