summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/textarea.c2
-rw-r--r--desktop/textarea.h46
-rw-r--r--desktop/tree.c5
3 files changed, 26 insertions, 27 deletions
diff --git a/desktop/textarea.c b/desktop/textarea.c
index 3ab8c5af5..9b14773cf 100644
--- a/desktop/textarea.c
+++ b/desktop/textarea.c
@@ -874,7 +874,7 @@ int textarea_get_caret(struct textarea *ta)
/* exported interface, documented in textarea.h */
-void textarea_redraw(struct textarea *ta, int x, int y,
+void textarea_redraw(struct textarea *ta, int x, int y, colour bg,
const struct rect *clip, const struct redraw_context *ctx)
{
const struct plotter_table *plot = ctx->plot;
diff --git a/desktop/textarea.h b/desktop/textarea.h
index a798e7c9f..641d39c73 100644
--- a/desktop/textarea.h
+++ b/desktop/textarea.h
@@ -37,22 +37,22 @@ typedef enum textarea_flags {
} textarea_flags;
typedef struct textarea_setup {
- textarea_flags flags;
+ textarea_flags flags; /**< Setup flags */
- int width;
- int height;
+ int width; /**< Textarea width */
+ int height; /**< Textarea height */
- int pad_top;
- int pad_right;
- int pad_bottom;
- int pad_left;
+ int pad_top; /**< Textarea top padding */
+ int pad_right; /**< Textarea right padding */
+ int pad_bottom; /**< Textarea bottom padding */
+ int pad_left; /**< Textarea left padding */
- int border_width;
- colour border_col;
+ int border_width; /**< Textarea border width */
+ colour border_col; /**< Textarea border colour */
- colour selected_text;
- colour selected_bg;
- plot_font_style_t text;
+ colour selected_text; /**< Textarea selected text colour */
+ colour selected_bg; /**< Textarea selection background colour */
+ plot_font_style_t text; /**< Font and textarea background colour */
} textarea_setup;
@@ -65,13 +65,9 @@ typedef void(*textarea_redraw_request_callback)(void *data, int x, int y,
/**
* Create a text area
*
- * \param width width of the text area
- * \param height width of the text area
- * \param flags text area flags
- * \param style font style
- * \param redraw_start_callback will be called when textarea wants to redraw
- * \param redraw_end_callback will be called when textarea finisjes redrawing
- * \param data user specified data which will be passed to redraw callbacks
+ * \param setup textarea settings and style
+ * \param redraw_callback will be called when textarea wants to redraw
+ * \param data user specified data which will be passed to callbacks
* \return Opaque handle for textarea or 0 on error
*/
struct textarea *textarea_create(const textarea_setup *setup,
@@ -125,14 +121,14 @@ int textarea_get_caret(struct textarea *ta);
/**
* Handle redraw requests for text areas
*
- * \param redraw Redraw request block
- * \param x0 left X coordinate of redraw area
- * \param y0 top Y coordinate of redraw area
- * \param x1 right X coordinate of redraw area
- * \param y1 bottom Y coordinate of redraw area
+ * \param ta textarea to render
+ * \param x x coordinate of textarea top
+ * \param y y coordinate of textarea left
+ * \param bg background colour under textarea
+ * \param clip clip rectangle
* \param ctx current redraw context
*/
-void textarea_redraw(struct textarea *ta, int x, int y,
+void textarea_redraw(struct textarea *ta, int x, int y, colour bg,
const struct rect *clip, const struct redraw_context *ctx);
/**
diff --git a/desktop/tree.c b/desktop/tree.c
index df2e9263f..a48b615a0 100644
--- a/desktop/tree.c
+++ b/desktop/tree.c
@@ -2078,7 +2078,10 @@ void tree_draw(struct tree *tree, int x, int y,
y = y + tree->editing->box.y;
if (tree->editing->type == NODE_ELEMENT_TEXT_PLUS_ICON)
x += NODE_INSTEP;
- textarea_redraw(tree->textarea, x, y, &clip, &new_ctx);
+ textarea_redraw(tree->textarea, x, y,
+ plot_style_fill_tree_background.
+ fill_colour,
+ &clip, &new_ctx);
}
}