summaryrefslogtreecommitdiff
path: root/fluid/Fluid_Image.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2022-12-10 23:22:24 +0100
committerGitHub <noreply@github.com>2022-12-10 23:22:24 +0100
commita5adbd99ca073ecb9d6153b089543b23a673c9b5 (patch)
tree0e1bdebff56e5e0b23369b91b68a90fa42da4f65 /fluid/Fluid_Image.cxx
parent8dcd121d44f1b5041c83081277e2633745fa376d (diff)
Add option to bind images to a widget (#589)
Adding image binding to FLUID as well
Diffstat (limited to 'fluid/Fluid_Image.cxx')
-rw-r--r--fluid/Fluid_Image.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/fluid/Fluid_Image.cxx b/fluid/Fluid_Image.cxx
index e7fcbc253..604ec80a1 100644
--- a/fluid/Fluid_Image.cxx
+++ b/fluid/Fluid_Image.cxx
@@ -200,10 +200,10 @@ void Fluid_Image::write_initializer(const char *type_name, const char *format, .
va_end(ap);
}
-void Fluid_Image::write_code(const char *var, int inactive) {
+void Fluid_Image::write_code(int bind, const char *var, int inactive) {
/* Outputs code that attaches an image to an Fl_Widget or Fl_Menu_Item.
This code calls a function output before by Fluid_Image::write_initializer() */
- if (img) write_c("%s%s->%s( %s() );\n", indent(), var, inactive ? "deimage" : "image", function_name_);
+ if (img) write_c("%s%s->%s%s( %s() );\n", indent(), var, bind ? "bind_" : "", inactive ? "deimage" : "image", function_name_);
}
void Fluid_Image::write_inline(int inactive) {