Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > PHP/MySQL/Scripting

  • Print
  • + Share This
Like this article? We recommend

Widget Class

Listing 4 illustrates the Widget base class. Notice that this class is very clean and generic just as was the case for ConnectionDirector.

Listing 4 Widget Base Class

class Widget
  explicit Widget(ConnectionDirector*);
  virtual void Changed();

  ConnectionDirector* _director;

Each widget contains a pointer to its director (or mediator), which is what enables it to inform the director (or mediator) of changes to the widget. Because we have two widget subclasses (for paths and QoS entities), let’s now see how to subclass the Widget.

  • + Share This
  • 🔖 Save To Your Account