Lines Matching refs:widget
151 def get_offset_helper(widget, axis, smaller_coord_side): argument
167 coord = widget.coords[axis]
184 def get_offset_x(widget): argument
185 return get_offset_helper(widget, 0, 'left')
188 def get_offset_y(widget): argument
189 return get_offset_helper(widget, 1, 'top')
211 def generate_widget_init_helper(widget, is_graph_description=False): argument
215 color = [channel / 255.0 for channel in widget.color]
216 offset_x, offset_x_is_left = get_offset_x(widget)
217 offset_y, offset_y_is_top = get_offset_y(widget)
219 if is_text_type(widget.type):
221 font_size = widget.font
222 width = str(widget.length) + ' * kFontGlyphWidths[fontSize]'
226 width = str(widget.bar_width) + ' * static_cast<uint32_t>(widget->runningValues.size())'
227 height = widget.height
229 is_left_aligned = not widget.negative_alignment[0]
230 is_top_aligned = not widget.negative_alignment[1]
257 type=widget.type,
269 def generate_widget_init(widget): argument
270 widget_init = '{\n' + widget.type + ' *widget = new ' + widget.constructor + ';\n'
272 widget_init += generate_widget_init_helper(widget)
273 widget_init += 'mState.mOverlayWidgets[WidgetId::' + widget.name + '].reset(widget);\n'
275 if is_graph_type(widget.type):
276 widget_init += generate_widget_init_helper(widget.description, True)
298 widget = OverlayWidget(widget_properties)
299 overlay_widgets[widget.name] = widget
300 set_alignment_flags(widget, overlay_widgets)