YSTest: yfocus.h 源文件

YSTest PreAlpha_b400_20130424 The YSLib Test Project

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

- 文件列表
- 文件成员

全部 类 命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义 组 页
yfocus.h
浏览该文件的文档.
1 ﻿/*
2 Copyright by FrankHB 2010 - 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 #ifndef YSL_INC_UI_yfocus_h_
29 #define YSL_INC_UI_yfocus_h_ 1
30
31 #include "ycomp.h"
32
33 YSL_BEGIN
34
35 YSL_BEGIN_NAMESPACE(UI)
36
37
40 YF_API bool
41 IsFocused(const IWidget&);
42
49 YF_API bool
50 DoRequestFocus(IWidget&, bool release_event = false);
51
57 YF_API bool
58 DoReleaseFocus(IWidget&);
59
66 YF_API void
67 RequestFocusFrom(IWidget& dst, IWidget& src);
68
75 YF_API void
76 ReleaseFocusFrom(IWidget& dst, IWidget& src);
77
82 inline void
83 RequestFocus(IWidget& wgt)
84 {
85 RequestFocusFrom(wgt, wgt);
86 }
87
92 inline void
93 ReleaseFocus(IWidget& wgt)
94 {
95 ReleaseFocusFrom(wgt, wgt);
96 }
97
103 YF_API void
104 ClearFocusingOf(IWidget&);
105
109 YF_API void
110 RequestFocusCascade(IWidget&);
111
115 YF_API void
116 ReleaseFocusCascade(IWidget&);
117
118 YSL_END_NAMESPACE(UI)
119
120 YSL_END
121
122 #endif
123