On 07/01/2013 at 08:54, xxxxxxxx wrote:
What do you mean with "sharing the public class members"? From a kickstart, I'd say you could
just pass the Tag plugin instance to the dialog, or the dialog to the Tag plugin, or both, and
access each others public members. Or you allocate a piece of memory both objects can share:
typedef struct {
Real member_one;
LONG member_two;
String member_three;
} SharedData;
class MyTag : public BaseTag {
private:
SharedData* data;
public:
Bool Message(GeListNode* node, LONG msgType, void* msgData) {
if (msgType == OPEN_MY_DIALOG) {
if (!this->data) {
this->data = new SharedData;
}
MyDialog dlg(this->data);
dlg.Open(DLG_TYPE_MODAL);
}
}
// ...
};
class MyDialog : public GeDialog {
private:
SharedData* data;
public:
MyDialog(SharedData* data) : GeDialog(), data(data) {};
// ...
};