Re: Two Marker Styles and SetMarkerAttributes

From: Rene Brun <brun_at_pcroot.cern.ch>
Date: Fri, 29 Jul 2005 15:05:46 +0200 (MEST)


It looks like you are reinventing the wheel or your bits of code do not illustrate your problem.
Please send a concrete and running script that we can use to see if we can understand what you mean.
Ilka will process your problem once she will be back from holidyas.

Rene Brun

On Fri,
29
Jul 2005, Thomas Bretz wrote:

> I have tried your proposal and created an object
> class MyAttMarker : public TObject, public TAttMarker
> {
> public: MyAttMarker() : TAttMarker() { }
> }
> After replacing the two TAttMarker in my class my MyAttMarker and drawing
> them in its Draw function I still get the wrong menu. Calling void SetAtt1()
> from the context menu displays the menu corresponding to the base class
> TAttLine of my object. This is somehow a weired behaviour... I have an Object
> TAttMarker, call one of its data members and get a menu corresponding to some
> totally different object, isn't it?
>
> Thomas.
>
>
> Rene Brun wrote:
>> Two points:
>> -the object must be drawn in the pad
>> -the function with *MENU* must be a public function
>>
>> Rene
>>
>> On Thu, 28 Jul 2005, Thomas Bretz wrote:
>>
>>> Dear all,
>>>
>>> I have a class which contains two TAttMarkerStyle for two different
>>> purposes. I thought, I could add both to the context menu by:
>>>
>>> class A : public TAttLine
>>> {
>>> TAttMarker m1;
>>> TAttMarker m2;
>>> void SetAtt1() { m1.SetMarkerAttributes; } //*MENU*
>>> void SetAtt2() { m2.SetMarkerAttributes; } //*MENU*
>>> }
>>> But using the corresponding menu entries in the context menu I always get
>>> the SetLineAttributes() menu...
>>>
>>> You can reproduce it in the interpreter by:
>>> new TCanvas;
>>> TAttMarker m;
>>> m.SetMarkerAttributes();
>>>
>>> --> You get the SetPadAttributes() menu.
>>>
>>> I'm using root 4.04/02.
>>>
>>> Can somebody help me?
>>>
>>> Thanks in advance,
>>> Thomas.
>>>
>>
>
Received on Fri Jul 29 2005 - 15:05:52 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:11 MET