Do virtual functions have to be public?
<p>Here is the way I have my base class working:</p>

<pre><code>class AguiWidgetBase
{
    //variables
    AguiDockingEnum dockingStyle;
    std::string text;
    AguiRectangle clientRectangle;
    AguiColor tintColor;
    AguiColor fontColor;
    std::map&lt;int,int,CmpIntInt&gt; children;

    //private methods
    void zeroMemory();
    virtual void onPaint();
    virtual void onAddChildControl(AguiWidgetBase *control);
    virtual void onTintColorChanged(AguiColor color);
    virtual void onDockingStyleChanged(AguiDockingEnum style);
    virtual void onTextChanged(std::string text);
    virtual void onThemeChanged(const AguiTheme &amp;theme);
    void (*onPaintCallback)(AguiRectangle clientRect);
    void (*onTintColorChangedCallback)();
    void (*onDockingStyleChangedCallback)();
    void (*onTextChangedCallback)();
    void (*onThemeChangedCallback)();

protected:
    AguiWidgetBase *parentWidget;
public:
    AguiWidgetBase(void);
    ~AguiWidgetBase(void);

    void addChildControl(AguiWidgetBase *control);
    void removeChildControl(AguiWidgetBase *control);
    AguiWidgetBase* getParent();
    void paint();
    void setTintColor(AguiColor color);
    AguiColor getTintColor();
    void setDockingStyle(AguiDockingEnum style);
    AguiDockingEnum getDockingStyle();
    void setText(std::string text);
    std::string getText();
    void SetTheme( const AguiTheme &amp;theme);
};
</code></pre>

<p>Some of them work like this. There is a regular non-overridable funcion which calls the virtual function and the function pointer if its not NULL.</p>

<p>Will my virtual functions be able to once again go into the private scope when I create derived classes or must they be public?</p>

<p>I want to avoid them being public due to my design.
Thanks</p>
