René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -
 

ListBox [Ming wrapper class]

The source

ListBox.h
#include "SWFMovie.h"

#include "ScrollBar.h"

/* A list box shows a portion of a Plane */

class ListBox : public MovieClip {
  public:
    ListBox(int width, int height);

    void Plane(MovieClip&);

  protected:
    Shape     plane_mask_;
    MovieClip plane_;
    ScrollBar horizontal_sb_;
    ScrollBar vertical_sb_;

    int width_;
    int height_;

    int width_plane_;
    int height_plane_;

    /* See MovieClip_::AfterAdding */

    virtual void BeforeAdding();
    virtual void AfterAdding(DisplayClip&);
};
ListBox.cpp
#include "ListBox.h"

ListBox::ListBox(int width, int height)  :
  width_ (width ),
  height_(height)
{
}

void ListBox::BeforeAdding() {

}

void ListBox::AfterAdding(DisplayClip& d) {
  MovieClip::AfterAdding(d);
  NextFrame();
}

void ListBox::Plane(MovieClip&) {

}