mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
[menu] Removed unused functions
This commit is contained in:
parent
6c72b54658
commit
81da515ba3
@ -367,35 +367,6 @@ set_menu_selection(struct menu *menu, int pos)
|
|||||||
int_bounds(&menu->first, 0, menu->size - height);
|
int_bounds(&menu->first, 0, menu->size - height);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* width - number of standard terminal cells to be displayed (text + whitespace
|
|
||||||
* separators). For double-width glyph width == 2.
|
|
||||||
* len - length of text in bytes */
|
|
||||||
static inline void
|
|
||||||
draw_menu_left_text(struct terminal *term, char *text, int len,
|
|
||||||
int x, int y, int width, struct color_pair *color)
|
|
||||||
{
|
|
||||||
int w = width - (L_TEXT_SPACE + R_TEXT_SPACE);
|
|
||||||
int max_len;
|
|
||||||
|
|
||||||
if (w <= 0) return;
|
|
||||||
|
|
||||||
if (len < 0) len = strlen(text);
|
|
||||||
if (!len) return;
|
|
||||||
|
|
||||||
#ifdef CONFIG_UTF8
|
|
||||||
if (term->utf8_cp) {
|
|
||||||
max_len = utf8_cells2bytes(text, w, NULL);
|
|
||||||
if (max_len <= 0)
|
|
||||||
return;
|
|
||||||
} else
|
|
||||||
#endif /* CONFIG_UTF8 */
|
|
||||||
max_len = w;
|
|
||||||
|
|
||||||
if (len > max_len) len = max_len;
|
|
||||||
|
|
||||||
draw_text(term, x + L_TEXT_SPACE, y, text, len, 0, color);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* width - number of standard terminal cells to be displayed (text + whitespace
|
/* width - number of standard terminal cells to be displayed (text + whitespace
|
||||||
* separators). For double-width glyph width == 2.
|
* separators). For double-width glyph width == 2.
|
||||||
* len - length of text in bytes */
|
* len - length of text in bytes */
|
||||||
@ -549,23 +520,6 @@ utf8:
|
|||||||
#endif /* CONFIG_UTF8 */
|
#endif /* CONFIG_UTF8 */
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
|
||||||
draw_menu_right_text(struct terminal *term, char *text, int len,
|
|
||||||
int x, int y, int width, struct color_pair *color)
|
|
||||||
{
|
|
||||||
int w = width - (L_RTEXT_SPACE + R_RTEXT_SPACE);
|
|
||||||
|
|
||||||
if (w <= 0) return;
|
|
||||||
|
|
||||||
if (len < 0) len = strlen(text);
|
|
||||||
if (!len) return;
|
|
||||||
if (len > w) len = w;
|
|
||||||
|
|
||||||
x += w - len + L_RTEXT_SPACE + L_TEXT_SPACE;
|
|
||||||
|
|
||||||
draw_text(term, x, y, text, len, 0, color);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
draw_menu_right_text_node(struct terminal *term, char *text, int len,
|
draw_menu_right_text_node(struct terminal *term, char *text, int len,
|
||||||
int x, int y, int width, unsigned int color_node)
|
int x, int y, int width, unsigned int color_node)
|
||||||
|
Loading…
Reference in New Issue
Block a user