diff --git a/src/apps/cdplayer/PlayList.cpp b/src/apps/cdplayer/PlayList.cpp index b4e2e96cc9..a7a01274e4 100644 --- a/src/apps/cdplayer/PlayList.cpp +++ b/src/apps/cdplayer/PlayList.cpp @@ -1,5 +1,7 @@ #include "PlayList.h" + #include + #include #include @@ -12,34 +14,36 @@ #define STRACE(x) /* nothing */ #endif + PlayList::PlayList(int16 count, int16 start) - : fTrackCount(count), - fTrackIndex(0), - fStartingTrack(start), - fRandom(false), - fLoop(false) + : + fTrackCount(count), + fTrackIndex(0), + fStartingTrack(start), + fRandom(false), + fLoop(false) { STRACE(("PlayList(count=%d,start=%d)\n",count,start)); - + srand(real_time_clock_usecs()); - - if(fTrackCount < 0) + + if (fTrackCount < 0) fTrackCount = 0; - else - if(fTrackCount > 500) + else if (fTrackCount > 500) fTrackCount = 500; - - if(fStartingTrack >= fTrackCount) + + if (fStartingTrack >= fTrackCount) fStartingTrack = fTrackCount - 1; - - if(fStartingTrack < 1) + + if (fStartingTrack < 1) fStartingTrack = 1; - - memset(fTrackList,-1,500); - + + memset(fTrackList, -1, 500); + Unrandomize(); } + void PlayList::SetTrackCount(const int16 &count) { @@ -47,23 +51,22 @@ PlayList::SetTrackCount(const int16 &count) STRACE(("PlayList::SetTrackCount(%d)\n",count)); - if(count <= 0) - { + if (count <= 0) { fTrackCount = 0; fTrackIndex = 0; } - else - if(count > 500) + else if (count > 500) fTrackCount = 500; else fTrackCount = count; - - memset(fTrackList,-1,500); + + memset(fTrackList, -1, 500); SetShuffle(IsShuffled()); - + fLocker.Unlock(); } + void PlayList::SetStartingTrack(const int16 &start) { @@ -76,8 +79,9 @@ PlayList::SetStartingTrack(const int16 &start) fLocker.Unlock(); } + void -PlayList::Rewind(void) +PlayList::Rewind() { STRACE(("PlayList::Rewind()\n")); fLocker.Lock(); @@ -87,13 +91,14 @@ PlayList::Rewind(void) fLocker.Unlock(); } + void PlayList::SetShuffle(const bool &random) { - STRACE(("PlayList::SetShuffle(%s)\n",random ? "random" : "sequential")); + STRACE(("PlayList::SetShuffle(%s)\n", random ? "random" : "sequential")); fLocker.Lock(); - - if(random) + + if (random) Randomize(); else Unrandomize(); @@ -103,69 +108,68 @@ PlayList::SetShuffle(const bool &random) fLocker.Unlock(); } + void PlayList::SetLoop(const bool &loop) { - STRACE(("PlayList::SetLoop(%s)\n",loop ? "loop" : "non-loop")); + STRACE(("PlayList::SetLoop(%s)\n", loop ? "loop" : "non-loop")); fLocker.Lock(); - + fLoop = loop; - + fLocker.Unlock(); } + void PlayList::SetCurrentTrack(const int16 &track) { STRACE(("PlayList::SetCurrentTrack(%d)\n",track)); - if(track < 0 || track > fTrackCount) + if (track < 0 || track > fTrackCount) return; - + fLocker.Lock(); - - for(int16 i=0; i (fTrackCount - fStartingTrack)) - { - if(fLoop) + + if (fTrackIndex > (fTrackCount - fStartingTrack)) { + if (fLoop) fTrackIndex = 0; - else - { + else { fLocker.Unlock(); STRACE(("PlayList::GetNextTrack()=-1 (track index out of range)\n")); return -1; @@ -181,24 +185,22 @@ PlayList::GetNextTrack(void) return value; } + int16 -PlayList::GetPreviousTrack(void) +PlayList::GetPreviousTrack() { fLocker.Lock(); - - if(fTrackCount < 1) - { + + if (fTrackCount < 1) { fLocker.Unlock(); STRACE(("PlayList::GetPreviousTrack()=-1 (no tracks)\n")); return -1; } - - if(fTrackIndex == 0) - { - if(fLoop) + + if (fTrackIndex == 0) { + if (fLoop) fTrackIndex = (fTrackCount - fStartingTrack); - else - { + else { fLocker.Unlock(); STRACE(("PlayList::GetPreviousTrack()=-1 (track index out of range)\n")); return -1; @@ -213,18 +215,18 @@ PlayList::GetPreviousTrack(void) return value; } + int16 -PlayList::GetLastTrack(void) +PlayList::GetLastTrack() { fLocker.Lock(); - - if(fTrackCount < 1) - { + + if (fTrackCount < 1) { fLocker.Unlock(); STRACE(("PlayList::GetLastTrack()=-1 (no tracks)\n")); return -1; } - + fTrackIndex = fTrackCount - 1; int16 value = fTrackList[fTrackIndex]; STRACE(("PlayList::GetLastTrack()=%d\n",value)); @@ -232,13 +234,13 @@ PlayList::GetLastTrack(void) return value; } + int16 -PlayList::GetFirstTrack(void) +PlayList::GetFirstTrack() { fLocker.Lock(); - if(fTrackCount < 1) - { + if (fTrackCount < 1) { fLocker.Unlock(); STRACE(("PlayList::GetFirstTrack()=-1 (no tracks)\n")); return -1; @@ -251,47 +253,47 @@ PlayList::GetFirstTrack(void) return value; } + void -PlayList::Randomize(void) +PlayList::Randomize() { STRACE(("PlayList::Randomize()\n")); // Reinitialize the count - for(int16 i=fStartingTrack; i<=fTrackCount; i++) + for (int16 i = fStartingTrack; i <= fTrackCount; i++) fTrackList[i - fStartingTrack] = i; // There are probably *much* better ways to do this, // but this is the only one I could think of. :( int32 listcount = (fTrackCount - fStartingTrack); - int32 swapcount = listcount* 2; + int32 swapcount = listcount * 2; int16 temp, first, second; - for(int32 i=0; i< swapcount; i++) - { + for (int32 i = 0; i < swapcount; i++) { // repeatedly pick two elements at random and swap them // This way we are sure to not have any duplicates and still have // all tracks eventually be played. - first = (int16)(listcount * ((float)rand()/RAND_MAX)); - second = (int16)(listcount * ((float)rand()/RAND_MAX)); - + first = (int16)(listcount * ((float)rand() / RAND_MAX)); + second = (int16)(listcount * ((float)rand() / RAND_MAX)); + temp = fTrackList[first]; fTrackList[first] = fTrackList[second]; fTrackList[second] = temp; } - + #ifdef DEBUG_PLAYLIST - for(int16 i=fStartingTrack; i<=fTrackCount; i++) - printf("\tSlot %d: track %d\n",i,fTrackList[i]); + for (int16 i = fStartingTrack; i <= fTrackCount; i++) + printf("\tSlot %d: track %d\n", i, fTrackList[i]); #endif } + void -PlayList::Unrandomize(void) +PlayList::Unrandomize() { STRACE(("PlayList::Unrandomize()\n")); - for(int16 i=fStartingTrack; i<=fTrackCount; i++) + for (int16 i = fStartingTrack; i <= fTrackCount; i++) fTrackList[i - fStartingTrack] = i; } - diff --git a/src/apps/cdplayer/PlayList.h b/src/apps/cdplayer/PlayList.h index fbf3a67b50..39abc74d4c 100644 --- a/src/apps/cdplayer/PlayList.h +++ b/src/apps/cdplayer/PlayList.h @@ -1,50 +1,49 @@ #ifndef PLAYLIST_H #define PLAYLIST_H -#include #include +#include -class PlayList -{ -public: - PlayList(int16 tracks = 0, int16 startingtrack = 1); - - void SetTrackCount(const int16 &count); - int16 TrackCount(void) const { return fTrackCount; } +class PlayList { + public: + PlayList(int16 tracks = 0, int16 startingtrack = 1); - void SetStartingTrack(const int16 &start); - int16 StartingTrack(void) const { return fStartingTrack; } + void SetTrackCount(const int16 &count); + int16 TrackCount() const { return fTrackCount; } + + void SetStartingTrack(const int16 &start); + int16 StartingTrack() const { return fStartingTrack; } + + void Rewind(); + + void SetShuffle(const bool &random); + bool IsShuffled() const { return fRandom; } + + void SetLoop(const bool &loop); + bool IsLoop() const { return fLoop; } - void Rewind(void); + void SetCurrentTrack(const int16 &track); + int16 GetCurrentTrack(); - void SetShuffle(const bool &random); - bool IsShuffled(void) const { return fRandom; } - - void SetLoop(const bool &loop); - bool IsLoop(void) const { return fLoop; } - - void SetCurrentTrack(const int16 &track); - int16 GetCurrentTrack(void); - - int16 GetNextTrack(void); - int16 GetPreviousTrack(void); - - int16 GetFirstTrack(void); - int16 GetLastTrack(void); - -private: - void Randomize(void); - void Unrandomize(void); - - int16 fTrackCount; - int16 fTrackIndex; - int16 fStartingTrack; - int16 fTrackList[500]; // This should be big enough. :) - - bool fRandom; - bool fLoop; - - BLocker fLocker; + int16 GetNextTrack(); + int16 GetPreviousTrack(); + + int16 GetFirstTrack(); + int16 GetLastTrack(); + + private: + void Randomize(); + void Unrandomize(); + + int16 fTrackCount; + int16 fTrackIndex; + int16 fStartingTrack; + int16 fTrackList[500]; // This should be big enough. :) + + bool fRandom; + bool fLoop; + + BLocker fLocker; }; -#endif +#endif // PLAYLIST_H diff --git a/src/apps/cdplayer/TrackMenu.cpp b/src/apps/cdplayer/TrackMenu.cpp index b1e43351c5..02e547aa9d 100644 --- a/src/apps/cdplayer/TrackMenu.cpp +++ b/src/apps/cdplayer/TrackMenu.cpp @@ -1,22 +1,24 @@ +#include "TrackMenu.h" + +#include #include #include -#include #include -#include -#include "TrackMenu.h" +#include + #include + TrackMenu::TrackMenu(const BRect &frame, const char *name, BMessage *msg, - const int32 &resize, const int32 &flags) - : BView(frame,name,resize,flags), - BInvoker(msg,NULL), + const int32 &resize, const int32 &flags) + : BView(frame, name, resize, flags), BInvoker(msg, NULL), fCurrentItem(-1), fCount(0), fIsTracking(false) { - SetViewColor(20,20,20); + SetViewColor(20, 20, 20); - fItemRect.Set(1,1,1 + StringWidth("00") + 3, Bounds().bottom - 1); + fItemRect.Set(1, 1, 1 + StringWidth("00") + 3, Bounds().bottom - 1); BFont font; font.SetSize(11); @@ -29,254 +31,241 @@ TrackMenu::TrackMenu(const BRect &frame, const char *name, BMessage *msg, fFontHeight = fh.ascent + fh.descent + fh.leading; } -TrackMenu::~TrackMenu(void) + +TrackMenu::~TrackMenu() { } + void -TrackMenu::AttachedToWindow(void) +TrackMenu::AttachedToWindow() { if (!Messenger().IsValid()) SetTarget(Window()); BView::AttachedToWindow(); } + void TrackMenu::MessageReceived(BMessage *msg) { - switch(msg->what) - { + switch (msg->what) { default: - { BView::MessageReceived(msg); break; - } } } + void TrackMenu::SetItemCount(const int32 &count) { - if(count < 0) - { + if (count < 0) { fCount = 0; fCurrentItem = -1; Invalidate(); return; } - + fCount = count; - - if(fCurrentItem > fCount - 1) + + if (fCurrentItem > fCount - 1) fCurrentItem = fCount - 1; - else - if(fCurrentItem < 0) + else if(fCurrentItem < 0) fCurrentItem = 0; - + Invalidate(); } + void TrackMenu::SetValue(const int32 &value) { - if(value < 0 || value > fCount) + if (value < 0 || value > fCount) return; - - if(value != Value()) - { + + if (value != Value()) { fCurrentItem = value; Invalidate(); } } + int32 TrackMenu::ItemAt(const BPoint &pt) { // TODO: Optimize. This is simple, but costly in performance BRect r(fItemRect); - for(int32 i=0; i= 0) - { + + if (item >= 0) { fCurrentItem = item; Invalidate(); - + // Shamelessly stolen from BButton. :D - if (Window()->Flags() & B_ASYNCHRONOUS_CONTROLS) - { + if (Window()->Flags() & B_ASYNCHRONOUS_CONTROLS) { SetMouseEventMask(B_POINTER_EVENTS, B_LOCK_WINDOW_FOCUS); fIsTracking = true; - } else - { + } else { uint32 buttons; - - do - { + + do { Window()->UpdateIfNeeded(); - + snooze(40000); - + GetMouse(&pt, &buttons, true); - + int32 mouseitem = ItemAt(pt); - if(mouseitem > -1) - { + if (mouseitem > -1) { fCurrentItem = mouseitem; Draw(Bounds()); } - + } while (buttons != 0); - - if(fCurrentItem != saveditem) + + if (fCurrentItem != saveditem) Invoke(); } } } + void TrackMenu::MouseUp(BPoint pt) { - if(!fIsTracking) + if (!fIsTracking) return; int32 item = ItemAt(pt); - - if(item >= 0) + + if (item >= 0) Invoke(); - + fIsTracking = false; } + void TrackMenu::MouseMoved(BPoint pt, uint32 transit, const BMessage *msg) { - if(!fIsTracking) + if (!fIsTracking) return; int32 item = ItemAt(pt); - - if(item >= 0) - { + + if (item >= 0) { fCurrentItem = item; Invalidate(); } } + void TrackMenu::Draw(BRect update) { - rgb_color dark = {20,20,20,255}; - rgb_color light = {200,200,200,255}; - BPoint pt1,pt2; - + rgb_color dark = {20, 20, 20, 255}; + rgb_color light = {200, 200, 200, 255}; + BPoint pt1, pt2; + // Draw the frame SetHighColor(dark); - pt1.Set(0,0); + pt1.Set(0, 0); pt2 = Bounds().RightTop(); - StrokeLine(pt1,pt2); - - pt2.Set(0,Bounds().bottom); - StrokeLine(pt1,pt2); - + StrokeLine(pt1, pt2); + + pt2.Set(0, Bounds().bottom); + StrokeLine(pt1, pt2); + SetHighColor(255,255,255); pt1 = Bounds().RightBottom(); pt2.Set(Bounds().right, 1); - StrokeLine(pt1,pt2); - + StrokeLine(pt1, pt2); + pt2.Set(1,Bounds().bottom); - StrokeLine(pt1,pt2); - + StrokeLine(pt1, pt2); + // Draw the items BRect r(fItemRect); - - for(int32 i=0; i Bounds().right - 2) - { + r.OffsetBy(r.Width() + 1, 0); + + if (r.left > Bounds().right - 2) { ConstrainClippingRegion(NULL); break; } - - if(r.right > Bounds().right - 2) - { + + if (r.right > Bounds().right - 2) { r.right = Bounds().right - 2; BRegion reg(r); ConstrainClippingRegion(®); diff --git a/src/apps/cdplayer/TrackMenu.h b/src/apps/cdplayer/TrackMenu.h index c7ee3dbc2e..2e5abc67be 100644 --- a/src/apps/cdplayer/TrackMenu.h +++ b/src/apps/cdplayer/TrackMenu.h @@ -1,40 +1,39 @@ #ifndef TRACKMENU_H #define TRACKMENU_H -#include #include +#include -class TrackMenu : public BView, public BInvoker -{ -public: - TrackMenu(const BRect &frame, const char *name, BMessage *msg, - const int32 &resize = B_FOLLOW_LEFT | B_FOLLOW_TOP, - const int32 &flags = B_WILL_DRAW); - ~TrackMenu(void); +class TrackMenu : public BView, public BInvoker { + public: + TrackMenu(const BRect &frame, const char *name, BMessage *msg, + const int32 &resize = B_FOLLOW_LEFT | B_FOLLOW_TOP, + const int32 &flags = B_WILL_DRAW); + ~TrackMenu(); - void AttachedToWindow(void); - void MessageReceived(BMessage *msg); - void Draw(BRect update); - void MouseDown(BPoint pt); - void MouseUp(BPoint pt); - void MouseMoved(BPoint pt, uint32 transit, const BMessage *msg); - - int32 CountItems(void) const { return fCount; } - void SetItemCount(const int32 &count); - - int32 Value(void) const { return fCurrentItem; } - void SetValue(const int32 &value); - -private: - int32 ItemAt(const BPoint &pt); - - int32 fCurrentItem; - int32 fCount; - BRect fItemRect; - - bool fIsTracking; - - float fFontHeight; + void AttachedToWindow(); + void MessageReceived(BMessage *msg); + void Draw(BRect update); + void MouseDown(BPoint pt); + void MouseUp(BPoint pt); + void MouseMoved(BPoint pt, uint32 transit, const BMessage *msg); + + int32 CountItems() const { return fCount; } + void SetItemCount(const int32 &count); + + int32 Value() const { return fCurrentItem; } + void SetValue(const int32 &value); + + private: + int32 ItemAt(const BPoint &pt); + + int32 fCurrentItem; + int32 fCount; + BRect fItemRect; + + bool fIsTracking; + + float fFontHeight; }; -#endif +#endif // TRACKMENU_H diff --git a/src/apps/cdplayer/TwoStateDrawButton.cpp b/src/apps/cdplayer/TwoStateDrawButton.cpp index 20c2789b9a..8ec9019bf8 100644 --- a/src/apps/cdplayer/TwoStateDrawButton.cpp +++ b/src/apps/cdplayer/TwoStateDrawButton.cpp @@ -3,15 +3,17 @@ * Distributed under the terms of the MIT license. * * Author: - * DarkWyrm + * DarkWyrm, bpmagic@columbus.rr.com */ + + #include "TwoStateDrawButton.h" + TwoStateDrawButton::TwoStateDrawButton(BRect frame, const char *name, BBitmap *upone, - BBitmap *downone, BBitmap *uptwo, - BBitmap *downtwo, BMessage *msg, - const int32 &resize, const int32 &flags) - : BButton(frame, name, "", msg, resize, flags), + BBitmap *downone, BBitmap *uptwo, BBitmap *downtwo, BMessage *msg, + const int32 &resize, const int32 &flags) + : BButton(frame, name, "", msg, resize, flags), fUpOne(upone), fDownOne(downone), fUpTwo(uptwo), @@ -25,7 +27,7 @@ TwoStateDrawButton::TwoStateDrawButton(BRect frame, const char *name, BBitmap *u } -TwoStateDrawButton::~TwoStateDrawButton(void) +TwoStateDrawButton::~TwoStateDrawButton() { delete fUpOne; delete fDownOne; @@ -37,37 +39,32 @@ TwoStateDrawButton::~TwoStateDrawButton(void) void -TwoStateDrawButton::ResizeToPreferred(void) +TwoStateDrawButton::ResizeToPreferred() { - if(fUpOne) - ResizeTo(fUpOne->Bounds().Width(),fUpOne->Bounds().Height()); - else - if(fDownOne) - ResizeTo(fDownOne->Bounds().Width(),fDownOne->Bounds().Height()); - else - if(fUpTwo) + if (fUpOne) + ResizeTo(fUpOne->Bounds().Width(), fUpOne->Bounds().Height()); + else if (fDownOne) + ResizeTo(fDownOne->Bounds().Width(), fDownOne->Bounds().Height()); + else if (fUpTwo) ResizeTo(fUpTwo->Bounds().Width(),fUpTwo->Bounds().Height()); - else - if(fDownTwo) - ResizeTo(fDownTwo->Bounds().Width(),fDownTwo->Bounds().Height()); - else - if(fDisabledOne) - ResizeTo(fDisabledOne->Bounds().Width(),fDisabledOne->Bounds().Height()); - else - if(fDisabledTwo) - ResizeTo(fDisabledTwo->Bounds().Width(),fDisabledTwo->Bounds().Height()); + else if (fDownTwo) + ResizeTo(fDownTwo->Bounds().Width(), fDownTwo->Bounds().Height()); + else if (fDisabledOne) + ResizeTo(fDisabledOne->Bounds().Width(), fDisabledOne->Bounds().Height()); + else if(fDisabledTwo) + ResizeTo(fDisabledTwo->Bounds().Width(), fDisabledTwo->Bounds().Height()); } void TwoStateDrawButton::SetBitmaps(BBitmap *upone, BBitmap *downone, BBitmap *uptwo, - BBitmap *downtwo) + BBitmap *downtwo) { delete fUpOne; delete fDownOne; delete fUpTwo; delete fDownTwo; - + fUpOne = upone; fDownOne = downone; fUpTwo = uptwo; @@ -115,7 +112,7 @@ TwoStateDrawButton::MouseUp(BPoint pt) void TwoStateDrawButton::SetState(int32 value) { - if(fButtonState != value) { + if (fButtonState != value) { fButtonState = (value == 0) ? false : true; Invalidate(); } @@ -125,46 +122,45 @@ TwoStateDrawButton::SetState(int32 value) void TwoStateDrawButton::Draw(BRect update) { - if(fButtonState) { - if(!IsEnabled()) { - if(fDisabledTwo) + if (fButtonState) { + if (!IsEnabled()) { + if (fDisabledTwo) DrawBitmap(fDisabledTwo, BPoint(0,0)); else StrokeRect(Bounds()); return; } - if(Value() == B_CONTROL_ON) { - if(fDownTwo) + if (Value() == B_CONTROL_ON) { + if (fDownTwo) DrawBitmap(fDownTwo, BPoint(0,0)); else StrokeRect(Bounds()); } else { - if(fUpTwo) + if (fUpTwo) DrawBitmap(fUpTwo, BPoint(0,0)); else StrokeRect(Bounds()); } } else { - if(!IsEnabled()) { - if(fDisabledOne) + if (!IsEnabled()) { + if (fDisabledOne) DrawBitmap(fDisabledOne, BPoint(0,0)); else StrokeRect(Bounds()); return; } - - if(Value() == B_CONTROL_ON) { - if(fDownOne) + + if (Value() == B_CONTROL_ON) { + if (fDownOne) DrawBitmap(fDownOne, BPoint(0,0)); else StrokeRect(Bounds()); - } else { - if(fUpOne) + } else { + if (fUpOne) DrawBitmap(fUpOne, BPoint(0,0)); else StrokeRect(Bounds()); } } } - diff --git a/src/apps/cdplayer/TwoStateDrawButton.h b/src/apps/cdplayer/TwoStateDrawButton.h index 58bdbdf455..65d7080ecf 100644 --- a/src/apps/cdplayer/TwoStateDrawButton.h +++ b/src/apps/cdplayer/TwoStateDrawButton.h @@ -8,44 +8,44 @@ #ifndef _TWOSTATE_DRAWBUTTON_H #define _TWOSTATE_DRAWBUTTON_H -#include -#include + #include #include +#include +#include -class TwoStateDrawButton : public BButton -{ -public: - TwoStateDrawButton(BRect frame, const char *name, BBitmap *upone, - BBitmap *downone, BBitmap *uptwo, BBitmap *downtwo, - BMessage *msg, const int32 &resize, - const int32 &flags); - ~TwoStateDrawButton(void); +class TwoStateDrawButton : public BButton { + public: + TwoStateDrawButton(BRect frame, const char *name, BBitmap *upone, + BBitmap *downone, BBitmap *uptwo, BBitmap *downtwo, + BMessage *msg, const int32 &resize, const int32 &flags); - void Draw(BRect update); + ~TwoStateDrawButton(); - void SetBitmaps(BBitmap *upone, BBitmap *downone, BBitmap *uptwo, - BBitmap *downtwo); - void SetBitmaps(const int32 state, BBitmap *up, BBitmap *down); - void ResizeToPreferred(void); - void SetDisabled(BBitmap *disabledone, BBitmap *disabledtwo); - void MouseUp(BPoint pt); - - int32 GetState(void) { return fButtonState ? 1 : 0; }; - void SetState(int32 value); - -private: - - BBitmap *fUpOne, - *fDownOne, - *fUpTwo, - *fDownTwo, - *fDisabledOne, - *fDisabledTwo; - + void Draw(BRect update); + + void SetBitmaps(BBitmap *upone, BBitmap *downone, BBitmap *uptwo, + BBitmap *downtwo); + + void SetBitmaps(const int32 state, BBitmap *up, BBitmap *down); + void ResizeToPreferred(); + void SetDisabled(BBitmap *disabledone, BBitmap *disabledtwo); + void MouseUp(BPoint pt); + + int32 GetState() { return fButtonState ? 1 : 0; }; + void SetState(int32 value); + + private: + BBitmap *fUpOne, + *fDownOne, + *fUpTwo, + *fDownTwo, + *fDisabledOne, + *fDisabledTwo; + + bool fButtonState; // true if in state two - bool fButtonState; }; -#endif +#endif // _TWOSTATE_DRAWBUTTON_H