From 6f55477ed036f3f60a9f467477fefc28c95bacd1 Mon Sep 17 00:00:00 2001 From: rods Date: Mon, 15 Jun 1998 22:05:24 +0000 Subject: [PATCH] removed radiogroup functionality --- widget/src/windows/nsRadioButton.cpp | 47 +--------------------------- widget/src/windows/nsRadioButton.h | 6 ---- 2 files changed, 1 insertion(+), 52 deletions(-) diff --git a/widget/src/windows/nsRadioButton.cpp b/widget/src/windows/nsRadioButton.cpp index 40cf454bf1c..c582e162dea 100644 --- a/widget/src/windows/nsRadioButton.cpp +++ b/widget/src/windows/nsRadioButton.cpp @@ -31,7 +31,6 @@ //------------------------------------------------------------------------- nsRadioButton::nsRadioButton(nsISupports *aOuter) : nsWindow(aOuter) { - fRadioGroup = NULL; } @@ -66,7 +65,7 @@ nsresult nsRadioButton::QueryObject(const nsIID& aIID, void** aInstancePtr) //------------------------------------------------------------------------- // -// Sets the state of the nsRadioButton but it DOES notify its nsRadioGroup. +// Sets the state of the nsRadioButton // //------------------------------------------------------------------------- void nsRadioButton::SetState(PRBool aState) @@ -74,20 +73,6 @@ void nsRadioButton::SetState(PRBool aState) fState = aState; ::SendMessage(GetWindowHandle(), BM_SETCHECK, (WPARAM)(fState), 0L); - if (nsnull != fRadioGroup) - fRadioGroup->Clicked(this); -} - -//------------------------------------------------------------------------- -// -// Sets the state of the nsRadioButton but it does not notify -// its nsRadioGroup. -// -//------------------------------------------------------------------------- -void nsRadioButton::SetStateNoNotify(PRBool aState) -{ - fState = aState; - ::SendMessage(GetWindowHandle(), BM_SETCHECK, (WPARAM)(fState), 0L); } //------------------------------------------------------------------------- @@ -100,36 +85,6 @@ PRBool nsRadioButton::GetState() return fState; } -//------------------------------------------------------------------------- -// -// Return the radio group this radio button belongs to -// -//------------------------------------------------------------------------- -nsIRadioGroup* nsRadioButton::GetRadioGroup() -{ - if (fRadioGroup) - fRadioGroup->AddRef(); - return fRadioGroup; -} - - -//------------------------------------------------------------------------- -// -// Set the radio button group -// -//------------------------------------------------------------------------- -void nsRadioButton::SetRadioGroup(nsIRadioGroup* aGroup) -{ - if (aGroup) - aGroup->AddRef(); - - if (fRadioGroup) - NS_RELEASE(fRadioGroup); - - fRadioGroup = aGroup; - fRadioGroup->Add(this); -} - //------------------------------------------------------------------------- // // Set this button label diff --git a/widget/src/windows/nsRadioButton.h b/widget/src/windows/nsRadioButton.h index ede2738b431..f682c5e4b3f 100644 --- a/widget/src/windows/nsRadioButton.h +++ b/widget/src/windows/nsRadioButton.h @@ -25,7 +25,6 @@ #include "nsString.h" #include "nsIRadioButton.h" -#include "nsIRadioGroup.h" /** @@ -57,15 +56,10 @@ public: virtual PRBool OnResize(nsRect &aWindowRect); virtual void SetState(PRBool aState); - virtual void SetStateNoNotify(PRBool aState); virtual PRBool GetState(); - virtual nsIRadioGroup* GetRadioGroup(); - virtual void SetRadioGroup(nsIRadioGroup* aGroup); - protected: PRBool fState; - nsIRadioGroup* fRadioGroup; virtual LPCTSTR WindowClass(); virtual DWORD WindowStyle();