YSTest: YWidgetView.cpp 源文件

YSTest PreAlpha_b700_20160611 The YSLib Test Project

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

- 文件列表
- 文件成员

YWidgetView.cpp
浏览该文件的文档.
1 /*
2 © 2009-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 "YSLib/UI/YModules.h"
29 #include YFM_YSLib_UI_YWidget
30
31 namespace YSLib
32 {
33
34 using namespace Drawing;
35
36 namespace UI
37 {
38
39 ImplDeDtor(ViewSignal)
40
41
42 ImplDeDtor(AView)
43
44 void
45 AView::swap(AView& v) ynothrow
46 {
47 std::swap(ContainerPtr, v.ContainerPtr),
48 std::swap(DependencyPtr, v.DependencyPtr),
49 std::swap(FocusingPtr, v.FocusingPtr);
50 }
51
52 void
53 SwapLocationOf(AView& v, Point& pt)
54 {
55 auto t(v.GetLocation());
56
57 std::swap(t, pt);
58 v.SetLocation(t);
59 }
60
61 void
62 SwapSizeOf(AView& v, Size& s)
63 {
64 auto t(v.GetSize());
65
66 std::swap(t, s);
67 v.SetSize(t);
68 }
69
70 bool
71 View::IsVisible() const ynothrow
72 {
73 return
74 DependencyPtr ? DependencyPtr->GetView().IsVisible() : visual.Visible;
75 }
76
77 void
78 View::SetVisible(bool b)
79 {
80 if(DependencyPtr)
81 DependencyPtr->GetView().SetVisible(b);
82 else
83 visual.Visible = b;
84 }
85
86 } // namespace UI;
87
88 } // namespace YSLib;
89
YSLib::UI::AView
抽象部件视图。
Definition: YWidgetView.h:111
ystdex::swap
void swap(container_adaptor< _tSeqCon > &x, container_adaptor< _tSeqCon > &y)
Definition: container.hpp:179
v
byte v
Definition: CharRenderer.cpp:75
YSLib
YSLib 命名空间。
Definition: AndroidHost.h:45
YSLib::UI::IsVisible
IsVisible
Definition: YWidget.h:101
YSLib::ynothrow
YB_PURE const _type size_t n ynothrow
Definition: YCoreUtilities.h:168
YSLib::UI::SwapSizeOf
YF_API void SwapSizeOf(AView &, Size &)
交换指定视图的大小。
Definition: YWidgetView.cpp:62
YSLib::Drawing::Size
屏幕区域大小。
Definition: YGDIBase.h:293
Drawing
UI
YSLib::Drawing::ImplDeDtor
ImplDeDtor(FontException) namespace
Definition: Font.cpp:80
YModules.h
YSLib::UI::SwapLocationOf
YF_API void SwapLocationOf(AView &, Point &)
交换指定视图的位置。
YSLib::UI::ViewSignal
视图操作消息信号。
Definition: YWidgetView.h:94
CHRLib::s
_tDst const _tSrc * s
Definition: CharacterProcessing.h:140
YSLib::Drawing::GBinaryGroup< SPos >