[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [paragui-users] How to pass a crtain userdata to PARAGUI_CALLBACK ?
From: |
leiavoia |
Subject: |
Re: [paragui-users] How to pass a crtain userdata to PARAGUI_CALLBACK ? |
Date: |
Sun, 12 Oct 2003 12:12:44 -0400 |
User-agent: |
KMail/1.5 |
On Sunday 12 October 2003 10:28 am, juri wrote:
> Hi,
>
> i dom´t fully understand how to access userdata in PARAGUI_CALLBACK.
> Let´s say i have a Listbox (or a Radiobutton). And i want to use the
> name or the ID or The actual Content in the CALLBACK function. Like: I
> klick the ListBoxItem "AnItem". "AnItem" contains the Text
> "ThisIsASample". Now i klick The button, and i want to have a pointer to
> "ThisIsASample" to proceed. Hope you understand what i mean...
>
> Also if anybody could point my in the right direction how i can find out
> these things myself that would be nice.
>
> THX, John
well, here is a paragui callback member function modified to suit an
illustration:
PARAGUI_CALLBACK(SomeClass::do_something) {
// now if you know the exact widgets you are going to be working with,
// you can just work with them directly by name, You can skip
using whatever
// widget you passed into the function, like so:
some_widget_we_know_by_name->Show();
// otherwise, we'll have to cast the data then work with it.
// cast the data
SomeKindOfWidget widget = (SomeKindOfWidget)clientdata;
// now we have the widget that got passed by the function originally:
widget->Show();
// ALWAYS return true unless you don't handle anything in this function!
return true;
}
--
leiavoia
The AXIS Project
http://www.project-axis.net/