Re: MyEntryBox



>     Gtk::Entry *get_entry(void) const { return &entry; }
>     Gtk::Label *get_label(void) const ( return &label; }

By the way, in general, you want accessors that return pointers to be
like this:

class Something
{
...
  Gtk::Entry* Something::get_entry(); 
  const Gtk::Entry* Something::get_entry() const;
...

That way you can still use const functions of the Entry when the
Something is const, and you are not allowed to use const functions of
the Entry when Something is const.

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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