MCPcopy Create free account
hub / github.com/JacquesLucke/code_autocomplete / draw

Method draw

modal_handler.py:147–164  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

145 return self.top_index + get_line_amount() - 1
146
147 def draw(self):
148 if self.hide: return
149
150 operators = get_text_operators(get_active_text_block())
151 self.correct_index(len(operators))
152 if len(operators) == 0: return
153 active_operator = self.get_active_operator(operators)
154
155 editor_info = TextEditorInfo()
156 scale = editor_info.scale
157
158 box_position_info = self.get_operator_box_position_info(editor_info)
159 operator_box_rectangle = self.draw_operator_box(box_position_info, operators, scale)
160
161 attribute_info_position = (operator_box_rectangle.right + 10 * scale, operator_box_rectangle.top)
162 self.draw_attribute_info_box(attribute_info_position, getattr(active_operator, "additional_data", None), scale)
163
164 restore_opengl_defaults()
165
166 def get_operator_box_position_info(self, editor_info):
167 x, y = editor_info.cursor_position

Callers

nothing calls this directly

Calls 9

correct_indexMethod · 0.95
get_active_operatorMethod · 0.95
draw_operator_boxMethod · 0.95
get_text_operatorsFunction · 0.90
get_active_text_blockFunction · 0.85
TextEditorInfoClass · 0.85
restore_opengl_defaultsFunction · 0.85

Tested by

no test coverage detected