Re: bells and whistle in Gtkmm



Yah! as in the message below, there is a problem here, obviously the writer did not want this class to be used directly. So what I have done is derive a class from it, and that solve the problem!
namespace hamd
class Display : virtual public Gdk::Display{
  public: Display(){}
};
}

#include <gdkmm/display.h>
class SomeClass{
public:
     hamd::Display display;
     void someMethod();
};
---------\
void SomeClass::someMethod(){
         display.beep();
}




Jamiil wrote:
Thanks Mohamed for the help!
I read the documentation and it is exactly what I am looking for and more. However, the compiler complains saying that Display() is protected and in Gdk::Display::Display *is a 'protected' method (?)
What can I do to fix this problem?

Thanks
-------
#include <gdkmm/display.h>
class SomeClass{
...
public:
...Gdk::Display display;
  void someMethod();
};
---------\
void SomeClass::someMethod(){
display.beep();
}




--
Know this... God will move heavens and earth to do what you cannot do and that He will not for something you can.

Happiness has many doors, and when one of them closes another opens, yet we spent so much time looking at the one that is shut that we don't see the one that just opened..



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]