00001 #ifndef LABEL_IMPLEMENTATION_FILE
00002 #define LABEL_IMPLEMENTATION_FILE
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "argument_list.h"
00019 #include "label.h"
00020 #include "system_string.h"
00021 #include "wp_implementation.h"
00022
00023 #include <Xm/Label.h>
00024
00025 label::label(manager &root, const c_point &origin, const char *message,
00026 const color &foreground, const color &background)
00027 : worker(root, c_rectangle(origin, origin),
00028 create_label_handle(root, message, origin),
00029 foreground, background)
00030 {}
00031
00032 label::~label() {}
00033
00034 window_handle label::create_label_handle(manager &root,
00035 const istring &message, const c_point &origin)
00036 {
00037 argument_list wargs;
00038 system_string to_send(message);
00039 wargs.add(XmNlabelString, to_send);
00040 add_origin(wargs, root.universe_to_device(origin));
00041 return XtCreateManagedWidget
00042 ("label", xmLabelWidgetClass, root.self(),
00043 wargs.generate(), wargs.number());
00044 }
00045
00046 void label::reset(const char *new_message)
00047 {
00048 argument_list wargs;
00049 system_string to_send(new_message);
00050 wargs.add(XmNlabelString, to_send);
00051 wargs.apply(self());
00052 }
00053
00054
00055 #endif //LABEL_IMPLEMENTATION_FILE
00056