- TransportButton(BRect frame, const char *name,
- const unsigned char *normalBits,
- const unsigned char *pressedBits,
- const unsigned char *disabledBits,
- BMessage *invokeMessage, // done pressing over button
- BMessage *startPressingMessage = 0, // just clicked button
- BMessage *pressingMessage = 0, // periodical still pressing
- BMessage *donePressing = 0, // tracked out of button/didn't invoke
- bigtime_t period = 0, // pressing message period
- uint32 key = 0, // optional shortcut key
- uint32 modifiers = 0, // optional shortcut key modifier
- uint32 resizeFlags = B_FOLLOW_LEFT | B_FOLLOW_TOP);
-
- virtual ~TransportButton();
-
- void SetStartPressingMessage(BMessage *);
- void SetPressingMessage(BMessage *);
- void SetDonePressingMessage(BMessage *);
- void SetPressingPeriod(bigtime_t);
-
- virtual void SetEnabled(bool);
-
-protected:
-
- enum {
- kDisabledMask = 0x1,
- kPressedMask = 0x2
- };
-
- virtual void AttachedToWindow();
- virtual void DetachedFromWindow();
- virtual void Draw(BRect);
- virtual void MouseDown(BPoint);
- virtual void MouseMoved(BPoint, uint32 code, const BMessage *);
- virtual void MouseUp(BPoint);
- virtual void WindowActivated(bool);
-
- virtual BBitmap *MakeBitmap(uint32);
- // lazy bitmap builder
-
- virtual uint32 ModeMask() const;
- // mode mask corresponding to the current button state
- // - determines which bitmap will be used
- virtual const unsigned char *BitsForMask(uint32) const;
- // pick the right bits based on a mode mask
-
- // overriding class can add swapping between two pairs of bitmaps, etc.
- virtual void StartPressing();
- virtual void MouseCancelPressing();
- virtual void DonePressing();
+ TransportButton(BRect frame, const char *name,
+ const unsigned char *normalBits,
+ const unsigned char *pressedBits,
+ const unsigned char *disabledBits,
+ BMessage *invokeMessage, // done pressing over button
+ BMessage *startPressingMessage = 0, // just clicked button
+ BMessage *pressingMessage = 0, // periodical still pressing
+ BMessage *donePressing = 0, // tracked out of button/didn't invoke
+ bigtime_t period = 0, // pressing message period
+ uint32 key = 0, // optional shortcut key
+ uint32 modifiers = 0, // optional shortcut key modifier
+ uint32 resizeFlags = B_FOLLOW_LEFT | B_FOLLOW_TOP);
+
+ virtual ~TransportButton();
+
+ void SetStartPressingMessage(BMessage *);
+ void SetPressingMessage(BMessage *);
+ void SetDonePressingMessage(BMessage *);
+ void SetPressingPeriod(bigtime_t);
+
+ virtual void SetEnabled(bool);
+
+protected:
+
+ enum {
+ kDisabledMask = 0x1,
+ kPressedMask = 0x2
+ };
+
+ virtual void AttachedToWindow();
+ virtual void DetachedFromWindow();
+ virtual void Draw(BRect);
+ virtual void MouseDown(BPoint);
+ virtual void MouseMoved(BPoint, uint32 code, const BMessage *);
+ virtual void MouseUp(BPoint);
+ virtual void WindowActivated(bool);
+
+ virtual BBitmap *MakeBitmap(uint32);
+ // lazy bitmap builder
+
+ virtual uint32 ModeMask() const;
+ // mode mask corresponding to the current button state
+ // - determines which bitmap will be used
+ virtual const unsigned char *BitsForMask(uint32) const;
+ // pick the right bits based on a mode mask
+
+ // overriding class can add swapping between two pairs of bitmaps, etc.
+ virtual void StartPressing();
+ virtual void MouseCancelPressing();
+ virtual void DonePressing();