60 this->values =
new const char*[n + 1];
61 for (
int i = 0; i < n; i++)
68 for (
int i = 0; values[i]; i++)
69 free((
char *)values[i]);
77 for (it = resource->groupIterator (), i = 0; it->
hasNext (); i++) {
110 this->values =
new const char*[n + 1];
111 for(
int i = 0; i < n; i++)
118 for(
int i = 0; values[i]; i++)
119 free((
char *)values[i]);
128 for (
int i = 0; i < n; i++) {
129 if (resource->isSelected (i)) {
131 valueBuf.append (
", ");
132 valueBuf.append (values[i]);
137 return valueBuf.getChars ();
142 form->send (NULL, NULL, -1, -1);
175 resources =
new lout::container::typed::List <ResourceDecorator> (
true);
178 new lout::container::typed::List <FormClickedReceiver> (
true);
249void Form::send (
const char *buttonName,
const char *buttonValue,
int x,
int y)
251 for (lout::container::typed::Iterator <ResourceDecorator> it =
255 const char *value = resource->
getValue ();
257 printf (
"%s = %s; x=%d y=%d\n", resource->
getName (), value, x, y);
260 if(buttonName && buttonValue)
261 printf (
"%s = %s\n", buttonName, buttonValue);
Basic interface for all resources.
void connectClicked(ClickedReceiver *receiver)
void connectActivate(ActivateReceiver *receiver)
Base interface for dw::core::ui::ListResource and dw::core::ui::OptionMenuResource.
virtual int getNumberOfItems()=0
virtual const char * getText()=0
Decorates instances of dw::core::ui::TextResource.
TextResourceDecorator(const char *name, dw::core::ui::TextResource *resource)
dw::core::ui::TextResource * resource
char * dStrdup(const char *s)
Anything related to embedded UI widgets is defined here.