Index: uspace/lib/ui/src/paint.c
===================================================================
--- uspace/lib/ui/src/paint.c	(revision 81ec7e1867942dce648bbef472b80d7b8a71f294)
+++ uspace/lib/ui/src/paint.c	(revision 214aefb4d5294105a7d7b4f51aa40776fdec8c67)
@@ -38,41 +38,6 @@
 #include <gfx/context.h>
 #include <gfx/render.h>
-#include <gfx/text.h>
 #include <ui/paint.h>
-#include <stdlib.h>
-#include <str.h>
 #include "../private/resource.h"
-
-/** Single box characters */
-static ui_box_chars_t single_box_chars = {
-	{
-		{ "\u250c", "\u2500", "\u2510" },
-		{ "\u2502", " ",      "\u2502" },
-		{ "\u2514", "\u2500", "\u2518" }
-	}
-};
-
-/** Double box characters */
-static ui_box_chars_t double_box_chars = {
-	{
-		{ "\u2554", "\u2550", "\u2557" },
-		{ "\u2551", " ",      "\u2551" },
-		{ "\u255a", "\u2550", "\u255d" }
-	}
-};
-
-/** Single horizontal brace characters */
-static ui_brace_chars_t single_hbrace_chars = {
-	.start = "\u251c",
-	.middle = "\u2500",
-	.end = "\u2524"
-};
-
-/** Double horizontal brace characters */
-static ui_brace_chars_t double_hbrace_chars = {
-	.start = "\u2560",
-	.middle = "\u2550",
-	.end = "\u2563"
-};
 
 /** Paint bevel.
@@ -84,5 +49,5 @@
  * @param thickness Bevel thickness in pixels
  * @param inside Place to store rectangle of the interior or @c NULL
- * @return EOK on success or an error code
+ * @reutrn EOK on success or an error code
  */
 errno_t ui_paint_bevel(gfx_context_t *gc, gfx_rect_t *rect,
@@ -142,28 +107,14 @@
 	}
 
-	if (inside != NULL)
-		ui_paint_get_bevel_inside(gc, rect, thickness, inside);
+	if (inside != NULL) {
+		inside->p0.x = rect->p0.x + thickness;
+		inside->p0.y = rect->p0.y + thickness;
+		inside->p1.x = rect->p1.x - thickness;
+		inside->p1.y = rect->p1.y - thickness;
+	}
 
 	return EOK;
 error:
 	return rc;
-}
-
-/** Get bevel interior rectangle.
- *
- * Get the bevel interior rectangle without painting it.
- *
- * @param gc Graphic context
- * @param rect Rectangle to paint into
- * @param thickness Bevel thickness in pixels
- * @param inside Place to store rectangle of the interior
- */
-void ui_paint_get_bevel_inside(gfx_context_t *gc, gfx_rect_t *rect,
-    gfx_coord_t thickness, gfx_rect_t *inside)
-{
-	inside->p0.x = rect->p0.x + thickness;
-	inside->p0.y = rect->p0.y + thickness;
-	inside->p1.x = rect->p1.x - thickness;
-	inside->p1.y = rect->p1.y - thickness;
 }
 
@@ -196,19 +147,4 @@
 error:
 	return rc;
-}
-
-/** Get inset frame interior rectangle.
- *
- * This allows one to get the interior rectangle without actually painting
- * the inset frame.
- *
- * @param resource UI resource
- * @param rect Rectangle to paint onto
- * @param inside Place to store inside rectangle or @c NULL
- */
-void ui_paint_get_inset_frame_inside(ui_resource_t *resource, gfx_rect_t *rect,
-    gfx_rect_t *inside)
-{
-	ui_paint_get_bevel_inside(resource->gc, rect, 2, inside);
 }
 
@@ -359,199 +295,4 @@
 }
 
-/** Paint a text box.
- *
- * @param resource UI resource
- * @param rect Rectangle inside which to paint the box
- * @param style Box style
- * @param color Color
- * @return EOK on success or an error code
- */
-errno_t ui_paint_text_box(ui_resource_t *resource, gfx_rect_t *rect,
-    ui_box_style_t style, gfx_color_t *color)
-{
-	errno_t rc;
-	gfx_text_fmt_t fmt;
-	gfx_rect_t srect;
-	gfx_coord2_t pos;
-	gfx_coord2_t dim;
-	size_t bufsz;
-	size_t off;
-	int i;
-	gfx_coord_t y;
-	char *str = NULL;
-	ui_box_chars_t *boxc = NULL;
-
-	gfx_rect_points_sort(rect, &srect);
-	gfx_rect_dims(&srect, &dim);
-
-	/* Is rectangle large enough to hold box? */
-	if (dim.x < 2 || dim.y < 2)
-		return EOK;
-
-	switch (style) {
-	case ui_box_single:
-		boxc = &single_box_chars;
-		break;
-	case ui_box_double:
-		boxc = &double_box_chars;
-		break;
-	}
-
-	if (boxc == NULL)
-		return EINVAL;
-
-	gfx_text_fmt_init(&fmt);
-	fmt.color = color;
-
-	bufsz = str_size(boxc->c[0][0]) +
-	    str_size(boxc->c[0][1]) * (dim.x - 2) +
-	    str_size(boxc->c[0][2]) + 1;
-
-	str = malloc(bufsz);
-	if (str == NULL)
-		return ENOMEM;
-
-	/* Top edge and corners */
-
-	str_cpy(str, bufsz, boxc->c[0][0]);
-	off = str_size(boxc->c[0][0]);
-
-	for (i = 1; i < dim.x - 1; i++) {
-		str_cpy(str + off, bufsz - off, boxc->c[0][1]);
-		off += str_size(boxc->c[0][1]);
-	}
-
-	str_cpy(str + off, bufsz - off, boxc->c[0][2]);
-	off += str_size(boxc->c[0][2]);
-	str[off] = '\0';
-
-	pos = rect->p0;
-	rc = gfx_puttext(resource->font, &pos, &fmt, str);
-	if (rc != EOK)
-		goto error;
-
-	/* Vertical edges */
-	for (y = rect->p0.y + 1; y < rect->p1.y - 1; y++) {
-		pos.y = y;
-
-		pos.x = rect->p0.x;
-		rc = gfx_puttext(resource->font, &pos, &fmt,
-		    boxc->c[1][0]);
-		if (rc != EOK)
-			goto error;
-
-		pos.x = rect->p1.x - 1;
-		rc = gfx_puttext(resource->font, &pos, &fmt,
-		    boxc->c[1][2]);
-		if (rc != EOK)
-			goto error;
-	}
-
-	/* Bottom edge and corners */
-
-	str_cpy(str, bufsz, boxc->c[2][0]);
-	off = str_size(boxc->c[2][0]);
-
-	for (i = 1; i < dim.x - 1; i++) {
-		str_cpy(str + off, bufsz - off, boxc->c[2][1]);
-		off += str_size(boxc->c[2][1]);
-	}
-
-	str_cpy(str + off, bufsz - off, boxc->c[2][2]);
-	off += str_size(boxc->c[2][2]);
-	str[off] = '\0';
-
-	pos.x = rect->p0.x;
-	pos.y = rect->p1.y - 1;
-	rc = gfx_puttext(resource->font, &pos, &fmt, str);
-	if (rc != EOK)
-		goto error;
-
-	free(str);
-	return EOK;
-error:
-	if (str != NULL)
-		free(str);
-	return rc;
-}
-
-/** Paint a text horizontal brace.
- *
- * @param resource UI resource
- * @param rect Rectangle inside which to paint the brace (height should
- *             be 1).
- * @param style Box style
- * @param color Color
- * @return EOK on success or an error code
- */
-errno_t ui_paint_text_hbrace(ui_resource_t *resource, gfx_rect_t *rect,
-    ui_box_style_t style, gfx_color_t *color)
-{
-	errno_t rc;
-	gfx_text_fmt_t fmt;
-	gfx_rect_t srect;
-	gfx_coord2_t pos;
-	gfx_coord2_t dim;
-	size_t bufsz;
-	size_t off;
-	int i;
-	char *str = NULL;
-	ui_brace_chars_t *hbc = NULL;
-
-	gfx_rect_points_sort(rect, &srect);
-	gfx_rect_dims(&srect, &dim);
-
-	/* Is rectangle large enough to hold brace? */
-	if (dim.x < 2 || dim.y < 1)
-		return EOK;
-
-	switch (style) {
-	case ui_box_single:
-		hbc = &single_hbrace_chars;
-		break;
-	case ui_box_double:
-		hbc = &double_hbrace_chars;
-		break;
-	}
-
-	if (hbc == NULL)
-		return EINVAL;
-
-	gfx_text_fmt_init(&fmt);
-	fmt.color = color;
-
-	bufsz = str_size(hbc->start) +
-	    str_size(hbc->middle) * (dim.x - 2) +
-	    str_size(hbc->end) + 1;
-
-	str = malloc(bufsz);
-	if (str == NULL)
-		return ENOMEM;
-
-	str_cpy(str, bufsz, hbc->start);
-	off = str_size(hbc->start);
-
-	for (i = 1; i < dim.x - 1; i++) {
-		str_cpy(str + off, bufsz - off, hbc->middle);
-		off += str_size(hbc->middle);
-	}
-
-	str_cpy(str + off, bufsz - off, hbc->end);
-	off += str_size(hbc->end);
-	str[off] = '\0';
-
-	pos = rect->p0;
-	rc = gfx_puttext(resource->font, &pos, &fmt, str);
-	if (rc != EOK)
-		goto error;
-
-	free(str);
-	return EOK;
-error:
-	if (str != NULL)
-		free(str);
-	return rc;
-}
-
 /** @}
  */
