Lines Matching refs:surface

1025   virtual void FieldDelegateDraw(Surface &surface, bool is_selected) = 0;
1111 void DrawContent(Surface &surface, bool is_selected) { in DrawContent() argument
1112 UpdateScrolling(surface.GetWidth()); in DrawContent()
1114 surface.MoveCursor(0, 0); in DrawContent()
1116 surface.PutCString(text, surface.GetWidth()); in DrawContent()
1119 surface.MoveCursor(GetCursorXPosition(), 0); in DrawContent()
1121 surface.AttributeOn(A_REVERSE); in DrawContent()
1124 surface.PutChar(' '); in DrawContent()
1126 surface.PutChar(m_content[m_cursor_position]); in DrawContent()
1128 surface.AttributeOff(A_REVERSE); in DrawContent()
1131 void DrawField(Surface &surface, bool is_selected) { in DrawField() argument
1132 surface.TitledBox(m_label.c_str()); in DrawField()
1134 Rect content_bounds = surface.GetFrame(); in DrawField()
1136 Surface content_surface = surface.SubSurface(content_bounds); in DrawField()
1141 void DrawError(Surface &surface) { in DrawError() argument
1144 surface.MoveCursor(0, 0); in DrawError()
1145 surface.AttributeOn(COLOR_PAIR(RedOnBlack)); in DrawError()
1146 surface.PutChar(ACS_DIAMOND); in DrawError()
1147 surface.PutChar(' '); in DrawError()
1148 surface.PutCStringTruncated(1, GetError().c_str()); in DrawError()
1149 surface.AttributeOff(COLOR_PAIR(RedOnBlack)); in DrawError()
1152 void FieldDelegateDraw(Surface &surface, bool is_selected) override { in FieldDelegateDraw() argument
1153 Rect frame = surface.GetFrame(); in FieldDelegateDraw()
1156 Surface field_surface = surface.SubSurface(field_bounds); in FieldDelegateDraw()
1157 Surface error_surface = surface.SubSurface(error_bounds); in FieldDelegateDraw()
1464 void FieldDelegateDraw(Surface &surface, bool is_selected) override { in FieldDelegateDraw() argument
1465 surface.MoveCursor(0, 0); in FieldDelegateDraw()
1466 surface.PutChar('['); in FieldDelegateDraw()
1468 surface.AttributeOn(A_REVERSE); in FieldDelegateDraw()
1469 surface.PutChar(m_content ? ACS_DIAMOND : ' '); in FieldDelegateDraw()
1471 surface.AttributeOff(A_REVERSE); in FieldDelegateDraw()
1472 surface.PutChar(']'); in FieldDelegateDraw()
1473 surface.PutChar(' '); in FieldDelegateDraw()
1474 surface.PutCString(m_label.c_str()); in FieldDelegateDraw()
1544 void DrawContent(Surface &surface, bool is_selected) { in DrawContent() argument
1547 surface.MoveCursor(0, i); in DrawContent()
1552 surface.AttributeOn(A_REVERSE); in DrawContent()
1553 surface.PutChar(current_choice == m_choice ? ACS_DIAMOND : ' '); in DrawContent()
1554 surface.PutCString(text); in DrawContent()
1556 surface.AttributeOff(A_REVERSE); in DrawContent()
1560 void FieldDelegateDraw(Surface &surface, bool is_selected) override { in FieldDelegateDraw() argument
1563 surface.TitledBox(m_label.c_str()); in FieldDelegateDraw()
1565 Rect content_bounds = surface.GetFrame(); in FieldDelegateDraw()
1567 Surface content_surface = surface.SubSurface(content_bounds); in FieldDelegateDraw()
1772 void DrawRemoveButton(Surface &surface, int highlight) { in DrawRemoveButton() argument
1773 surface.MoveCursor(1, surface.GetHeight() / 2); in DrawRemoveButton()
1775 surface.AttributeOn(A_REVERSE); in DrawRemoveButton()
1776 surface.PutCString("[Remove]"); in DrawRemoveButton()
1778 surface.AttributeOff(A_REVERSE); in DrawRemoveButton()
1781 void DrawFields(Surface &surface, bool is_selected) { in DrawFields() argument
1783 int width = surface.GetWidth(); in DrawFields()
1790 Surface field_surface = surface.SubSurface(field_bounds); in DrawFields()
1791 Surface remove_button_surface = surface.SubSurface(remove_button_bounds); in DrawFields()
1806 void DrawNewButton(Surface &surface, bool is_selected) { in DrawNewButton() argument
1808 int x = (surface.GetWidth() - sizeof(button_text) - 1) / 2; in DrawNewButton()
1809 surface.MoveCursor(x, 0); in DrawNewButton()
1813 surface.AttributeOn(A_REVERSE); in DrawNewButton()
1814 surface.PutCString(button_text); in DrawNewButton()
1816 surface.AttributeOff(A_REVERSE); in DrawNewButton()
1819 void FieldDelegateDraw(Surface &surface, bool is_selected) override { in FieldDelegateDraw() argument
1820 surface.TitledBox(m_label.c_str()); in FieldDelegateDraw()
1822 Rect content_bounds = surface.GetFrame(); in FieldDelegateDraw()
1827 Surface fields_surface = surface.SubSurface(fields_bounds); in FieldDelegateDraw()
1828 Surface new_button_surface = surface.SubSurface(new_button_bounds); in FieldDelegateDraw()
2069 void DrawArrow(Surface &surface) { in DrawArrow() argument
2070 surface.MoveCursor(0, 1); in DrawArrow()
2071 surface.PutChar(ACS_RARROW); in DrawArrow()
2074 void FieldDelegateDraw(Surface &surface, bool is_selected) override { in FieldDelegateDraw() argument
2075 Rect bounds = surface.GetFrame(); in FieldDelegateDraw()
2083 Surface key_field_surface = surface.SubSurface(key_field_bounds); in FieldDelegateDraw()
2084 Surface arrow_surface = surface.SubSurface(arrow_bounds); in FieldDelegateDraw()
2085 Surface value_field_surface = surface.SubSurface(value_field_bounds); in FieldDelegateDraw()
2263 void Draw(Surface &surface, bool is_selected) { in Draw() argument
2264 int x = (surface.GetWidth() - m_label.length()) / 2; in Draw()
2265 surface.MoveCursor(x, 0); in Draw()
2267 surface.AttributeOn(A_REVERSE); in Draw()
2268 surface.PutChar('['); in Draw()
2269 surface.PutCString(m_label.c_str()); in Draw()
2270 surface.PutChar(']'); in Draw()
2272 surface.AttributeOff(A_REVERSE); in Draw()
2546 void UpdateScrolling(Surface &surface) { in UpdateScrolling() argument
2549 int surface_height = surface.GetHeight(); in UpdateScrolling()
2570 void DrawError(Surface &surface) { in DrawError() argument
2573 surface.MoveCursor(0, 0); in DrawError()
2574 surface.AttributeOn(COLOR_PAIR(RedOnBlack)); in DrawError()
2575 surface.PutChar(ACS_DIAMOND); in DrawError()
2576 surface.PutChar(' '); in DrawError()
2577 surface.PutCStringTruncated(1, m_delegate_sp->GetError().c_str()); in DrawError()
2578 surface.AttributeOff(COLOR_PAIR(RedOnBlack)); in DrawError()
2580 surface.MoveCursor(0, 1); in DrawError()
2581 surface.HorizontalLine(surface.GetWidth()); in DrawError()
2584 void DrawFields(Surface &surface) { in DrawFields() argument
2586 int width = surface.GetWidth(); in DrawFields()
2595 Surface field_surface = surface.SubSurface(bounds); in DrawFields()
2601 void DrawActions(Surface &surface) { in DrawActions() argument
2603 int width = surface.GetWidth() / number_of_actions; in DrawActions()
2610 Surface action_surface = surface.SubSurface(bounds); in DrawActions()
2616 void DrawElements(Surface &surface) { in DrawElements() argument
2617 Rect frame = surface.GetFrame(); in DrawElements()
2619 frame.HorizontalSplit(surface.GetHeight() - GetActionsHeight(), in DrawElements()
2621 Surface fields_surface = surface.SubSurface(fields_bounds); in DrawElements()
2622 Surface actions_surface = surface.SubSurface(actions_bounds); in DrawElements()
2631 void DrawContent(Surface &surface) { in DrawContent() argument
2632 UpdateScrolling(surface); in DrawContent()
2634 int width = surface.GetWidth(); in DrawContent()
2647 int copy_height = std::min(surface.GetHeight(), pad.GetHeight()); in DrawContent()
2648 pad.CopyToSurface(surface, Point(0, m_first_visible_line), Point(), in DrawContent()
2652 void DrawSubmitHint(Surface &surface, bool is_active) { in DrawSubmitHint() argument
2653 surface.MoveCursor(2, surface.GetHeight() - 1); in DrawSubmitHint()
2655 surface.AttributeOn(A_BOLD | COLOR_PAIR(BlackOnWhite)); in DrawSubmitHint()
2656 surface.Printf("[Press Alt+Enter to %s]", in DrawSubmitHint()
2659 surface.AttributeOff(A_BOLD | COLOR_PAIR(BlackOnWhite)); in DrawSubmitHint()
3702 void UpdateScrolling(Surface &surface) { in UpdateScrolling() argument
3708 int height = surface.GetHeight(); in UpdateScrolling()
3715 void DrawMatches(Surface &surface) { in DrawMatches() argument
3719 UpdateScrolling(surface); in DrawMatches()
3721 int count = GetNumberOfVisibleMatches(surface.GetHeight()); in DrawMatches()
3723 surface.MoveCursor(1, i); in DrawMatches()
3726 surface.AttributeOn(A_REVERSE); in DrawMatches()
3727 surface.PutCString( in DrawMatches()
3730 surface.AttributeOff(A_REVERSE); in DrawMatches()
3734 void DrawContent(Surface &surface) { in DrawContent() argument
3735 Rect content_bounds = surface.GetFrame(); in DrawContent()
3739 Surface text_field_surface = surface.SubSurface(text_field_bounds); in DrawContent()
3740 Surface matches_surface = surface.SubSurface(matchs_bounds); in DrawContent()