MCPcopy Create free account
hub / github.com/ZDoom/Raze / SetFrameGeometry

Method SetFrameGeometry

libraries/ZWidget/src/core/widget.cpp:147–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147void Widget::SetFrameGeometry(const Rect& geometry)
148{
149 if (Type == WidgetType::Child)
150 {
151 FrameGeometry = geometry;
152 double left = FrameGeometry.left() + Noncontent.Left;
153 double top = FrameGeometry.top() + Noncontent.Top;
154 double right = FrameGeometry.right() - Noncontent.Right;
155 double bottom = FrameGeometry.bottom() - Noncontent.Bottom;
156 left = std::min(left, FrameGeometry.right());
157 top = std::min(top, FrameGeometry.bottom());
158 right = std::max(right, FrameGeometry.left());
159 bottom = std::max(bottom, FrameGeometry.top());
160 ContentGeometry = Rect::ltrb(left, top, right, bottom);
161 OnGeometryChanged();
162 }
163 else
164 {
165 DispWindow->SetWindowFrame(geometry);
166 }
167}
168
169void Widget::Show()
170{

Callers 15

SetComponentGeometryMethod · 0.45
OnGeometryChangedMethod · 0.45
UpdateVerticalScrollMethod · 0.45
StatusbarMethod · 0.45
OnGeometryChangedMethod · 0.45
OnGeometryChangedMethod · 0.45
OnGeometryChangedMethod · 0.45
OnGeometryChangedMethod · 0.45
ExecModalMethod · 0.45
OnGeometryChangedMethod · 0.45
OnGeometryChangedMethod · 0.45
OnGeometryChangedMethod · 0.45

Calls 5

leftMethod · 0.80
topMethod · 0.80
rightMethod · 0.80
bottomMethod · 0.80
SetWindowFrameMethod · 0.45

Tested by

no test coverage detected