1
1

Merged tty_draw_double_box() function into tty_draw_box() one.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Этот коммит содержится в:
Andrew Borodin 2010-03-22 21:55:10 +03:00
родитель 279375b418
Коммит b0be11acd5
4 изменённых файлов: 12 добавлений и 33 удалений

Просмотреть файл

@ -138,37 +138,20 @@ tty_print_one_vline (gboolean single)
} }
void void
tty_draw_box (int y, int x, int ys, int xs) tty_draw_box (int y, int x, int ys, int xs, gboolean single)
{ {
tty_draw_vline (y, x, mc_tty_frm[MC_TTY_FRM_VERT], ys); tty_draw_vline (y, x, mc_tty_frm[single ? MC_TTY_FRM_VERT : MC_TTY_FRM_DVERT], ys);
tty_draw_vline (y, x + xs - 1, mc_tty_frm[MC_TTY_FRM_VERT], ys); tty_draw_vline (y, x + xs - 1, mc_tty_frm[single ? MC_TTY_FRM_VERT : MC_TTY_FRM_DVERT], ys);
tty_draw_hline (y, x, mc_tty_frm[MC_TTY_FRM_HORIZ], xs); tty_draw_hline (y, x, mc_tty_frm[single ? MC_TTY_FRM_HORIZ : MC_TTY_FRM_DHORIZ], xs);
tty_draw_hline (y + ys - 1, x, mc_tty_frm[MC_TTY_FRM_HORIZ], xs); tty_draw_hline (y + ys - 1, x, mc_tty_frm[single ? MC_TTY_FRM_HORIZ : MC_TTY_FRM_DHORIZ], xs);
tty_gotoyx (y, x); tty_gotoyx (y, x);
tty_print_alt_char (ACS_ULCORNER, TRUE); tty_print_alt_char (ACS_ULCORNER, single);
tty_gotoyx (y + ys - 1, x); tty_gotoyx (y + ys - 1, x);
tty_print_alt_char (ACS_LLCORNER, TRUE); tty_print_alt_char (ACS_LLCORNER, single);
tty_gotoyx (y, x + xs - 1); tty_gotoyx (y, x + xs - 1);
tty_print_alt_char (ACS_URCORNER, TRUE); tty_print_alt_char (ACS_URCORNER, single);
tty_gotoyx (y + ys - 1, x + xs - 1); tty_gotoyx (y + ys - 1, x + xs - 1);
tty_print_alt_char (ACS_LRCORNER, TRUE); tty_print_alt_char (ACS_LRCORNER, single);
}
void
tty_draw_double_box (int y, int x, int ys, int xs)
{
tty_draw_vline (y, x, mc_tty_frm[MC_TTY_FRM_DVERT], ys);
tty_draw_vline (y, x + xs - 1, mc_tty_frm[MC_TTY_FRM_DVERT], ys);
tty_draw_hline (y, x, mc_tty_frm[MC_TTY_FRM_DHORIZ], xs);
tty_draw_hline (y + ys - 1, x, mc_tty_frm[MC_TTY_FRM_DHORIZ], xs);
tty_gotoyx (y, x);
tty_print_alt_char (ACS_ULCORNER, FALSE);
tty_gotoyx (y + ys - 1, x);
tty_print_alt_char (ACS_LLCORNER], FALSE);
tty_gotoyx (y, x + xs - 1);
tty_print_alt_char (ACS_URCORNER, FALSE);
tty_gotoyx (y + ys - 1, x + xs - 1);
tty_print_alt_char (ACS_LRCORNER, FALSE);
} }
char * char *

Просмотреть файл

@ -75,8 +75,7 @@ extern void tty_print_one_vline (gboolean single);
extern void tty_print_one_hline (gboolean single); extern void tty_print_one_hline (gboolean single);
extern void tty_draw_hline (int y, int x, int ch, int len); extern void tty_draw_hline (int y, int x, int ch, int len);
extern void tty_draw_vline (int y, int x, int ch, int len); extern void tty_draw_vline (int y, int x, int ch, int len);
extern void tty_draw_box (int y, int x, int rows, int cols); extern void tty_draw_box (int y, int x, int rows, int cols, gboolean single);
extern void tty_draw_double_box (int y, int x, int rows, int cols);
extern void tty_fill_region (int y, int x, int rows, int cols, unsigned char ch); extern void tty_fill_region (int y, int x, int rows, int cols, unsigned char ch);
extern int mc_tty_frm[]; extern int mc_tty_frm[];

Просмотреть файл

@ -65,10 +65,7 @@ static void dlg_broadcast_msg_to (Dlg_head * h, widget_msg_t message,
void void
draw_box (Dlg_head *h, int y, int x, int ys, int xs, gboolean single) draw_box (Dlg_head *h, int y, int x, int ys, int xs, gboolean single)
{ {
if (single) tty_draw_box (h->y + y, h->x + x, ys, xs, single);
tty_draw_box (h->y + y, h->x + x, ys, xs);
else
tty_draw_double_box (h->y + y, h->x + x, ys, xs);
} }
void void

Просмотреть файл

@ -341,7 +341,7 @@ mcview_display_clean (mcview_t * view)
tty_setcolor (NORMAL_COLOR); tty_setcolor (NORMAL_COLOR);
widget_erase ((Widget *) view); widget_erase ((Widget *) view);
if (view->dpy_frame_size != 0) if (view->dpy_frame_size != 0)
tty_draw_double_box (view->widget.y, view->widget.x, view->widget.lines, view->widget.cols); tty_draw_box (view->widget.y, view->widget.x, view->widget.lines, view->widget.cols, FALSE);
} }
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */