YSTest  PreAlpha_b400_20130424
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
ywgtview.cpp
浏览该文件的文档.
1 /*
2  Copyright by FrankHB 2009 - 2013.
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/ywidget.h"
29 
31 
32 using namespace Drawing;
33 
35 
36 Visual::Visual(const Rect& r)
37  : visible(true),
38  location(r.GetPoint()), size(r.Width, r.Height)
39 {}
40 
41 
42 bool
44 {
45  return DependencyPtr ? DependencyPtr->GetView().IsVisible()
46  : visual.IsVisible();
47 }
48 
49 void
50 View::SetVisible(bool b)
51 {
52  if(DependencyPtr)
53  DependencyPtr->GetView().SetVisible(b);
54  else
55  visual.SetVisible(b);
56 }
57 
59 
60 YSL_END
61