Inheritance diagram for CP_Dialog:
Public Types | |
enum | { kCP_DialogModality_Modal, kCP_DialogModality_Modeless } |
Public Member Functions | |
void | SetID (FourCharCode inIdentifier) |
FourCharCode | GetID () |
void | RegisterSignal (const CP_SignalHolder &inSignal) |
CP_DataValueSignal * | FindSignal (const CP_String &inSignalName) |
UInt32 | GetNumberSignals () |
CP_String | GetNthSignalName (UInt32 inSignalIndex) |
void | RegisterSlot (const CP_SlotHolder &inSlot) |
CP_DataValueSlot | FindSlot (const CP_String &inSlotName) |
UInt32 | GetNumberSlots () |
CP_String | GetNthSlotName (UInt32 inSlotIndex) |
template<class R, class P1, class P2> | |
CP_CommandHandlerSignal * | Connect (CPLAT::CP_CommandNo cmd, void(R::*handler)(P1, P2), SInt32 mode) |
template<class R, class P1, class P2> | |
void | Connect (CP_Object *control, const CPLAT::CP_String &signalName, void(R::*handler)(P1, P2)) |
void | disconnect_all () |
void | signal_connect (CP_Signal *inSender) |
void | signal_disconnect (CP_Signal *inSender) |
Constructor / Destructor | |
CP_Dialog () | |
Constructor. | |
virtual | ~CP_Dialog () throw () |
Destructor. | |
Initialization | |
void | Create (const CP_Point &inUpperLeft, const CP_Size &inContentSize, const CP_String &inWindowTitle, const CP_WindowTypeBase &inWindowType) |
void | CreateButtons (const CP_String &inDefaultButtonText, const CP_String &inCancelButtonText) |
Events | |
void | Run (SInt16 inModal=kCP_DialogModality_Modal) |
Getters | |
CP_Window * | GetWindow () |
Setters | |
void | SetModality (CP_DialogModality *inModality) |
void | SetModality (WindowModality inWindowModality, CP_Window *inParentWindow=NULL) |
Static Public Member Functions | |
static void | Connect (CP_Object *sender, const CP_String &signalName, CP_Object *receiver, const CP_String &slotName, const bool reciprocal=false) |
static void | Connect (CP_Object *sender, CP_Object *receiver, const bool reciprocal=false, const CP_String &signalName=kCP_Signal_ValueChanged, const CP_String &slotName=kCP_Slot_SetValue) |
Protected Member Functions | |
Slots | |
void | DismissButtonClicked (CP_DataValueHolder &inValue, OSStatus &inOutStatus) |
void | CancelButtonClicked (CP_DataValueHolder &inValue, OSStatus &inOutStatus) |
Protected Attributes | |
CP_Window * | fDialogWindow |
CP_DialogModality * | fDialogModality |
CP_DataValueSignal | fDismissDialogSignal |
CP_DataValueSignal | fCancelDialogSignal |
CP_Signals_Array * | fSignals |
CP_Slots_Array * | fSlots |
FourCharCode | fObjectID |
sender_set | fSenders |
Static Protected Attributes | |
static FourCharCode | fObjectIDCount = 0 |
|
|
|
Constructor.
|
|
Destructor.
|
|
Creates the dialogs main window from the passed in params. Use this if you want to create just the dialogs window, and then will populate the dialog with views.
|
|
Creates the default and optionally cancel buttons for the dialog. The cancel button will only be created if the inCancelButtonText is not empty, otherwise only the default button is created. The buttons will be assigned the following object ids: DefaultButton - kCP_DefaultButtonObjectID, CancelButton - kCP_CancelButtonObjectID
|
|
Runs the dialog event loop. Call this once the dialog has been created and you want to handle the events for the dialog.
|
|
Returns the CP_Window used to display the dialogs views.
|
|
Sets the dialogs modality.
|
|
Sets the modality of the dialogs window.
|
|
Called when the user has clicked on the dismiss button. This will send out a kCP_Signal_DismissDialog which you can listen for and handle any action needed when the user wants to dismiss the dialog. If you want the dialog to be dismissed, then return CP_noErr from this signal, otherwise the dialog will not be dismissed. You might not want to return CP_noErr to dismiss the dialog, if say an edit field did not contain a valid value. This gives you a chance to validate the data in the dialog before it is dismissed.
|
|
Called when the user has clicked on the cancel button. This will send out a kCP_Signal_CancelDialog which you can listen for and handle any action needed when the user wants to dismiss the dialog. If you want the dialog to be dismissed, then return CP_noErr from this signal, otherwise the dialog will not be dismissed. You might not want to return CP_noErr to dismiss the dialog, if say an edit field did not contain a valid value. This gives you a chance to validate the data in the dialog before it is dismissed.
|
|
Sets the identifier for this object. If a specific identifier is not set with this function, then a default id is used, which is simply a running count of the number of objects created.
|
|
Returns the objects identifier.
|
|
Registers the signal / signal name contained in the passed in inSignal object.
|
|
Finds the CP_DataValueSignal object that matches the passed in inSignalName.
|
|
Returns the number of signals for this object.
|
|
Returns the signal name of the passed in signal index.
|
|
Registers the slot / slot name contained in the passed in inSlot object.
|
|
Finds the CP_Slot1 object that matches the passed in inSlotName.
|
|
Returns the number of slots for this object.
|
|
Returns the slot name of the passed in signal index.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CP_Window used to display the dialog. |
|
Modality of the dialog. |
|
Signal sent when the dismiss button is clicked. |
|
|
|
List of registered signals for this object. |
|
List of registered slots for this object. |
|
Object identifier. |
|
|