/* * Class PaintedPushButton is a subclass of PushButton that uses a stenciled * bitmap as its background rather than the standard ovaled text label. */ #ifndef paintbuttonIncluded #define paintbuttonIncluded #include class PaintedPushButton : public PushButton { public: PaintedPushButton(Bitmap* bm, ButtonState* bs, int value); /* * Construct with the given bitmap as background. */ PaintedPushButton(const char* filename, ButtonState* bs, int value); /* * Construct with the given bitmap file as background. */ virtual void Refresh(); virtual void Redraw(Coord l, Coord b, Coord r, Coord t); virtual void Reconfig(); protected: void Init(); Bitmap* bm; /* X11 bitmap to be stenciled as background. */ Painter* normal; /* Painter for normal bitmap config. */ Painter* highlight; /* Painter for inversed bitmap config (when button is * pressed). */ }; #endif