YSTest: Main.cpp 源文件

YSTest PreAlpha_b700_20160611 The YSLib Test Project

- 首页
- 相关页面
- 模块
- 命名空间
- 类
- 文件

- 文件列表
- 文件成员

YDE/ImageBrowser/Main.cpp
浏览该文件的文档.
1 /*
2 © 2013-2015 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 #include "ImageControl.h"
29 #include <iostream>
30 using namespace std;
31
32 int
33 main(int argc, char* argv[])
34 {
35 using namespace ImageBrowser;
36 using namespace Host;
37 using namespace platform_ex;
38
39 if(argc > 1)
40 FilterExceptions([=]{
41 GUIApplication app;
42 ImageCodec codec;
43 ImagePanel pnl({Point::Invalid, 640, 480});
44
45 pnl.Load(DecodeArg(argv[1]));
46 ShowTopLevelDraggable(pnl);
47 pnl.SetRootMode(Deref(GetHostRendererPtrOf(pnl)).RootMode),
48 pnl.SetupContextMenu();
49 Execute(app);
50 }, yfsig);
51 }
52
ImageBrowser::ImagePanel
Definition: ImageControl.h:47
ImageBrowser
Definition: ImageControl.cpp:31
YSLib::FilterExceptions
bool FilterExceptions(_func f, const char *desc={}, RecordLevel lv=Alert, ExceptionTracer trace=ExtractAndTrace) ynothrow
调用函数并过滤宿主异常。
Definition: YException.h:202
yfsig
#define yfsig
展开为表示函数签名的预定义变量的宏。
Definition: ydef.h:702
platform_ex::Windows::Invalid
Definition: MinGW32.h:461
ImageBrowser::ImagePanel::Load
void Load(const _type &arg)
Definition: ImageControl.h:125
std
Definition: memory.hpp:1100
platform::Deref
yconstfn auto Deref(_type &&p) -> decltype(*p)
断言并解引用非空指针。
Definition: Debug.h:440
YSLib::GUIApplication
平台相关的应用程序类。
Definition: GUIApplication.h:202
ImageControl.h
图像显示控件。
main
int main(int argc, char *argv[])
Definition: YDE/ImageBrowser/Main.cpp:33
platform_ex
平台扩展命名空间。
Definition: Android.h:45