Lines Matching refs:surface

1026   virtual void FieldDelegateDraw(Surface &surface, bool is_selected) = 0;
1112 void DrawContent(Surface &surface, bool is_selected) { in DrawContent() argument
1113 UpdateScrolling(surface.GetWidth()); in DrawContent()
1115 surface.MoveCursor(0, 0); in DrawContent()
1117 surface.PutCString(text, surface.GetWidth()); in DrawContent()
1120 surface.MoveCursor(GetCursorXPosition(), 0); in DrawContent()
1122 surface.AttributeOn(A_REVERSE); in DrawContent()
1125 surface.PutChar(' '); in DrawContent()
1127 surface.PutChar(m_content[m_cursor_position]); in DrawContent()
1129 surface.AttributeOff(A_REVERSE); in DrawContent()
1132 void DrawField(Surface &surface, bool is_selected) { in DrawField() argument
1133 surface.TitledBox(m_label.c_str()); in DrawField()
1135 Rect content_bounds = surface.GetFrame(); in DrawField()
1137 Surface content_surface = surface.SubSurface(content_bounds); in DrawField()
1142 void DrawError(Surface &surface) { in DrawError() argument
1145 surface.MoveCursor(0, 0); in DrawError()
1146 surface.AttributeOn(COLOR_PAIR(RedOnBlack)); in DrawError()
1147 surface.PutChar(ACS_DIAMOND); in DrawError()
1148 surface.PutChar(' '); in DrawError()
1149 surface.PutCStringTruncated(1, GetError().c_str()); in DrawError()
1150 surface.AttributeOff(COLOR_PAIR(RedOnBlack)); in DrawError()
1153 void FieldDelegateDraw(Surface &surface, bool is_selected) override { in FieldDelegateDraw() argument
1154 Rect frame = surface.GetFrame(); in FieldDelegateDraw()
1157 Surface field_surface = surface.SubSurface(field_bounds); in FieldDelegateDraw()
1158 Surface error_surface = surface.SubSurface(error_bounds); in FieldDelegateDraw()
1465 void FieldDelegateDraw(Surface &surface, bool is_selected) override { in FieldDelegateDraw() argument
1466 surface.MoveCursor(0, 0); in FieldDelegateDraw()
1467 surface.PutChar('['); in FieldDelegateDraw()
1469 surface.AttributeOn(A_REVERSE); in FieldDelegateDraw()
1470 surface.PutChar(m_content ? ACS_DIAMOND : ' '); in FieldDelegateDraw()
1472 surface.AttributeOff(A_REVERSE); in FieldDelegateDraw()
1473 surface.PutChar(']'); in FieldDelegateDraw()
1474 surface.PutChar(' '); in FieldDelegateDraw()
1475 surface.PutCString(m_label.c_str()); in FieldDelegateDraw()
1545 void DrawContent(Surface &surface, bool is_selected) { in DrawContent() argument
1548 surface.MoveCursor(0, i); in DrawContent()
1553 surface.AttributeOn(A_REVERSE); in DrawContent()
1554 surface.PutChar(current_choice == m_choice ? ACS_DIAMOND : ' '); in DrawContent()
1555 surface.PutCString(text); in DrawContent()
1557 surface.AttributeOff(A_REVERSE); in DrawContent()
1561 void FieldDelegateDraw(Surface &surface, bool is_selected) override { in FieldDelegateDraw() argument
1564 surface.TitledBox(m_label.c_str()); in FieldDelegateDraw()
1566 Rect content_bounds = surface.GetFrame(); in FieldDelegateDraw()
1568 Surface content_surface = surface.SubSurface(content_bounds); in FieldDelegateDraw()
1773 void DrawRemoveButton(Surface &surface, int highlight) { in DrawRemoveButton() argument
1774 surface.MoveCursor(1, surface.GetHeight() / 2); in DrawRemoveButton()
1776 surface.AttributeOn(A_REVERSE); in DrawRemoveButton()
1777 surface.PutCString("[Remove]"); in DrawRemoveButton()
1779 surface.AttributeOff(A_REVERSE); in DrawRemoveButton()
1782 void DrawFields(Surface &surface, bool is_selected) { in DrawFields() argument
1784 int width = surface.GetWidth(); in DrawFields()
1791 Surface field_surface = surface.SubSurface(field_bounds); in DrawFields()
1792 Surface remove_button_surface = surface.SubSurface(remove_button_bounds); in DrawFields()
1807 void DrawNewButton(Surface &surface, bool is_selected) { in DrawNewButton() argument
1809 int x = (surface.GetWidth() - sizeof(button_text) - 1) / 2; in DrawNewButton()
1810 surface.MoveCursor(x, 0); in DrawNewButton()
1814 surface.AttributeOn(A_REVERSE); in DrawNewButton()
1815 surface.PutCString(button_text); in DrawNewButton()
1817 surface.AttributeOff(A_REVERSE); in DrawNewButton()
1820 void FieldDelegateDraw(Surface &surface, bool is_selected) override { in FieldDelegateDraw() argument
1821 surface.TitledBox(m_label.c_str()); in FieldDelegateDraw()
1823 Rect content_bounds = surface.GetFrame(); in FieldDelegateDraw()
1828 Surface fields_surface = surface.SubSurface(fields_bounds); in FieldDelegateDraw()
1829 Surface new_button_surface = surface.SubSurface(new_button_bounds); in FieldDelegateDraw()
2070 void DrawArrow(Surface &surface) { in DrawArrow() argument
2071 surface.MoveCursor(0, 1); in DrawArrow()
2072 surface.PutChar(ACS_RARROW); in DrawArrow()
2075 void FieldDelegateDraw(Surface &surface, bool is_selected) override { in FieldDelegateDraw() argument
2076 Rect bounds = surface.GetFrame(); in FieldDelegateDraw()
2084 Surface key_field_surface = surface.SubSurface(key_field_bounds); in FieldDelegateDraw()
2085 Surface arrow_surface = surface.SubSurface(arrow_bounds); in FieldDelegateDraw()
2086 Surface value_field_surface = surface.SubSurface(value_field_bounds); in FieldDelegateDraw()
2264 void Draw(Surface &surface, bool is_selected) { in Draw() argument
2265 int x = (surface.GetWidth() - m_label.length()) / 2; in Draw()
2266 surface.MoveCursor(x, 0); in Draw()
2268 surface.AttributeOn(A_REVERSE); in Draw()
2269 surface.PutChar('['); in Draw()
2270 surface.PutCString(m_label.c_str()); in Draw()
2271 surface.PutChar(']'); in Draw()
2273 surface.AttributeOff(A_REVERSE); in Draw()
2547 void UpdateScrolling(Surface &surface) { in UpdateScrolling() argument
2550 int surface_height = surface.GetHeight(); in UpdateScrolling()
2571 void DrawError(Surface &surface) { in DrawError() argument
2574 surface.MoveCursor(0, 0); in DrawError()
2575 surface.AttributeOn(COLOR_PAIR(RedOnBlack)); in DrawError()
2576 surface.PutChar(ACS_DIAMOND); in DrawError()
2577 surface.PutChar(' '); in DrawError()
2578 surface.PutCStringTruncated(1, m_delegate_sp->GetError().c_str()); in DrawError()
2579 surface.AttributeOff(COLOR_PAIR(RedOnBlack)); in DrawError()
2581 surface.MoveCursor(0, 1); in DrawError()
2582 surface.HorizontalLine(surface.GetWidth()); in DrawError()
2585 void DrawFields(Surface &surface) { in DrawFields() argument
2587 int width = surface.GetWidth(); in DrawFields()
2596 Surface field_surface = surface.SubSurface(bounds); in DrawFields()
2602 void DrawActions(Surface &surface) { in DrawActions() argument
2604 int width = surface.GetWidth() / number_of_actions; in DrawActions()
2611 Surface action_surface = surface.SubSurface(bounds); in DrawActions()
2617 void DrawElements(Surface &surface) { in DrawElements() argument
2618 Rect frame = surface.GetFrame(); in DrawElements()
2620 frame.HorizontalSplit(surface.GetHeight() - GetActionsHeight(), in DrawElements()
2622 Surface fields_surface = surface.SubSurface(fields_bounds); in DrawElements()
2623 Surface actions_surface = surface.SubSurface(actions_bounds); in DrawElements()
2632 void DrawContent(Surface &surface) { in DrawContent() argument
2633 UpdateScrolling(surface); in DrawContent()
2635 int width = surface.GetWidth(); in DrawContent()
2648 int copy_height = std::min(surface.GetHeight(), pad.GetHeight()); in DrawContent()
2649 pad.CopyToSurface(surface, Point(0, m_first_visible_line), Point(), in DrawContent()
2653 void DrawSubmitHint(Surface &surface, bool is_active) { in DrawSubmitHint() argument
2654 surface.MoveCursor(2, surface.GetHeight() - 1); in DrawSubmitHint()
2656 surface.AttributeOn(A_BOLD | COLOR_PAIR(BlackOnWhite)); in DrawSubmitHint()
2657 surface.Printf("[Press Alt+Enter to %s]", in DrawSubmitHint()
2660 surface.AttributeOff(A_BOLD | COLOR_PAIR(BlackOnWhite)); in DrawSubmitHint()
3703 void UpdateScrolling(Surface &surface) { in UpdateScrolling() argument
3709 int height = surface.GetHeight(); in UpdateScrolling()
3716 void DrawMatches(Surface &surface) { in DrawMatches() argument
3720 UpdateScrolling(surface); in DrawMatches()
3722 int count = GetNumberOfVisibleMatches(surface.GetHeight()); in DrawMatches()
3724 surface.MoveCursor(1, i); in DrawMatches()
3727 surface.AttributeOn(A_REVERSE); in DrawMatches()
3728 surface.PutCString( in DrawMatches()
3731 surface.AttributeOff(A_REVERSE); in DrawMatches()
3735 void DrawContent(Surface &surface) { in DrawContent() argument
3736 Rect content_bounds = surface.GetFrame(); in DrawContent()
3740 Surface text_field_surface = surface.SubSurface(text_field_bounds); in DrawContent()
3741 Surface matches_surface = surface.SubSurface(matchs_bounds); in DrawContent()