• 全部
...

问2个关于container的问题

klep1986 2011-06-16 11:00:35
1.draw container的时候是会draw widget node里面的widget,每个widget有自己的extent,不明白要container的extent干什么
2.icontainer_invalidate传的最后一个参数是0 是什么意思? api reference上面没有看到
...全文
给本帖投票
1673 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
yekang10 2011-08-01
  • 打赏
  • 举报
回复
学习学习学习学习学习
欢乐的小熊 2011-07-15
  • 打赏
  • 举报
回复
[Quote=引用楼主 klep1986 的回复:]
1.draw container的时候是会draw widget node里面的widget,每个widget有自己的extent,不明白要container的extent干什么
2.icontainer_invalidate传的最后一个参数是0 是什么意思? api reference上面没有看到
[/Quote]

1>> Container自身有extent, 主要是为了实现其组合模式,当把container当做Widget的时候,自身不是也需要extent么。
2>> 那个0是一个FLG。参照APIReferences
strayedbird 2011-06-16
  • 打赏
  • 举报
回复
container 主要用来布局,所以其显示范围由它自己控制更具灵活性,如果你只想显示其子widget的范围,获取preferred extent 然后设置extent就可以了;如果container范围设置的较小,可以剪切其中的widget,如果设置较大,可以控制空白区域。

icontainer_invalidate在api ref中可以找到,如下
f: A set of flags that control the the calculation of the invalidation rectangle.
The defined validation flags are:
ICIF_EXTENT - When this flag is ON, it is an indication that the widget has
changed its extent.
ICIF_REDRAW - When this flag is ON, it is an indication that the widget has
changed its contents, but its preferred extent is still the same.
The widget simply wants to be redrawn.
ICIF_DEFER - When this flag is ON, it indicates that the widget's layout is
disabled, but it is still passing an invalidate up to
notify its ancestors that an invalidate occurred but no action
was taken as layout was disabled. When RootContainer receives
an invalidate with the ICIF_DEFER flag appended, it will not cause
a draw to be scheduled.

2,856

社区成员

发帖
与我相关
我的任务
社区描述
本论坛以AI、WoS 、XR、IoT、Auto、生成式AI等核心板块组成,为开发者提供便捷及高效的学习和交流平台。 高通开发者专区主页:https://qualcomm.csdn.net/
人工智能物联网机器学习 技术论坛(原bbs) 北京·东城区
社区管理员
  • csdnsqst0050
  • chipseeker
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧

手机看
关注公众号

关注公众号

客服 返回
顶部