#include <radio.h>
Public Member Functions | |
RadioGroup (DialogOp *pDialog=NULL, CGadgetAssociation *AssocArray=NULL, UINT32 NumGadgets=0) | |
BOOL | SetAssociations (DialogOp *pDialog, CGadgetAssociation *AssocArray, UINT32 NumGadgets) |
Sets up the RadioGroup. Call prior to any other member. | |
CCObject * | GetDefault () |
Allows the setting of a new ApplyNow state. | |
BOOL | SetDefault (CCObject *pDefaultObject) |
Sets the gadget associated with the given object as the default (using SetBoolGadgetSelected). | |
UINT32 | GetRadioBoxCount () |
BOOL | Disable () |
Disables all the radio items in this group. | |
BOOL | Enable () |
Disables all the radio items in this group. | |
CCObject * | GetSelected () |
Allows the setting of a new ApplyNow state. | |
Protected Attributes | |
DialogOp * | m_pDialog |
CGadgetAssociation * | m_Associations |
UINT32 | m_nNumAssociations |
Private Member Functions | |
CC_DECLARE_MEMDUMP (RadioGroup) |
static CGadgetAssociation ColourUnitAssociations[NUM_GADGETS] = { {_R(IDC_GADGET1), PointerToObject1}, {_R(IDC_GADGET2), PointerToObject2} }; MonoOff:
This class is under construction and will probably change.
Scope: public
Definition at line 153 of file radio.h.
|
Definition at line 158 of file radio.h. 00158 : 00159 m_pDialog(pDialog), m_Associations(AssocArray), m_nNumAssociations(NumGadgets) {}
|
|
|
|
Disables all the radio items in this group.
Definition at line 184 of file radio.cpp. 00185 { 00186 ERROR2IF(m_pDialog == NULL, FALSE, "RadioGroup::Disable - m_pDialog not set"); 00187 00188 for (UINT32 i = 0; i < GetRadioBoxCount(); i++) 00189 { 00190 m_pDialog->EnableGadget(m_Associations[i].m_GadgetID, FALSE); 00191 } 00192 return TRUE; 00193 }
|
|
Disables all the radio items in this group.
Definition at line 211 of file radio.cpp. 00212 { 00213 ERROR2IF(m_pDialog == NULL, FALSE, "RadioGroup::Disable - m_pDialog not set"); 00214 00215 for (UINT32 i = 0; i < GetRadioBoxCount(); i++) 00216 { 00217 m_pDialog->EnableGadget(m_Associations[i].m_GadgetID, FALSE); 00218 } 00219 return TRUE; 00220 }
|
|
Allows the setting of a new ApplyNow state.
Definition at line 161 of file radio.cpp. 00162 { 00163 ERROR3IF(TRUE, "RadioGroup::GetDefault() - not implemented"); 00164 00165 return NULL; 00166 }
|
|
Definition at line 164 of file radio.h. 00164 {return m_nNumAssociations;}
|
|
Allows the setting of a new ApplyNow state.
Definition at line 268 of file radio.cpp. 00269 { 00270 ERROR2IF(m_pDialog == NULL, NULL, "RadioGroup::GetSelected - m_pDialog not set"); 00271 00272 for (UINT32 i = 0; i < GetRadioBoxCount(); i++) 00273 { 00274 if (m_pDialog->GetBoolGadgetSelected(m_Associations[i].m_GadgetID)) 00275 return (m_Associations[i].m_pObject); 00276 00277 } 00278 ERROR3IF(TRUE, "RadioGroup::GetSelected() - None selected"); 00279 return NULL; 00280 }
|
|
Sets up the RadioGroup. Call prior to any other member.
Definition at line 134 of file radio.cpp. 00135 { 00136 ERROR2IF(pDialog == NULL, FALSE, "RadioGroup::SetAssociations() - pDialog NULL"); 00137 ERROR2IF(AssocArray == NULL, FALSE, "RadioGroup::SetAssociations() - AssocArray NULL"); 00138 ERROR2IF(NumGadgets == 0, FALSE, "RadioGroup::SetAssociations() - NumGadgets is zero"); 00139 00140 m_pDialog = pDialog; 00141 m_Associations = AssocArray; 00142 m_nNumAssociations = NumGadgets; 00143 return TRUE; 00144 }
|
|
Sets the gadget associated with the given object as the default (using SetBoolGadgetSelected).
Definition at line 240 of file radio.cpp. 00241 { 00242 ERROR2IF(m_pDialog == NULL, FALSE, "RadioGroup::SetDefault - m_pDialog not set"); 00243 00244 for (UINT32 i = 0; i < GetRadioBoxCount(); i++) 00245 { 00246 if (m_Associations[i].m_pObject == pDefaultObject) 00247 return (m_pDialog->SetBoolGadgetSelected(m_Associations[i].m_GadgetID, TRUE)); 00248 } 00249 ERROR3IF(TRUE, "RadioGroup::SetDefault - pDefaultObject not in RadioGroup"); 00250 return FALSE; 00251 }
|
|
|
|
|
|
|