summaryrefslogtreecommitdiff
path: root/src/Fl_Window.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_Window.cxx')
-rw-r--r--src/Fl_Window.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Fl_Window.cxx b/src/Fl_Window.cxx
index f8fb10253..c95b07638 100644
--- a/src/Fl_Window.cxx
+++ b/src/Fl_Window.cxx
@@ -30,6 +30,8 @@
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
+#include <stdlib.h>
+#include "flstring.h"
void Fl_Window::_Fl_Window() {
type(FL_WINDOW);
@@ -107,6 +109,17 @@ void Fl_Window::draw() {
void Fl_Window::label(const char *name) {label(name, iconlabel());}
+void Fl_Window::copy_label(const char *a) {
+ if (flags() & COPIED_LABEL) {
+ free((void *)label());
+ clear_flag(COPIED_LABEL);
+ }
+ if (a) a = strdup(a);
+ label(a, iconlabel());
+ set_flag(COPIED_LABEL);
+}
+
+
void Fl_Window::iconlabel(const char *iname) {
uchar saveflags = flags();
label(label(), iname);